/* Context Passport: passport.cloudytuesdays.com
   One stylesheet, no web fonts, no scripts (CSP: default-src 'none'; style-src 'self').
   Orbit brand: paper, ink, and one accent (coral). Coral is used for shapes and underlines,
   never for small text on paper; text on coral is always ink. */

/* ---------- Tokens ---------- */
:root {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --paper: #fbf8f2;
  --surface: #efe9de;
  --ink: #1b1f3b;
  --ink-fixed: #1b1f3b;      /* text on coral, both modes */
  --muted: #4a4e68;          /* 8:1 on paper */
  --line: rgba(27, 31, 59, 0.14);
  --line-strong: rgba(27, 31, 59, 0.28);
  --coral: #ff6b4a;
  --coral-soft: rgba(255, 107, 74, 0.14);
  --nav-bg: rgba(251, 248, 242, 0.88);
  --radius: 14px;
  --gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1126;
    --surface: #1b1f3b;
    --ink: #fbf8f2;
    --muted: #b9bbcb;
    --line: rgba(251, 248, 242, 0.14);
    --line-strong: rgba(251, 248, 242, 0.3);
    --coral-soft: rgba(255, 107, 74, 0.18);
    --nav-bg: rgba(14, 17, 38, 0.88);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3 { font-weight: 650; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--coral); color: var(--ink-fixed); }
code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
strong { font-weight: 650; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: min(100% - 2 * var(--gutter), 1120px); margin-inline: auto; }
.wrap { width: min(100% - 2 * var(--gutter), 720px); margin-inline: auto; }
@media (min-width: 768px) { :root { --gutter: 40px; } }

/* ---------- Header / footer ---------- */
header.site { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
header.site .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { border-radius: 7px; flex: none; }
nav.site { display: flex; gap: 4px; }
nav.site a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 550; padding: 8px 10px; border-radius: 8px; }
nav.site a:hover { color: var(--ink); }
nav.site a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 8px; }

footer.site { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
footer.site .foot { display: grid; gap: 16px; }
footer.site .foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
footer.site .foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; }
footer.site .foot-links a { color: var(--muted); text-decoration: none; }
footer.site .foot-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); }
footer.site p { margin: 0; max-width: 80ch; }
footer.site .brand { font-size: 15px; }
footer.site .brand img { border-radius: 6px; }

/* ---------- Home: hero ---------- */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(24px, 4vw, 48px); text-align: center; }
.h-hero { font-size: clamp(40px, 7.4vw, 84px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; margin: 0 auto 22px; max-width: 15ch; }
@media (max-width: 420px) { .soon { font-size: 14px; padding: 8px 14px; } }
.sub { font-size: clamp(18px, 2.3vw, 22px); line-height: 1.5; color: var(--muted); max-width: 40ch; margin: 0 auto 22px; }
.soon { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin: 0; font-size: 15px; text-align: left; font-weight: 600; padding: 9px 16px; border-radius: 999px; background: var(--surface); }
.soon-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); flex: none; }

.orbit-fig { margin: clamp(36px, 6vw, 72px) auto 0; max-width: 1080px; }
.orbit { display: block; width: 100%; height: auto; overflow: visible; }
.orbit-tall { display: none; max-width: 380px; margin-inline: auto; }
@media (max-width: 719px) { .orbit-wide { display: none; } .orbit-tall { display: block; } }

