/* Legend beta site — shared stylesheet. Dark-first, light via prefers-color-scheme.
   Self-contained: system fonts only, no external requests. */

/* ⚠ THE ORANGE IS RULED AND IT STAYS — do not "fix" it to match the app. Joe, 2026-08-19,
   asked directly whether the brand was going nautical: **option C, leave it, colors after
   the send.** The app moved to a nautical palette (sea glass `--accent`, brass in the
   action role) and this site did not, so the two disagree on purpose rather than by drift.
   ⚠⚠ THIS WAS A REVERSAL, NOT A DEFAULT, WHICH IS WHY IT SHOULD HOLD: Joe came into the
   question INTENDING full nautical and changed his mind on looking at the live site —
   *"You changed my mind. I was going to go full nautical, and then I looked at the
   website."* So "the site is still orange" is not an oversight nobody got to; it is the
   considered answer, reached with the alternative in front of him.
   Three reasons it was ruled that way, kept because they are what would make someone
   reopen it:
     · the wordmark is the HERO IMAGE on index.html and it is orange and blue, so swapping
       only these tokens puts an orange logo on a sea-glass page — a half-migration reads
       as a mistake, not a palette;
     · a full recolor is ~10 files including `favicon.svg`, both header SVGs (mirrored in
       `brand/assets/` and gate-enforced byte-identical), and `og-card.png`, which is what
       every /beta/<name> gift link unfurls as;
     · the app's own nautical migration is INCOMPLETE — brass is live on two selectors and
       `port` does not exist in the app at all — so there is no finished thing to match.
   Revisit AFTER the 2026-08-22 send, not before. Provenance for that work, from Joe:
   `apple-touch-icon.png` originated in cowork, and it HAS been regenerated locally since
   without going back there — so a missing source file is not a blocker for the recolor. */

