/* The landing page at ownandchill.com (D-54), after /styles.css. Layout, the product drawings ("frames") and the
   CSS-only demos: radio groups whose panels show through :has(), and <details>. No scripts, no images but the logo,
   nothing loaded from elsewhere. Every animation and transition sits in the prefers-reduced-motion: no-preference
   block at the end (tools/site/site.test.ts checks it). The page is light only (D-54), and the frames show the
   app's light theme as --app-* tokens (app/src/core/theme/globals.css, :root), each on a softly tinted stage with a
   hairline edge and a lifted shadow so it reads as a window onto the product. */

/* ---------- Page tokens ---------- */

.home {
  --wrap: 72rem;
  --glow: rgb(118 88 63 / 0.1);
  --glow-2: rgb(150 122 98 / 0.07);
  /* The stage behind a frame: a warm grey wash, lighter at the top. */
  --stage: linear-gradient(180deg, #f5f4f2, #f0eeeb);
  --frame-edge: rgb(36 35 33 / 0.06);
  --frame-shadow: 0 1px 2px rgb(36 35 33 / 0.05), 0 12px 32px -12px rgb(36 35 33 / 0.14),
    0 40px 80px -40px rgb(36 35 33 / 0.22);
  --soft-shadow: 0 1px 2px rgb(36 35 33 / 0.05), 0 10px 28px -14px rgb(36 35 33 / 0.16);
}

/* ---------- Frame tokens: the app's light palette ---------- */

.frame {
  color-scheme: light;
  --app-bg: #ffffff;
  --app-card: #ffffff;
  --app-sidebar: #fcfcfb;
  --app-fg: #242321;
  --app-heading: #242321;
  --app-muted: #6b6964;
  --app-subtle: #929089;
  --app-primary: #76583f;
  --app-primary-fg: #fffaf3;
  --app-button: #624b39;
  --app-button-fg: #ffffff;
  --app-secondary: #f5f4f2;
  --app-accent: #f0eeeb;
  --app-border: #e9e7e3;
  --app-border-strong: #dddad5;
  --app-input: #8a877f;
  --app-danger-tint: #faeeea;
  --app-danger-ink: #a04432;
  --app-warning-tint: #fbf4e5;
  --app-warning-ink: #74500f;
  --app-muted-tint: #f0eeeb;
  --app-muted-ink: #5f5d58;
  --app-bar: #967a62;
  --app-track: #f0eeeb;
}

/* ---------- Stages: the tinted band behind the hero window and the demos ---------- */

.frames,
.stepper .panels,
.tour .panels {
  padding: 1rem;
  border-radius: 1.5rem;
  background: radial-gradient(40rem 20rem at 50% 0%, rgb(255 255 255 / 0.7), transparent 70%), var(--stage);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* ---------- Base ---------- */

.home {
  overflow-x: clip;
}

/* Resets at the lowest specificity, so any class below wins. */
:where(.home main) p,
:where(.home main) h2,
:where(.home main) h3,
:where(.home main) dl,
:where(.home main) dd {
  margin: 0;
}

:where(.home main) ul,
:where(.home main) ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:where(.home main) li + li {
  margin-top: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-foreground);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.home section[id] {
  scroll-margin-top: 5rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--background) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
}

.home .brand {
  margin-right: auto;
  min-height: 2.75rem;
}

.header-nav {
  display: none;
}

.header-nav a,
.header-signin {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  color: var(--foreground);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.header-nav a:hover,
.header-signin:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.button-small {
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}

.button-large {
  min-height: 3rem;
  padding: 0.6rem 1.6rem;
  font-size: 1rem;
}

@media (max-width: 29.99rem) {
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (min-width: 52rem) {
  .header-nav {
    display: flex;
    gap: 0.125rem;
  }

  .header-inner {
    gap: 1.25rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 3rem 0 2.5rem;
  background:
    radial-gradient(60rem 28rem at 50% -6rem, var(--glow), transparent 70%),
    radial-gradient(40rem 24rem at 85% 30rem, var(--glow-2), transparent 70%);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}

.home .hero h1 {
  max-width: 15em;
  font-size: clamp(2.5rem, 1.55rem + 3.4vw, 4rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* Each clause on its own line once it fits (task/hero-tagline-line-break, D-54) */
@media (min-width: 48rem) {
  .hero-line {
    display: block;
  }
}

.hero-lede {
  max-width: 36rem;
  color: var(--muted-foreground);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero-note {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 3rem;
}

.caption {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-align: center;
}

/* ---------- Pickers: radio groups drawn as pills ---------- */

.picker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* A floated legend joins the layout as an ordinary item, so it can sit on its own line above the pills. */
.picker legend {
  float: left;
  width: 100%;
  margin-bottom: 0.25rem;
  padding: 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.picker label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--background);
  color: var(--foreground);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.picker label:hover {
  border-color: var(--primary);
}

.picker input:checked + label {
  border-color: var(--button);
  background: var(--button);
  color: var(--button-foreground);
}

.picker input:focus-visible + label {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.seg-number {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
}

.picker input:checked + label .seg-number {
  background: var(--button-foreground);
  color: var(--button);
}

/* ---------- Frames: the product drawings ---------- */

.frame {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 1rem;
  background: var(--app-bg);
  color: var(--app-fg);
  box-shadow: 0 0 0 1px var(--frame-edge), var(--frame-shadow);
}

.frame-flat {
  box-shadow: 0 0 0 1px var(--frame-edge), var(--soft-shadow);
}

.frame figcaption {
  margin: 0;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--app-border);
  background: var(--app-sidebar);
  color: var(--app-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.frame-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  text-align: left;
  user-select: none;
}

.frame-body .i {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.i {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-h1 {
  color: var(--app-heading);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.app-h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--app-border);
  color: var(--app-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.app-h3 {
  color: var(--app-heading);
  font-size: 0.9375rem;
  font-weight: 600;
}

.app-muted {
  color: var(--app-muted);
}

.app-small {
  font-size: 0.75rem;
}

.app-strong {
  color: var(--app-heading);
  font-weight: 500;
}

.app-link {
  color: var(--app-primary);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-figure {
  color: var(--app-heading);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.money {
  font-variant-numeric: tabular-nums;
}

.app-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 2rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--app-button);
  color: var(--app-button-fg);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.app-button-secondary {
  border-color: var(--app-border-strong);
  background: var(--app-card);
  color: var(--app-fg);
}

.app-button-block {
  align-self: stretch;
}

.tile {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--app-accent);
  color: var(--app-primary);
}

.tile-danger {
  background: var(--app-danger-tint);
  color: var(--app-danger-ink);
}

.tile-large {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
}

.tile-large .i {
  width: 1.25rem;
  height: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background: var(--app-muted-tint);
  color: var(--app-muted-ink);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-danger {
  background: var(--app-danger-tint);
  color: var(--app-danger-ink);
}

.badge-warning {
  background: var(--app-warning-tint);
  color: var(--app-warning-ink);
}

.badge-card {
  margin-left: auto;
  background: var(--app-card);
}

/* The browser window */
.browser-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: -1.25rem -1.25rem 0;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-sidebar);
}

.dots {
  display: flex;
  gap: 0.375rem;
}

.dots i {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: var(--app-border-strong);
}

.address {
  flex: 0 1 18rem;
  margin: 0 auto;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--app-secondary);
  color: var(--app-muted);
  font-size: 0.6875rem;
  text-align: center;
}

.frame-browser .frame-body {
  padding-bottom: 0;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: -0.75rem -1.25rem 0;
}

.app-sidebar {
  display: none;
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  padding: 1.5rem 1.5rem 1.75rem;
}

.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.app-head > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--app-heading);
  font-weight: 600;
}

.app-logo {
  width: 1.5rem;
  height: 1.5rem;
}

.logo-tile,
.logo-stripe {
  fill: var(--app-primary);
}

.logo-stripe {
  fill-opacity: 0.6;
}

.logo-bar {
  fill: var(--app-primary-fg);
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-top: 1rem;
}

.app-nav li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--app-muted);
}

.app-nav li .i {
  color: var(--app-subtle);
}

.app-nav .is-current {
  background: var(--app-accent);
  color: var(--app-heading);
  font-weight: 600;
}

.app-nav .is-current .i {
  color: var(--app-primary);
}

.app-person {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  color: var(--app-heading);
}

.avatar {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--app-accent);
  color: var(--app-primary);
  font-size: 0.6875rem;
  font-weight: 600;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: var(--app-secondary);
}

.status-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.app-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--app-border);
}

.row-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.row > .badge {
  align-self: center;
}

.row > .money {
  color: var(--app-heading);
  font-weight: 500;
  text-align: right;
}

.rows .row > .badge {
  grid-column: 2;
  grid-row: 2;
}

.rows .row > .money {
  grid-column: 3;
  grid-row: 1;
}

.spend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.spend li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1rem;
  color: var(--app-muted);
}

.spend li .money {
  color: var(--app-fg);
}

.bar {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--app-track);
}

.fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--app-bar);
}

.w-4 { width: 4%; }
.w-8 { width: 8%; }
.w-10 { width: 10%; }
.w-22 { width: 22%; }
.w-32 { width: 32%; }
.w-82 { width: 82%; }
.w-100 { width: 100%; }

/* Hero: the browser window at every width; the sidebar joins from 52rem. */
.frames {
  width: 100%;
}

@media (max-width: 39.99rem) {
  .app-main {
    gap: 1rem;
    padding: 1.25rem 1rem 1.5rem;
  }

  .app-head .app-button {
    display: none;
  }
}

@media (min-width: 52rem) {
  .app {
    grid-template-columns: 11.5rem minmax(0, 1fr);
  }

  .app-sidebar {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.875rem;
    border-right: 1px solid var(--app-border);
    background: var(--app-sidebar);
  }

  .app-main {
    padding: 1.75rem 2rem 2rem;
  }

  .rows .row {
    grid-template-columns: 2rem minmax(0, 1fr) auto 5rem;
  }

  .rows .row > .badge {
    grid-column: 3;
    grid-row: 1;
  }

  .rows .row > .money {
    grid-column: 4;
  }
}

/* ---------- Built for ---------- */

.built-for {
  padding: 1.5rem 0;
  border-block: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  text-align: center;
}

