/* ============================================================
   PRACTICAL PEDIATRIC OT — design system
   Palette supplied by the client:
   Linen #F7F4EC · Sand #E5DECA · Ocean Blue #7E9DA2
   Clay #B4674A · Deep Teal #1F4E4C · Dark Green #282C15
   Type: Playfair Display (display, italic used as the signature)
         Figtree (interface and body)
   ============================================================ */

:root {
  /* brand palette — refined August 2026
     Linen replaces the darker cream as the page; the original cream is kept
     as Sand for muted fills. Clay and Deep Teal replace Avocado and Olive. */
  --cream:      #F7F4EC;   /* Linen — page background */
  --sand:       #E5DECA;   /* the original cream, now a muted fill */
  --ocean:      #7E9DA2;   /* Ocean Blue — unchanged */
  --clay:       #B4674A;   /* Clay — accent, tags, highlights */
  --clay-deep:  #9C563B;
  --teal:       #1F4E4C;   /* Deep Teal — primary action */
  --teal-deep:  #163B3A;
  --forest:     #282C15;   /* Dark Green — ink and dark sections */

  /* derived working tones */
  --paper:      #FFFFFF;   /* cards */
  --paper-2:    #F3EFE4;   /* inputs — distinct from both white cards and the linen page */
  --line:       #DCD5C2;
  --line-soft:  #EAE4D6;
  --ink:        var(--forest);
  --ink-soft:   #4A4C3B;
  --ink-faint:  #626451;
  --ocean-tint: #E4EDED;
  --ocean-ink:  var(--ocean-ink);   /* readable ocean, for tag text and links */
  --ocean-hover:var(--ocean-hover);

  /* text on dark surfaces — Sand-derived, replacing the old olive-greys */
  --on-dark:       #D6CFBD;
  --on-dark-muted: #98917F;
  --on-dark-faint: #979180;
  --clay-on-dark:  #CC7F62;   /* Clay, lightened to stay readable on Forest */

  /* semantics, kept clear of Clay's hue */
  --warn-bg:   #FBF3E4;
  --warn-line: #E3C793;
  --warn-ink:  #7A5410;
  --error:     #97231F;
  --clay-tint:  #F5E6DF;

  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(40,44,21,.05), 0 10px 28px -14px rgba(40,44,21,.28);
  --shadow-lg: 0 2px 6px rgba(40,44,21,.06), 0 30px 60px -28px rgba(40,44,21,.4);
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.1rem, 1.7vw, 1.35rem); font-weight: 600; }
h4 { font-size: 1rem; }
em.script, .script { font-style: italic; font-family: var(--display); }
p { margin: 0 0 1em; }
a { color: var(--teal); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 820px; }

/* ---------- utility ---------- */
.eyebrow {
  font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 1rem; display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--clay); }
