/* ============================================================
   LOGORHYTHMX V4 SHARED STYLES. "cinematic editorial, warm ivory."
   The V3-R token system, unchanged, now shared by the five
   marketing pages: /, /how-it-works, /pricing, /about, /contact.
   Single token block; no raw color or size values below it
   (clamp() internals excepted, themselves tokens).
   ============================================================ */
:root {
  /* ---- color ---- */
  --canvas:    #F4EFE6;  /* warm ivory. the page */
  --plaster:   #ECE5D8;  /* alternate section tint / quiet fills */
  --ink:       #211D18;  /* primary text ~13:1 */
  --ink-soft:  #6B6257;  /* muted text, measured >=4.5:1 on canvas */
  --charcoal:  #1B1916;  /* dark panels, used sparingly */
  --brass:     #A87B3F;  /* accents, hairlines, icons */
  --brass-cta: #B07D3E;  /* primary buttons: brass fill + ink text */
  --brass-cta-bright: #BD8A4C; /* primary hover only */
  --brass-text: #7E5C2E; /* brass for SMALL text on ivory, measured >=4.5:1 */
  --hairline:  rgba(33,29,24,0.12);
  --hairline-strong: rgba(33,29,24,0.24);
  /* charcoal-panel foreground set */
  --ivory-on-dark: #F4EFE6;
  --ivory-soft: rgba(244,239,230,0.66);
  --hairline-dark: rgba(244,239,230,0.14);
  /* derived alphas */
  --canvas-glass: rgba(244,239,230,0.85);
  --scrim: rgba(27,25,22,0.55);
  --shadow-card: 0 14px 34px -20px rgba(33,29,24,0.35);
  --shadow-media: 0 30px 60px -30px rgba(33,29,24,0.45);
  --shadow-float: 0 28px 70px -24px rgba(33,29,24,0.4);
  --grain-opacity: 0.06;

  /* ---- type: perfect fourth, fluid; serif display ---- */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --text-sm:   clamp(12px, 0.4vw + 11px, 13.5px);
  --text-body: clamp(16px, 1.5vw + 12px, 18px);
  --text-lg:   clamp(20px, 1.8vw + 14px, 24px);
  --text-h2:   clamp(26px, 2.5vw + 17px, 34px);
  --text-h1:   clamp(32px, 3.2vw + 20px, 46px);
  --text-hero: clamp(40px, 4.5vw + 24px, 72px);
  --lh-body: 1.6; --lh-head: 1.25; --lh-display: 1.02;
  --track-display: -0.01em;
  --track-kicker: 0.18em;
  --measure: 68ch;

  /* ---- space: 8px grid ---- */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --s6: 48px; --s8: 64px; --s12: 96px; --s16: 128px;
  --s-half: 4px;
  --field-gap: var(--s3);

  /* ---- radius ---- */
  --radius-card: 12px; --radius-ctl: 8px; --radius-pill: 999px;
  --radius-media: 20px;

  /* ---- motion ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 200ms; --dur-base: 300ms; --dur-slow: 600ms;
  --dur-fade: 400ms;

  /* ---- layout ---- */
  --maxw: 1140px;
  --measure-narrative: 720px;
  --hairline-w: 1px;
  --nav-h: 72px;

  /* ---- Instagram device mock (authentic LIGHT DM palette, tokenized) ---- */
  /* bubble blue and muted gray deepened from Instagram's own values so the
     mock's visible text measures >=4.5:1 (Lighthouse a11y) while still
     reading as the real DM palette */
  --ig-shell:  #1a1a1a;  --ig-screen: #ffffff;
  --ig-bubble-in: #F1F1F1; --ig-bubble-out: #1F6ED4;
  --ig-elev:   #F4F4F4;  --ig-text:   #161616;
  --ig-text-inv: #ffffff;
  --ig-muted:  #6E6E6E;  --ig-active: #4ade80;
  --ig-person: #DBDBDB;  --ig-person-fg: #8E8E8E;
  --ig-hairline: rgba(0,0,0,0.10);
  --text-ig: 15px; --text-ig-sm: 12px;
  --phone-w: 320px; --phone-screen-h: 560px;
  --radius-phone: 44px; --radius-screen: 34px;
}
@media (max-width: 700px) { :root { --radius-media: 14px; } }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--canvas); color: var(--ink);
  font-size: var(--text-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* V4.1 font fix: Fraunces' WONK axis (the wiggly j/f alternates) is off
     EVERYWHERE. font-variation-settings inherits, so setting it here covers
     every Fraunces element, present and future, not just the ones listed in
     the belt-and-suspenders rule below. Weight and optical size untouched. */
  font-variation-settings: "SOFT" 0, "WONK" 0;
}
::selection { background: var(--brass); color: var(--canvas); }
:focus-visible { outline: 2px solid var(--brass-text); outline-offset: 2px; border-radius: var(--s-half); }