:root {
  --bg: #0d1017;
  --bg-elev: #141922;
  --surface: #171d28;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e7e9ee;
  --text-dim: #a3adbd;
  --text-faint: #6c7788;
  --accent: #ef9f27;
  --accent-hover: #ffb646;
  --accent-ink: #12161f;
  --ok: #4bbf8a;
  --warn: #d98c4a;
  --err: #e2705f;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1080px;
  --radius: 12px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfc;
    --bg-elev: #ffffff;
    --surface: #ffffff;
    --border: rgba(15, 20, 30, 0.10);
    --border-strong: rgba(15, 20, 30, 0.18);
    --text: #171b22;
    --text-dim: #545e6d;
    --text-faint: #8a93a1;
    --accent: #b5730f;
    --accent-hover: #96600b;
    --accent-ink: #ffffff;
    --ok: #1f9d68;
    --warn: #b26a2a;
    --err: #c2402f;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 560px; }

/* ---- announcement banner (landing only) ---- */
.banner { background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.banner-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 28px; flex-wrap: wrap;
}
.banner p { margin: 0; color: var(--text-dim); font-size: 0.95rem; flex: 1 1 320px; max-width: 62ch; }
.banner p strong { color: var(--text); font-weight: 650; }
/* The shared .subinput basis is 220px, which with the 10px gap and a 110.25px "Notify me"
   needs 340.25px — so a 340px form wrapped the button onto a second row over a quarter of a
   pixel. Rather than pin a width that a longer button label would silently break again, the
   field gets a smaller basis here and the form keeps ~30px of slack at its own minimum. */
.banner .subform { margin: 0; flex: 1 1 300px; max-width: 400px; }
.banner .subinput { flex: 1 1 150px; }
/* The shared .status is flex:1 0 100%, which reserves a second row inside the form.
   Harmless in a section, visible as dead space in a one-line banner — so collapse it
   until it actually carries a message. */
.banner .subform .status:empty { min-height: 0; margin: 0; }

@media (max-width: 720px) {
  .banner-inner { padding: 12px 18px; }
  .banner .subform { flex: 1 1 100%; width: auto; }
}

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand svg.orb { width: 26px; height: 26px; display: block; }
.brand .word { height: 15px; width: auto; display: block; color: var(--text); }
.topbar nav a { color: var(--text-dim); font-size: 15px; margin-left: 22px; }
.topbar nav a:hover { color: var(--text); }
.topbar nav a[aria-current="page"] { color: var(--text); }
.brand-simple { font-weight: 680; letter-spacing: -0.02em; }
.brand-simple img { width: 28px; height: 28px; display: block; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 550;
  padding: 11px 20px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, opacity .15s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn[aria-disabled="true"], .btn:disabled {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}
.btn .plat { opacity: .6; font-weight: 450; }

/* ---- hero ---- */
.hero { padding: 40px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -0.035em; margin: 0 0 18px;
}
.hero-wordmark { display: block; width: min(100%, 360px); margin: 0 0 20px; }
.hero-wordmark img { display: block; width: 100%; height: auto; }
.hero .sub { font-size: 1.12rem; color: var(--text-dim); margin: 0 0 30px; max-width: 34ch; }
.hero .cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero .cta-note { color: var(--text-faint); font-size: 14px; }
.eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 18px;
}

/* ---- editor mock ---- */
.mock {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-elev); box-shadow: 0 24px 60px -30px rgba(0,0,0,.55);
}
.mock-chrome {
  display: flex; align-items: center; gap: 14px; padding: 11px 15px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.mock-dots { display: flex; gap: 7px; }
.mock-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); display: block; }
.mock-tabs { display: flex; gap: 4px; font-family: var(--mono); font-size: 12px; }
.mock-tab { padding: 3px 10px; border-radius: 6px; color: var(--text-faint); }
.mock-tab.active { background: var(--bg); color: var(--text-dim); }
.mock-body {
  padding: 22px 24px; font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  color: var(--text-dim);
}
.mock-body .h { color: var(--text); font-family: var(--sans); font-weight: 680; font-size: 21px; letter-spacing: -0.02em; }
.mock-body .h2 { color: var(--text); font-family: var(--sans); font-weight: 640; font-size: 15px; margin-top: 4px; }
.mock-body .li { padding-left: 20px; position: relative; }
.mock-body .li::before { content: "•"; color: var(--accent); position: absolute; left: 6px; }
.mock-body .lnk { color: var(--accent); }
.mock-body .tag { color: var(--accent); opacity: .85; }
.mock-body .em { font-style: italic; color: var(--text); }
.mock-body .bold { font-weight: 680; color: var(--text); }
.mock-body .caret { border-left: 2px solid var(--accent); margin-left: 1px; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock-body .row { margin: 2px 0; }
.mock-body .muted { color: var(--text-faint); }

/* ---- sections ---- */
section { padding: 22px 0; }
.section-head { margin-bottom: 34px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { color: var(--text-dim); margin: 12px 0 0; max-width: 60ch; }

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.feature { background: var(--bg); padding: 26px 24px; }
.feature h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

/* ---- content pages: creator directory + changelog ---- */
.content-page { max-width: 820px; }
.page-intro { padding: 64px 0 34px; }
.page-intro h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 16px; }
.page-intro > p { color: var(--text-dim); max-width: 62ch; font-size: 1.05rem; }
.page-intro .directory-note { color: var(--text-faint); font-size: 0.9rem; }
.directory-state {
  padding: 38px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); text-align: center;
}
.directory-state h2 { font-size: 1.25rem; margin-bottom: 10px; }
.directory-state p { color: var(--text-dim); margin: 0 auto; max-width: 52ch; }
.creator-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.creator-card {
  display: flex; flex-direction: column; gap: 8px; padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--text);
}
.creator-card:hover { color: var(--text); border-color: var(--border-strong); }
.creator-card strong { font-size: 1.08rem; }
.creator-card span { color: var(--accent); font-size: 0.9rem; }
.change-entry {
  padding: 38px 0 52px; border-top: 1px solid var(--border);
}
.change-entry:first-child { border-top: 0; }
.change-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.change-meta time { color: var(--text-faint); font-family: var(--mono); font-size: 0.82rem; }
.placeholder-badge {
  color: var(--warn); border: 1px solid currentColor; border-radius: 999px;
  padding: 3px 8px; font-size: 0.7rem; letter-spacing: 0.03em;
}
.change-entry > h2 { font-size: clamp(1.55rem, 3.5vw, 2.2rem); max-width: 24ch; }
.change-summary { color: var(--text-dim); font-size: 1.08rem; max-width: 66ch; }
.number-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 28px 0; }
.number-card {
  padding: 18px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elev); display: flex; flex-direction: column; gap: 5px;
}
.number-card strong { font-family: var(--mono); font-size: 1.18rem; color: var(--accent); }
.number-card span { color: var(--text-dim); font-size: 0.86rem; }
.change-section { padding: 12px 0; }
.change-section h3 { font-size: 1rem; margin-bottom: 7px; }
.change-section p { color: var(--text-dim); margin: 0; max-width: 68ch; }

/* ---- beta strip ---- */
.strip {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); padding: 40px; margin: 20px 0 8px;
}
.strip h2 { font-size: 1.5rem; margin-bottom: 12px; }
.strip p { color: var(--text-dim); margin: 0 0 22px; max-width: 62ch; }
.platline { color: var(--text-faint); font-size: 14px; margin-top: 18px; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 34px 0 48px; }
footer .sustain { color: var(--text-dim); font-size: 0.95rem; max-width: 66ch; margin: 0 0 14px; }
footer .copy { color: var(--text-faint); font-size: 14px; }

