/* ===========================================================================
   Handle the Sale — "Pop, in Ember"
   One stylesheet, no framework. Tokens on :root; dark theme redefines only
   the surface/ink tokens. The six tones never change between themes.
   =========================================================================== */

:root {
  --ground: #fdfaf6;
  --surface: #ffffff;
  --surface-2: #f5efe7;
  --surface-3: #e9e0d4;
  --ink: #241e1a;
  --ink-muted: #655b52;
  --ink-faint: #6b6055;
  --accent: #e8956b;
  --accent-deep: #a8501f;
  --accent-wash: #fbe7d8;
  --danger: #b3271b;
  --accent-text: var(--accent-deep);   /* clay that stays legible as text/outline */

  /* Six tones. Each is a kind of thing, never a severity. Fixed in both themes. */
  --tone-next: #e8956b;
  --tone-waiting: #bfb0e8;
  --tone-house: #a8cb8f;
  --tone-question: #7fc9c4;
  --tone-reply: #f0a8b8;
  --tone-quote: #efc559;
  --tone-ink: #241e1a;

  --display: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --body: Nunito, ui-sans-serif, system-ui, sans-serif;

  --card-border: 3px solid var(--ink);
  --card-shadow: 5px 5px 0 var(--ink);
  --gutter: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #1c1714;
    --surface: #29221e;
    --surface-2: #342b25;
    --surface-3: #40352d;
    --ink: #f7f1ea;
    --ink-muted: #c9bdb2;
    --ink-faint: #b7aa9e;
    --accent-wash: #3a2418;
    --danger: #ff9385;
    --accent-text: var(--accent);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #1c1714;
  --surface: #29221e;
  --surface-2: #342b25;
  --surface-3: #40352d;
  --ink: #f7f1ea;
  --ink-muted: #c9bdb2;
  --ink-faint: #b7aa9e;
  --accent-wash: #3a2418;
  --danger: #ff9385;
  --accent-text: var(--accent);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  background-image:
    radial-gradient(
      72rem 48rem at 4% -18%,
      color-mix(in oklab, var(--accent-wash) 60%, var(--ground)),
      transparent 62%
    ),
    radial-gradient(
      64rem 44rem at 98% 108%,
      color-mix(in oklab, var(--tone-quote) 12%, var(--ground)),
      transparent 60%
    );
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

/* --- the single gutter wrapper ------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- type ---------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.1875rem; }

p { margin: 0; max-width: 60ch; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); font-size: .9375rem; }

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent-text); }

:where(a, button, summary, input, textarea):focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- the wordmark and the Lia pill --------------------------------------- */
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.3125rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.lia {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  background: var(--tone-next);
  color: var(--tone-ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 1px 15px 3px;
  line-height: 1.25;
}
.lia .stop { color: #ffffff; }

/* --- header -------------------------------------------------------------- */
.site-head {
  padding-block: 22px 6px;
}
.site-head .row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.site-head nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  font-size: .9375rem;
  font-weight: 800;
}
.site-head nav a { color: var(--ink-muted); text-decoration: none; }
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }

/* --- buttons and chips --------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  background: var(--ink);
  color: var(--ground);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 11px 24px 12px;
  box-shadow: 3px 3px 0 var(--accent);
  transition: transform .08s ease-out;
}
.btn:hover { transform: translate(1px, 1px); }
.btn-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border-color: transparent;
  text-decoration: underline;
  padding-inline: 4px;
}
.btn-quiet:hover { transform: none; text-decoration-color: var(--accent-text); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: .875rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 14px 6px;
  background: var(--surface);
  color: var(--ink);
}

.kicker {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 3px 15px 4px;
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--tone-next);
  color: var(--tone-ink);
  margin-bottom: 16px;
}
.kicker.waiting  { background: var(--tone-waiting); }
.kicker.house    { background: var(--tone-house); }
.kicker.question { background: var(--tone-question); }
.kicker.reply    { background: var(--tone-reply); }
.kicker.quote    { background: var(--tone-quote); }

/* --- cards --------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: var(--card-border);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
  padding: 26px;
}

/* A toned card: every word on it is --tone-ink, captions and links included. */
.card.toned,
.card.toned h2,
.card.toned h3,
.card.toned p,
.card.toned a,
.card.toned li,
.card.toned .faint,
.card.toned .muted { color: var(--tone-ink); }
.card.toned a { text-decoration-color: var(--tone-ink); }
.card.next     { background: var(--tone-next); }
.card.waiting  { background: var(--tone-waiting); }
.card.house    { background: var(--tone-house); }
.card.question { background: var(--tone-question); }
.card.reply    { background: var(--tone-reply); }
.card.quote    { background: var(--tone-quote); }

/* --- sections and grids -------------------------------------------------- */
section { padding-block: 46px; }
section.tight { padding-block: 30px; }
.stack { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.stack > * { max-width: 100%; }

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 26px;
}
.row-wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* --- numbered steps ------------------------------------------------------ */
ol.steps {
  list-style: none;
  counter-reset: step;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
ol.steps > li {
  counter-increment: step;
  background: var(--surface);
  border: var(--card-border);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
  padding: 24px 24px 26px;
}
ol.steps > li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1875rem;
  background: var(--tone-next);
  color: var(--tone-ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
}

/* --- the cited example --------------------------------------------------- */
.quoted {
  background: color-mix(in oklab, var(--tone-quote) 22%, var(--surface));
  border-left: 8px solid var(--ink);
  border-radius: 0 18px 18px 0;
  padding: 20px 22px;
  margin-top: 8px;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
  max-width: 60ch;
}
.quoted .cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-weight: 800;
  font-size: .9375rem;
}
.quoted .cite a { color: var(--ink); }

/* --- certainty chips ----------------------------------------------------- */
.certainty { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 14px; }
.certainty .chip.confirmed { background: var(--ink); color: var(--ground); }
.certainty .chip.estimated { background: color-mix(in oklab, var(--tone-question) 34%, var(--surface)); color: var(--ink); }
.certainty .chip.check     { background: color-mix(in oklab, var(--tone-quote) 34%, var(--surface)); color: var(--ink); }
.certainty .chip.unknown   { background: var(--surface-2); color: var(--ink-faint); border-style: dashed; }

/* --- FAQ (no JavaScript) ------------------------------------------------- */
.faq { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface);
  border: var(--card-border);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
  padding: 6px 22px;
}
.faq summary {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  padding-block: 16px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  margin-left: 12px;
  font-weight: 800;
  color: var(--accent-text);
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding-bottom: 18px; color: var(--ink-muted); }