h1, h2, h3 { color: var(--ink); }
/* Belt to the body rule's suspenders: explicit wonk-free on display text,
   in case a page ever overrides font-variation-settings locally. */
h1, .sec-head h2, .final-cta h2, .founding-offer, .price-card .price,
.signature .name {
  font-variation-settings: "SOFT" 0, "WONK" 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s3); }
.kicker {
  font-size: var(--text-sm); font-weight: 600; letter-spacing: var(--track-kicker);
  text-transform: uppercase; color: var(--brass-text);
}
section { padding: var(--s12) 0; scroll-margin-top: 88px; }
@media (max-width: 900px) { section { padding: var(--s8) 0; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* grain, charcoal surfaces ONLY, subtle */
.grained { position: relative; }
.grained::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='240'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s1); font-family: var(--font-body); font-weight: 600;
  font-size: var(--text-sm); min-height: var(--s6);
  padding: 0 var(--s3); border-radius: var(--radius-ctl);
  border: var(--hairline-w) solid transparent; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brass-cta); color: var(--ink); border-color: var(--brass-cta); }
.btn-primary:hover { background: var(--brass-cta-bright); border-color: var(--brass-cta-bright); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.btn-secondary:hover { border-color: var(--brass); }
.btn-block { width: 100%; }
.link-quiet {
  display: inline-flex; align-items: center; min-height: var(--s6);
  padding: 0 var(--s1); font-weight: 600; font-size: var(--text-sm);
  color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
.link-quiet:hover { color: var(--brass-text); }
.cta-note { margin-top: var(--s1); font-size: var(--text-sm); color: var(--ink-soft); }
.sec-cta { text-align: center; margin-top: var(--s6); }

/* body-copy links */
.body-link { color: var(--brass-text); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out); }
.body-link:hover { color: var(--ink); }

/* ---------- NAV ----------
   Solid canvas + hairline. Five pages plus the Talk to Hali primary
   button. Below 860px the page links collapse behind the burger; the
   Talk to Hali button stays visible next to it. */
.nav { position: sticky; top: var(--annbar-h, 0px); z-index: 95;
  background: var(--canvas);
  border-bottom: var(--hairline-w) solid var(--hairline); }
.nav-inner { display: flex; align-items: center; justify-content: space-between;
  gap: var(--s2); height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: var(--s1); flex-shrink: 0; }
.brand img { width: var(--s4); height: var(--s4); border-radius: var(--radius-ctl); }
.brand .wordmark { font-family: var(--font-body); font-weight: 600; font-size: var(--text-lg); color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: var(--s3); }
.nav-links a:not(.btn) { position: relative; font-weight: 600; font-size: var(--text-sm);
  color: var(--ink-soft); padding: var(--s1) 0; min-height: var(--s6);
  display: inline-flex; align-items: center;
  transition: color var(--dur-fast) var(--ease-out); }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute;
  left: 0; right: 0; bottom: var(--s1); height: 2px;
  background: var(--brass); border-radius: var(--radius-pill); }
