/* kalmefit.com (D85 to D88). Dark, monochrome, green only for Kalme and a few meaningful accents (D88).
   Every colour is a tokens.css variable; scripts/build_site.py refuses a literal colour here.
   Shared by index.html, meet.html and signin.html. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* F-SITE-6: on phones the peeking Kalmes hang past the right edge of the window. Clip the sections that hold them;
   clip, not hidden, so the sticky story phone keeps working (a body value would move to the viewport and not clip). */
@media (max-width: 760px) { .hero, .band, .story { overflow-x: clip; } } /* wider, they hang inside the window by design */
body { margin: 0; background: var(--kf-bg); color: var(--kf-ink); font: 400 18px/1.55 var(--kf-font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--kf-brand-green); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--kf-font-display); margin: 0; }

/* Pebble: gradient stops and eyes from the brand tokens */
.stop-energy { stop-color: var(--kf-brand-energy); }
.stop-green { stop-color: var(--kf-brand-green); }
.stop-teal { stop-color: var(--kf-brand-teal); }
.stop-shine { stop-color: var(--kf-brand-mint); stop-opacity: 0.5; }
.stop-clear { stop-color: var(--kf-brand-mint); stop-opacity: 0; }
.pebble-eyes { fill: var(--kf-brand-mint); transform-box: fill-box; transform-origin: center; animation: blink 6.7s ease-in-out infinite; }
@keyframes blink { 0%, 43%, 47%, 100% { transform: scaleY(1); } 45% { transform: scaleY(0.1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pebble-eyes, .peek-pebble { animation: none; } }

/* Buttons: black and white (D88). Pills only for primary tap targets. */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px;
  padding: 0 24px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--kf-ink);
  font: 600 16px/1 var(--kf-font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--kf-dur-fast), border-color var(--kf-dur-fast), opacity var(--kf-dur-fast);
}
.btn-small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn-light { background: var(--kf-ink); color: var(--kf-bg); }
.btn-light:hover { opacity: 0.88; }
.btn-primary { background: var(--kf-ink); color: var(--kf-bg); }
.btn-ghost { border-color: var(--kf-hairline); color: var(--kf-ink); }
.btn-ghost:hover { border-color: var(--kf-ink-3); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 14px max(24px, calc((100vw - 1200px) / 2)); background: var(--kf-bg); border-bottom: 1px solid var(--kf-hairline);
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { display: block; }
.wordmark { font: 700 19px/1 var(--kf-font-display); letter-spacing: -0.02em; color: var(--kf-ink); }
.wordmark span { color: var(--kf-brand-green); }
.nav-links { display: flex; gap: 24px; flex: 1; }
.nav-links a { color: var(--kf-ink-2); text-decoration: none; font: 400 15px/1 var(--kf-font); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--kf-ink); }
.nav-actions { display: flex; gap: 8px; }
@media (max-width: 820px) { .nav { padding: 12px 16px; justify-content: space-between; } .nav-links { display: none; } .nav-actions .btn-ghost { display: none; } }

/* Layout: a 1200 px container, sections 80 to 112 px apart (D88) */
.block { max-width: 1200px; margin: 0 auto; padding: 96px 24px; }
.section-head { max-width: 720px; margin: 0 0 48px; }
.block h2, .story h2, .band h2 { font: 700 clamp(34px, 3.8vw, 46px)/1.08 var(--kf-font-display); letter-spacing: -0.025em; }
.section-head p { margin: 14px 0 0; color: var(--kf-ink-2); font-size: 18px; }
@media (max-width: 760px) { .block { padding: 72px 16px; } }