.o-ring { fill: none; stroke: var(--ink); stroke-opacity: 0.22; stroke-width: 1.5; }
.o-core { fill: var(--coral); }
.o-core-label { fill: var(--ink-fixed); font: 700 15px var(--font); text-anchor: middle; letter-spacing: 0.01em; }
.o-card { fill: var(--paper); }
.o-card-text { fill: var(--ink); font: 600 13.5px var(--font); text-anchor: middle; }
.o-card-wide { font-size: 15px; }
.o-node { fill: var(--ink); }
.o-node-quiet { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.o-label { fill: var(--ink); font: 650 16px var(--font); text-anchor: middle; }
.o-muted { fill: var(--muted); font-weight: 550; }
.o-start { text-anchor: start; }
.o-end { text-anchor: end; }
.o-mid { text-anchor: middle; }
.o-halo { paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; }
.o-step { fill: var(--muted); font: 600 14px var(--font); letter-spacing: 0.02em; }
.o-bubble { fill: var(--paper); stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 1.5; }
.o-bubble-you { fill: var(--surface); stroke: none; }
.o-bubble-text { fill: var(--ink); font: 550 18px var(--font); text-anchor: middle; }
.o-flow { fill: none; stroke: var(--ink); stroke-opacity: 0.4; stroke-width: 1.5; stroke-dasharray: 3 5; }
.o-arrow { fill: none; stroke: var(--ink); stroke-opacity: 0.6; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.o-dot { fill: none; stroke: var(--coral); stroke-width: 11; stroke-linecap: round; stroke-dasharray: 0.01 199.99; stroke-dashoffset: 0; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .o-dot { animation: o-travel 5.5s cubic-bezier(0.45, 0, 0.35, 1) 0.6s infinite; }
  .o-core { animation: o-pulse 5.5s ease-in-out 0.6s infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes o-travel {
  0% { stroke-dashoffset: 0; opacity: 0; }
  6% { opacity: 1; }
  46%, 54% { stroke-dashoffset: -50; }
  94% { opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes o-pulse {
  0%, 38%, 62%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

/* ---------- Home: sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0 0; }
.h-section { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.025em; margin: 0 0 32px; }
.steps, .control { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
@media (min-width: 760px) { .steps, .control { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps h3, .control h3 { font-size: 19px; margin: 14px 0 6px; letter-spacing: -0.01em; }
.control h3 { margin-top: 0; padding-top: 16px; border-top: 2px solid var(--coral); }
.steps p, .control p { margin: 0; color: var(--muted); }
.glyph { width: 48px; height: 48px; display: block; }
.g-ring { fill: none; stroke: var(--ink); stroke-opacity: 0.3; stroke-width: 1.5; }
.g-core { fill: var(--coral); }
.g-core-empty { fill: none; stroke: var(--coral); stroke-width: 2; }
.g-node { fill: var(--ink); }
.g-line { stroke: var(--ink); stroke-opacity: 0.45; stroke-width: 1.5; stroke-linecap: round; }
.fine { margin: 32px 0 0; font-size: 15px; color: var(--muted); max-width: 72ch; }
.works { padding-bottom: clamp(64px, 9vw, 112px); }
.works-line { margin: 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 17px; }
.works-line strong { margin-right: 8px; }

/* ---------- Shared pieces (legal, support, 404) ---------- */
.eyebrow { display: inline-block; font: 650 13px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.note { font-size: 14px; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; background: var(--coral); color: var(--ink-fixed); font-weight: 650; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn:hover { filter: brightness(1.05); }

.callout { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; border-left: 3px solid var(--coral); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
caption { text-align: left; padding: 12px 12px 0; font-weight: 650; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
thead th { color: var(--muted); font-weight: 600; background: var(--surface); }
tbody th { font-weight: 600; }

details { border-bottom: 1px solid var(--line); padding: 14px 0; margin: 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); }
details[open] > summary::after { transform: rotate(-135deg) translateX(-2px); }
details p, details ul, details ol { margin: 10px 0 4px; color: var(--muted); }
details li { margin: 6px 0; }

/* ---------- Legal / support pages ---------- */
main.doc { padding: clamp(40px, 7vw, 80px) 0 80px; }
h1.page { font-size: clamp(36px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 16px; margin: 0 0 32px; }
main.doc h2 { font-size: 23px; letter-spacing: -0.015em; margin: 52px 0 12px; }
main.doc h3 { font-size: 18px; margin: 28px 0 6px; }
main.doc ul, main.doc ol { padding-left: 22px; }
main.doc li { margin: 6px 0; }
.toc { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin: 0 0 12px; }
.toc h2 { font-size: 13px !important; letter-spacing: 0.08em !important; text-transform: uppercase; color: var(--muted); margin: 0 0 10px !important; }
.toc ol { margin: 0; columns: 2 220px; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { text-decoration-color: var(--line-strong); }
.toc a:hover { text-decoration-color: var(--coral); }
.short { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 10px; }
.short li { margin: 0 !important; padding-left: 24px; position: relative; }
.short li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
ol.steps-list { counter-reset: s; list-style: none; padding: 0 !important; }
ol.steps-list > li { counter-increment: s; position: relative; padding-left: 40px; margin: 12px 0; }
ol.steps-list > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--coral); color: var(--ink-fixed); font-weight: 700; font-size: 14px; display: grid; place-items: center; }

/* Phones: pages with three nav links keep the icon and drop the wordmark so nothing clips. */
@media (max-width: 420px) {
  header.site .bar:has(nav.site a:nth-child(3)) .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  nav.site a { padding: 8px 8px; }
}