.nav-burger { display: none; flex-shrink: 0; width: var(--s6); height: var(--s6);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: var(--hairline-w) solid var(--hairline-strong);
  border-radius: var(--radius-ctl); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out); }
.nav-burger:hover { border-color: var(--brass); }
.nav-burger span { display: block; width: var(--s2); height: 2px;
  background: var(--ink); border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease-out); }
.nav-open .nav-burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-open .nav-burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 859px) {
  .nav-burger { display: flex; }
  .nav-links { position: absolute; top: var(--nav-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--canvas); border-bottom: var(--hairline-w) solid var(--hairline);
    padding: var(--s1) var(--s3) var(--s3); box-shadow: var(--shadow-card); }
  .nav-open .nav-links { display: flex; }
  .nav-links a:not(.btn) { min-height: var(--s6);
    border-bottom: var(--hairline-w) solid var(--hairline); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--brass-text); }
  .nav-links .btn { margin-top: var(--s2); width: 100%; }
  /* the bar itself still shows the primary action on phones */
  .nav-inner .nav-cta-bar { display: inline-flex; }
}
@media (max-width: 480px) { .brand .wordmark { display: none; } }
/* duplicate Talk to Hali button that lives in the bar on phones only */
.nav-cta-bar { display: none; }

/* ---------- ANNOUNCEMENT BAR ----------
   Injected by site.js on every page. Sticky above the nav; the nav's
   top offset follows --annbar-h, which site.js keeps in sync with the
   bar's measured height so nothing is ever covered. */
.annbar { position: sticky; top: 0; z-index: 96;
  display: flex; align-items: center; justify-content: center;
  min-height: 38px; padding: var(--s-half) var(--s6);
  background: var(--plaster);
  border-bottom: var(--hairline-w) solid var(--hairline);
  text-align: center; }
.annbar-link { font-size: var(--text-sm); font-weight: 600; line-height: 1.4;
  color: var(--brass-text); transition: color var(--dur-fast) var(--ease-out); }
.annbar-link:hover { color: var(--ink); }
.annbar-close { position: absolute; right: var(--s1); top: 50%;
  transform: translateY(-50%); width: var(--s4); height: var(--s4);
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: var(--radius-ctl);
  color: var(--ink-soft); font-size: var(--text-lg); line-height: 1; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out); }
.annbar-close:hover { color: var(--ink); }

/* ---------- SECTION HEADINGS ---------- */
.sec-head { text-align: center; max-width: var(--measure-narrative); margin: 0 auto var(--s6); }
.sec-head .kicker::after { content: ""; display: block; width: var(--s4); height: 2px;
  margin: var(--s2) auto 0; background: linear-gradient(90deg, var(--brass), transparent);
  border-radius: var(--radius-pill); }
.sec-head h1, .sec-head h2 { font-family: var(--font-display); font-weight: 500;
  font-size: var(--text-h1); letter-spacing: var(--track-display);
  line-height: var(--lh-head); margin-top: var(--s2); }
.sec-head p { color: var(--ink-soft); margin-top: var(--s2); font-size: var(--text-lg); }

/* ---------- FOUNDING OFFER BAND (home + pricing) ---------- */
.founding-band { background: var(--plaster); }
.founding-inner { max-width: var(--measure-narrative); margin: 0 auto; text-align: center;
  border: var(--hairline-w) solid var(--hairline); border-radius: var(--radius-card);
  padding: var(--s6) var(--s4); background: var(--canvas); box-shadow: var(--shadow-card); }
.founding-offer { font-family: var(--font-display); font-weight: 500;
  font-size: var(--text-h2); line-height: var(--lh-head);
  letter-spacing: var(--track-display); color: var(--ink); }
.founding-offer s { color: var(--ink-soft); text-decoration-thickness: 2px; }
.founding-count { margin-top: var(--s3); font-size: var(--text-sm); font-weight: 600;
  letter-spacing: var(--track-kicker); text-transform: uppercase; color: var(--brass-text); }