/* 1. Hero: copy left, a substantial phone right */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 72px 24px 88px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: center;
}
h1 { font: 700 clamp(56px, 6.4vw, 80px)/1 var(--kf-font-display); letter-spacing: -0.04em; display: flex; flex-wrap: wrap; align-items: center; gap: 0.16em; }
.shape { width: 0.9em; height: 0.9em; flex: none; overflow: visible; }
.shape path { fill: var(--kf-ink); }
.shape .shape-eyes { fill: var(--kf-bg); }
.shape-mini { width: 32px; height: 32px; }
.row { display: flex; align-items: flex-end; gap: 8px; }
.row-user { justify-content: flex-end; }
.row .msg { max-width: 76%; }
.row-kalme .msg-block { flex: 1; min-width: 0; }
.avatar { width: 30px; height: 30px; flex: none; }
.avatar-user { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--kf-surface-3); color: var(--kf-ink-2); }
.avatar-user svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.stamp { align-self: center; margin: 0 0 4px; color: var(--kf-ink-3); font: 500 14px/1 var(--kf-font); }
.lede { max-width: 30ch; margin: 24px 0 0; color: var(--kf-ink-2); font: 400 clamp(19px, 1.8vw, 22px)/1.45 var(--kf-font); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { margin: 18px 0 0; color: var(--kf-ink-3); font-size: 14px; }
.hero-demo { position: relative; }
@media (max-width: 960px) { .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 48px; } .hero-copy { display: flex; flex-direction: column; align-items: center; } h1 { justify-content: center; } }

/* The phone: ONE component, identical everywhere, iPhone 18 Pro Max geometry (1 CSS px = 1 pt before scaling).
   Apple spec (support.apple.com/en-us/148591, read 2026-09-22): 2868 x 1320 px at 460 ppi = 956 x 440 pt screen;
   body 163.4 x 78.0 mm; screen 158.4 x 72.9 mm, so bezel 2.5 mm = 15.4 pt at 6.036 pt/mm; body 470.8 x 986.3 pt.
   APPROXIMATE (Apple does not publish them): screen corner radius 62 pt, Dynamic Island 126 x 37 pt, 11 pt from the top.
   Every phone shares one --phone-zoom (home.js), so they never differ from one another. */
.phone-wrap { position: relative; width: calc(470.8px * var(--phone-zoom, 0.7)); height: calc(986.3px * var(--phone-zoom, 0.7)); flex: none; }
.phone {
  position: absolute; left: 0; top: 0; width: 470.8px; height: 986.3px; padding: 15.4px; border-radius: 77px;
  background: var(--kf-device-frame); box-shadow: inset 0 0 0 2px var(--kf-device-edge), 0 36px 90px -24px color-mix(in srgb, var(--kf-device-shadow) 85%, transparent), 0 8px 24px color-mix(in srgb, var(--kf-device-shadow) 45%, transparent);
  transform: scale(var(--phone-zoom, 0.7)); transform-origin: 0 0;
}
.phone-screen {
  position: relative; width: 440px; height: 956px; border-radius: 62px; overflow: hidden; background: var(--kf-bg); color: var(--kf-ink);
  display: flex; flex-direction: column; padding: 0 18px 8px;
}
.side { position: absolute; width: 4px; border-radius: 2px; background: var(--kf-device-edge); }
.side-l1 { left: -3px; top: 180px; height: 34px; } .side-l2 { left: -3px; top: 250px; height: 66px; }
.side-l3 { left: -3px; top: 330px; height: 66px; } .side-r { right: -3px; top: 280px; height: 104px; }
.status { position: relative; display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 22px 0 30px; }
.status .time { font: 600 17px/1 var(--kf-font); letter-spacing: -0.01em; }
.status-icons { display: inline-flex; gap: 6px; align-items: center; fill: currentColor; }
.home-ind { display: block; width: 144px; height: 5px; margin: 14px auto 0; border-radius: 3px; background: var(--kf-ink); }
.phone-island { position: absolute; top: 11px; left: 50%; width: 126px; height: 37px; margin-left: -63px; border-radius: 19px; background: var(--kf-device-island); }
/* Grok Bot phone pattern (D86): round back, centred name pill, round icon; dark bubbles; light user bubble. */
.phone-bar { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 14px; }
.round {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; border: 0; background: var(--kf-surface-2); color: var(--kf-ink); font: 400 22px/1 var(--kf-font);
}
.who { display: inline-flex; align-items: center; gap: 9px; padding: 5px 18px 5px 6px; border: 0; border-radius: 999px;
  background: var(--kf-surface-2); font: 600 17px/1 var(--kf-font); }
