/* ─────────────────────────────────────────────────────────────
   Tadbooks site — "fall afternoon" app-like layout
   Every page fits the viewport exactly: no scrolling, any device.
   Palette lifted straight from the app's design tokens.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Paper — golden-hour neutrals */
  --paper-50:  #FDFAF2;
  --paper-100: #F6EDDC;
  --paper-200: #EEE2CB;
  --paper-300: #E3D2B4;
  --paper-400: #CBB393;
  --paper-600: #85715A;
  --paper-700: #5C4B39;
  --paper-800: #46382A;
  --paper-900: #362A1E;
  --paper-950: #281E14;

  /* Burnt sienna — the brand hue */
  --sienna-100: #F6E2C6;
  --sienna-300: #E0A96B;
  --sienna-500: #C46F28;
  --sienna-700: #B0561E;
  --sienna-800: #8F4519;

  /* Moss — money in, success */
  --moss-300: #A3C495;
  --moss-700: #44693E;

  /* Winter — monochrome night */
  --midnight-700: #363636;
  --midnight-950: #1a1a1a;
  --frost-200: #e8e8e8;
  --frost-600: #a0a0a0;

  /* The app's sidebar brown */
  --bark: #31261b;

  --font-heading: 'Lora', Georgia, Cambria, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', -apple-system, system-ui, sans-serif;

  /* Motion — confident deceleration, never bouncy */
  --ease-out: cubic-bezier(.25, 1, .5, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 1px 2px rgba(54, 42, 30, .08), 0 8px 28px rgba(54, 42, 30, .12);
  --shadow-deep: 0 2px 6px rgba(54, 42, 30, .14), 0 20px 48px rgba(54, 42, 30, .20);

  --wrap: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── No-scroll shell ─────────────────────────────────────── */

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--paper-900);
  background:
    radial-gradient(900px 380px at 85% -80px, rgba(196, 111, 40, .10), transparent 70%),
    linear-gradient(160deg, var(--paper-50) 0%, var(--paper-100) 55%, var(--paper-200) 100%);
  line-height: 1.5;
  font-size: clamp(1rem, 1.75vmin, 1.2rem);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(.5rem, 1.6vmin, 1.2rem) clamp(1rem, 2.5vw, 1.5rem);
}

/* Load choreography: each page's top-level blocks rise in sequence */
main > * { animation: rise .6s var(--ease-expo) both; }
main > *:nth-child(2) { animation-delay: .08s; }
main > *:nth-child(3) { animation-delay: .16s; }
main > *:nth-child(4) { animation-delay: .24s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

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

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.1; color: var(--paper-950); }
h1 em, h2 em { font-style: italic; color: var(--sienna-700); }

::selection { background: var(--sienna-300); color: var(--paper-950); }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(176, 86, 30, .35);
  border-radius: var(--radius-sm);
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 1em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: .65em 1.3em;
  transition: transform .16s var(--ease-out), background .16s var(--ease-out),
              box-shadow .16s var(--ease-out), border-color .16s var(--ease-out);
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--sienna-700);
  color: var(--paper-50);
  box-shadow: 0 1px 2px rgba(102, 50, 18, .35);
}
.btn-primary:hover { background: var(--sienna-800); box-shadow: 0 4px 14px rgba(102, 50, 18, .35); }

.btn-ghost {
  background: transparent;
  color: var(--paper-800);
  border: 1px solid var(--paper-400);
}
.btn-ghost:hover { background: var(--paper-50); border-color: var(--paper-600); }

.btn-lg { font-size: 1.14em; padding: .8em 1.6em; }
.btn-block { width: 100%; }
.btn-nav { font-size: .98rem; padding: .5em 1.1em; }

/* ── Header ──────────────────────────────────────────────── */

.site-header {
  flex-shrink: 0;
  background: color-mix(in srgb, var(--paper-100) 88%, transparent);
  border-bottom: 1px solid var(--paper-300);
  z-index: 50;
}

