/* ============================================================
     Deliberately single-theme. This is a product used at night,
     in low light, in a bedroom — the page commits to that world
     rather than offering a daylight variant. Every colour is
     painted explicitly so the page holds on any host ground.
     Accent tokens are the app's own "Ember" skin (web/src/styles.css).
     ============================================================ */

  :root {
    --ink:        #0d0a0e;  /* near-black, biased plum — not neutral grey */
    --ink-raised: #17121a;
    --ink-line:   #2a2028;
    --ember:      #e0895f;  /* app's --ember */
    --ember-deep: #7d3a4d;  /* app's --ember-deep */
    --candle:     #f2e4d8;  /* warm off-white, candlelit */
    --dim:        #a4909a;  /* plum-biased muted — 6.59:1 on ink */
    --faint:      #9a8791;  /* quietest legible tone — 5.49:1 on raised */

    --display: "Hoefler Text", "Baskerville", "Iowan Old Style", Palatino, Georgia, serif;
    --body: ui-sans-serif, -apple-system, "Helvetica Neue", "Segoe UI", sans-serif;
    --inst: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

    --measure: 34rem;
    --gut: clamp(1.25rem, 5vw, 2rem);
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--ink);
    color: var(--candle);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  /* faint warmth at the top, like a lamp just out of frame */
  .glow {
    position: fixed;
    inset: -30vh 0 auto 0;
    height: 70vh;
    background: radial-gradient(60% 60% at 50% 50%, rgba(224, 137, 95, 0.13), transparent 70%);
    pointer-events: none;
    z-index: 0;
  }

  .wrap {
    position: relative;
    z-index: 1;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 var(--gut);
  }

  section { padding-block: clamp(3.5rem, 11vw, 6rem); }

  .eyebrow {
    font-family: var(--inst);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ember);
    margin: 0 0 1.25rem;
  }

  h1 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.6rem, 11vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    text-wrap: balance;
    margin: 0 0 1.4rem;
  }

  h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.7rem, 6vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-wrap: balance;
    margin: 0 0 1.2rem;
  }

  h3 {
    font-family: var(--body);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
  }

  p { margin: 0 0 1.1rem; }
  .lede { font-size: 1.12rem; color: #e2d2c8; }
  .muted { color: var(--dim); }
  .small { font-size: 0.88rem; }

  /* ---------- links ----------
     There was no base rule here until now: the mockup contained no links at
     all, so every link added with the legal pages fell through to browser
     blue (#0000EE), which is 2.09:1 on the ink ground — unreadable.
     --ember is 7.42:1, passing AA and AAA. The underline is not decoration:
     WCAG 1.4.1 forbids colour as the only means of identifying a link. */

  a {
    color: var(--ember);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-color: var(--ember-deep);
    transition: text-decoration-color 120ms ease, text-decoration-thickness 120ms ease;
  }

  a:hover {
    text-decoration-color: var(--ember);
    text-decoration-thickness: 2px;
  }

  /* ---------- masthead ---------- */

  .mast {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding-top: 2.5rem;
  }

  .mark {
    font-family: var(--display);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
  }

  .mark em { font-style: italic; color: var(--ember); }

  /* The wordmark is a link on the legal pages; it must stay the wordmark. */
  .mark a,
  .mark a:hover { color: var(--candle); text-decoration: none; }

  /* ---------- signup ---------- */

  .signup { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.75rem; }

  input[type="email"] {
    flex: 1 1 15rem;
    min-width: 0;
    background: var(--ink-raised);
    border: 1px solid var(--ink-line);
    border-radius: 2px;
    color: var(--candle);
    font: inherit;
    font-size: 1rem;
    padding: 0.85rem 1rem;
  }

  input[type="email"]::placeholder { color: var(--faint); }

  button {
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: 0;
    border-radius: 2px;
    padding: 0.85rem 1.4rem;
    background: var(--ember);
    color: #24120c;
    cursor: pointer;
    transition: background 140ms ease;
  }

  button:hover { background: #eb9a72; }

  :focus-visible {
    outline: 2px solid var(--ember);
    outline-offset: 3px;
  }

  .note { font-size: 0.82rem; color: var(--dim); margin-top: 0.85rem; }

  /* ---------- the dial: the page's one bold move ---------- */

  .dial-box {
    background: var(--ink-raised);
    border: 1px solid var(--ink-line);
    border-radius: 3px;
    padding: clamp(1.25rem, 5vw, 1.9rem);
  }

  .dial-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
  }

  .rung-no {
    font-family: var(--inst);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--dim);
  }

  .rung-name {
    font-family: var(--display);
    font-size: 1.65rem;
    line-height: 1;
    color: var(--ember);
  }

  input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2rem;
    background: transparent;
    cursor: pointer;
    margin: 0;
  }

  input[type="range"]::-webkit-slider-runnable-track {
    height: 2px;
    background: linear-gradient(90deg, var(--ember-deep), var(--ember));
  }

  input[type="range"]::-moz-range-track {
    height: 2px;
    background: linear-gradient(90deg, var(--ember-deep), var(--ember));
  }

  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.4rem;
    height: 1.4rem;
    margin-top: -0.68rem;
    border-radius: 50%;
    background: var(--candle);
    border: 3px solid var(--ember);
  }

  input[type="range"]::-moz-range-thumb {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: var(--candle);
    border: 3px solid var(--ember);
  }

  .ticks {
    display: flex;
    justify-content: space-between;
    font-family: var(--inst);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    color: var(--faint);
    margin-top: 0.15rem;
  }

  .rung-copy { margin-top: 1.1rem; min-height: 4.5rem; }
  .rung-copy p { margin: 0; }

  .gate {
    margin-top: 1.1rem;
    border-top: 1px solid var(--ink-line);
    padding-top: 1.1rem;
  }

  .gate[hidden] { display: none; }

  .gate button {
    background: transparent;
    border: 1px solid var(--ember);
    color: var(--ember);
    padding: 0.55rem 1rem;
    font-size: 0.92rem;
  }

  .gate button:hover { background: rgba(224, 137, 95, 0.12); }

  /* ---------- the two tracks ---------- */

  .tracks { display: grid; gap: 0.9rem; margin-top: 1.6rem; }
  @media (min-width: 34rem) { .tracks { grid-template-columns: 1fr 1fr; } }

  .track {
    background: var(--ink-raised);
    border: 1px solid var(--ink-line);
    border-radius: 3px;
    padding: 1.1rem 1.2rem;
  }

  .track .who {
    font-family: var(--inst);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ember);
    margin: 0 0 0.6rem;
  }

  .track .cue {
    font-family: var(--display);
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
  }

  .stamp {
    font-family: var(--inst);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--dim);
  }

  /* ---------- steps: a real sequence, so numbers carry meaning ---------- */

  ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }

  ol.steps li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0 1rem;
    align-items: baseline;
  }

  ol.steps .n {
    font-family: var(--inst);
    font-size: 0.8rem;
    color: var(--ember);
  }

  ol.steps p { grid-column: 2; margin: 0; }

  /* ---------- faq ---------- */

  dl { margin: 0; display: grid; gap: 1.5rem; }
  dt { font-weight: 600; margin-bottom: 0.3rem; }
  dd { margin: 0; color: var(--dim); }

  /* ---------- waitlist ---------- */

  .panel {
    background: var(--ink-raised);
    border: 1px solid var(--ink-line);
    border-radius: 3px;
    padding: clamp(1.4rem, 5vw, 2rem);
  }

  fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; }
  legend { font-weight: 600; padding: 0; margin-bottom: 0.7rem; }

  .opts { display: flex; flex-wrap: wrap; gap: 0.5rem; }

  .opt {
    font-family: var(--body);
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid var(--ink-line);
    color: var(--candle);
    border-radius: 100px;
    padding: 0.45rem 0.95rem;
    font-weight: 400;
  }

  .opt:hover { background: rgba(224, 137, 95, 0.1); border-color: var(--ember-deep); }

  .opt[aria-pressed="true"] {
    background: var(--ember);
    border-color: var(--ember);
    color: #24120c;
    font-weight: 600;
  }

  [hidden] { display: none !important; }

  footer {
    border-top: 1px solid var(--ink-line);
    padding-block: 2.5rem 3.5rem;
    color: var(--dim);
    font-size: 0.85rem;
  }

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
  }

/* ---------- waitlist: error + pending ---------- */

.err {
  font-size: 0.88rem;
  color: #f0a58a;
  margin-top: 0.75rem;
}

.err[hidden] { display: none; }

button[disabled] {
  opacity: 0.55;
  cursor: progress;
}

/* ---------- prose pages (privacy, terms) ---------- */

.prose { max-width: 34rem; }
.prose h1 { font-size: clamp(2rem, 7vw, 2.8rem); margin-bottom: 0.4rem; }
.prose h2 { font-size: 1.25rem; margin-top: 2.4rem; }
.prose .updated {
  font-family: var(--inst);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 2rem;
}
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: 0.5rem; }
/* .prose a and footer a inherit the base rule; footer stays quieter. */

.draft {
  border: 1px solid var(--ember-deep);
  background: rgba(125, 58, 77, 0.14);
  border-radius: 3px;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ---------- consent ---------- */

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.consent input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--ember);
  flex: none;
}

.consent-note { font-size: 0.82rem; color: var(--dim); margin-top: 0.9rem; }

footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 0.6rem; }
footer a {
  color: var(--dim);
  text-decoration-color: #4a3b44;
}
footer a:hover { color: var(--candle); text-decoration-color: var(--dim); }