.lede { font-size: clamp(1.04rem, 1.4vw, 1.2rem); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-faint); }
.small { font-size: .86rem; }
.code { font-variant-numeric: tabular-nums; letter-spacing: .05em; font-size: .75rem; font-weight: 600; }
.stack > * + * { margin-top: 1rem; }
.divider { height: 1px; background: var(--line); border: 0; margin: 2.6rem 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--body); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #FFFFFF; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ocean { background: var(--ocean); color: var(--forest); }
.btn-ocean:hover { background: var(--ocean-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-quiet { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-sm { padding: .5rem .9rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247,244,236,.93); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.4rem; height: 70px; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); flex: none; }
.logo .glyph {
  width: 30px; height: 30px; border-radius: 7px; background: var(--teal);
  display: grid; place-items: center; color: var(--cream);
  font-family: var(--display); font-style: italic; font-size: .95rem; padding-bottom: 2px;
}
.logo .name { font-family: var(--display); font-size: 1.05rem; line-height: 1.1; font-weight: 500; }
.logo .name i { display: block; font-size: .66rem; font-style: normal; font-family: var(--body);
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.nav { display: flex; gap: .2rem; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500; padding: .45rem .75rem; border-radius: 999px; }
.nav a:hover, .nav a.active { color: var(--ink); background: rgba(255,255,255,.5); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: .4rem .85rem; font-weight: 600; cursor: pointer; font-family: var(--body); color: var(--ink); }
@media (max-width: 940px) {
  .nav { position: absolute; top: 70px; left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: .6rem 22px 1.2rem; gap: .1rem; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .7rem .6rem; }
  .nav .btn { margin-top: .5rem; }
  .nav-toggle { display: block; }
}

/* ---------- sections ---------- */
.section { padding: clamp(3.2rem, 6vw, 5.6rem) 0; }
.section.paper { background: var(--sand); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section.forest { background: var(--forest); color: var(--cream); }
.section.forest h2, .section.forest h3 { color: var(--cream); }
.section.forest p, .section.forest .lede { color: var(--on-dark); }
.section.forest .eyebrow { color: var(--on-dark-muted); }
.section.forest .eyebrow::before { background: var(--clay); }
.section-head { max-width: 720px; margin-bottom: 2.6rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 7vw, 5.4rem) 0 3.4rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 3.4rem); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 em { font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }
.hero-note { margin-top: 1.3rem; font-size: .86rem; color: var(--ink-faint); }

/* signature: colour plates lifted from the brand palette */
.plates { display: grid; gap: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.plate {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem; color: var(--cream); text-decoration: none;
  transition: padding-left .2s ease;
}
.plate:hover { padding-left: 1.9rem; }
.plate .label { font-family: var(--display); font-style: italic; font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
.plate .meta { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.plate.p1 { background: var(--ocean); color: var(--forest); }
.plate.p2 { background: var(--clay-deep); }
.plate.p3 { background: var(--teal); }
.plate.p4 { background: var(--forest); }
.plate.p0 { background: var(--paper-2); color: var(--forest); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 1.35rem 1.3rem; position: relative; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-soft); font-size: .93rem; margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .14s ease, box-shadow .14s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kicker { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; display: block; margin-bottom: .7rem; }
.rule-top { border-top: 3px solid var(--teal); }

.tag {
  display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .02em;
  padding: .2rem .5rem; border-radius: 4px; background: var(--clay-tint); color: var(--clay-deep);
  border: 1px solid rgba(180,103,74,.28);
}
.tag.ocean { background: var(--ocean-tint); color: var(--ocean-ink); border-color: rgba(126,157,162,.4); }
.tagrow { display: flex; flex-wrap: wrap; gap: .3rem; }

/* ---------- forms ---------- */
.field, select, input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea {
  width: 100%; font-family: var(--body); font-size: .93rem; color: var(--ink);
  padding: .6rem .75rem; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper-2); appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2355573F' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 11px; padding-right: 1.9rem; }
label.lbl { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .3rem; }

/* ---------- locked / paywall ---------- */
.lock { position: relative; overflow: hidden; }
.lock .veil { filter: blur(4px); opacity: .5; user-select: none; pointer-events: none; }
.lock-badge {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .55rem; text-align: center; padding: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.94));
}
.lock-badge p { margin: 0; font-weight: 600; font-size: .9rem; }
.lock-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: var(--cream); display: grid; place-items: center; font-size: .8rem; }

/* ---------- pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: stretch; }
@media (max-width: 1050px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .tiers { grid-template-columns: 1fr; } }
.tier { position: relative; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem 1.35rem; display: flex; flex-direction: column; }
.tier.featured { border-color: var(--teal); background: var(--paper-2); box-shadow: var(--shadow); }
.tier .tier-name { font-family: var(--display); font-size: 1.45rem; margin: 0 0 .2rem; }
.tier .who { font-size: .84rem; color: var(--ink-faint); min-height: 2.6em; margin-bottom: .9rem; }
.tier .price { font-family: var(--display); font-size: 2.5rem; line-height: 1; }
.tier .per { font-size: .84rem; color: var(--ink-faint); }
.tier .alt-price { font-size: .8rem; color: var(--ink-faint); margin: .25rem 0 1.1rem; }
.tier ul { list-style: none; padding: 0; margin: 0 0 1.4rem; font-size: .89rem; }
.tier li { padding: .34rem 0 .34rem 1.5rem; position: relative; color: var(--ink-soft); }
.tier li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 9px; border-radius: 2px; border: 1.5px solid var(--line); }
.tier li.yes::before { background: var(--clay); border-color: var(--clay); }
.tier .btn { margin-top: auto; }
.badge { position: absolute; top: -11px; left: 1.3rem; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  background: var(--clay-deep); color: #FFFFFF; border-radius: 999px; padding: .25rem .7rem; }

.cmp { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; }
.cmp th, .cmp td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line-soft); }
.cmp thead th { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); background: var(--cream); font-weight: 700; }
.cmp td:not(:first-child), .cmp th:not(:first-child) { text-align: center; }
.cmp tbody tr:last-child td { border-bottom: none; }
.tick { color: var(--teal); font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* ---------- faq / callout ---------- */
.faq details { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r); padding: .95rem 1.15rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-faint); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .8rem 0 0; color: var(--ink-soft); font-size: .93rem; }
.callout { border-left: 4px solid var(--ocean); background: var(--paper); padding: 1.1rem 1.25rem; border-radius: 0 var(--r) var(--r) 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; } }
.side {
  background: var(--forest); color: var(--on-dark); padding: 1.2rem 1rem 2rem;
  display: flex; flex-direction: column; gap: .3rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
@media (max-width: 900px) { .side { position: static; height: auto; } }
.side .logo { margin-bottom: 1.4rem; color: var(--cream); }
.side .logo .glyph { background: var(--clay-deep); color: #FFFFFF; }
.side .logo .name i { color: var(--on-dark-faint); }
.side h5 { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-faint); margin: 1.2rem 0 .4rem; font-weight: 700; font-family: var(--body); }
.side a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  color: var(--on-dark); text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: .5rem .7rem; border-radius: 8px;
}
.side a:hover { background: rgba(255,255,255,.07); color: var(--cream); }
.side a.on { background: var(--clay-deep); color: #FFFFFF; font-weight: 600; }
.side a .pill { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  background: rgba(255,255,255,.14); padding: .12rem .4rem; border-radius: 4px; }
.side a.on .pill { background: rgba(255,255,255,.22); }
.side .who { margin-top: auto; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; }
.side .who strong { color: var(--cream); display: block; font-size: .9rem; }

.main { padding: 1.6rem clamp(1rem, 3vw, 2.2rem) 4rem; max-width: 1180px; }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.app-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .2rem; }
.app-head p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.toolbar { display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: 1.2rem; align-items: center; }
.toolbar select, .toolbar input { width: auto; min-width: 148px; }
.count { font-size: .84rem; color: var(--ink-soft); font-weight: 600; }