.nav {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: .6rem clamp(1rem, 2.5vw, 1.5rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--paper-950);
  text-decoration: none;
}
.brand img { border-radius: 8px; width: 34px; height: 34px; }

.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a {
  position: relative;
  color: var(--paper-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.02rem;
  padding: .2em 0;
  transition: color .2s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--sienna-700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease-out);
}
.nav-links a:hover { color: var(--sienna-700); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--sienna-700); }

/* Hamburger (mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--paper-400);
  border-radius: var(--radius-sm);
  padding: .45em .6em;
  cursor: pointer;
  color: var(--paper-800);
  font-size: 1.05rem;
  line-height: 1;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: linear-gradient(160deg, var(--paper-50), var(--paper-200));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  animation: menu-in .3s var(--ease-expo) both;
}
.mobile-menu[hidden] { display: none; }
@keyframes menu-in {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: none; }
}
.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--paper-900);
  text-decoration: none;
}
.mobile-menu a[aria-current="page"] { color: var(--sienna-700); font-style: italic; }
.mobile-menu .menu-close {
  position: absolute;
  top: 1rem; right: 1.2rem;
  font-size: 2rem;
  background: none; border: none;
  color: var(--paper-700);
  cursor: pointer;
}

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
  flex-shrink: 0;
  background: var(--bark);
  color: var(--paper-400);
  font-size: .86rem;
}
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .5rem clamp(1rem, 2.5vw, 1.5rem);
}
.footer-tag { color: var(--paper-300); }
.footer-fine { margin-left: auto; }
.footer-fine a { color: var(--paper-300); }

/* ── Shared bits ─────────────────────────────────────────── */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: clamp(.68rem, 1.25vmin, .85rem);
  font-weight: 700;
  color: var(--sienna-700);
}

.page-head { text-align: center; margin-bottom: clamp(.5rem, 1.4vmin, 1rem); }
.page-head h1 { font-size: clamp(1.7rem, 4.2vmin, 2.9rem); }
.page-head p { color: var(--paper-700); margin-top: .3rem; font-size: clamp(.95rem, 1.7vmin, 1.15rem); }