.founding-count b { font-size: var(--text-lg); letter-spacing: 0; }
.founding-inner .btn { margin-top: var(--s4); }

/* ---------- FINAL CTA ---------- */
.final-cta { text-align: center; background: var(--plaster); }
.final-cta h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-h1);
  line-height: var(--lh-display); letter-spacing: var(--track-display);
  max-width: 22ch; margin: 0 auto; }
.final-cta p { color: var(--ink-soft); font-size: var(--text-lg); margin: var(--s2) 0 var(--s4); }

/* ---------- FOOTER ---------- */
.footer { padding: var(--s8) 0 var(--s4); border-top: var(--hairline-w) solid var(--hairline); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: var(--s4);
  align-items: start; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-meta { margin-top: var(--s2); font-size: var(--text-sm); color: var(--ink-soft);
  line-height: 1.9; }
.footer-meta a { transition: color var(--dur-fast) var(--ease-out); }
.footer-meta a:hover { color: var(--brass-text); }
.footer-nav { display: flex; flex-direction: column; gap: var(--s-half); }
.footer-nav a { color: var(--ink-soft); font-size: var(--text-sm); font-weight: 600;
  padding: var(--s-half) 0; transition: color var(--dur-fast) var(--ease-out); }
.footer-nav a:hover { color: var(--brass-text); }
.footer-legal { margin-top: var(--s6); padding-top: var(--s3);
  border-top: var(--hairline-w) solid var(--hairline);
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  font-size: var(--text-sm); color: var(--ink-soft); }
.footer-legal a { font-weight: 600; padding: var(--s-half) 0;
  transition: color var(--dur-fast) var(--ease-out); }
.footer-legal a:hover { color: var(--brass-text); }

/* ---------- FORM FIELDS (contact) ---------- */
.field { margin-bottom: var(--field-gap); }
.field label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--ink);
  margin-bottom: var(--s1); }
.field input, .field select { width: 100%; font-family: var(--font-body); font-size: var(--text-body);
  padding: var(--s1) var(--s2); min-height: var(--s6);
  border: var(--hairline-w) solid var(--hairline-strong); border-radius: var(--radius-ctl);
  background: var(--plaster); color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease-out); }
.field input::placeholder { color: var(--ink-soft); }
.field select:invalid { color: var(--ink-soft); }
.field input:focus, .field select:focus { outline: none; border-color: var(--brass); }
.form-error { display: none; color: var(--brass-text); font-size: var(--text-sm);
  line-height: var(--lh-body); margin-top: var(--s2); text-align: center; }

/* ---------- MEDIA READY STATES ---------- */
img[data-img] { opacity: 0; transition: opacity var(--dur-slow) var(--ease-out); }
img[data-img].ready { opacity: 1; }

/* ---------- SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(12px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- PRICING OFFER HERO (pricing page headline block) ---------- */
.offer-hero { max-width: var(--measure-narrative); margin: 0 auto var(--s6);
  text-align: center; border: var(--hairline-w) solid var(--brass);
  border-radius: var(--radius-card); padding: var(--s6) var(--s4);
  background: var(--canvas); box-shadow: var(--shadow-float); }
.offer-hero .offer-line { font-family: var(--font-display); font-weight: 500;
  font-size: var(--text-h2); line-height: var(--lh-head);
  letter-spacing: var(--track-display); color: var(--ink);
  font-variation-settings: "SOFT" 0, "WONK" 0; }
.offer-hero .offer-line + .offer-line { margin-top: var(--s2); }
.offer-hero .offer-line s { color: var(--ink-soft); text-decoration-thickness: 2px; }
.offer-hero .offer-line b { color: var(--brass-text); font-weight: 600; }
.offer-hero .founding-count { margin-top: var(--s3); }

/* ============================================================
   SHARED HALI DEMO (scripted storyboard). Markup injected by
   /demo.js into [data-hali-demo]; used on /, /contact and the
   trade landing pages. Styles moved here from index.html.
   ============================================================ */