.built-lead {
  margin-right: 0.5rem;
  color: var(--heading);
  font-weight: 600;
}

/* ---------- Sections ---------- */

.section {
  padding: 3rem 0;
}

.section-sunken {
  background: var(--sunken);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 40rem;
  margin-bottom: 2rem;
}

.home .section h2,
.home .cta-band h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.home main h3 {
  font-size: 1.125rem;
  line-height: 1.3;
}

.section-lede {
  max-width: 34rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
  text-wrap: pretty;
}

.steps {
  display: grid;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 34rem;
}

.steps p {
  color: var(--muted-foreground);
}

.step-number {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
}

/* ---------- Demos ---------- */

.demo {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panels {
  display: grid;
  gap: 1.5rem;
}

.panel {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.stepper .panels,
.timeline .panels {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.demo-note {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  text-align: center;
}

/* Upload */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.75rem 1rem;
  border: 1.5px dashed var(--app-border-strong);
  border-radius: 0.75rem;
  background: var(--app-secondary);
  text-align: center;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  color: var(--app-primary);
}

.file-row .app-muted {
  margin-left: auto;
}

/* The letter being read */
.letter {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem;
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  background: var(--app-card);
  color: var(--app-fg);
}

.letter-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.hl {
  padding: 0.05rem 0.2rem;
  border-radius: 0.25rem;
  background: var(--app-accent);
  color: inherit;
}

.hl-unsure {
  background: var(--app-warning-tint);
  color: var(--app-warning-ink);
  box-shadow: 0 0 0 1px var(--app-warning-ink);
}

.reading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--app-muted);
}

.pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--app-primary);
}

/* The review form */
.review {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--app-heading);
  font-weight: 600;
}

.input {
  display: block;
  overflow: hidden;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--app-input);
  border-radius: 0.5rem;
  background: var(--app-card);
  color: var(--app-fg);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.input-short {
  max-width: 9rem;
}

.input-empty {
  color: var(--app-muted);
}

.field-check {
  padding: 0.8rem;
  border-radius: 0.75rem;
  background: var(--app-warning-tint);
  color: var(--app-warning-ink);
}

.field-check .field-label {
  color: var(--app-warning-ink);
}

.quote {
  padding-left: 0.6rem;
  border-left: 2px solid currentColor;
}

.confirm {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--app-border);
  color: var(--app-heading);
}

.checkbox {
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--app-input);
  border-radius: 0.25rem;
  background: var(--app-card);
}

/* Timeline */
.track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
}

.track legend {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
}

/* The line between the stops: a piece behind each stop, from the middle of the first to the middle of the last. */
.track label::before {
  content: "";
  position: absolute;
  top: calc(1rem - 1px);
  right: 0;
  left: 0;
  height: 2px;
  background: var(--border-strong);
}