/* Window chrome — matches the app's warm-brown title bar */
.window-chrome {
  display: flex;
  align-items: center;
  gap: .8rem;
  background: var(--bark);
  padding: .45rem .85rem;
  border-radius: var(--radius) var(--radius) 0 0;
  flex-shrink: 0;
}
.traffic { display: flex; gap: .4rem; }
.traffic i { width: 11px; height: 11px; border-radius: 50%; }
.traffic i:first-child { background: #e0655a; }
.traffic i:nth-child(2) { background: #e0a53a; }
.traffic i:last-child  { background: #7fa873; }
.window-title {
  color: var(--paper-300);
  font-size: .8rem;
  letter-spacing: .02em;
  margin: 0 auto;
  transform: translateX(-26px);
}

/* ── Home (hero) ─────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(1rem, 3vw, 2.6rem);
  align-items: center;
  width: 100%;
  min-height: 0;
  flex: 1;
}

.hero-copy > * { animation: rise .6s var(--ease-expo) both; }
.hero-copy > *:nth-child(2) { animation-delay: .07s; }
.hero-copy > *:nth-child(3) { animation-delay: .14s; }
.hero-copy > *:nth-child(4) { animation-delay: .21s; }
.hero-copy > *:nth-child(5) { animation-delay: .28s; }

.hero-copy h1 { font-size: clamp(2rem, 5.4vmin, 4rem); }
.hero-copy .eyebrow { display: block; margin-bottom: .7em; }

.lede {
  color: var(--paper-700);
  margin-top: .9em;
  font-size: clamp(1rem, 1.95vmin, 1.32rem);
  max-width: 32em;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: 1.3em;
  width: min(100%, 23em);
}
.hero-actions-row { display: flex; gap: .7rem; }
.hero-actions-row .btn { flex: 1; padding-inline: .6em; white-space: nowrap; }

.hero-note { margin-top: .9em; font-size: clamp(.8rem, 1.45vmin, .98rem); color: var(--paper-600); }

.hero-shot {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  justify-self: center;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep);
  border: 1px solid var(--paper-300);
  animation: rise-scale .7s .15s var(--ease-expo) both;
  transition: box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
.hero-shot:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(54,42,30,.16), 0 28px 60px rgba(54,42,30,.26); }
.hero-shot img {
  min-height: 0;
  object-fit: contain;
  border-radius: 0 0 var(--radius) var(--radius);
  cursor: zoom-in;
}

@keyframes rise-scale {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.ledger-strip {
  flex-shrink: 0;
  width: 100%;
  border-top: 1px solid var(--paper-300);
  margin-top: clamp(.6rem, 1.8vmin, 1.2rem);
  padding-top: clamp(.55rem, 1.5vmin, .9rem);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 2rem;
  justify-content: space-between;
}
.ledger-item {
  font-family: var(--font-heading);
  font-size: clamp(.9rem, 1.75vmin, 1.12rem);
  color: var(--paper-700);
}
.ledger-item strong { color: var(--sienna-700); font-weight: 600; }

/* ── Tour ────────────────────────────────────────────────── */

.tour {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* Tour load choreography */
.tour > * { animation: rise .55s var(--ease-expo) both; }
.tour > *:nth-child(2) { animation-delay: .1s; }
.tour > *:nth-child(3) { animation-delay: .18s; }
.tour > *:nth-child(4) { animation-delay: .26s; }

.tour-tabs,
.os-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  flex-shrink: 0;
  margin-bottom: clamp(.5rem, 1.4vmin, .95rem);
}
.tour-tabs [role="tab"],
.os-tabs [role="tab"] {
  font-family: var(--font-body);
  font-size: clamp(.8rem, 1.55vmin, 1rem);
  font-weight: 600;
  color: var(--paper-700);
  background: transparent;
  border: 1px solid var(--paper-400);
  border-radius: 999px;
  padding: .42em 1.05em;
  cursor: pointer;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out),
              color .18s var(--ease-out), border-color .18s var(--ease-out),
              box-shadow .18s var(--ease-out);
}
.tour-tabs [role="tab"]:hover,
.os-tabs [role="tab"]:hover {
  border-color: var(--sienna-500);
  color: var(--sienna-700);
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(54, 42, 30, .12);
}
.tour-tabs [role="tab"]:active,
.os-tabs [role="tab"]:active { transform: scale(.96); }
.tour-tabs [role="tab"][aria-selected="true"],
.os-tabs [role="tab"][aria-selected="true"] {
  background: var(--sienna-700);
  border-color: var(--sienna-700);
  color: var(--paper-50);
  box-shadow: 0 2px 8px rgba(102, 50, 18, .3);
}

.tour-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 100%;
  flex: 1;
  width: 100%;
  margin: 0 auto; /* JS narrows the stage to the image's aspect ratio */
}

.tour-zoom {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  padding: 0;
  border: 1px solid var(--paper-300);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: none;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .3s var(--ease-out);
}
.tour-zoom:hover { box-shadow: var(--shadow-deep); }

.tour-zoom img {
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .28s var(--ease-out), transform .5s var(--ease-out);
}
.tour-zoom:hover img { transform: scale(1.012); }
.tour-zoom img.is-out { opacity: 0; transform: translateY(8px) scale(.99); transition-duration: .18s; }

/* "Click to enlarge" hint — appears on hover */
.tour-zoom::after {
  content: "Click to enlarge";
  position: absolute;
  right: .9rem;
  bottom: .8rem;
  background: color-mix(in srgb, var(--bark) 88%, transparent);
  color: var(--paper-100);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  padding: .4em 1em;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
  pointer-events: none;
}
.tour-zoom:hover::after { opacity: 1; transform: none; }

.tour-caption {
  flex-shrink: 0;
  text-align: center;
  color: var(--paper-600);
  font-size: clamp(.88rem, 1.75vmin, 1.1rem);
  margin-top: .6rem;
  font-style: italic;
  font-family: var(--font-heading);
  transition: opacity .28s var(--ease-out), transform .28s var(--ease-out);
}
.tour-caption.is-out { opacity: 0; transform: translateY(4px); transition-duration: .18s; }

/* ── Tutorials ───────────────────────────────────────────── */

.tutorials {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.tutorials > * { animation: rise .55s var(--ease-expo) both; }
.tutorials > *:nth-child(2) { animation-delay: .1s; }
.tutorials > *:nth-child(3) { animation-delay: .18s; }
.tutorials > *:nth-child(4) { animation-delay: .26s; }

.player-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--paper-300);
  box-shadow: var(--shadow-deep);
  background: var(--bark);
  position: relative;
}
.player iframe { width: 100%; height: 100%; border: 0; display: block; }

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  color: var(--paper-300);
  text-align: center;
  padding: 1rem;
}
.player-placeholder .play-badge {
  width: clamp(48px, 8.5vmin, 68px);
  height: clamp(48px, 8.5vmin, 68px);
  border-radius: 50%;
  background: var(--sienna-700);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper-50);
  font-size: clamp(1.05rem, 2.5vmin, 1.5rem);
  transition: transform .25s var(--ease-out), background .25s var(--ease-out);
}
.player:hover .play-badge { transform: scale(1.08); background: var(--sienna-800); }
.player-placeholder strong { font-family: var(--font-heading); font-size: clamp(1.1rem, 2.4vmin, 1.5rem); color: var(--paper-100); }
.player-placeholder span { font-size: clamp(.8rem, 1.5vmin, .95rem); color: var(--paper-400); }