.phone-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; overflow: hidden; padding: 4px 0 16px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 48px); mask-image: linear-gradient(to bottom, transparent 0, black 48px); }
.msg { margin: 0; max-width: 82%; padding: 12px 18px; border-radius: 22px; font: 400 18px/1.4 var(--kf-font); }
.msg-user { align-self: flex-end; background: var(--kf-bubble-user); color: var(--kf-bubble-user-ink); }
.msg-kalme { align-self: flex-start; background: var(--kf-surface-2); color: var(--kf-ink); }
.msg-block { align-self: stretch; background: var(--kf-surface-2); border-radius: 22px; padding: 12px; }
.plan-card { border: 1px solid var(--kf-hairline); border-radius: 16px; padding: 12px 16px; }
.plan-title { margin: 0 0 4px; font: 600 17px/1.3 var(--kf-font); }
.plan-row { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 0; border-top: 1px solid var(--kf-hairline); font: 400 17px/1.3 var(--kf-font); }
.nums { font-variant-numeric: tabular-nums; color: var(--kf-ink-2); white-space: nowrap; }
/* The changed exercise: a green mark and what it replaced (D88: "highlight the changed exercise") */
.plan-row.changed { position: relative; padding-left: 12px; margin-left: -12px; box-shadow: inset 3px 0 0 var(--kf-brand-green); }
.plan-row.changed small { display: block; margin-top: 3px; color: var(--kf-ink-2); font-size: 14px; }
.plan-row.changed small s { color: var(--kf-ink-3); }
.plan-tag { display: inline-block; margin-left: 8px; color: var(--kf-brand-green); font: 600 12px/1 var(--kf-font); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; }
.plan-actions { display: flex; gap: 8px; margin-top: 12px; }
.phone-screen .btn-small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.phone-screen .btn-action { background: var(--kf-action); color: var(--kf-action-ink); }
.phone-screen .btn-ghost { border-color: var(--kf-hairline); background: var(--kf-bg); color: var(--kf-ink); }
.msg-block { background: var(--kf-surface-2); }
.plan-card { background: var(--kf-bg); }
.phone-composer { display: flex; gap: 10px; align-items: center; }
.field {
  flex: 1; display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 7px 0 18px;
  border: 1px solid var(--kf-hairline); border-radius: 999px; background: var(--kf-bg); color: var(--kf-ink-3); font: 400 17px/1 var(--kf-font);
}
.mic { width: 34px; height: 34px; border-radius: 50%; background: var(--kf-surface-3); }
.phone-body > * { animation: rise var(--kf-dur-slow) var(--kf-ease) both; }
@media (prefers-reduced-motion: reduce) { .phone-body > * { animation: none; } }