.res-card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.res-top { height: 56px; }
.res-body { padding: .95rem 1rem 1.05rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.res-body h3 { font-size: 1.02rem; margin: 0; font-family: var(--body); font-weight: 700; letter-spacing: -.01em; }
.res-body p { font-size: .87rem; color: var(--ink-soft); margin: 0; flex: 1; }
.res-actions { display: flex; gap: .4rem; align-items: center; margin-top: .2rem; }

.goal-row { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 1.05rem 1.15rem; margin-bottom: .7rem; position: relative; }
.goal-row .gid { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-faint); }
.goal-row .gtext { font-size: 1rem; line-height: 1.5; margin: .5rem 0 .7rem; }
.goal-row .gtext em { font-style: normal; background: var(--clay-tint); box-shadow: inset 0 -2px 0 var(--clay); border-radius: 2px; padding: 0 .12em; }
.row-head { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; padding-top: .75rem; border-top: 1px dashed var(--line); }
.drawer { display: none; margin-top: .85rem; padding: .95rem; background: var(--sand); border-radius: var(--r-sm); border: 1px solid var(--line-soft); }
.drawer.open { display: block; }
.drawer-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 720px) { .drawer-row { grid-template-columns: 1fr; } }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } }
.auth-side { background: var(--forest); color: var(--cream); padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; }
.auth-side blockquote { font-family: var(--display); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.25; margin: 0; }
.auth-side cite { font-style: normal; font-size: .84rem; color: var(--on-dark-muted); }
.auth-main { padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-card .field { margin-bottom: .85rem; }
.demo-accounts { margin-top: 1.6rem; border-top: 1px dashed var(--line); padding-top: 1.1rem; }
.demo-accounts button { text-align: left; width: 100%; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: .6rem .75rem; margin-bottom: .4rem; cursor: pointer; font-family: var(--body); font-size: .85rem; color: var(--ink); }
.demo-accounts button:hover { border-color: var(--teal); }
.demo-accounts strong { display: block; }

/* misc */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--forest); color: var(--cream); padding: .7rem 1.15rem; border-radius: 999px;
  font-size: .88rem; opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--forest); color: var(--cream); padding: .6rem 1rem; z-index: 999; }
.skip:focus { left: 0; }