.demo-sec { background: var(--plaster); }
.hero-stage { display: flex; flex-direction: column; align-items: center;
  gap: var(--s3); width: 100%; }
.demo-grid { display: grid; grid-template-columns: 1fr; gap: var(--s3);
  justify-items: center; width: 100%; }
.demo-col-phone { display: flex; flex-direction: column; align-items: center;
  gap: var(--s2); width: 100%; max-width: var(--phone-w); min-width: 0; }
.demo-col-card { display: flex; flex-direction: column; align-items: stretch;
  width: 100%; max-width: 320px; min-width: 0; text-align: left; }
@media (min-width: 900px) {
  .demo-grid { grid-template-columns: auto minmax(260px, 320px);
    justify-content: center; align-items: start; }
}
.never-list { list-style: none; margin-top: var(--s3);
  border-top: var(--hairline-w) solid var(--hairline); }
.never-list li { padding: var(--s1) 0; font-size: var(--text-sm); font-weight: 600;
  color: var(--ink); border-bottom: var(--hairline-w) solid var(--hairline); }
.demo-col-card .guard-note { margin-top: var(--s2); font-size: var(--text-ig-sm);
  color: var(--ink-soft); text-align: left; }

/* IG phone device mock */
.ig-phone {
  width: 100%; max-width: var(--phone-w); margin: 0 auto; position: relative;
  background: var(--ig-shell); border-radius: var(--radius-phone); padding: var(--s1);
  box-shadow: var(--shadow-media);
}
.ig-screen { position: relative; background: var(--ig-screen); border-radius: var(--radius-screen);
  overflow: hidden; height: var(--phone-screen-h); display: flex; flex-direction: column; }
.ig-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 24px; background: var(--ig-shell);
  border-radius: 0 0 var(--s2) var(--s2); z-index: 6; }
.ig-statusbar { display: flex; align-items: center; justify-content: space-between;
  padding: var(--s1) var(--s3) var(--s-half); color: var(--ig-text);
  font-size: var(--text-ig-sm); font-weight: 600; }
.ig-sb-icons { display: flex; align-items: center; gap: var(--s-half); }
.ig-statusbar svg { display: block; }
.ig-header { display: flex; align-items: center; gap: var(--s1); padding: var(--s1) var(--s2);
  border-bottom: var(--hairline-w) solid var(--ig-hairline); }
.ig-back { color: var(--ig-text); font-size: var(--text-lg); line-height: 1; font-weight: 300; }
.ig-peer { display: flex; align-items: center; gap: var(--s1); flex: 1; min-width: 0; }
.ig-avatar { width: var(--s4); height: var(--s4); border-radius: 50%; flex-shrink: 0;
  background: var(--brass); display: flex; align-items: center; justify-content: center; }
.ig-avatar svg { width: var(--s2); height: var(--s2); }
.ig-peer-name { color: var(--ig-text); font-weight: 700; font-size: var(--text-ig); line-height: var(--lh-head); }
.ig-peer-sub { color: var(--ig-muted); font-size: var(--text-ig-sm); line-height: var(--lh-head); }
.ig-active-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ig-active); margin: 0 var(--s-half) 1px 1px; vertical-align: middle;
  animation: igActivePulse 2.2s ease-in-out infinite; }