/* ---- centered app pages (beta / gift / 404) ---- */
.page {
  min-height: 100dvh; display: flex; flex-direction: column;
}
.page main {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px 64px;
}
.card {
  width: 100%; max-width: 480px; text-align: center;
}
.card .orb-lg { width: 46px; height: 46px; margin: 0 auto 22px; display: block; }
.card h1 { font-size: 1.7rem; margin-bottom: 10px; }
.card .lead { color: var(--text-dim); margin: 0 auto 28px; max-width: 40ch; }

.keyform { display: flex; flex-direction: column; gap: 12px; margin: 0 auto; max-width: 380px; }
.keyinput {
  font-family: var(--mono); font-size: 17px; letter-spacing: 0.06em; text-align: center;
  padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text); width: 100%; text-transform: uppercase;
  transition: border-color .15s;
}
.keyinput::placeholder { color: var(--text-faint); letter-spacing: 0.04em; text-transform: none; }
.keyinput:focus { outline: none; border-color: var(--accent); }
.keyform .btn { width: 100%; }

.dl-row { display: flex; flex-direction: column; gap: 12px; margin: 8px auto 0; max-width: 380px; }
.dl-row .btn { width: 100%; }
.dl-note { color: var(--text-faint); font-size: 13.5px; margin-top: 8px; }
/* Turnstile mounts here on a download click only. In managed mode it is
   usually empty, so it must take no vertical space until it has something. */
.turnstile-box { display: flex; justify-content: center; margin-top: 12px; }

.redownload {
  margin: 24px auto 0; padding: 18px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elev); max-width: 420px;
}
.redownload p { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 12px; }
.redownload .status { margin: 10px 0 0; }

.referral-box {
  margin: 22px auto 0; padding: 20px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elev); max-width: 440px;
}
.referral-box p { color: var(--text-dim); font-size: 0.95rem; margin: 0 0 14px; }
.referral-box .btn { margin: 4px; }
.referral-box .status { margin: 12px 0 0; }

/* ---- optional email signup (landing strip + beta/gift download states) ---- */
.subform {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start;
  max-width: 460px; margin: 0;
}
.card .subform { margin-left: auto; margin-right: auto; }
.subinput {
  flex: 1 1 220px; min-width: 0;
  font: inherit; font-size: 15px; padding: 11px 14px;
  border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text);
  transition: border-color .15s;
}
.subinput::placeholder { color: var(--text-faint); }
.subinput:focus { outline: none; border-color: var(--accent); }
.subinput:disabled { opacity: .6; }
.subform .btn { flex: 0 0 auto; }
/* Status claims the full row so a message never squeezes the field. */
.subform .status { flex: 1 0 100%; margin: 0; text-align: left; }
.card .subform .status { text-align: center; }
.subnote { color: var(--text-faint); font-size: 13px; margin: 12px 0 0; max-width: 60ch; }
.card .subnote { margin-left: auto; margin-right: auto; }
/* The signup block on the download states, below the buttons — separated so it
   reads as an aside to a finished action, never a step in it. */
.subblock { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--border); }
.subprompt { color: var(--text-dim); font-size: 0.95rem; margin: 0 auto 14px; max-width: 40ch; }
/* Honeypot: off-screen rather than display:none, because some form bots skip
   hidden inputs. Never focusable (tabindex="-1" on the input) and never read
   out (aria-hidden on the wrapper), so it costs a person nothing. */
.hp {
  position: absolute; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.smallprint { color: var(--text-faint); font-size: 13.5px; margin-top: 30px; max-width: 42ch; margin-left: auto; margin-right: auto; }
.smallprint a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }

.status { font-size: 0.95rem; margin: 4px 0 0; min-height: 1.2em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.status.warn { color: var(--warn); }

.invited { color: var(--ok); font-weight: 550; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin .7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.what-legend { color: var(--text-dim); font-size: 0.95rem; margin: 26px auto 0; max-width: 44ch; }
.backhome { display: inline-block; margin-top: 18px; color: var(--text-dim); font-size: 14px; }

[hidden] { display: none !important; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .sub, .hero h1 { max-width: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .strip { padding: 28px 22px; }
  .topbar nav a { margin-left: 16px; }
  .hero { padding: 24px 0 44px; }
  .topbar { align-items: flex-start; }
  .topbar nav { display: flex; flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
  .creator-grid, .number-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .wrap { padding: 0 18px; }
  .topbar { padding: 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .mock-body .caret, .spinner { animation: none; }
}