.site-footer { background: var(--forest); color: var(--on-dark); padding: 3.2rem 0 2rem; font-size: .9rem; }
.site-footer a { color: var(--sand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; margin-bottom: 2.4rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-faint); margin: 0 0 .8rem; font-weight: 700; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-logo { font-family: var(--display); font-size: 1.3rem; color: var(--cream); margin: 0 0 .6rem; }
.disclaimer { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.4rem; font-size: .8rem; color: var(--on-dark-faint); }
.disclaimer p { max-width: 80ch; }

/* ---------- live preview ---------- */
.preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--clay-deep); color: #FFFFFF;
  padding: .7rem 1rem; border-radius: var(--r); margin-bottom: 1.4rem; font-size: .88rem;
}
.preview-bar .pv-actions { display: flex; gap: .5rem; align-items: center; }
.preview-bar select { width: auto; background: rgba(255,255,255,.92); border-color: rgba(255,255,255,.4); font-size: .84rem; padding: .4rem .6rem; }
.preview-bar .btn-primary { background: var(--forest); color: #FFFFFF; }

.flag {
  display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .75rem; border-radius: var(--r-sm);
  background: var(--warn-bg); border: 1px solid var(--warn-line); margin-bottom: .45rem; font-size: .87rem; color: var(--ink);
}
.flag .what { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--warn-ink); flex: none; padding-top: .2rem; min-width: 74px; }
.flag.ok { background: var(--ocean-tint); border-color: rgba(126,157,162,.55); }
.flag.ok .what { color: var(--ocean-ink); }
.mono { font-family: ui-monospace, Menlo, monospace; }

/* preview page */
.pv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .pv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .pv-grid { grid-template-columns: 1fr; } }
.pv-sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pv-sheet img { width: 100%; display: block; border-bottom: 1px solid var(--line-soft); }
.pv-sheet .cap { padding: .8rem .95rem; }
.pv-sheet .cap h3 { font-size: .96rem; font-family: var(--body); font-weight: 700; margin: 0 0 .2rem; }
.pv-sheet .cap p { font-size: .82rem; color: var(--ink-faint); margin: 0; }

.pv-frame { border: 1.5px solid var(--forest); border-radius: var(--r-lg); overflow: hidden; background: var(--paper); }
.pv-frame .bar { background: var(--forest); color: var(--cream); padding: .55rem .9rem; font-size: .78rem;
  display: flex; align-items: center; gap: .5rem; }
.pv-frame .bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--clay); }
.pv-body { padding: 1.2rem; }

/* ============================================================
   HOMEPAGE PRODUCT SURFACES
   Window frames, app mockups, and the two live demos.
   ============================================================ */

/* --- window chrome --- */
.win {
  border-radius: 14px; overflow: hidden; background: var(--paper);
  border: 1px solid rgba(40,44,21,.18);
  box-shadow: 0 2px 4px rgba(40,44,21,.06), 0 26px 60px -26px rgba(40,44,21,.45);
}
.win-bar {
  background: var(--forest); padding: .55rem .85rem; display: flex; align-items: center; gap: .5rem;
}
.win-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(229,222,202,.28); display: block; }
.win-bar i:first-child { background: var(--clay); }
.win-bar span { color: var(--on-dark); font-size: .72rem; margin-left: .5rem; letter-spacing: .02em; }
.win-body { background: var(--cream); }