@keyframes igActivePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.ig-header-actions { display: flex; align-items: center; gap: var(--s2); color: var(--ig-text); }
.ig-header-actions svg { width: var(--s3); height: var(--s3); display: block; }
@keyframes haliGlow { 0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 14px 3px rgba(168,123,63,0.5); } }
.ig-avatar.glow { animation: haliGlow 1.5s ease infinite; }
.ig-chat { flex: 1; overflow-y: auto; padding: var(--s2); display: flex; flex-direction: column;
  gap: var(--s1); background: var(--ig-screen); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ig-chat::-webkit-scrollbar { display: none; }
.ig-chat.readback { scrollbar-width: thin; scrollbar-color: var(--ig-hairline) transparent; }
.ig-chat.readback::-webkit-scrollbar { display: block; width: var(--s-half); }
.ig-chat.readback::-webkit-scrollbar-track { background: transparent; }
.ig-chat.readback::-webkit-scrollbar-thumb { background: var(--ig-hairline); border-radius: var(--radius-pill); }
.ig-row { display: flex; align-items: flex-end; gap: var(--s-half); }
.ig-row-in { justify-content: flex-start; }
.ig-row-out { justify-content: flex-end; }
.ig-bubble { max-width: 78%; padding: var(--s1) var(--s2); font-size: var(--text-ig);
  line-height: 1.48; word-wrap: break-word; }
.ig-bubble-in { background: var(--ig-bubble-in); color: var(--ig-text);
  border-radius: var(--s2) var(--s2) var(--s2) var(--s-half); }
.ig-bubble-out { background: var(--ig-bubble-out); color: var(--ig-text-inv);
  border-radius: var(--s2) var(--s2) var(--s-half) var(--s2); }
.ig-row-in.ig-anim  { animation: igRiseIn var(--dur-base) var(--ease-out) both; }
.ig-row-out.ig-anim { animation: igRiseOut var(--dur-base) var(--ease-out) both; }
@keyframes igRiseIn  { from { opacity: 0; transform: translate(-8px, 8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes igRiseOut { from { opacity: 0; transform: translate(8px, 8px) scale(0.98); } to { opacity: 1; transform: none; } }
.ig-person { width: 20px; height: 20px; border-radius: 50%; background: var(--ig-person);
  position: relative; flex-shrink: 0; overflow: hidden; }
.ig-person::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ig-person-fg); top: 3px; left: 50%; transform: translateX(-50%); }
.ig-person::after { content: ""; position: absolute; width: 13px; height: 9px; border-radius: 50% 50% 0 0;
  background: var(--ig-person-fg); bottom: 0; left: 50%; transform: translateX(-50%); }
.ig-typing { display: inline-flex; gap: var(--s-half); align-items: center; padding: var(--s1) var(--s2); }
.ig-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--brass);
  display: inline-block; opacity: 0.4; animation: igDot 1.2s infinite ease-in-out; }
.ig-typing span:nth-child(2) { animation-delay: 200ms; }
.ig-typing span:nth-child(3) { animation-delay: 400ms; }
@keyframes igDot { 0%, 100% { opacity: 0.4; } 40% { opacity: 1; } }
.ig-inputbar { display: flex; align-items: center; gap: var(--s1); padding: var(--s1) var(--s2);
  border-top: var(--hairline-w) solid var(--ig-hairline); background: var(--ig-screen); }
.ig-inputbar svg { width: var(--s3); height: var(--s3); display: block; color: var(--ig-text); }
.ig-input { flex: 1; background: var(--ig-elev); border: var(--hairline-w) solid var(--ig-hairline);
  border-radius: var(--radius-pill); padding: var(--s1) var(--s2); color: var(--ig-muted); font-size: var(--text-sm); }

/* temperature selector: Hot / Warm / Cold groups the scene chips */
.temp-row { display: flex; align-items: center; justify-content: center;
  gap: var(--s1); width: 100%; max-width: var(--phone-w); }
.temp-pill { display: inline-flex; align-items: center; gap: var(--s-half);
  min-height: var(--s4); padding: 0 var(--s2);
  border: var(--hairline-w) solid var(--hairline-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink-soft);
  font-family: var(--font-body); font-size: var(--text-ig-sm); font-weight: 600;
  letter-spacing: var(--track-kicker); text-transform: uppercase; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out); }