.track label[for="tl-today"]::before {
  left: 50%;
}

.track label[for="tl-renews"]::before {
  right: 50%;
}

.track label {
  position: relative;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 5rem;
  padding: 0.5rem 0.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  text-align: center;
  white-space: normal;
}

.track input:checked + label {
  background: transparent;
  color: var(--heading);
}

.track label:hover {
  color: var(--heading);
}

.stop-dot {
  position: relative;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  background: var(--background);
}

.section-sunken .stop-dot {
  background: var(--sunken);
}

.track input:checked + label .stop-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--accent);
  transform: scale(1.15);
}

.stop-name {
  font-weight: 600;
  line-height: 1.25;
}

.stop-date {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.frame-row .frame-body {
  gap: 0.25rem;
  padding: 0.9rem 1.1rem 0.4rem;
}

.frame-row .row {
  border-bottom: 0;
}

.tl-text {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--muted-foreground);
  text-align: center;
}

.tl-text strong {
  color: var(--heading);
}

/* Feature tour */
.tabs {
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin: 0 -1rem;
  padding: 0.25rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tour-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 30rem;
}

.home main .tour-copy h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  letter-spacing: -0.02em;
}

.tour-copy p {
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

.optional {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 0.375rem;
  background: var(--accent);
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--app-border);
}

.stats div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stats dt {
  color: var(--app-muted);
  font-size: 0.75rem;
}

.stats dd {
  color: var(--app-heading);
  font-size: 1.0625rem;
  font-weight: 500;
}

.stats dd.app-figure {
  font-size: 1.375rem;
}

.ask {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bubble {
  max-width: 88%;
  padding: 0.6rem 0.8rem;
  border-radius: 0.75rem;
  background: var(--app-secondary);
}

.bubble-me {
  align-self: flex-end;
  background: var(--app-accent);
  color: var(--app-heading);
}

.cite {
  display: block;
  margin-top: 0.35rem;
  color: var(--app-primary);
  font-size: 0.75rem;
}

.list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.1rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--app-border);
}

.list li > :first-child,
.list li > :nth-child(2) {
  grid-column: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.list li > :nth-child(3) {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
}

.list-compact li {
  padding: 0.5rem 0;
}

.tag {
  max-width: 11rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  background: var(--app-secondary);
  color: var(--app-muted);
  font-size: 0.6875rem;
  text-align: right;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  counter-reset: step;
  margin-bottom: 0.5rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  counter-increment: step;
}

.checklist li::before {
  content: counter(step);
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--app-accent);
  color: var(--app-primary);
  font-size: 0.6875rem;
  font-weight: 700;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 7rem;
  padding-top: 0.5rem;
}

.col {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--app-bar);
}

.col:last-child {
  background: var(--app-primary);
}

.h-60 { height: 60%; }
.h-64 { height: 64%; }
.h-66 { height: 66%; }
.h-70 { height: 70%; }
.h-72 { height: 72%; }
.h-78 { height: 78%; }
.h-80 { height: 80%; }
.h-84 { height: 84%; }
.h-88 { height: 88%; }
.h-90 { height: 90%; }
.h-94 { height: 94%; }
.h-100 { height: 100%; }