.episodes[hidden] { display: none; }
.episodes {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: clamp(.5rem, 1.6vmin, 1rem);
  max-width: 100%;
}
.ep-arrow {
  background: none;
  border: 1px solid var(--paper-400);
  border-radius: 50%;
  width: 2.2em; height: 2.2em;
  cursor: pointer;
  color: var(--paper-800);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out), color .18s var(--ease-out);
}
.ep-arrow:hover:not(:disabled) { border-color: var(--sienna-500); color: var(--sienna-700); transform: translateY(-1px); }
.ep-arrow:active:not(:disabled) { transform: scale(.94); }
.ep-arrow:disabled { opacity: .35; cursor: default; }

.ep-list {
  display: flex;
  gap: .4rem;
  overflow: hidden;
  flex-wrap: nowrap;
}
.ep-pill {
  font-family: var(--font-body);
  font-size: clamp(.8rem, 1.5vmin, .98rem);
  font-weight: 600;
  color: var(--paper-700);
  background: transparent;
  border: 1px solid var(--paper-400);
  border-radius: 999px;
  padding: .4em 1em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out),
              color .18s var(--ease-out), border-color .18s var(--ease-out);
}
.ep-pill:hover { border-color: var(--sienna-500); color: var(--sienna-700); transform: translateY(-2px); }
.ep-pill[aria-selected="true"] {
  background: var(--sienna-700);
  border-color: var(--sienna-700);
  color: var(--paper-50);
}

.ep-title {
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--paper-600);
  font-size: clamp(.88rem, 1.7vmin, 1.08rem);
  margin-top: .55rem;
}

/* ── Why Tad (story pager) ───────────────────────────────── */

.story {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.story-card {
  flex: 1;
  min-height: 0;
  width: min(100%, 780px);
  background: var(--paper-50);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep);
  padding: clamp(1.1rem, 3.5vmin, 2.6rem) clamp(1.1rem, 4vmin, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.story-chapter { display: none; }
.story-chapter.is-active { display: block; animation: rise .45s var(--ease-expo) both; }

.story-chapter .eyebrow { display: block; margin-bottom: .6em; }
.story-chapter h2 { font-size: clamp(1.4rem, 3.4vmin, 2.3rem); margin-bottom: .55em; }
.story-chapter p {
  color: var(--paper-700);
  font-size: clamp(.95rem, 1.9vmin, 1.18rem);
  max-width: 54ch;
}
.story-chapter p + p { margin-top: .8em; }

.story-tad {
  width: clamp(44px, 7.5vmin, 60px);
  border-radius: 13px;
  margin-bottom: 1em;
}

.story-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(.6rem, 1.8vmin, 1.1rem);
}
.story-dots { display: flex; gap: .5rem; }
.story-dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper-400);
  transition: background .25s var(--ease-out), transform .25s var(--ease-out);
}
.story-dots i.is-active { background: var(--sienna-700); transform: scale(1.3); }