/* 2. Companion banner: the oversized character, simple copy */
.band { max-width: 1200px; margin: 0 auto; padding: 112px 24px 96px; }
/* D103: the card no longer crops Kalme; the whole silhouette shows and overlaps the card's top edge. */
.peek {
  position: relative; min-height: 340px; display: flex; align-items: center;
  background: var(--kf-surface-2); border-radius: 28px; padding: 56px;
}
.peek-copy { position: relative; z-index: 1; max-width: 520px; }
.peek-copy p { margin: 16px 0 0; color: var(--kf-ink-2); }
.peek-pebble { position: absolute; right: 64px; top: -92px; width: 340px; height: auto; aspect-ratio: 256 / 272; overflow: visible; cursor: pointer; }
/* D103 satin silicone, token colours only: emerald core, deep green underneath, one pale green highlight */
.satin-core { stop-color: color-mix(in srgb, var(--kf-brand-green) 78%, var(--kf-brand-energy)); }
.satin-shade-in { stop-color: var(--kf-brand-teal); stop-opacity: 0.62; }
.satin-shade-out { stop-color: var(--kf-brand-teal); stop-opacity: 0; }
.satin-light-in { stop-color: color-mix(in srgb, var(--kf-brand-mint) 70%, var(--kf-brand-energy)); stop-opacity: 0.5; }
.satin-light-mid { stop-color: var(--kf-brand-mint); stop-opacity: 0.16; }
.satin-light-out { stop-color: var(--kf-brand-mint); stop-opacity: 0; }
.satin-rim { stroke-width: 7; opacity: 0.32; }
.satin-rim-out { stop-color: var(--kf-brand-mint); stop-opacity: 0; }
.satin-rim-in { stop-color: var(--kf-brand-mint); stop-opacity: 1; }
.satin-grain { opacity: 0.028; }
.satin-mask-low { stop-color: var(--kf-brand-glint); stop-opacity: 0.35; }
.satin-mask-full { stop-color: var(--kf-brand-glint); stop-opacity: 1; }
.satin-shadow { fill: var(--kf-device-shadow); }
#peek .face .f { fill: color-mix(in srgb, var(--kf-brand-mint) 55%, var(--kf-brand-glint)); }
#peek .face .f-line, #peek .face .f .f-line { fill: none; stroke: color-mix(in srgb, var(--kf-brand-mint) 55%, var(--kf-brand-glint)); }
#peek .glint { fill: var(--kf-brand-glint); opacity: 0.85; }
#peek-face { transform-box: view-box; }
.face .f { display: none; fill: var(--kf-brand-mint); }
.face .f-line, .face .f .f-line { fill: none; stroke: var(--kf-brand-mint); stroke-width: 9; stroke-linecap: round; }
.face[data-face="idle"] .f-idle, .face[data-face="happy"] .f-happy, .face[data-face="wink"] .f-wink,
.face[data-face="wow"] .f-wow, .face[data-face="calm"] .f-calm, .face[data-face="focus"] .f-focus { display: inline; }
@media (max-width: 1080px) { .band { padding-top: 16px; } .peek { padding-bottom: 300px; } .peek-pebble { width: 240px; top: auto; bottom: 16px; right: 50%; margin-right: -120px; } }
@media (max-width: 760px) { .band { padding: 0 16px 72px; } .peek { padding: 32px 24px 280px; } .peek-pebble { width: 220px; margin-right: -110px; } }

/* 3. Sticky demonstration: steps left (40%), one sticky phone right (60%) */
.story { max-width: 1200px; margin: 0 auto; padding: 96px 24px; }
.story-head { max-width: 760px; margin-bottom: 24px; }
.story-grid { display: grid; grid-template-columns: 4fr 6fr; gap: 48px; }
.story-steps { list-style: none; margin: 0; padding: 0; }
.story-step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; color: var(--kf-ink-3); transition: color var(--kf-dur); }
.story-step.on { color: var(--kf-ink); }
.step-num { margin: 0 0 12px; font: 500 14px/1 var(--kf-font-mono); color: var(--kf-ink-3); }
.story-step.on .step-num { color: var(--kf-brand-green); }
.story-step h3 { font: 700 clamp(26px, 2.6vw, 32px)/1.15 var(--kf-font-display); letter-spacing: -0.02em; color: inherit; }
.story-step p:not(.step-num) { margin: 14px 0 0; max-width: 36ch; color: var(--kf-ink-2); }
.story-step:not(.on) p:not(.step-num) { color: var(--kf-ink-3); }
/* D102: a flat text link after step 3, no pill (the page already carries the pill CTAs) */
.story-step .step-link { margin-top: 20px; }
.step-link a { color: var(--kf-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--kf-hairline); text-underline-offset: 5px; transition: color var(--kf-dur), text-decoration-color var(--kf-dur); }
.step-link a:hover { text-decoration-color: var(--kf-ink); }
.story-step:not(.on) .step-link a { color: var(--kf-ink-3); }
.story-stage { position: relative; }
.story-sticky { position: sticky; top: calc((100vh - 986.3px * var(--phone-zoom, 0.7)) / 2 + 28px); display: flex; justify-content: center; }
.step-phone { display: none; }
@media (max-width: 960px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-stage { display: none; }
  .story-step { min-height: 0; color: var(--kf-ink); padding: 32px 0; }
  .story-step p:not(.step-num), .story-step:not(.on) p:not(.step-num) { color: var(--kf-ink-2); }
  .story-step:not(.on) .step-link a { color: var(--kf-ink); }
  .step-phone { display: flex; justify-content: center; margin-top: 28px; }
}