/* --- app mockup: sidebar + panel --- */
.mock { display: grid; grid-template-columns: 168px 1fr; min-height: 430px; }
@media (max-width: 720px) { .mock { grid-template-columns: 1fr; min-height: 0; } }
.mock-side { background: var(--forest); padding: .9rem .7rem; }
@media (max-width: 720px) { .mock-side { display: flex; gap: .3rem; overflow-x: auto; padding: .7rem; } }
.mock-side .brandline {
  color: var(--cream); font-family: var(--display); font-size: .82rem; line-height: 1.15;
  padding: 0 .5rem .9rem; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: .7rem;
}
@media (max-width: 720px) { .mock-side .brandline { display: none; } }
.mock-side button {
  display: flex; align-items: center; justify-content: space-between; gap: .4rem; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left; white-space: nowrap;
  color: var(--on-dark); font-family: var(--body); font-size: .8rem; font-weight: 500;
  padding: .42rem .55rem; border-radius: 7px; margin-bottom: .12rem;
}
.mock-side button:hover { background: rgba(255,255,255,.08); color: var(--cream); }
.mock-side button[aria-selected="true"] { background: var(--clay-deep); color: #FFFFFF; font-weight: 600; }
.mock-side .lk { font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.mock-panel { padding: 1.1rem 1.2rem; background: var(--cream); }
.mock-panel h4 { font-family: var(--display); font-size: 1.15rem; margin: 0 0 .15rem; font-weight: 500; }
.mock-panel .sub { font-size: .78rem; color: var(--ink-faint); margin: 0 0 .9rem; }
.mock-row { display: grid; gap: .5rem; }
.mock-stat { background: #fff; border: 1px solid var(--line-soft); border-radius: 9px; padding: .6rem .7rem; }
.mock-stat b { display: block; font-family: var(--display); font-size: 1.35rem; line-height: 1; }
.mock-stat span { font-size: .66rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.mock-item {
  background: #fff; border: 1px solid var(--line-soft); border-radius: 9px; padding: .55rem .7rem;
  display: flex; align-items: center; gap: .6rem; font-size: .8rem;
}
.mock-item .sw { width: 26px; height: 32px; border-radius: 4px; flex: none; }
.mock-item .t { flex: 1; line-height: 1.25; }
.mock-item .t em { font-style: normal; display: block; font-size: .66rem; color: var(--ink-faint); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.mock-item .pill { font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .16rem .4rem; border-radius: 4px; background: var(--clay-deep); color: #FFFFFF; }
.mock-item .pill.lock { background: var(--ocean-tint); color: var(--ocean-ink); }
.mock-lockrow { opacity: .45; }
.mock-note { font-size: .72rem; color: var(--ink-faint); margin: .7rem 0 0; }

/* --- plan switch --- */
.planswitch { display: inline-flex; background: var(--sand); border-radius: 999px; padding: 3px; gap: 2px; }
.planswitch button {
  border: 0; background: none; cursor: pointer; font-family: var(--body); font-weight: 600;
  font-size: .74rem; padding: .34rem .7rem; border-radius: 999px; color: var(--ink-soft);
}
.planswitch button[aria-pressed="true"] { background: var(--teal); color: var(--cream); }

/* --- chips (demo controls) --- */
.chipset { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip {
  font-family: var(--body); font-size: .78rem; font-weight: 500; line-height: 1.2;
  padding: .34rem .68rem; border-radius: 999px; cursor: pointer;
  border: 1.4px solid var(--line); background: #fff; color: var(--ink-soft); transition: all .12s ease;
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--cream); }
.chip.pop[aria-pressed="true"] { background: var(--clay-deep); border-color: var(--clay-deep); color: #FFFFFF; }
.chiplabel { font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .35rem; }

/* --- goal demo output --- */
.goalout { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 1rem 1.1rem; }
.goalout .gid { font-size: .68rem; font-weight: 700; letter-spacing: .07em; color: var(--ink-faint); }
.goalout .gtxt { font-size: 1.02rem; line-height: 1.5; margin: .5rem 0 .8rem; }
.goalout .gtxt em { font-style: normal; background: var(--clay-tint); box-shadow: inset 0 -2px 0 var(--clay); border-radius: 2px; padding: 0 .12em; }

/* --- marquee --- */
.marquee { overflow: hidden; background: var(--forest); padding: .8rem 0; }
.marquee-track { display: flex; gap: 2.4rem; width: max-content; animation: slide 42s linear infinite; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-track span { font-size: .82rem; font-weight: 600; color: var(--sand); white-space: nowrap; display: flex; align-items: center; gap: 2.4rem; }
.marquee-track span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--clay); opacity: .9; }

/* --- feature tiles --- */
.ftile { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 1.2rem 1.15rem; }
.ftile .ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: .8rem;
  background: var(--clay-tint); color: var(--clay-deep);
}
.ftile .ico svg { width: 19px; height: 19px; }
.ftile.o .ico { background: var(--ocean-tint); color: var(--ocean-ink); }
.ftile.f .ico { background: rgba(40,44,21,.09); color: var(--forest); }
.ftile h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; margin: 0 0 .3rem; letter-spacing: -.01em; }
.ftile p { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.ftile .num { font-family: var(--display); font-size: 1.05rem; color: var(--teal); }

/* --- numbered steps --- */
.steps { counter-reset: s; display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 2.3rem; }
.step::before {
  counter-increment: s; content: "0" counter(s);
  position: absolute; top: 0; left: 0; font-family: var(--display); font-size: 1.6rem; color: var(--clay);
}
.step h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; margin: 0 0 .3rem; }
.step p { font-size: .89rem; color: var(--ink-soft); margin: 0; }
.step::after { content: ""; position: absolute; top: 1.55rem; left: 2.6rem; right: 1rem; height: 1px; background: var(--line); }
@media (max-width: 900px) { .step::after { display: none; } }
.steps .step:last-child::after { display: none; }

/* --- sheet strip --- */
.sheets { display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; }
@media (max-width: 1000px) { .sheets { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .sheets { grid-template-columns: repeat(2, 1fr); } }
.sheet { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff;
  transition: transform .16s ease, box-shadow .16s ease; }
.sheet:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.sheet img { width: 100%; display: block; }
.sheet { text-decoration: none; color: inherit; display: block; }
.sheet .cap { display: block; padding: .5rem .55rem; font-size: .7rem; line-height: 1.25; color: var(--ink-soft); }
.sheet .cap b { display: block; color: var(--ink); font-size: .74rem; }

/* --- fb community card --- */
.fbcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fbcard .banner { height: 74px; background: linear-gradient(105deg, var(--ocean), var(--teal)); }
.fbcard .in { padding: .95rem 1.1rem 1.1rem; }
.fbcard .in h3 { margin: 0 0 .15rem; font-family: var(--body); font-weight: 700; font-size: 1.02rem; }
.fbcard .meta { font-size: .76rem; color: var(--ink-faint); margin: 0 0 .8rem; }
.postrow { display: flex; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--line-soft); font-size: .82rem; }
.postrow .av { width: 26px; height: 26px; border-radius: 50%; background: var(--clay-tint); color: var(--clay-deep);
  font-size: .66rem; font-weight: 700; display: grid; place-items: center; flex: none; }
.postrow .bd { line-height: 1.35; color: var(--ink-soft); }
.postrow .bd b { color: var(--ink); display: block; font-size: .8rem; }

/* Unfilled legal fields — deliberately loud so they can't ship blank */
.js-fill { background: #FFF3C4; color: #6B5200; border-bottom: 2px dotted #B58900; padding: 0 .2em; font-weight: 600; }

/* ---------- supplied logo assets ---------- */
.logo img { display: block; height: 30px; width: auto; }
@media (max-width: 520px) { .logo img { height: 26px; } }
.side .logo { display: block; margin-bottom: 1.2rem; }
.side .logo img { height: auto; width: 100%; max-width: 150px; }
.auth-side .logo img { height: auto; width: 260px; max-width: 100%; }
.footer-logo-img { display: block; width: 230px; max-width: 100%; height: auto; margin-bottom: .9rem; }
.brandline-img { display: block; width: 100%; max-width: 130px; height: auto;
  padding: 0 .5rem .8rem; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: .7rem; }
@media (max-width: 720px) { .brandline-img { display: none; } }


/* ============================================================
   CASCADE CORRECTIONS
   Two leaks the cascade audit found. Both are the same shape:
   a rule written for one context reaching into another.
   ============================================================ */

/* 1 · Header buttons.
   `.nav a` (0,1,1) outranked `.btn-primary` (0,1,0), so the header CTA
   rendered ink-soft text on a teal fill — 1.06:1. */
.nav a.btn-primary { color: #FFFFFF; background: var(--teal); }
.nav a.btn-primary:hover { color: #FFFFFF; background: var(--teal-deep); }
.nav a.btn-ghost { color: var(--ink); }
.nav a.btn-ghost:hover { color: var(--cream); background: var(--ink); }
.nav a.btn-quiet { color: var(--ink); }

/* 2 · Light cards inside dark sections.
   `.section.forest h3 / p / .lede` (0,2,1) applied to everything beneath,
   including white cards — Linen headings on white at 1.10:1. Light surfaces
   inside a dark section now restate their own text colours. */
.section.forest .card,
.section.forest .fbcard,
.section.forest .win,
.section.forest .tier,
.section.forest .goal-row,
.section.forest .res-card { color: var(--ink); }

.section.forest .card h2, .section.forest .card h3, .section.forest .card h4,
.section.forest .fbcard h2, .section.forest .fbcard h3, .section.forest .fbcard h4,
.section.forest .win h2, .section.forest .win h3, .section.forest .win h4,
.section.forest .tier h3 { color: var(--ink); }

.section.forest .card p, .section.forest .fbcard p, .section.forest .win p,
.section.forest .tier p, .section.forest .fbcard .bd { color: var(--ink-soft); }

.section.forest .card .kicker, .section.forest .fbcard .meta,
.section.forest .win .sub, .section.forest .card .small { color: var(--ink-faint); }

.section.forest .fbcard .bd b { color: var(--ink); }