/* ── Pricing ─────────────────────────────────────────────── */

.pricing {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 580px);
  gap: clamp(1.2rem, 4vw, 3.2rem);
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.pricing-col { min-height: 0; display: flex; flex-direction: column; justify-content: center; }

.receipt {
  background: var(--paper-50);
  border: 1px solid var(--paper-300);
  border-radius: 4px;
  padding: clamp(1.1rem, 2.8vmin, 2rem) clamp(1.1rem, 2.8vmin, 1.9rem);
  box-shadow: var(--shadow-deep);
  position: relative;
  font-size: clamp(.85rem, 1.7vmin, 1.05rem);
}
.receipt::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 9px;
  background: var(--paper-50);
  clip-path: polygon(0 0, 3% 100%, 6% 0, 9% 100%, 12% 0, 15% 100%, 18% 0, 21% 100%, 24% 0, 27% 100%, 30% 0, 33% 100%, 36% 0, 39% 100%, 42% 0, 45% 100%, 48% 0, 51% 100%, 54% 0, 57% 100%, 60% 0, 63% 100%, 66% 0, 69% 100%, 72% 0, 75% 100%, 78% 0, 81% 100%, 84% 0, 87% 100%, 90% 0, 93% 100%, 96% 0, 100% 100%, 100% 0);
}

.receipt-store {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3em;
  letter-spacing: .28em;
  text-align: center;
  color: var(--paper-950);
}
.receipt-meta { text-align: center; color: var(--paper-600); font-size: .9em; margin-top: .2em; }

.receipt-rule { border-top: 1.5px dashed var(--paper-400); margin: .9em 0; }

.receipt-lines div {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin: .45em 0;
}
.receipt-lines dt { color: var(--paper-700); order: 1; }
.receipt-lines div::after {
  content: "";
  border-bottom: 2px dotted var(--paper-300);
  flex: 1;
  order: 2;
  transform: translateY(-3px);
}
.receipt-lines dd { order: 3; font-weight: 600; color: var(--paper-950); font-variant-numeric: tabular-nums; }

.receipt-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.28em;
  color: var(--paper-950);
  margin-bottom: .9em;
}

.receipt-fine { text-align: center; font-size: .78em; color: var(--paper-600); margin-top: .7em; }
.receipt-thanks {
  text-align: center;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--moss-700);
  margin-top: .7em;
}

/* FAQ (one open at a time, compact) */
.faq-col h2 { font-size: clamp(1.3rem, 2.9vmin, 1.9rem); margin-bottom: .5em; }

.faq-list details {
  border-bottom: 1px solid var(--paper-300);
  padding: clamp(.45rem, 1.3vmin, .75rem) 0;
}
.faq-list summary {
  font-weight: 600;
  font-size: clamp(.9rem, 1.75vmin, 1.08rem);
  color: var(--paper-950);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color .18s var(--ease-out);
}
.faq-list summary:hover { color: var(--sienna-700); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--font-heading);
  color: var(--sienna-700);
  font-size: 1.25em;
  transition: transform .25s var(--ease-out);
  flex-shrink: 0;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p {
  color: var(--paper-700);
  margin-top: .45em;
  font-size: clamp(.85rem, 1.6vmin, 1rem);
  max-width: 58ch;
  animation: rise .3s var(--ease-out) both;
}