.temp-pill:hover { border-color: var(--brass); color: var(--ink); }
.temp-pill.active { border-color: var(--brass); color: var(--ink); background: var(--canvas); }
.temp-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.temp-dot-hot { background: #B25C43; }
.temp-dot-warm { background: #C9922E; }
.temp-dot-cold { background: #5C6F80; }

/* scene switcher chips. Mobile: one swipeable snap row with edge fade. */
.chips-wrap { position: relative; width: 100%; max-width: var(--phone-w); }
.scene-chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--s1); width: 100%; }
@media (max-width: 899px) {
  .scene-chips { flex-wrap: nowrap; justify-content: flex-start;
    overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-bottom: var(--s-half); }
  .scene-chips::-webkit-scrollbar { display: none; }
  .scene-chips .scene-chip { flex: 0 0 auto; scroll-snap-align: start; }
  .chips-fade { position: absolute; top: 0; right: 0; bottom: 0; width: var(--s6);
    pointer-events: none;
    background: linear-gradient(90deg, rgba(236,229,216,0), var(--plaster));
    transition: opacity var(--dur-fast) var(--ease-out); }
  .chips-fade.gone { opacity: 0; }
}
@media (min-width: 900px) { .chips-fade { display: none; } }
.phone-caption { margin-top: var(--s2); font-size: var(--text-ig-sm);
  color: var(--ink-soft); text-align: center; }
.swipe-hint { font-size: var(--text-ig-sm); color: var(--ink-soft);
  transition: opacity var(--dur-slow) var(--ease-out); }
.swipe-hint.gone { opacity: 0; }
@media (min-width: 900px) { .swipe-hint { display: none; } }
.scene-chip { position: relative; overflow: hidden; flex: 1 1 auto;
  min-height: var(--s6); padding: 0 var(--s2);
  border: var(--hairline-w) solid var(--hairline-strong); border-radius: var(--radius-pill);
  background: var(--canvas); color: var(--ink);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out); }
.scene-chip:hover { transform: translateY(-1px); border-color: var(--brass); }
.scene-chip.active { border-color: var(--brass); background: var(--canvas); }
.chip-fill { position: absolute; left: 0; bottom: 0; height: 2px; width: 0%;
  background: var(--brass); transition: width var(--dur-slow) linear; }
.sb-replay { flex-shrink: 0; width: var(--s6); height: var(--s6); border-radius: 50%;
  border: var(--hairline-w) solid var(--hairline-strong); background: transparent; color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out); }
.sb-replay:hover { border-color: var(--brass); color: var(--brass-text); transform: rotate(-40deg); }
.sb-replay svg { width: var(--s2); height: var(--s2); stroke: currentColor; fill: none; }

/* live summary card */
.live-summary { width: 100%; max-width: 320px; text-align: left; }
.ig-summary-card { background: var(--canvas); border: var(--hairline-w) solid var(--hairline);
  border-radius: var(--radius-card); padding: var(--s3); box-shadow: var(--shadow-card); }
.sum-outcome { display: inline-block; max-width: 100%; padding: var(--s-half) var(--s2);
  border: var(--hairline-w) solid var(--hairline-strong); border-radius: var(--radius-pill);
  font-size: var(--text-ig-sm); font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.sum-outcome.filled { color: var(--ink); border-color: var(--brass); }
.sum-fields { display: grid; grid-template-columns: 1fr; margin-top: var(--s2); }
.sum-field { position: relative; padding: var(--s1) 0; }
.sum-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--hairline-w);
  background: linear-gradient(90deg, var(--brass), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out); }
.sum-field.filled::after { transform: scaleX(1); }
.sum-field .k { display: block; font-size: var(--text-ig-sm); font-weight: 600;
  letter-spacing: var(--track-kicker); text-transform: uppercase; color: var(--ink-soft); }
.sum-field .v { display: block; font-size: var(--text-sm); color: var(--ink-soft); margin-top: var(--s-half);
  min-height: calc(var(--text-sm) * var(--lh-body));
  transition: opacity var(--dur-fast) var(--ease-out); }
.sum-field.filled .v { color: var(--ink); }
.sum-note { margin-top: var(--s1); font-size: var(--text-ig-sm); color: var(--ink-soft); text-align: center; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