/* 4. Three compact situations: columns on hairlines, no boxes */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--kf-hairline); }
.case { padding: 32px 32px 8px 0; }
.case + .case { padding-left: 32px; border-left: 1px solid var(--kf-hairline); }
.case h3 { font: 700 22px/1.2 var(--kf-font-display); letter-spacing: -0.01em; }
.case dl { margin: 20px 0 0; }
.case dt { margin-top: 18px; font: 600 12px/1 var(--kf-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--kf-ink-3); }
.case dt:first-child { margin-top: 0; }
.case dd { margin: 6px 0 0; color: var(--kf-ink); font-size: 17px; }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; } .case, .case + .case { padding: 28px 0; border-left: 0; } .case + .case { border-top: 1px solid var(--kf-hairline); } }

/* 5. Pilot and availability: one conversion section */
.pilot { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.pilot-copy p { margin: 16px 0 28px; color: var(--kf-ink-2); max-width: 40ch; }
.facts { margin: 0; border-top: 1px solid var(--kf-hairline); }
.facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--kf-hairline); }
.facts dt { color: var(--kf-ink-3); font-size: 15px; }
.facts dd { margin: 0; font-size: 17px; }
@media (max-width: 860px) { .pilot { grid-template-columns: 1fr; gap: 40px; } }

/* 6. FAQ: native details, hairline rows */
.faq { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.faq-list details { border-top: 1px solid var(--kf-hairline); }
.faq-list details:last-child { border-bottom: 1px solid var(--kf-hairline); }
.faq-list summary { list-style: none; cursor: pointer; padding: 20px 32px 20px 0; position: relative; font: 600 18px/1.35 var(--kf-font); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--kf-ink-2); font-weight: 400; font-size: 22px; }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { margin: 0 0 20px; color: var(--kf-ink-2); max-width: 62ch; }
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; gap: 20px; } }

/* 7. Closing call with the outlined Kalme */
.final { position: relative; overflow: hidden; text-align: center; padding: 104px 16px 0; }
.final h2 { font: 700 clamp(44px, 5.4vw, 68px)/1.02 var(--kf-font-display); letter-spacing: -0.035em; }
.final p { color: var(--kf-ink-2); margin: 12px 0 0; }
.final .cta { justify-content: center; }
.arc { display: block; width: min(960px, 140vw); height: auto; margin: 48px auto 0; }
.arc path { stroke: var(--kf-hairline); stroke-width: 1.5; }