/* --- forms --------------------------------------------------------------- */
form.early { margin-top: 24px; max-width: 34rem; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-weight: 800; font-size: .9375rem; }
input[type="text"], input[type="email"], textarea {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-2);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 11px 14px;
  width: 100%;
}
textarea { min-height: 7.5rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); font-weight: 600; }

/* --- footer -------------------------------------------------------------- */
.site-foot {
  border-top: 3px solid var(--ink);
  margin-top: 52px;
  padding-block: 28px 44px;
}
.site-foot .links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 800;
  font-size: .9375rem;
  margin-bottom: 16px;
}
.site-foot .links a { color: var(--ink); }
.site-foot .disclaimer { color: var(--ink-muted); font-size: .875rem; max-width: 68ch; }
.site-foot .copyright { color: var(--ink-faint); font-size: .875rem; margin-top: 12px; }

/* --- theme toggle: revealed by app.js, absent without JavaScript --------- */
#theme-toggle[hidden] { display: none !important; }
#theme-toggle {
  font-family: var(--body);
  font-weight: 800;
  font-size: .875rem;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 14px 6px;
  transition: transform .08s ease-out;
}
#theme-toggle:hover { transform: translate(1px, 1px); }

/* --- wide things get their own scroller, the page never does ------------- */
.scroller { overflow-x: auto; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .btn, #theme-toggle { transition: none; }
  .btn:hover, #theme-toggle:hover { transform: none; }
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  body { font-size: 16.5px; }
  .card, ol.steps > li { padding: 22px; }
}
