/* ==========================================================================
   Nexi — commercial site prototype
   Design tokens mirror the product tokens in
   UserApp/nexi-user-app/src/lib/theme/tokens.cjs
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body,
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img, svg, video { display: block; max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

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

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand — from tokens.cjs primitiveColors.brand */
  --brand-500: #4B986C;
  --brand-600: #3A7A56;   /* chrome.sidebarHover */
  --brand-700: #2C5C41;
  --brand-400: #6FB18C;
  --brand-300: #9CCBB2;
  --brand-200: #C9E4D6;
  --brand-100: #E4F1EA;
  --brand-050: #F2F9F5;

  --amber:      #FFC107;
  --amber-600:  #FFA000;
  --amber-100:  #FAE5A0;
  --indigo:     #4B5198;
  --indigo-100: #E3E4F2;
  --coral:      #F46459;

  /* Calendar accents — real values from the product */
  --cal-birthday:    #87CEFA;
  --cal-anniversary: #FF69B4;
  --cal-reminder:    #9370DB;
  --cal-event:       #FFA500;

  /* Neutrals */
  --n-white: #FFFFFF;
  --n-50:  #FAFAFA;
  --n-100: #F5F5F5;
  --n-200: #E2E2E2;
  --n-300: #BDBDBD;
  --n-400: #AEAEAE;
  --n-600: #757575;
  --n-700: #555555;
  --n-800: #333333;
  --n-850: #262626;
  --n-900: #1A1A1A;

  /* Type */
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-full: 999px;

  --wrap: 1380px;
  --wrap-narrow: 940px;

  --nav-h: 68px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Semantic — light theme */
  --bg: #FFFFFF;
  --bg-sub: #FAFAF9;
  --bg-alt: #F4F6F4;
  --surface: #FFFFFF;
  --surface-2: #FAFAF9;
  --text: #262626;
  --text-2: #63706A;
  --text-3: #97A29D;
  --border: #E6EAE7;
  --border-strong: #D5DBD7;
  --shadow-sm: 0 1px 2px rgba(20, 40, 30, .05), 0 2px 8px rgba(20, 40, 30, .04);
  --shadow-md: 0 2px 6px rgba(20, 40, 30, .05), 0 14px 34px -12px rgba(20, 40, 30, .16);
  --shadow-lg: 0 4px 12px rgba(20, 40, 30, .06), 0 34px 70px -20px rgba(20, 40, 30, .24);
  --ring: rgba(75, 152, 108, .16);
}

[data-theme="dark"] {
  --bg: #101413;
  --bg-sub: #151A18;
  --bg-alt: #1A201D;
  --surface: #171D1A;
  --surface-2: #1D2421;
  --text: #ECF1EE;
  --text-2: #A3AEA8;
  --text-3: #74807A;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .3), 0 16px 40px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 4px 14px rgba(0, 0, 0, .35), 0 40px 80px -24px rgba(0, 0, 0, .7);
  --ring: rgba(111, 177, 140, .22);
  --brand-100: #1E2A24;
  --brand-050: #17201C;
  --indigo-100: #21243A;
  --amber-100: #33290C;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

::selection { background: rgba(75, 152, 108, .22); }

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */

.h-hero,
.h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
  text-wrap: balance;
}

.h-hero { font-size: clamp(2.45rem, 5.1vw, 4.15rem); font-weight: 800; letter-spacing: -.035em; }
.h1     { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -.032em; }
.h2     { font-size: clamp(1.85rem, 3.6vw, 2.85rem); letter-spacing: -.03em; }
.h3     { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -.02em; line-height: 1.2; }
.h4     { font-size: 1.075rem; letter-spacing: -.012em; line-height: 1.3; font-weight: 600; }

.lead {
  font-size: clamp(1.075rem, 1.55vw, 1.3rem);
  color: var(--text-2);
  line-height: 1.55;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .755rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-500);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}

.eyebrow.no-rule::before { display: none; }

.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.tiny  { font-size: .78rem; }
.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: .84em;
  letter-spacing: -.01em;
}