/* Tabs (launch post): flat text tabs, never pill chips (owner rule) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 24px 0 18px; border-bottom: 1px solid var(--kf-hairline); }
.tabs button {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 0;
  color: var(--kf-ink-2); font: 600 15px/1 var(--kf-font); cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--kf-ink); border-bottom-color: var(--kf-ink); }

/* Footer */
.foot { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding: 48px 24px 56px; border-top: 1px solid var(--kf-hairline); }
.foot-brand p { margin: 12px 0 0; color: var(--kf-ink-3); font-size: 13px; line-height: 1.5; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-cols a { display: block; padding: 4px 0; color: var(--kf-ink-2); text-decoration: none; font-size: 14px; }
.foot-cols a:hover { color: var(--kf-ink); }
.col-head { margin: 0 0 8px; font: 600 11px/1 var(--kf-font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--kf-ink-3); }
@media (max-width: 760px) { .foot, .foot-cols { grid-template-columns: 1fr; } }

/* Section navigator (rail.js; owner reference: the x.ai article rail). Flat text and hairline segments. */
.rail-nav { position: fixed; z-index: 5; right: 20px; top: 300px; bottom: 60px; width: 150px; display: none; flex-direction: column; }
.rail-item { position: relative; display: block; min-height: 22px; padding-right: 16px; text-align: right; text-decoration: none; }
.rail-label { display: block; padding-top: 1px; color: var(--kf-ink-3); font: 500 12px/1.3 var(--kf-font); transition: color var(--kf-dur-fast); }
.rail-item:hover .rail-label { color: var(--kf-ink-2); }
.rail-item.on .rail-label { color: var(--kf-ink); font-weight: 600; }
.rail-seg { position: absolute; right: 0; top: 3px; bottom: 3px; width: 2px; border-radius: 1px; background: var(--kf-hairline); overflow: hidden; }
.rail-fill { position: absolute; inset: 0; background: var(--kf-ink-2); transform: scaleY(0); transform-origin: 50% 0; transition: transform 120ms linear; }
.rail-item.on .rail-fill { background: var(--kf-ink); }
.rail-item:focus-visible { outline: 2px solid var(--kf-brand-green); outline-offset: 2px; }
@media (min-width: 1100px) { .rail-nav { display: flex; right: 14px; } }
/* Compact below 1560 px: segments always, only the current label, every label on hover */
@media (min-width: 1100px) and (max-width: 1559px) {
  .rail-item:not(.on) .rail-label { opacity: 0; transition: opacity var(--kf-dur-fast); }
  .rail-nav:hover .rail-item .rail-label, .rail-nav:focus-within .rail-item .rail-label { opacity: 1; }
  .rail-label { background: var(--kf-bg); display: inline-block; padding: 1px 4px; }
}
@media (prefers-reduced-motion: reduce) { .rail-fill, .rail-label { transition: none; } }

/* D93 hero (owner's ads brief): headline left; an oversized, cropped phone right; the green Kalme at the phone's edge */
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); padding-top: 64px; padding-bottom: 72px; }
.meet { display: inline-flex; align-items: center; gap: 0.3em; margin: 0 0 20px; font: 600 22px/1 var(--kf-font-display); letter-spacing: -0.01em; color: var(--kf-ink-2); }
.meet .shape { width: 1.25em; height: 1.25em; }
.hero h1 { display: block; font: 700 clamp(48px, 5.6vw, 78px)/1.02 var(--kf-font-display); letter-spacing: -0.04em; max-width: 11ch; }
.hero-demo { position: relative; justify-self: end; }
.hero-crop { height: 640px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent); mask-image: linear-gradient(to bottom, black 78%, transparent); }
.phone-wrap.phone-big { --zb: 0.9; width: calc(470.8px * var(--zb)); height: calc(986.3px * var(--zb)); }
.phone-big .phone { transform: scale(var(--zb)); }
.phone-body-top { justify-content: flex-start; -webkit-mask-image: none; mask-image: none; padding-top: 8px; }
/* D96: white, morphing, tucked partly behind the phone's top-right corner (the ad's placement) */
.hero-crop { position: relative; z-index: 1; }
.edge-pebble { position: absolute; z-index: 0; width: 200px; height: 200px; right: -118px; top: -44px; animation: peek-tilt 7s ease-in-out infinite; }
@keyframes peek-tilt { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .edge-pebble { animation: none; } }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { margin: 0 auto; }
  .hero-demo { justify-self: center; }
  .hero-crop { height: 520px; }
  .phone-wrap.phone-big { --zb: 0.72; }
  .edge-pebble { width: 130px; height: 130px; right: -60px; top: -24px; }
}