/* Panels show one at a time where :has() works; elsewhere they all show, stacked, and the pickers hide. */
@supports selector(:has(*)) {
  .stepper .panel,
  .timeline .panel,
  .tour .panel {
    display: none;
  }

  .stepper:has(#step-upload:checked) .panel-upload,
  .stepper:has(#step-read:checked) .panel-read,
  .stepper:has(#step-check:checked) .panel-check,
  .timeline:has(#tl-today:checked) .panel-tl-today,
  .timeline:has(#tl-30:checked) .panel-tl-30,
  .timeline:has(#tl-7:checked) .panel-tl-7,
  .timeline:has(#tl-decide:checked) .panel-tl-decide,
  .timeline:has(#tl-renews:checked) .panel-tl-renews,
  .tour:has(#tour-contracts:checked) .panel-contracts,
  .tour:has(#tour-accounts:checked) .panel-accounts,
  .tour:has(#tour-playbook:checked) .panel-playbook,
  .tour:has(#tour-net-worth:checked) .panel-net-worth,
  .tour:has(#tour-budget:checked) .panel-budget,
  .tour:has(#tour-points:checked) .panel-points,
  .tour:has(#tour-passport:checked) .panel-passport {
    display: grid;
  }
}

@supports not selector(:has(*)) {
  .picker {
    display: none;
  }
}

/* ---------- Security ---------- */

.security {
  display: grid;
  gap: 0;
}

.security li {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-strong);
}

.security p {
  color: var(--muted-foreground);
}

.sec-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.25rem;
  border-radius: 0.75rem;
  background: var(--background);
  color: var(--primary);
}

.home details summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  width: fit-content;
  color: var(--primary);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.home details summary::-webkit-details-marker {
  display: none;
}

.home details summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.2rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.home details[open] > summary::after {
  margin-top: 0.2rem;
  transform: rotate(-135deg);
}

.home details summary:hover {
  color: var(--primary-hover);
}

.home details summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 0.375rem;
}

.home details > p {
  max-width: 34rem;
  padding-bottom: 0.5rem;
}

.honest {
  margin-top: 1.5rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.75rem;
  background: var(--background);
}

.home .honest > summary {
  color: var(--heading);
}

.home .honest > p {
  color: var(--muted-foreground);
  padding-bottom: 1rem;
}

/* ---------- Questions ---------- */

.faq {
  border-top: 1px solid var(--border-strong);
}

.faq details {
  border-bottom: 1px solid var(--border-strong);
}

.home .faq summary {
  justify-content: space-between;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.5rem 0;
  color: var(--heading);
  font-size: 1.0625rem;
}

.home .faq summary:hover {
  color: var(--primary);
}

.faq details > p {
  padding-bottom: 1.25rem;
  color: var(--muted-foreground);
}

/* ---------- Final call to action ---------- */

.cta-band {
  padding: 1rem 0 3rem;
}

.cta-band .cta-inner > * {
  max-width: 34rem;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-radius: 1.5rem;
  background:
    radial-gradient(30rem 16rem at 50% 0%, var(--glow), transparent 70%),
    linear-gradient(180deg, var(--sunken), var(--background));
  box-shadow: inset 0 0 0 1px var(--border);
}

.cta-band p {
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

.cta-band .cta-row {
  margin-top: 0;
}

.cta-join {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

/* ---------- Footer ---------- */

.home footer {
  display: block;
  padding: 1.5rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* ---------- Wider screens ---------- */

@media (min-width: 40rem) {
  .wrap {
    padding: 0 1.5rem;
  }

  .frames,
  .stepper .panels,
  .tour .panels {
    padding: 2rem;
  }

  .tabs {
    margin: 0;
    padding: 0.25rem 0;
  }

  .hero {
    padding: 4.5rem 0 3.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  .security {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
  }

  .cta-inner {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

@media (min-width: 56rem) {
  .tabs {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
  }

  .tour-panel {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 3rem;
  }

  .faq-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 3rem;
  }
}

@media (min-width: 64rem) {
  .wrap {
    padding: 0 2rem;
  }

  .frames {
    padding: 3rem 3rem 0;
    overflow: hidden;
  }

  .frames .frame-browser {
    border-bottom: 0;
    border-radius: 1rem 1rem 0 0;
  }

  .hero {
    padding: 6rem 0 4.5rem;
  }

  .section {
    padding: 6rem 0;
  }

  .cta-band {
    padding-bottom: 5rem;
  }
}

/* ---------- Motion, only for people who haven't asked for less ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .picker label,
  .header-nav a,
  .header-signin,
  .home details summary {
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  }

  .stop-dot {
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .home details summary::after {
    transition: transform 0.2s ease;
  }

  .panels > .panel {
    animation: panel-in 0.35s ease-out both;
  }

  .panel-read .hl {
    animation: mark-in 0.45s ease-out both;
  }

  .panel-read .hl-1 {
    animation-delay: 0.3s;
  }

  .panel-read .hl-2 {
    animation-delay: 0.75s;
  }

  .panel-read .hl-3 {
    animation-delay: 1.2s;
  }

  .panel-read .hl-4 {
    animation-delay: 1.65s;
  }

  .pulse {
    animation: pulse 1.2s ease-in-out 3;
  }

  @keyframes panel-in {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }
  }

  @keyframes mark-in {
    from {
      background-color: transparent;
      box-shadow: none;
    }
  }

  @keyframes pulse {
    50% {
      opacity: 0.3;
    }
  }
}