/* Mobile segmented control for pricing page */
.seg {
  display: none;
  gap: .4rem;
  margin-bottom: .8rem;
  flex-shrink: 0;
}
.seg button {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  padding: .5em 1em;
  border: 1px solid var(--paper-400);
  background: transparent;
  color: var(--paper-700);
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out);
}
.seg button[aria-selected="true"] {
  background: var(--sienna-700);
  border-color: var(--sienna-700);
  color: var(--paper-50);
}

/* ── Install ─────────────────────────────────────────────── */

.install {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.install > * { animation: rise .55s var(--ease-expo) both; }
.install > *:nth-child(2) { animation-delay: .1s; }
.install > *:nth-child(3) { animation-delay: .18s; }
.install > *:nth-child(4) { animation-delay: .26s; }

.install-card {
  flex: 1;
  min-height: 0;
  width: min(100%, 720px);
  background: var(--paper-50);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep);
  padding: clamp(1.1rem, 3.2vmin, 2.4rem) clamp(1.1rem, 3.8vmin, 2.8rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.install-panel[hidden] { display: none; }
.install-panel { animation: rise .45s var(--ease-expo) both; }
.install-panel h2 { font-size: clamp(1.3rem, 3vmin, 2rem); margin-bottom: .7em; }

.install-lede {
  color: var(--paper-700);
  font-size: clamp(.9rem, 1.75vmin, 1.1rem);
  margin: -.4em 0 1em;
  max-width: 54ch;
}

.install-steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: clamp(.6rem, 1.8vmin, 1.05rem);
}
.install-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.7em;
  color: var(--paper-700);
  font-size: clamp(.9rem, 1.8vmin, 1.12rem);
  max-width: 56ch;
}
.install-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .05em;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: var(--sienna-100);
  color: var(--sienna-800);
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-steps strong { color: var(--paper-950); }

.install-panel code {
  background: var(--paper-200);
  border-radius: 5px;
  padding: .1em .4em;
  font-size: .88em;
  white-space: nowrap;
}

.install-done {
  margin-top: 1.1em;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--moss-700);
  font-size: clamp(.9rem, 1.75vmin, 1.1rem);
}

.install-note {
  flex-shrink: 0;
  text-align: center;
  margin-top: clamp(.55rem, 1.6vmin, 1rem);
  color: var(--paper-600);
  font-size: clamp(.8rem, 1.5vmin, .98rem);
  max-width: 62ch;
}
.install-note a { color: var(--sienna-700); font-weight: 600; }

/* ── Lightbox ────────────────────────────────────────────── */

.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(40, 30, 20, .9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vmin;
  cursor: zoom-out;
  animation: lb-fade .22s var(--ease-out) both;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 96vw;
  max-height: 92dvh;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  animation: lb-zoom .32s var(--ease-expo) both;
}
@keyframes lb-zoom {
  from { opacity: 0; transform: scale(.955); }
  to   { opacity: 1; transform: none; }
}
.lightbox-close {
  position: absolute;
  top: .6rem; right: 1.2rem;
  font-size: 2.2rem;
  background: none;
  border: none;
  color: var(--paper-200);
  cursor: pointer;
  line-height: 1;
}

/* ── Reduced motion ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; margin-left: auto; }
  .nav .btn-nav { margin-left: 0; }

  .hero {
    grid-template-columns: 1fr;
    gap: .9rem;
    align-content: center;
    justify-items: center;
    text-align: center;
  }
  .hero-copy .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { margin-left: auto; margin-right: auto; }
  .hero-shot { max-width: min(100%, 520px); }
  .ledger-strip { justify-content: center; gap: .3rem 1.2rem; }

  .pricing { grid-template-columns: minmax(0, 500px); }
  .seg { display: flex; }
  .pricing [data-seg-panel][hidden] { display: none; }

  .footer-tag { display: none; }
  .tour-zoom::after { display: none; } /* no hover on touch */
}

/* Short screens: drop decorations before content */
@media (max-height: 620px) {
  .hero-shot { display: none; }
  .ledger-strip { display: none; }
  .story-tad { display: none; }
  .footer-tag { display: none; }
  .install-done { display: none; }
  .install-note { display: none; }
}