/* D93 story: the labelled sample history block */
.msg-block.history { padding: 14px 16px; }
.history-label { margin: 0 0 6px; font: 600 13px/1 var(--kf-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--kf-ink-3); }
.msg-block.history .plan-row:first-of-type { border-top: 0; }

/* The story phone scrolls as one continuous thread (owner 2026-09-23): a hidden-scrollbar scroller whose first item
   takes the free space, so a short thread sits at the bottom and a long one scrolls smoothly. */
.story .phone-body { justify-content: flex-start; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.story .phone-body::-webkit-scrollbar { display: none; }
.story .phone-body > :first-child { margin-top: auto; }
.story .phone-body > * { flex: none; }

/* D95: the edge pebble's antennae (owner: "antennas in motion coming on and off like bunny ears") */
.edge-pebble { overflow: visible; }
.edge-pebble .ear { fill: none; stroke: var(--kf-ink); stroke-width: 10; stroke-linecap: round; transform-box: fill-box; transform-origin: 0% 100%; }
.ear-1 { animation: ear 3.2s var(--kf-ease) infinite; }
.ear-2 { transform-origin: 0% 50%; animation: ear 3.2s var(--kf-ease) 0.45s infinite; }
@keyframes ear {
  0%, 12% { transform: scale(0); opacity: 0; }
  20%, 46% { transform: scale(1); opacity: 1; }
  52% { transform: scale(1.12) rotate(-8deg); }
  58% { transform: scale(1) rotate(0); }
  70%, 100% { transform: scale(0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ear-1, .ear-2 { animation: none; transform: none; opacity: 1; } }

/* D97: the story peek. A white Kalme behind the sticky phone; each step it ducks behind the phone and pops out
   somewhere else, in another of the five shapes (owner: "pop up in different shape behind phone revealing itself"). */
.phone-wrap > .phone { z-index: 1; }
.story-peek { position: absolute; z-index: 0; width: 42%; height: auto; aspect-ratio: 1; overflow: visible;
  transition: transform 520ms var(--kf-ease-spring), opacity 260ms ease; }
.story-peek .sp-body { fill: var(--kf-ink); }
.story-peek .shape-eyes { fill: var(--kf-bg); }
.story-peek.hide { opacity: 0; transform: translate(var(--hx, 0), var(--hy, 0)) scale(0.6); }
.story-peek[data-pose="0"] { right: -26%; top: -6%; --hx: -50%; --hy: 30%; transform: rotate(10deg); }
.story-peek[data-pose="1"] { left: -28%; top: 30%; --hx: 50%; --hy: 0; transform: rotate(-12deg); }
.story-peek[data-pose="2"] { right: -28%; top: 52%; --hx: -50%; --hy: 0; transform: rotate(8deg); }
.story-peek[data-pose="3"] { left: -24%; top: -5%; --hx: 50%; --hy: 30%; transform: rotate(-8deg); }
@media (prefers-reduced-motion: reduce) { .story-peek { transition: none; } }

/* D97: the day and night dial on the closing arc. A moon at the left end (dark theme); dragged along the arc it
   becomes a half moon, a half sun, then a full sun at the right end (light theme). Flat, white on black, black on white. */
.daynight { position: relative; width: min(960px, 92vw); margin: 40px auto 0; user-select: none; }
.daynight .arc { display: block; width: 100%; height: auto; margin: 0; }
.daynight .arc path { stroke: var(--kf-ink-3); stroke-width: 1.5; stroke-dasharray: 2 6; }
.arc-box { position: relative; }
.celestial { appearance: none; position: absolute; left: 0; top: 0; width: 96px; height: 96px; margin: -48px 0 0 -48px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--kf-ink); cursor: grab; touch-action: none; }
.celestial:active { cursor: grabbing; }
.celestial svg { width: 100%; height: 100%; overflow: visible; }
.celestial .orb { fill: currentColor; }
.celestial #rays path { fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; }
.celestial #rays { transform-origin: 0 0; }
.end { position: absolute; transform: translate(-50%, 56px); color: var(--kf-ink-3); font: 600 12px/1 var(--kf-font); letter-spacing: 0.08em; text-transform: uppercase; }
.end-night { left: 10.5%; top: 91.3%; }
.end-day { left: 89.5%; top: 84%; }
.final .daynight-caption { margin: 92px auto 0; max-width: 46ch; text-align: center; color: var(--kf-ink-2); }
.daynight-caption span { display: block; margin-top: 6px; color: var(--kf-ink-3); font-size: 14px; }
.final { padding-bottom: 64px; }

/* D98: the owner's day and night section. Sharp: a light-weight large title, a thin solid arc, Kalme as the knob. */
.dayline { padding-top: 112px; }
.dl-brand { margin: 0 0 18px; font: 600 15px/1 var(--kf-font-display); color: var(--kf-ink); }
.final h2.dl-title { font: 400 clamp(40px, 5vw, 64px)/1.06 var(--kf-font-display); letter-spacing: -0.035em; }
.final .dl-sub { margin: 16px 0 0; color: var(--kf-ink-2); font-size: 18px; }
.dayline .daynight { margin-top: 56px; }
.dayline .arc path { stroke: var(--kf-ink-3); stroke-width: 1.2; stroke-dasharray: none; }
.dl-center { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: min(560px, 80%); text-align: center; pointer-events: none; }
.final .dl-time { margin: 0 0 18px; font: 600 14px/1 var(--kf-font); letter-spacing: 0.24em; text-transform: uppercase; color: var(--kf-ink-3); }
.final .dl-quote { margin: 0; font: 400 clamp(28px, 3.4vw, 42px)/1.15 var(--kf-font-display); letter-spacing: -0.02em; color: var(--kf-ink); }
.final .dl-sub2 { margin: 14px 0 0; color: var(--kf-ink-2); font-size: clamp(16px, 1.5vw, 19px); }
.dl-orb { fill: var(--kf-ink); }
#dl-rays path { fill: none; stroke: var(--kf-ink); stroke-width: 3.5; stroke-linecap: round; }
.dayline .celestial { width: 112px; height: 112px; margin: -56px 0 0 -56px; }
.dl-ring { fill: none; stroke: var(--kf-ink-2); stroke-width: 1.6; stroke-dasharray: 1.5 7; stroke-linecap: round; transform-origin: 0 0; animation: dl-spin 36s linear infinite; }
.dl-breathe { transform-box: fill-box; transform-origin: 50% 50%; animation: dl-breathe 4.2s ease-in-out infinite; }
.dl-body { fill: var(--kf-ink); }
.dl-eyes { fill: var(--kf-bg); }
.dl-eyes rect { transform-box: fill-box; transform-origin: center; animation: blink 6.3s ease-in-out infinite; }
@keyframes dl-spin { to { transform: rotate(360deg); } }
@keyframes dl-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.035, 0.97); } }
.dayline .end { transform: translate(-50%, 74px); font: 500 14px/1 var(--kf-font); letter-spacing: 0; text-transform: none; color: var(--kf-ink); }
.final .dl-hint { margin: 72px auto 0; color: var(--kf-ink-3); font-size: 13px; }
.dl-cta { justify-content: center; margin-top: 28px; }
@media (prefers-reduced-motion: reduce) { .dl-ring, .dl-breathe, .dl-eyes rect { animation: none; } }
.final .dl-quote b { font-weight: 700; color: inherit; }
/* D100: the K is white on the dark page and turns black once the dial brings the page into day */
.is-day .brand img { filter: invert(1); }