.grad-text {
  background: linear-gradient(102deg, #AEE0C4 0%, #7FC2A0 42%, #4B986C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.section-sm { padding-block: clamp(3rem, 5vw, 4.5rem); }
.section-alt { background: var(--bg-alt); }
.section-sub { background: var(--bg-sub); }

.section-head { max-width: 840px; margin-bottom: clamp(2.5rem, 4vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .h2 { margin-top: 1rem; }
.section-head .lead { margin-top: 1.15rem; }

.hr {
  height: 1px;
  border: 0;
  background: var(--border);
  margin: 0;
}

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split.reverse > *:first-child { order: 2; }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stack > * + * { margin-top: 1.1rem; }
.stack-sm > * + * { margin-top: .55rem; }
.stack-lg > * + * { margin-top: 1.75rem; }

.center { text-align: center; }

/* --------------------------------------------------------------------------
   6. Buttons / chips / pills
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.4rem;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .975rem;
  letter-spacing: -.008em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}

.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand-500);
  color: #fff;
  box-shadow: 0 1px 2px rgba(20, 60, 40, .2), 0 12px 26px -10px rgba(75, 152, 108, .65);
}
.btn-primary:hover { background: var(--brand-600); box-shadow: 0 2px 4px rgba(20, 60, 40, .22), 0 18px 36px -10px rgba(75, 152, 108, .75); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--brand-500); color: var(--brand-500); background: var(--brand-050); }

.btn-soft {
  background: var(--brand-100);
  color: var(--brand-600);
}
[data-theme="dark"] .btn-soft { color: var(--brand-300); }
.btn-soft:hover { background: var(--brand-200); }
[data-theme="dark"] .btn-soft:hover { background: #26352D; }

.btn-lg { padding: .95rem 1.75rem; font-size: 1.045rem; }
.btn-sm { padding: .52rem 1rem; font-size: .875rem; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  color: var(--brand-500);
  font-family: var(--font-display);
}
.btn-link .arrow { transition: transform .25s var(--ease); }
.btn-link:hover .arrow { transform: translateX(4px); }

/* on the dark stage */
.stage .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .26); }
.stage .btn-ghost:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .07); color: #fff; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .72rem .3rem .58rem;
  border-radius: var(--r-full);
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: .785rem;
  font-weight: 600;
  letter-spacing: -.005em;
}
[data-theme="dark"] .pill { color: var(--brand-300); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-amber { background: var(--amber-100); color: #8A6100; }
[data-theme="dark"] .pill-amber { color: var(--amber); }
.pill-indigo { background: var(--indigo-100); color: var(--indigo); }
[data-theme="dark"] .pill-indigo { color: #A5A9E0; }

.stage .pill {
  background: rgba(255, 255, 255, .1);
  color: #DCEDE3;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .1);
}

/* --------------------------------------------------------------------------
   7. Prototype ribbon
   -------------------------------------------------------------------------- */

.ribbon {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .5rem 3rem .5rem 1rem;
  background: var(--n-900);
  color: #E7EFE9;
  font-size: .785rem;
  text-align: center;
}
.ribbon b { color: var(--amber); font-weight: 600; }
.ribbon a { text-decoration: underline; text-underline-offset: 2px; opacity: .8; }
.ribbon a:hover { opacity: 1; }
.ribbon-x {
  position: absolute;
  right: .6rem;
  top: 50%;
  translate: 0 -50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #96A69C;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}
.ribbon-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ribbon[hidden] { display: none; }

/* --------------------------------------------------------------------------
   8. Nav
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -.03em;
  margin-right: auto;
}
.brand svg { width: 30px; height: 30px; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.nav-links a {
  padding: .45rem .78rem;
  border-radius: var(--r-full);
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-links a[aria-current="page"] { color: var(--brand-500); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: .55rem; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-alt); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .moon { display: none; }
[data-theme="dark"] .icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .moon { display: block; }

.nav-burger { display: none; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .75rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all .25s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .8rem .25rem; font-size: 1.05rem; border-radius: 0; }
  .nav-links a + a { border-top: 1px solid var(--border); }
  .nav-burger { display: grid; }
  .nav-cta { display: none; }
  .nav-links .only-sm { display: block; color: var(--brand-500); font-weight: 650; }
}

/* a CTA that only appears inside the collapsed mobile menu */
.nav-links .only-sm { display: none; }

/* --------------------------------------------------------------------------
   9. Hero stage (always dark — a product stage)
   -------------------------------------------------------------------------- */

.stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: #0B100E;
  color: #F1F5F2;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 5.5rem);
}

.stage .lead { color: #A9B8B0; }
.stage .eyebrow { color: var(--brand-300); }

/* soft emerald aurora */
.stage::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -32%;
  left: 50%;
  translate: -50% 0;
  width: min(1500px, 165vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(75, 152, 108, .40), rgba(75, 152, 108, .10) 55%, transparent 72%);
  filter: blur(10px);
}

.stage::after {
  content: "";
  position: absolute;
  z-index: -2;
  right: -14%;
  bottom: -34%;
  width: min(900px, 100vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 193, 7, .16), transparent 70%);
}

/* fine grid + grain */
.stage .stage-grid {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-copy .h-hero { margin-top: 1.25rem; }
.hero-copy .lead { margin-top: 1.4rem; max-width: 36ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.hero-note { margin-top: 1.15rem; font-size: .82rem; color: #7E8D85; }

.hero-figure { position: relative; }
.hero-controls { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }

.factstrip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 5vw, 4.5rem);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
}
.factstrip li {
  padding: 1.15rem 1.25rem;
  background: rgba(255, 255, 255, .022);
  backdrop-filter: blur(4px);
}
.factstrip .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -.03em;
  color: #fff;
  line-height: 1;
}
.factstrip .n em { font-style: normal; color: var(--brand-300); }
.factstrip .l { margin-top: .4rem; font-size: .81rem; color: #93A29A; line-height: 1.4; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-copy .lead { max-width: 46ch; }
  .factstrip { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   10. The Nexi device mockup
   -------------------------------------------------------------------------- */

/* ==========================================================================
   The Nexi object — a slim timber surround hugging the glass.
   Not a tablet in a picture frame: the enclosure IS the frame, the way a
   good digital frame is built. Square outer corners, a narrow moulding, a
   hairline liner at the glass, no camera, no chin.
   ========================================================================== */

.tablet {                             /* the timber surround */
  --wood-1: #DFC08C;
  --wood-2: #C7A268;
  --wood-3: #AE8850;
  --grain: .055;
  --liner: #2A2724;

  position: relative;
  width: 100%;
  padding: 3.1%;                      /* ≈8mm of moulding at real size */
  border-radius: 3px;                 /* frames are square; devices are not */
  background:
    repeating-linear-gradient(93deg,
      rgba(255, 255, 255, 0) 0 3px,
      rgba(86, 56, 22, var(--grain)) 3px 4px,
      rgba(255, 255, 255, 0) 4px 10px,
      rgba(120, 80, 34, calc(var(--grain) * .8)) 10px 11px),
    linear-gradient(158deg, var(--wood-1) 0%, var(--wood-2) 46%, var(--wood-3) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(0, 0, 0, .2),
    inset 1px 0 0 rgba(255, 255, 255, .1),
    inset -1px 0 0 rgba(0, 0, 0, .1),
    0 2px 3px rgba(28, 20, 8, .13),
    0 14px 28px -12px rgba(28, 20, 8, .28);
}

/* mitred corner joints — hairlines, the way a real moulding meets */
.tablet::before,
.tablet::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 3.1% 4.6%;
  mix-blend-mode: multiply;
  opacity: .8;
}
.tablet::before {
  background-image:
    linear-gradient(to bottom right, transparent 46%, rgba(0, 0, 0, .16) 49% 51%, transparent 54%),
    linear-gradient(to bottom right, transparent 46%, rgba(0, 0, 0, .16) 49% 51%, transparent 54%);
  background-position: 0 0, 100% 100%;
}
.tablet::after {
  background-image:
    linear-gradient(to bottom left, transparent 46%, rgba(0, 0, 0, .16) 49% 51%, transparent 54%),
    linear-gradient(to bottom left, transparent 46%, rgba(0, 0, 0, .16) 49% 51%, transparent 54%);
  background-position: 100% 0, 0 100%;
}

/* finishes */
.tablet[data-finish="walnut"] { --wood-1: #7E5939; --wood-2: #5E4029; --wood-3: #45301F; --grain: .10; }
.tablet[data-finish="chalk"]  { --wood-1: #F6F3ED; --wood-2: #E9E4DA; --wood-3: #D8D2C6; --grain: .012; --liner: #B8B2A6; }
.tablet[data-finish="ink"]    { --wood-1: #33322F; --wood-2: #232220; --wood-3: #161614; --grain: .05; --liner: #0E0E0D; }

/* a hairline liner where the moulding meets the glass */
.liner {
  padding: .38%;
  border-radius: 2px;
  background: var(--liner);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45);
}

/* the one control: a small knurled dial on the bottom rail */
.dial-knob {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: -.7%;
  width: 2.1%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(90, 60, 10, .3) 0deg 4deg, transparent 4deg 8deg),
    linear-gradient(150deg, #E3C382 0%, #C29A4E 52%, #9A7634 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    0 1px 2px rgba(40, 28, 8, .45);
}

/* the hero sits on a dark stage, where a deeper shadow reads better */
.stage .tablet {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    inset 0 -1px 0 rgba(0, 0, 0, .3),
    0 3px 6px rgba(0, 0, 0, .45),
    0 26px 50px -18px rgba(0, 0, 0, .6);
}

.screen {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 1px;
  overflow: hidden;
  background: #F5F5F5;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), inset 0 1px 3px rgba(20, 16, 8, .1);
}

/* matte, anti-glare: a whisper of sheen instead of a mirror */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(112deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, 0) 74%, rgba(255, 255, 255, .022) 100%);
}

/* --- screens: cross-fade stack --- */
.sv {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity .85s var(--ease), transform 1.4s var(--ease-out);
  pointer-events: none;
  font-family: var(--font-body);
  color: #fff;
}
.sv.active { opacity: 1; transform: none; z-index: 2; }

/* ---- shared screen furniture ---- */
.sv-pad { position: absolute; inset: 0; padding: 5cqw 6cqw; display: flex; }
.sv-sender {
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  font-size: 2.05cqw;
  font-weight: 500;
}
.avatar {
  width: 5.2cqw;
  height: 5.2cqw;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2cqw;
  color: #fff;
  flex: none;
  letter-spacing: 0;
}
.av-a { background: linear-gradient(140deg, #6FB18C, #3A7A56); }
.av-b { background: linear-gradient(140deg, #7C82C9, #4B5198); }
.av-c { background: linear-gradient(140deg, #FFC94D, #E08A00); }
.av-d { background: linear-gradient(140deg, #F79289, #D8493D); }

.reactions {
  display: flex;
  gap: 1.1cqw;
}
.reactions span {
  width: 6cqw;
  height: 6cqw;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.8cqw;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  border: .18cqw solid rgba(255, 255, 255, .2);
}

/* ---- 1. Clock — ported from NexiDevice app/screensavers/clock_ss.js
       Light theme values are the app's own: background #F5F5F5, ink #1A1A1A,
       sub-ink #666, rule #D0D0D0, dial face #FFF, dial markers #1A1A1A.   ---- */

.sv-paper {
  background: #F5F5F5;
  color: #1A1A1A;
  font-family: var(--font-body);
}

/* 1a. Analog — the default clock (ss_clock_type 1) */
.clock-row {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.5cqw;
  padding: 4cqw 5cqw;
}
.dial { width: 36cqw; flex: none; aspect-ratio: 1; }
.dial svg { width: 100%; height: 100%; overflow: visible; }

.clock-side { display: flex; flex-direction: column; gap: 2.2cqw; }
.cs-weekday {
  font-size: 5.6cqw;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .005em;
}
.cs-date {
  font-size: 2.9cqw;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .045em;
  margin-top: .5cqw;
}
.cs-rule { height: 1px; background: #D0D0D0; }
.cs-place { font-size: 2.7cqw; font-weight: 700; color: #1A1A1A; text-align: center; }
.cs-forecast { display: flex; justify-content: center; gap: 3.2cqw; }
.cs-day { display: flex; flex-direction: column; align-items: center; gap: .7cqw; }
.cs-day svg { width: 5.4cqw; height: 5.4cqw; }
.cs-day b { font-size: 2.15cqw; font-weight: 600; }
.cs-day span { font-size: 2.05cqw; color: #666; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 1b. Large — the high-legibility clock (ss_clock_type 3) */
.sv-clock-lg .sv-pad {
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 3cqw 6cqw;
  text-align: center;
}
.lg-weekday {
  font-size: 5cqw;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.05;
}
.lg-tod {
  font-size: 4.4cqw;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #666;
  margin-top: .6cqw;
}
.lg-time {
  font-size: 21.8cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.lg-date {
  font-size: 5cqw;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ---- 2. Photo ---- */
.sv-photo { background: #07100C; }
.sv-photo .sv-pad { flex-direction: column; justify-content: flex-end; }
.photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .74) 0%, rgba(0, 0, 0, .18) 34%, transparent 58%);
}
.photo-meta { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 3cqw; }
.photo-cap {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 4.2cqw;
  line-height: 1.14;
  letter-spacing: -.022em;
  max-width: 66%;
  text-shadow: 0 .3cqw 2cqw rgba(0, 0, 0, .6);
}
.photo-cap + .sv-sender { margin-top: 1.6cqw; }

/* generated "photos" */
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene .sky { position: absolute; inset: 0; }
.scene .sun {
  position: absolute;
  border-radius: 50%;
  filter: blur(.4cqw);
}
.scene .hill {
  position: absolute;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* sunset beach */
.sc-sunset .sky { background: linear-gradient(#2B2350 0%, #7C3F63 34%, #D9695C 62%, #F2A65A 82%, #F7CE8A 100%); }
.sc-sunset .sun { width: 16%; aspect-ratio: 1; left: 58%; top: 46%; background: #FFE6B0; box-shadow: 0 0 8cqw 3cqw rgba(255, 214, 150, .55); }
.sc-sunset .hill:nth-child(3) { width: 130%; height: 42%; left: -20%; bottom: 8%; background: #4A2A46; opacity: .9; }
.sc-sunset .hill:nth-child(4) { width: 120%; height: 26%; left: -10%; bottom: 0; background: #241733; }
.sc-sunset .water { position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(rgba(255, 200, 140, .34), rgba(40, 25, 55, .1)); }

/* green meadow */
.sc-meadow .sky { background: linear-gradient(#8FC7E8 0%, #C8E4F2 52%, #E9F2E4 72%, #98BE6E 72%, #5E8C3F 100%); }
.sc-meadow .sun { width: 11%; aspect-ratio: 1; left: 16%; top: 12%; background: #FFF6D8; box-shadow: 0 0 6cqw 2cqw rgba(255, 246, 216, .6); }
.sc-meadow .hill:nth-child(3) { width: 90%; height: 30%; left: 42%; bottom: 22%; background: #7BA85B; }
.sc-meadow .hill:nth-child(4) { width: 80%; height: 24%; left: -18%; bottom: 24%; background: #6D9B52; }

/* birthday / indoor warm */
.sc-warm .sky { background: radial-gradient(70% 80% at 34% 30%, #F6D9A8 0%, #E0A96D 40%, #96603B 78%, #4E2F1E 100%); }
.sc-warm .sun { width: 7%; aspect-ratio: 1; left: 46%; top: 30%; background: #FFF0C0; box-shadow: 0 0 9cqw 3cqw rgba(255, 210, 130, .75); }
.sc-warm .hill:nth-child(3) { width: 70%; height: 34%; left: 12%; bottom: -6%; background: rgba(70, 40, 25, .55); }

/* coast / blue */
.sc-coast .sky { background: linear-gradient(#0E4C6B 0%, #1E7FA8 40%, #4FB2C9 62%, #A9DCE3 78%, #E4D3A8 100%); }
.sc-coast .hill:nth-child(3) { width: 60%; height: 22%; left: -8%; bottom: 20%; background: #0B3549; }
.sc-coast .water { position: absolute; inset: auto 0 0 0; height: 24%; background: linear-gradient(rgba(255,255,255,.28), rgba(11,53,73,.2)); }

/* ---- 3. Message ---- */
.sv-message { background: #F5F5F5; color: #1A1A1A; }
.sv-message .sv-pad { flex-direction: column; justify-content: center; align-items: flex-start; gap: 3.4cqw; padding-inline: 9cqw; }
.msg-quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 5.6cqw;
  line-height: 1.22;
  letter-spacing: -.026em;
  max-width: 84%;
}
.msg-quote::before { content: "“"; color: var(--brand-500); margin-right: .1em; }
.msg-quote::after { content: "”"; color: var(--brand-500); }
.sv-message .sv-sender { color: #666; }

/* ---- 4. Moment ---- */
.sv-moment { background: #0A0F0D; }
.moment-split { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.moment-photo { position: relative; overflow: hidden; }
.moment-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 62%, rgba(250, 247, 241, .92) 100%);
}
.moment-side {
  padding: 6cqw 5.5cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.6cqw;
  background: linear-gradient(200deg, #FAF7F1, #F1ECE2);
  color: #1A1A1A;
}
.moment-prompt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.5cqw;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.moment-tag {
  align-self: flex-start;
  font-size: 1.7cqw;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #A9760A;
}
.voice {
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 1.7cqw 2.2cqw;
  border-radius: 2.6cqw;
  background: #FFFFFF;
  border: .16cqw solid #E4DDCF;
}
.voice .play {
  width: 5.4cqw;
  height: 5.4cqw;
  border-radius: 50%;
  background: var(--brand-500);
  display: grid;
  place-items: center;
  flex: none;
}
.voice .play svg { width: 2.2cqw; height: 2.2cqw; }
.wave { display: flex; align-items: center; gap: .55cqw; height: 5cqw; flex: 1; }
.wave i {
  display: block;
  flex: 1;
  border-radius: .4cqw;
  background: var(--brand-500);
  animation: wv 1.15s ease-in-out infinite;
  min-height: .8cqw;
}
@keyframes wv { 0%, 100% { height: 22%; opacity: .55; } 50% { height: 100%; opacity: 1; } }
.voice .dur { font-size: 1.75cqw; color: #777; font-variant-numeric: tabular-nums; }

/* ---- 5. Calendar ---- */
.sv-calendar { background: #F5F5F5; color: #1A1A1A; }
.sv-calendar .sv-pad { flex-direction: column; gap: 3cqw; }
.cal-head { display: flex; align-items: baseline; justify-content: space-between; }
.cal-head h4 { font-family: var(--font-display); font-weight: 700; font-size: 4.1cqw; letter-spacing: -.025em; }
.cal-head span { font-size: 2cqw; color: #777; }
.cal-list { display: flex; flex-direction: column; gap: 1.6cqw; }
.cal-row {
  display: grid;
  grid-template-columns: 12cqw 1fr auto;
  align-items: center;
  gap: 2.4cqw;
  padding: 2cqw 2.4cqw;
  border-radius: 2.2cqw;
  background: #FFFFFF;
  border: .14cqw solid #E6E1D6;
  border-left: .9cqw solid var(--acc, var(--brand-500));
}
.cal-when { font-family: var(--font-display); font-weight: 600; font-size: 2.4cqw; color: #1A1A1A; letter-spacing: -.015em; }
.cal-when em { display: block; font-style: normal; font-size: 1.6cqw; color: #777; font-weight: 500; }
.cal-what { font-size: 2.5cqw; font-weight: 500; }
.cal-what em { display: block; font-style: normal; font-size: 1.75cqw; color: #777; margin-top: .3cqw; }
.cal-icon { font-size: 3.2cqw; }

/* ---- 6. Locations ---- */
.sv-location { background: #0C1412; }
.map { position: absolute; inset: 0; }
.map svg { width: 100%; height: 100%; }
.loc-card {
  position: absolute;
  left: 5cqw;
  bottom: 5cqw;
  padding: 2.6cqw 3cqw;
  border-radius: 3cqw;
  background: rgba(10, 16, 14, .72);
  backdrop-filter: blur(14px);
  border: .16cqw solid rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  gap: 3cqw;
}
.loc-card .t { font-family: var(--font-display); font-weight: 700; font-size: 3.4cqw; letter-spacing: -.022em; }
.loc-card .s { font-size: 1.95cqw; color: #9BAAA3; margin-top: .4cqw; }
.loc-card .divider { width: .16cqw; align-self: stretch; background: rgba(255, 255, 255, .16); }
.loc-card .temp { font-family: var(--font-display); font-weight: 600; font-size: 3.2cqw; letter-spacing: -.02em; }
.loc-card .time { font-size: 1.85cqw; color: #9BAAA3; }
.pin {
  position: absolute;
  left: 56%;
  top: 38%;
  translate: -50% -100%;
}
.pin .head {
  width: 7cqw;
  height: 7cqw;
  border-radius: 50% 50% 50% 4%;
  rotate: 45deg;
  background: linear-gradient(140deg, #6FB18C, #3A7A56);
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .5);
  display: grid;
  place-items: center;
}
.pin .head span { rotate: -45deg; font-family: var(--font-display); font-weight: 700; font-size: 3cqw; }
.pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 108%;
  translate: -50% 0;
  width: 7cqw;
  height: 2cqw;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  filter: blur(.6cqw);
}
.pulse {
  position: absolute;
  left: 56%;
  top: 38%;
  translate: -50% -50%;
  width: 14cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  border: .3cqw solid rgba(111, 177, 140, .55);
  animation: pulse 2.6s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { scale: .35; opacity: .9; }
  100% { scale: 1.5; opacity: 0; }
}

/* ---- 7. Incoming call (event card) ---- */
.sv-call { background: radial-gradient(100% 120% at 50% 0%, #1D3327 0%, #0C1411 60%); }
.sv-call .sv-pad { flex-direction: column; align-items: center; justify-content: center; gap: 3cqw; }
.call-av {
  width: 20cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 8cqw;
  background: linear-gradient(140deg, #7C82C9, #4B5198);
  box-shadow: 0 0 0 1.4cqw rgba(255, 255, 255, .06), 0 0 0 2.8cqw rgba(255, 255, 255, .03);
  animation: ring 1.8s ease-in-out infinite;
}
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 1.4cqw rgba(255,255,255,.06), 0 0 0 2.8cqw rgba(255,255,255,.03); } 50% { box-shadow: 0 0 0 2.2cqw rgba(255,255,255,.09), 0 0 0 4.4cqw rgba(255,255,255,.02); } }
.call-name { font-family: var(--font-display); font-weight: 700; font-size: 5cqw; letter-spacing: -.028em; }
.call-sub { font-size: 2.2cqw; color: #9DB0A6; margin-top: -1.6cqw; }
.call-actions { display: flex; gap: 4cqw; margin-top: 1.5cqw; }
.call-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2cqw;
  font-size: 1.9cqw;
  color: #C6D4CD;
}
.call-btn i {
  width: 11cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.call-btn i svg { width: 4.6cqw; height: 4.6cqw; }
.call-accept i { background: var(--brand-500); box-shadow: 0 1cqw 3cqw rgba(75, 152, 108, .5); }
.call-decline i { background: var(--coral); }

/* --- module chips --- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .95rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: .885rem;
  font-weight: 550;
  font-family: var(--font-display);
  transition: all .22s var(--ease);
}
.chip svg { width: 15px; height: 15px; opacity: .7; }
.chip:hover { border-color: var(--brand-300); color: var(--text); }
.chip[aria-selected="true"] {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(75, 152, 108, .7);
}
.chip[aria-selected="true"] svg { opacity: 1; }

.stage .chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #B9C8C0; }
.stage .chip:hover { border-color: rgba(255, 255, 255, .3); color: #fff; }
.stage .chip[aria-selected="true"] { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }

.sv-progress {
  position: relative;
  height: 2px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
  margin-top: 1rem;
}
.stage .sv-progress { background: rgba(255, 255, 255, .12); }
.sv-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--brand-500);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   11. Phone mockup (family app)
   -------------------------------------------------------------------------- */

.phone {
  container-type: inline-size;
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 19;
  padding: 2.8%;
  border-radius: 13%;
  background: linear-gradient(155deg, #3C4541 0%, #191E1C 44%, #0D1110 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .07),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 24px 50px -14px rgba(0, 0, 0, .6);
}

.phone-screen {
  container-type: inline-size;
  position: relative;
  height: 100%;
  border-radius: 10.5%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 2.4%;
  translate: -50% 0;
  width: 28%;
  height: 3.2%;
  border-radius: 999px;
  background: #0D1110;
}

.ps-bar {
  padding: 9cqw 6cqw 3cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 3.4cqw;
  color: var(--text-3);
  font-weight: 600;
}

.ps-head {
  padding: 1cqw 6cqw 3cqw;
  display: flex;
  align-items: center;
  gap: 3cqw;
}
.ps-head .back { font-size: 5cqw; color: var(--text-2); line-height: 1; }
.ps-head .t { font-family: var(--font-display); font-weight: 700; font-size: 5.2cqw; letter-spacing: -.028em; }

.ps-body { flex: 1; overflow: hidden; padding: 0 6cqw; display: flex; flex-direction: column; gap: 3.4cqw; }

.ps-label { font-size: 3.3cqw; font-weight: 600; color: var(--text-2); }

.ps-chips { display: flex; flex-wrap: wrap; gap: 2cqw; }
.ps-chip {
  padding: 1.8cqw 3.4cqw;
  border-radius: 999px;
  border: .5cqw solid var(--border);
  font-size: 3.3cqw;
  font-weight: 600;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 1.4cqw;
}
.ps-chip.on { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.ps-chip.on.amber { background: var(--amber-600); border-color: var(--amber-600); }

.ps-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 4cqw;
  overflow: hidden;
  background: var(--bg-alt);
}

.ps-input {
  padding: 3cqw 3.6cqw;
  border-radius: 3.4cqw;
  border: .5cqw solid var(--border);
  font-size: 3.5cqw;
  color: var(--text);
  background: var(--surface);
}
.ps-input .cursor {
  display: inline-block;
  width: .4cqw;
  height: 4cqw;
  background: var(--brand-500);
  vertical-align: -.6cqw;
  animation: blink2 1.1s steps(1, end) infinite;
}
@keyframes blink2 { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.ps-send {
  margin-top: auto;
  margin-bottom: 5cqw;
  padding: 3.8cqw;
  border-radius: 999px;
  background: var(--brand-500);
  color: #fff;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4cqw;
  letter-spacing: -.01em;
  box-shadow: 0 3cqw 8cqw -3cqw rgba(75, 152, 108, .8);
  transition: transform .2s var(--ease), filter .2s var(--ease);
}
.ps-send.tapped { transform: scale(.96); filter: brightness(1.1); }

.ps-tabs {
  display: flex;
  border-top: .5cqw solid var(--border);
  padding: 2.6cqw 2cqw 3.4cqw;
}
.ps-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1cqw;
  font-size: 2.6cqw;
  color: var(--text-3);
  font-weight: 600;
}
.ps-tab svg { width: 5cqw; height: 5cqw; }
.ps-tab.on { color: var(--brand-500); }

/* activity feed variant */
.ps-feed { display: flex; flex-direction: column; gap: 3cqw; }
.ps-item {
  display: grid;
  grid-template-columns: 11cqw 1fr;
  gap: 3cqw;
  padding: 3.2cqw;
  border-radius: 4cqw;
  background: var(--surface-2);
  border: .5cqw solid var(--border);
  align-items: center;
}
.ps-item .ic {
  width: 11cqw;
  height: 11cqw;
  border-radius: 3cqw;
  display: grid;
  place-items: center;
  font-size: 4.6cqw;
  background: var(--brand-100);
}
.ps-item .tt { display: block; font-size: 3.5cqw; font-weight: 600; line-height: 1.3; }
.ps-item .ss { display: block; font-size: 3cqw; color: var(--text-3); margin-top: .6cqw; line-height: 1.3; }

/* the sent-card flight */
.flight {
  position: absolute;
  z-index: 40;
  width: 84px;
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
}
.flight.go { animation: fly 1.15s var(--ease-out) forwards; }
@keyframes fly {
  0%   { opacity: 0; transform: translate(0, 0) scale(.6) rotate(-6deg); }
  12%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--fx, -260px), var(--fy, -120px)) scale(2.1) rotate(3deg); }
}

/* --------------------------------------------------------------------------
   12. Cards & content blocks
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  padding: clamp(1.4rem, 2.4vw, 2rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card .h4 { margin-bottom: .5rem; }
.card p { color: var(--text-2); font-size: .965rem; line-height: 1.55; }

.card-flat { background: var(--bg-sub); border-color: transparent; }
.card-brand {
  background: linear-gradient(165deg, var(--brand-050), var(--surface) 60%);
  border-color: var(--brand-200);
}
[data-theme="dark"] .card-brand { border-color: rgba(111, 177, 140, .22); }

.ic-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.15rem;
  background: var(--brand-100);
  color: var(--brand-600);
  flex: none;
}
[data-theme="dark"] .ic-box { color: var(--brand-300); }
.ic-box svg { width: 22px; height: 22px; }
.ic-amber { background: var(--amber-100); color: #8A6100; }
[data-theme="dark"] .ic-amber { color: var(--amber); }
.ic-indigo { background: var(--indigo-100); color: var(--indigo); }
[data-theme="dark"] .ic-indigo { color: #A5A9E0; }

/* checklist */
.checks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: .7rem;
  align-items: start;
  color: var(--text-2);
  font-size: .975rem;
  line-height: 1.5;
}
.checks li + li { margin-top: .75rem; }
.checks .tick {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-600);
  display: grid;
  place-items: center;
  margin-top: .17rem;
}
[data-theme="dark"] .checks .tick { color: var(--brand-300); }
.checks .tick svg { width: 11px; height: 11px; }
.checks b { color: var(--text); font-weight: 600; }

.stage .checks li { color: #A9B8B0; }
.stage .checks b { color: #fff; }
.stage .checks .tick { background: rgba(111, 177, 140, .18); color: var(--brand-300); }

/* problem → answer */
.quiet-card {
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.quiet-card .q {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -.018em;
  line-height: 1.3;
}
.quiet-card .a { margin-top: .7rem; color: var(--text-2); font-size: .95rem; }
.quiet-card .n {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: .9rem;
  display: block;
}

/* steps */
.steps { counter-reset: s; display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step {
  position: relative;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.step::before {
  counter-increment: s;
  content: counter(s);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-500);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 6px 16px -6px rgba(75, 152, 108, .7);
}
.step h3 { font-family: var(--font-display); font-weight: 650; font-size: 1.16rem; letter-spacing: -.02em; }
.step p { margin-top: .55rem; color: var(--text-2); font-size: .95rem; }
.step .meta { margin-top: 1rem; font-size: .8rem; color: var(--text-3); }

/* spec table */
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th, .spec td { padding: .95rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.spec th { width: 34%; font-weight: 600; color: var(--text); font-family: var(--font-display); letter-spacing: -.01em; }
.spec td { color: var(--text-2); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

/* language demo */
.langbar { display: flex; flex-wrap: wrap; gap: .4rem; }
.langbar button {
  padding: .4rem .85rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  font-size: .84rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text-2);
  transition: all .2s var(--ease);
}
.langbar button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.lang-out {
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 2.4vw, 1.9rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  min-height: 128px;
}
.lang-out .k { font-size: .74rem; color: var(--text-3); }
.lang-out .v {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  letter-spacing: -.022em;
  line-height: 1.25;
  margin-top: .35rem;
  transition: opacity .25s var(--ease);
}
.lang-out .row + .row { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }

/* testimonials */
.quote-card {
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.quote-card blockquote {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 1.09rem;
  line-height: 1.45;
  letter-spacing: -.014em;
  flex: 1;
}
.quote-card .who { display: flex; align-items: center; gap: .75rem; }
.quote-card .who .av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  flex: none;
}
.quote-card .who b { display: block; font-size: .9rem; font-weight: 600; }
.quote-card .who span { font-size: .8rem; color: var(--text-3); }
.stars { display: flex; gap: .12rem; color: var(--amber); }
.stars svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   13. Pricing
   -------------------------------------------------------------------------- */

.toggle {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem;
  border-radius: var(--r-full);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.toggle button {
  padding: .48rem 1.05rem;
  border-radius: var(--r-full);
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text-2);
  transition: all .22s var(--ease);
}
.toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.toggle .save { color: var(--brand-500); font-size: .78rem; margin-left: .3rem; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); align-items: start; }
.plan {
  position: relative;
  padding: clamp(1.6rem, 2.6vw, 2.1rem);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.plan.featured {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px var(--ring), var(--shadow-lg);
}
.plan .tag {
  position: absolute;
  top: -.75rem;
  left: clamp(1.6rem, 2.6vw, 2.1rem);
  padding: .28rem .75rem;
  border-radius: var(--r-full);
  background: var(--brand-500);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.plan .pname { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.024em; }
.plan .pdesc { color: var(--text-2); font-size: .93rem; margin-top: .35rem; }
.price { display: flex; align-items: baseline; gap: .3rem; }
.price .cur { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--text-2); }
.price .amt {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 4vw, 3.1rem);
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price .per { font-size: .88rem; color: var(--text-3); }
.plan .note { font-size: .82rem; color: var(--text-3); }

.compare { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
.compare table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; }
.compare th, .compare td { padding: .85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); }
.compare thead th { background: var(--bg-alt); font-family: var(--font-display); font-weight: 650; letter-spacing: -.01em; }
.compare td:not(:first-child), .compare thead th:not(:first-child) { text-align: center; }
.compare tbody td:first-child { color: var(--text-2); }
.compare .yes { color: var(--brand-500); font-weight: 700; }
.compare .no { color: var(--text-3); }
.compare tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------------------
   14. FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem .25rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.055rem;
  letter-spacing: -.018em;
  transition: color .2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand-500); }
.faq summary .plus {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex: none;
  position: relative;
  transition: all .25s var(--ease);
}
.faq summary .plus::before,
.faq summary .plus::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}
.faq summary .plus::before { width: 11px; height: 1.5px; }
.faq summary .plus::after { width: 1.5px; height: 11px; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.faq details[open] summary .plus { background: var(--brand-500); border-color: var(--brand-500); color: #fff; rotate: 90deg; }
.faq details[open] summary .plus::after { opacity: 0; }
.faq .ans { padding: 0 3rem 1.5rem .25rem; color: var(--text-2); font-size: .975rem; line-height: 1.6; }
.faq .ans p + p { margin-top: .8rem; }

/* --------------------------------------------------------------------------
   15. CTA + footer
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(135deg, #16241C 0%, #0D1411 60%);
  color: #F1F5F2;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -50% -10% auto -10%;
  aspect-ratio: 2;
  background: radial-gradient(50% 60% at 50% 100%, rgba(75, 152, 108, .5), transparent 72%);
}
.cta-band .lead { color: #A9B8B0; margin-inline: auto; max-width: 52ch; }
.cta-band .row { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 2rem; }

.footer {
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-sub);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
.footer h5 {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
}
.footer li + li { margin-top: .6rem; }
.footer a { font-size: .93rem; color: var(--text-2); }
.footer a:hover { color: var(--brand-500); }
.footer-bottom {
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: .84rem;
  color: var(--text-3);
}
.footer-bottom .links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   16. Forms
   -------------------------------------------------------------------------- */

.field { display: block; }
.field .lbl { display: block; font-size: .855rem; font-weight: 600; margin-bottom: .45rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .8rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: .975rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px var(--ring);
}
.field textarea { resize: vertical; min-height: 120px; }
.field .hint { margin-top: .4rem; font-size: .8rem; color: var(--text-3); }

.form-note {
  display: flex;
  gap: .65rem;
  padding: .9rem 1.05rem;
  border-radius: var(--r-md);
  background: var(--amber-100);
  color: #6E4E00;
  font-size: .86rem;
  line-height: 1.45;
}
[data-theme="dark"] .form-note { color: #E9C86A; }
.form-note svg { width: 17px; height: 17px; flex: none; margin-top: .12rem; }

/* --------------------------------------------------------------------------
   17. Reveal + motion
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
}
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .75s var(--ease-out) var(--d, 0ms), transform .75s var(--ease-out) var(--d, 0ms);
}

.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   18. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1040px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .split, .split.even { grid-template-columns: 1fr; }
  .split.reverse > *:first-child { order: 0; }
  .g-2, .g-3, .steps { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .factstrip { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   19. Composed blocks (hero figure, mini devices, dark panel, phone cluster)
   -------------------------------------------------------------------------- */

.brand svg { color: var(--brand-500); }
[data-theme="dark"] .brand svg,
.stage .brand svg { color: var(--brand-400); }

/* the send demo: a phone beside a frame, in the "in your hand" half */
.send-phone { position: relative; width: 100%; max-width: 250px; }
.send-phone .phone { max-width: none; }
.send-phone .flight { left: 26%; top: 38%; }

/* the phone is an illustration at prop size, not a screenshot — nudge its
   type above true scale so it stays readable beside the frame. */
.send-phone .ps-bar     { font-size: 3.8cqw; }
.send-phone .ps-head .t { font-size: 6cqw; }
.send-phone .ps-label   { font-size: 3.8cqw; }
.send-phone .ps-chip    { font-size: 3.7cqw; }
.send-phone .ps-input   { font-size: 4.1cqw; }
.send-phone .ps-send    { font-size: 4.8cqw; padding: 4.2cqw; cursor: pointer; }
.send-phone .ps-tab     { font-size: 3cqw; }

@media (max-width: 860px) {
  .send-demo { gap: 2.5rem; }
}

/* mini device previews — everything inside scales because the screen is a
   container and all inner type is sized in cqw */
.mini .tablet { padding: 3%; border-radius: 2px; }
.mini .tablet::before,
.mini .tablet::after { opacity: .5; }
.mini .dial-knob { display: none; }

.module-card { display: flex; flex-direction: column; }
.module-card .ic-box { margin-bottom: .85rem; }
/* only the card's own description grows — never a <p> inside the mini screen,
   which would stretch the message quote and moment prompt out of centre */
.module-card > p { flex: 1; }

/* dark panel dropped into a light page */
.panel-dark {
  --text: #ECF1EE;
  --text-2: #A9B8B0;
  --text-3: #7E8D85;
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .2);
  --surface: rgba(255, 255, 255, .04);
  position: relative;
  isolation: isolate;
  overflow: clip;
  color: var(--text);
  background: linear-gradient(158deg, #17261D 0%, #0C1310 62%);
  border-radius: var(--r-xl);
  padding: clamp(1.75rem, 4.5vw, 3.5rem);
}
.panel-dark::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -55%;
  right: -15%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(75, 152, 108, .35), transparent 72%);
}
.panel-dark .eyebrow { color: var(--brand-300); }
.panel-dark .lead { color: var(--text-2); }
.panel-dark .checks li { color: var(--text-2); }
.panel-dark .checks b { color: #fff; }
.panel-dark .checks .tick { background: rgba(111, 177, 140, .18); color: var(--brand-300); }
.panel-dark .spec th { color: #fff; }

/* phone clusters */
.phone-cluster {
  display: flex;
  gap: clamp(.75rem, 2vw, 1.5rem);
  justify-content: center;
  align-items: flex-start;
}
.phone-cluster .phone { max-width: 262px; flex: 1 1 0; }
.phone-cluster.two .phone:nth-child(2) { margin-top: clamp(1.25rem, 3vw, 2.5rem); }

/* --------------------------------------------------------------------------
   20. Commercial blocks (reassurance, trust strip, box contents, compare)
   -------------------------------------------------------------------------- */

/* "what if…" reassurance tiles */
.reassure { display: grid; gap: .8rem; }
.reassure li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.reassure .em { font-size: 1.45rem; line-height: 1.1; }
.reassure b {
  display: block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -.016em;
}
.reassure .t { display: block; margin-top: .25rem; color: var(--text-2); font-size: .93rem; line-height: 1.5; }

/* risk-reversal / trust strip */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
}
.trust-strip li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: 1.3rem 1.35rem;
  background: var(--surface);
}
.trust-strip .ic-s { color: var(--brand-500); flex: none; margin-top: .15rem; }
.trust-strip .ic-s svg { width: 19px; height: 19px; }
.trust-strip b {
  display: block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: .97rem;
  letter-spacing: -.014em;
}
.trust-strip span.t { display: block; margin-top: .2rem; font-size: .845rem; color: var(--text-2); line-height: 1.45; }

/* what's in the box */
.box-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: .85rem;
  align-items: center;
  font-size: .97rem;
  color: var(--text-2);
}
.box-list li + li { margin-top: .8rem; }
.box-list .em { font-size: 1.15rem; line-height: 1; }
.box-list b { color: var(--text); font-weight: 600; }

/* customer-facing comparison */
.compare .head-cell {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.compare .head-cell small { font-weight: 500; color: var(--text-3); font-size: .78rem; }
.compare .mine { background: var(--brand-050); }
[data-theme="dark"] .compare .mine { background: rgba(75, 152, 108, .09); }
.compare tbody .mine { color: var(--text); font-weight: 550; }
.compare thead .mine { color: var(--brand-600); }
[data-theme="dark"] .compare thead .mine { color: var(--brand-300); }

/* gift band */
.gift {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3.5vw, 2.75rem);
  border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--amber-100), var(--brand-050) 85%);
  border: 1px solid var(--amber-100);
}
[data-theme="dark"] .gift {
  background: linear-gradient(120deg, rgba(255, 160, 0, .12), rgba(75, 152, 108, .1) 85%);
  border-color: rgba(255, 160, 0, .2);
}
@media (max-width: 760px) { .gift { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   21. The two halves — what the device does vs what you control
   -------------------------------------------------------------------------- */

/* band tints: warm off-whites for their screen, cool for your app */
.tint-w1 { background: #FBF8F2; }
.tint-w2 { background: #F5F0E5; }
.tint-c1 { background: #F3F7F6; }
.tint-c2 { background: #E8F0ED; }
[data-theme="dark"] .tint-w1 { background: #17150F; }
[data-theme="dark"] .tint-w2 { background: #1D1A13; }
[data-theme="dark"] .tint-c1 { background: #101614; }
[data-theme="dark"] .tint-c2 { background: #141D19; }

/* chapter marker */
.chapter { padding-block: clamp(3rem, 6vw, 5rem) 0; }
.chapter-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.25rem);
  align-items: start;
  padding-top: clamp(1.25rem, 2.5vw, 2rem);
  border-top: 2px solid var(--accent, var(--brand-500));
}
.chapter-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.9rem, 6.5vw, 5.25rem);
  line-height: .78;
  letter-spacing: -.05em;
  color: var(--accent, var(--brand-500));
}
.chapter-device  { --accent: var(--brand-500); }
.chapter-control { --accent: var(--indigo); }
[data-theme="dark"] .chapter-control { --accent: #9AA0E2; }
.chapter .h2 { margin-top: -.1em; }
.chapter .lead { margin-top: 1rem; max-width: 62ch; }
.chapter .who-for {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.35rem;
  padding: .4rem .9rem .4rem .7rem;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: .87rem;
}
.chapter .who-for svg { width: 16px; height: 16px; }

@media (max-width: 620px) {
  .chapter-inner { grid-template-columns: 1fr; gap: .75rem; }
}

/* the diptych that names the split */
.halves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}
.half {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  overflow: hidden;
}
.half-device  { background: #FBF8F2; border-color: #E8DFCC; }
.half-control { background: #F3F7F6; border-color: #D8E4DF; }
[data-theme="dark"] .half-device  { background: #1A1710; border-color: rgba(255, 220, 150, .14); }
[data-theme="dark"] .half-control { background: #101715; border-color: rgba(150, 200, 180, .14); }
.half .tag-row { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.half .tag-n {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  color: #fff;
  flex: none;
}
.half-device .tag-n  { background: var(--brand-500); }
.half-control .tag-n { background: var(--indigo); }
.half .tag-l {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.half .h3 { margin-bottom: .6rem; }
.half > p { color: var(--text-2); font-size: .97rem; }
.half ul { margin-top: 1.2rem; }
.half .foot {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: .88rem;
  color: var(--text-3);
}
.half .foot b { color: var(--text); font-weight: 600; }

@media (max-width: 860px) { .halves { grid-template-columns: 1fr; } }

/* finish swatches */
.finishes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.finishes button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .42rem .85rem .42rem .5rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .87rem;
  color: var(--text-2);
  transition: all .2s var(--ease);
}
.finishes button:hover { color: var(--text); border-color: var(--brand-400); }
.finishes button[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}
.finishes .sw {
  width: 20px; height: 20px;
  border-radius: 5px;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.sw-oak    { background: linear-gradient(150deg, #DFC08C, #AE8850); }
.sw-walnut { background: linear-gradient(150deg, #7E5939, #45301F); }
.sw-chalk  { background: linear-gradient(150deg, #F6F3ED, #D8D2C6); }
.sw-ink    { background: linear-gradient(150deg, #33322F, #161614); }

/* vertical timeline */
.timeline { position: relative; padding-left: 3rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(var(--brand-300), var(--border) 85%);
  border-radius: 2px;
}
.timeline > li { position: relative; }
.timeline > li + li { margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.timeline .dot {
  position: absolute;
  left: -3rem;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-500);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 0 0 5px var(--bg), 0 6px 16px -6px rgba(75, 152, 108, .7);
}
.timeline .dot.soft { background: var(--brand-100); color: var(--brand-600); box-shadow: 0 0 0 5px var(--bg); }
[data-theme="dark"] .timeline .dot.soft { color: var(--brand-300); }
.timeline .when {
  font-size: .755rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--brand-500);
}
.timeline h3 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  letter-spacing: -.024em;
  line-height: 1.2;
  margin-top: .35rem;
}
.timeline > li > p { color: var(--text-2); margin-top: .6rem; max-width: 60ch; }
.timeline .aside {
  margin-top: 1rem;
  padding: .95rem 1.15rem;
  border-radius: var(--r-md);
  background: var(--bg-alt);
  font-size: .9rem;
  color: var(--text-2);
  border-left: 3px solid var(--brand-300);
}
.section-alt .timeline .dot { box-shadow: 0 0 0 5px var(--bg-alt), 0 6px 16px -6px rgba(75, 152, 108, .7); }
.section-alt .timeline .dot.soft { box-shadow: 0 0 0 5px var(--bg-alt); }
.section-alt .timeline .aside { background: var(--surface); }

@media (max-width: 560px) {
  .timeline { padding-left: 2.35rem; }
  .timeline::before { left: 13px; }
  .timeline .dot { left: -2.35rem; width: 28px; height: 28px; font-size: .8rem; }
}

/* compact page header */
.stage.compact { padding-block: clamp(2.5rem, 5vw, 4.25rem) clamp(2.75rem, 5vw, 4.5rem); }
.stage.compact::after { display: none; }
.stage.compact .chip { font-size: .84rem; }

/* utility */
.hide-sm { }
@media (max-width: 720px) { .hide-sm { display: none !important; } }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.75rem; } .mt-4 { margin-top: 2.5rem; }
.flex { display: flex; }
.wrap-gap { flex-wrap: wrap; gap: .7rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
