/* Mectalon: one stylesheet for every page.
   Art direction: warm paper + ink + one signal orange; the chamfered corner (a machined, cut edge) is the motif. */
:root {
  --paper: #f4f2ec;
  --paper-2: #ebe8e0;
  --card: #fffdf9;
  --ink: #111318;
  --ink-2: #2a2d35;
  --muted: #5a5f6a;
  --line: #d9d5cb;
  --accent: #b95a06;     /* brand orange, deepened so white text on it reads (4.6:1) */
  --accent-hi: #f47608;  /* the visiting card's orange; decoration, and accent text on ink */
  --accent-ink: #a85106; /* accent text on paper (4.8:1) */
  --on-ink: #ece9e2;
  --on-ink-muted: #a3a8b2;
  --sans: "Instrument Sans", "Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Serif Fallback", Georgia, serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --cut: 18px;
  color-scheme: only light; /* keeps browsers' forced dark modes off; the site has no dark theme */
}

/* Local fonts sized to the web fonts' measured widths and line boxes, so text doesn't reflow (layout shift) when they arrive.
   ponytail: tuned against Arial; Roboto (Android) borrows the same numbers, close but not exact. */
@font-face { font-family: "Sans Fallback"; src: local("Arial"), local("Roboto"); size-adjust: 102.5%; ascent-override: 94.6%; descent-override: 24.4%; line-gap-override: 0%; }
@font-face { font-family: "Serif Fallback"; font-style: italic; src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT"), local("Times New Roman"); size-adjust: 89.4%; ascent-override: 110.7%; descent-override: 34.7%; line-gap-override: 0%; }

/* The web fonts, served from this site (not Google Fonts) so visitors' browsers don't contact Google for them.
   Google's own files and subsets; latin-ext carries ₹. Only the serif's italic is used. */
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap; src: url(/fonts/instrument-sans-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap; src: url(/fonts/instrument-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-display: swap; src: url(/fonts/instrument-serif-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-display: swap; src: url(/fonts/instrument-serif-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p a, li a, dd a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); line-height: 1.08; letter-spacing: -0.028em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
em.s, .s { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 40em; }
.muted { color: var(--muted); }
.lead + .muted { margin-top: 18px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* The motif: a cut top-right corner */
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--accent-hi); flex: none; }

/* Buttons */
.btn {
  --cut: 10px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; background: var(--ink); color: #fff;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: background .15s ease;
}
.btn:hover { background: var(--accent-ink); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-ink); }
.btn-sm { padding: 10px 16px; font-size: 0.95rem; }
.link-arrow { font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 36px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(244, 242, 236, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand img { display: block; width: auto; height: 26px; }
.site-footer .brand img { width: 300px; max-width: 100%; height: auto; }
.nav { display: flex; align-items: center; gap: 30px; white-space: nowrap; }
@media (max-width: 1140px) { .nav { gap: 22px; } }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--ink-2); font-size: 0.98rem; }
.nav a:not(.btn):hover, .nav a:not(.btn)[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
/* Dropdowns: open on hover or keyboard focus, no script. The panel is a small ink title block, like the portfolio index. */
.dd { position: relative; padding: 20px 0; }
.dd > a::after, .dd-btn::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); opacity: .6; }
.dd-btn { all: unset; cursor: pointer; font-weight: 500; color: var(--ink-2); font-size: 0.98rem; }
.dd-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dd:hover .dd-btn, .dd:has([aria-current="page"]) .dd-btn { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.dd-panel { --cut: 16px; position: absolute; top: 100%; left: -16px; width: 300px; padding: 8px; background: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); display: grid; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.dd:hover .dd-panel, .dd:focus-within .dd-panel { opacity: 1; visibility: visible; transform: none; }
.nav .dd-panel a { display: grid; gap: 2px; padding: 11px 12px; text-decoration: none; }
.nav .dd-panel a:hover, .nav .dd-panel a[aria-current] { background: rgba(255, 255, 255, .07); text-decoration: none; }
.dd-panel b { color: #fff; font-weight: 600; font-size: 0.98rem; }
.dd-panel small { color: var(--on-ink-muted); font-size: 0.85rem; line-height: 1.35; }
.dd-panel a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.menu { display: none; }
.menu .menu-h { padding: 14px 0 4px; font-weight: 500; font-size: 1.05rem; color: var(--ink); }
.menu nav a:has(+ .sub) { border-bottom: 0; padding-bottom: 4px; }
.menu .sub { display: flex; flex-wrap: wrap; gap: 2px 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.menu nav .sub a { padding: 4px 0; border: 0; font-size: 0.92rem; color: var(--muted); }
.menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 8px 0; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " +"; color: var(--accent); }
.menu[open] summary::after { content: " –"; }
.menu nav { position: absolute; left: 0; right: 0; top: 68px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; display: grid; max-height: calc(100dvh - 68px); overflow-y: auto; }
.menu nav a { padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: 1.05rem; color: var(--ink); }
[id] { scroll-margin-top: 88px; }
/* The phone menu takes over before the menu gets crowded */
@media (max-width: 1000px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* Partners strip under the home hero */
.partners { padding: 28px 0; border-top: 1px solid var(--line); }
.partners-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 56px; }
.partners ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 56px; }
.partners li, .partners a { display: grid; gap: 2px; color: inherit; text-decoration: none; }
.partners b { color: var(--ink); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.partners small { color: var(--muted); font-size: 0.85rem; }
.partners a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* Sections */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.rule { border-top: 1px solid var(--line); }

/* Hero */
.hero { position: relative; padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 112px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .55;
  mask-image: radial-gradient(ellipse 70% 80% at 80% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 30%, #000 10%, transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.hero h1 { margin: 22px 0 26px; }
.hero h1 .s { color: var(--accent); }
.hero-simple .hero-grid { grid-template-columns: 1fr; }
.hero-simple h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); max-width: 15em; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Portfolio index: an engineering-drawing title block */
.index { --cut: 26px; background: var(--ink); color: var(--on-ink); padding: 26px 28px 20px; }
.index-head, .index-foot { display: flex; justify-content: space-between; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-ink-muted); font-weight: 600; }
.index-head { padding-bottom: 16px; }
.index-foot { padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14); }
.index ol { list-style: none; margin: 0; padding: 0; }
.index li { border-top: 1px solid rgba(255, 255, 255, .14); }
.index li a { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: baseline; padding: 18px 0; text-decoration: none; color: inherit; }
.index li a:hover b { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.index .n { font-size: 0.8rem; color: var(--accent-hi); font-weight: 600; font-variant-numeric: tabular-nums; }
.index b { display: block; font-weight: 600; font-size: 1.12rem; color: var(--on-ink); letter-spacing: -0.01em; }
.index small { display: block; color: var(--on-ink-muted); font-size: 0.9rem; margin-top: 2px; }
.index .mail { display: block; padding: 34px 0 38px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: clamp(1.5rem, 3.2vw, 2.3rem); font-weight: 600; letter-spacing: -0.02em; color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.index .mail:hover { color: var(--accent); }
.tag { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 8px; border: 1px solid rgba(255, 255, 255, .25); color: var(--on-ink-muted); white-space: nowrap; }
.tag.live { border-color: var(--accent); color: #fff; background: var(--accent); }

/* Cards */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.eyebrow.group { display: flex; margin: 0 0 16px; }
.grid + .eyebrow.group { margin-top: 44px; }
.card { background: var(--card); padding: 30px 28px 28px; display: flex; flex-direction: column; gap: 12px; }
.card .n { font-size: 0.8rem; font-weight: 600; color: var(--accent-ink); letter-spacing: 0.08em; }
.card p { color: var(--muted); }
.card .link-arrow { margin-top: auto; padding-top: 12px; }
.card ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }
.card li + li { margin-top: 4px; }
.card .chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.card .chips li { margin: 0; padding: 4px 10px; border: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-2); }

/* Dark band */
.band-ink { background: var(--ink); color: var(--on-ink); }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink .lead, .band-ink p { color: var(--on-ink-muted); }
.band-ink .eyebrow { color: var(--on-ink-muted); }
.band-ink .btn { background: var(--accent); }
.band-ink .btn:hover { background: #fff; color: var(--ink); }
.band-ink .link-arrow { color: #fff; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split.top { align-items: start; }
.split .eyebrow + h2 { margin-top: 18px; }
.split h2 + .lead { margin-top: 20px; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.ticks li::before { content: ""; width: 10px; height: 10px; margin-top: 8px; background: var(--accent-hi); clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%); }
.band-ink .ticks li { color: var(--on-ink); }


/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { border-top: 2px solid var(--ink); padding-top: 18px; display: grid; gap: 8px; align-content: start; }
.steps li::before { counter-increment: step; content: "0" counter(step); font-size: 0.8rem; font-weight: 600; color: var(--accent-ink); letter-spacing: .08em; }
.steps p { color: var(--muted); }
.band-ink .steps li { border-top-color: var(--accent); }
.band-ink .steps li::before { color: var(--accent-hi); }
.band-ink .steps p { color: var(--on-ink-muted); }

/* Prose pages */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }

.facts { margin: 0; display: grid; grid-template-columns: 220px 1fr; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; color: var(--ink); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } .facts dd { padding-top: 4px; } }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative; font-weight: 600; font-size: 1.12rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 1.5rem; font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 46em; }

/* Breadcrumb */
.crumbs { font-size: 0.88rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* Closing call to action */
/* Closing call to action: warm stone band with the brand M as a faint watermark, like the card back */
.cta { position: relative; overflow: hidden; background: var(--paper-2); color: var(--ink); border-top: 1px solid var(--line); }
.cta::after { content: ""; position: absolute; right: -2%; bottom: -18%; width: min(46vw, 560px); aspect-ratio: 345 / 200; background: var(--ink); opacity: .05;
  -webkit-mask: url("/brand/mark.svg?v=2") center / contain no-repeat; mask: url("/brand/mark.svg?v=2") center / contain no-repeat; pointer-events: none; }
.cta-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: end; }
.cta h2 { color: var(--ink); max-width: 13em; }
.cta h2::before { content: ""; display: block; width: 56px; height: 4px; margin-bottom: 22px; background: var(--accent-hi); }
.cta p { color: var(--ink-2); margin-top: 14px; max-width: 34em; }
.cta .btn { background: var(--ink); color: #fff; }
.cta .btn:hover { background: var(--accent); color: #fff; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding: 64px 0 36px; font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.site-footer .brand { color: #fff; }
.site-footer p { margin-top: 14px; max-width: 26em; }
.site-footer h2 { font-size: 0.75rem; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; font-size: 0.85rem; }
.legal p { margin: 0; max-width: none; }

/* Enquiry popup (enquire.js) */
.enquire { --cut: 22px; border: 0; padding: 0; width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); background: var(--paper); color: var(--ink-2); overflow: auto; }
.enquire::backdrop { background: rgba(17, 19, 24, .62); }
html:has(.enquire[open]) { overflow: hidden; }
.enq-body { position: relative; padding: 34px 28px 24px; }
.enq-body h2 { font-size: 1.7rem; margin: 10px 0 6px; }
.enq-form, .enq-done { display: grid; gap: 14px; }
.enq-form[hidden], .enq-done[hidden] { display: none; }
.enq-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.enq-opt { font-weight: 400; color: var(--muted); }
.enq-form input, .enq-form select, .enq-form textarea { width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 0; padding: 12px 14px; }
.enq-form textarea { resize: vertical; min-height: 84px; }
.enq-form input:focus, .enq-form select:focus, .enq-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--ink); }
.enq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.enq-error { color: var(--accent-ink); font-weight: 600; font-size: 0.95rem; }
.enq-send, .enq-done .btn { justify-self: start; }
.enq-send:disabled { opacity: .6; cursor: default; }
.enq-note { font-size: 0.85rem; color: var(--muted); }
.enq-x { position: absolute; top: 14px; right: 30px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.enq-x:hover { color: var(--ink); }
button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }

/* Cookie choice (consent.js): Accept and Reject look the same, so neither is the easier press */
.consent { --cut: 14px; position: fixed; z-index: 6; left: 16px; right: 16px; bottom: 16px; max-width: 440px; display: grid; gap: 14px; padding: 18px 20px; background: var(--ink); color: var(--on-ink); font-size: 0.95rem; line-height: 1.5; }
.consent[hidden] { display: none; }
.consent p a { color: var(--accent-hi); }
.consent div { display: flex; gap: 10px; }
.consent .btn { background: var(--paper); color: var(--ink); }
.consent .btn:hover { background: #fff; }

/* GymTalon page: who it's for, what's inside (3D icons), each app's features as real screens (swipe; tap for a
   large view), what members see, getting started, then pricing */
.gt [id] { scroll-margin-top: 124px; }
.gt-hero .hero-grid { grid-template-columns: 1.15fr 1fr; }
.gt-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.who a { --cut: 12px; background: var(--card); padding: 16px 16px 14px; text-decoration: none; display: grid; grid-template-rows: auto 1fr auto; gap: 4px; }
.who a:hover { background: #fff; }
.who b { color: var(--ink); font-weight: 600; }
.who small { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.who .go { color: var(--accent-ink); font-weight: 600; font-size: 0.9rem; margin-top: 8px; }
.hero-phones { display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: center; max-width: 520px; width: 100%; justify-self: center; }
.hero-phones .phone:nth-child(1) { transform: translateX(16%) scale(.88); }
.hero-phones .phone:nth-child(2) { position: relative; z-index: 1; }
.hero-phones .phone:nth-child(3) { transform: translateX(-16%) scale(.88); }
@media (max-width: 900px) { .gt-hero .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .who { grid-template-columns: 1fr; gap: 8px; }
  .who a { grid-template-columns: 1fr auto; padding: 14px 16px; }
  .who .go { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; }
}

/* A phone around a real screen. The shots carry their own status bar (390 × 898 points); the corners follow an
   iPhone's (55 pt on 390). A clip is its status bar strip over the 390 × 844 video. */
.phone { display: block; border: 5px solid var(--ink); border-radius: 15% / 6.5%; background: var(--ink); overflow: hidden; aspect-ratio: 390 / 898; box-shadow: 0 0 0 1px rgba(17, 19, 24, .08), 0 24px 48px -24px rgba(17, 19, 24, .55); }
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; }
.phone.clip { display: flex; flex-direction: column; }
.phone.clip img { height: auto; flex: none; }
.phone.clip video { height: auto; flex: 1; min-height: 0; }

/* Jump bar */
.tabs { position: sticky; top: 68px; z-index: 4; background: rgba(244, 242, 236, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 12px; align-items: center; }
/* On phones the links scroll under a fade; the demo button stays put beside them */
.tab-links { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.tabs a:not(.btn) { padding: 14px 12px 12px; font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:not(.btn):hover, .tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .btn { padding: 8px 14px; font-size: 0.9rem; white-space: nowrap; flex: none; }

/* An app, then its features */
.app-head { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: end; margin-bottom: 8px; }
.app-head > div { display: grid; gap: 16px; max-width: 720px; }
.from { font-size: 1.05rem; color: var(--muted); }
.from b { font-size: 2rem; color: var(--ink); letter-spacing: -0.02em; }
.mod { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding: 44px 0; border-top: 1px solid var(--line); }
.app-head + .mod { margin-top: 32px; }
.mod-text { align-self: start; position: sticky; top: 140px; display: grid; gap: 14px; }
.mod-n { font-size: 0.8rem; font-weight: 600; color: var(--accent-ink); letter-spacing: 0.08em; }
.mod h3 { font-size: 1.55rem; letter-spacing: -0.02em; }
.mod-text > p { color: var(--muted); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--ink); }
.price b { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.price small { color: var(--muted); font-size: 0.88rem; }
.badge { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 8px; background: var(--ink); color: #fff; align-self: center; }
.badge.add { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mod .ticks { margin: 0; gap: 8px; font-size: 0.98rem; }
.mod .ticks small { display: block; color: var(--muted); font-size: 0.88rem; }
.shots { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; counter-reset: shot; scrollbar-width: thin; }
.shot { flex: 0 0 200px; scroll-snap-align: start; margin: 0; display: grid; gap: 12px; align-content: start; counter-increment: shot; }
.shot button { all: unset; display: block; cursor: zoom-in; }
.shot button:focus-visible .phone { outline: 2px solid var(--accent); outline-offset: 3px; }
.shot figcaption { font-size: 0.92rem; font-weight: 600; color: var(--ink); line-height: 1.35; display: grid; grid-template-columns: 22px 1fr; }
.shot figcaption::before { content: counter(shot); color: var(--accent-ink); }
.shot figcaption small { grid-column: 2; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
@media (max-width: 900px) {
  .mod { grid-template-columns: 1fr; }
  .mod-text { position: static; }
  .shot { flex-basis: min(58vw, 220px); }
}
.zoom { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; overflow: visible; }
.zoom::backdrop { background: rgba(17, 19, 24, .86); }
.zoom figure { margin: 0; display: grid; gap: 14px; justify-items: center; }
.zoom .phone { height: min(78dvh, 760px); width: auto; }
.zoom figcaption { color: #fff; font-weight: 600; text-align: center; }
.zoom-bar { display: flex; gap: 10px; justify-content: center; }
.zoom-bar button { width: 46px; height: 46px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.3rem; cursor: pointer; }
.zoom-bar button:hover { background: var(--accent); }

/* Pricing calculators */
.calc { background: var(--card); color: var(--ink-2); padding: 30px 28px 26px; display: grid; gap: 4px; align-content: start; border: 0; margin: 0; }
.calc h3 { color: var(--ink); font-size: 1.5rem; margin-bottom: 10px; }
.row { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); cursor: pointer; }
.row.fixed { cursor: default; }
.row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.row input[type=number] { width: 64px; font: inherit; font-weight: 600; color: var(--ink); text-align: center; padding: 6px 4px; border: 1px solid var(--line); background: #fff; border-radius: 0; }
.row.count { grid-template-columns: 1fr auto 64px; }
.row > span { color: var(--ink); font-weight: 500; line-height: 1.35; }
.row > span small { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.row > b { text-align: right; color: var(--ink); font-weight: 600; white-space: nowrap; }
.total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; border-top: 2px solid var(--ink); padding-top: 16px; margin-top: 6px; }
.total output { font-size: 2.2rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.total small { color: var(--muted); }
.total .early { color: var(--accent-ink); font-weight: 600; }
.note { margin-top: 22px; color: var(--on-ink-muted); font-size: 0.95rem; }
@media (max-width: 640px) { .calc { padding: 24px 18px 20px; } }

/* The GymTalon mascot stands on a line: a rule, the jump bar, a card's top edge. */
.gt-brand { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.gt-brand img { width: 52px; height: auto; }
.gt-brand b { display: block; color: var(--ink); font-size: 1.3rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.1; text-transform: uppercase; }
.gt-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.stores span { margin-right: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.stores b { padding: 6px 12px; box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); font-size: 0.9rem; font-weight: 600; }
.mascot { display: block; width: auto; height: 190px; pointer-events: none; user-select: none; }
/* Hero, two copies (the script plays only the one shown). Desktop: full body in front of the phones, sized and placed
   in % of them, so at any width it stands over the right phone, on a soft oval of floor that's part of the clip.
   One column: cut at the waist, standing on the jump bar at the right, over the corner of the right phone. */
.hero-phones { position: relative; }
.hero-phones .mascot { position: absolute; z-index: 2; right: -4%; bottom: 0; height: 52%; }
.gt-hero > .mascot { display: none; }
@media (max-width: 900px) {
  .hero-phones .mascot { display: none; }
  .gt-hero > .mascot { display: block; position: absolute; z-index: 2; bottom: 0; right: max(var(--gutter), calc(50% - 260px)); height: 140px; }
}
/* App heads: the mascot stands on the first feature's rule, 40px below (8px margin + 32px) */
.app-head:has(> .mascot) > div { flex: 1 1 320px; }
.app-head:has(> .mascot) .from { margin-left: auto; }
.app-head > .mascot { margin: 0 0 -40px auto; }
.app-head > .from + .mascot { margin-left: 0; }
/* Pricing: standing on the Owner app card's first rule, over the prices, half on the card and half against the band.
   It sits outside the card (the cut corner's clip-path would crop it). The rule is the card's top padding + its title
   (1.5rem x 1.3) + the title's 10px margin + the 4px gap; the card's right edge is half the 20px gap left of centre. */
#pricing .grid { position: relative; }
#pricing .section-head { margin-bottom: 64px; } /* room for the head above the card: 125 - 75 = 50px, plus air */
#pricing .grid > .mascot { --h: 125px; position: absolute; z-index: 1; height: var(--h); top: calc(30px + 1.95rem + 14px - var(--h)); right: calc(50% + 10px + 28px); }
.faq { position: relative; }
.faq > .mascot { position: absolute; bottom: 100%; right: 24px; height: 150px; }
@media (max-width: 640px) {
  .mascot { height: 124px; }
  #pricing .grid > .mascot { --h: 110px; top: calc(24px + 1.95rem + 14px - var(--h)); right: 18px; }
  #pricing .section-head { margin-bottom: 44px; }
  .faq > .mascot { height: 104px; }
  .app-head:has(> .mascot) { column-gap: 16px; }
  .app-head:has(> .mascot) .from { flex: 1 1 160px; margin-left: 0; }
  #faq h2 { padding-right: 100px; }
}

/* The 14 days free tag under the hero's lead */
.free-tag { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 22px; color: var(--ink); font-weight: 600; text-decoration: none; }
.free-tag b { padding: 5px 10px; background: var(--accent); color: #fff; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.free-tag:hover span { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* What's inside: a feature per column (3D icon, name, a few words, centred), each jumps to its screens.
   Wider screens: one white panel per app, lifted off the page by a shadow that follows the cut corner (on the
   wrapper: clip-path would clip a box-shadow), columns split by thin rules, a faint pool under each icon, which
   lifts on hover. Phones: separate tiles, three to a row, icon and name only. */
.feat-h { margin: 0 0 14px; }
.feats-panel + .feat-h { margin-top: 40px; }
.feats-panel { filter: drop-shadow(0 1px 2px rgba(17, 19, 24, .06)) drop-shadow(0 18px 30px rgba(17, 19, 24, .09)); }
.feats { --cut: 18px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); background: #fff; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.feats li + li { border-left: 1px solid var(--paper-2); }
.feats a { height: 100%; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 26px 14px 28px; text-align: center; text-decoration: none; background: radial-gradient(66px 56px at 50% 84px, #f0ece3, rgba(240, 236, 227, 0)); }
.feats a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.feats img { width: 100px; height: 100px; margin-bottom: 10px; transition: transform .2s ease; }
.feats a:hover img { transform: translateY(-4px); }
.feats b { color: var(--ink); font-weight: 600; font-size: 1rem; line-height: 1.3; }
.feats small { color: var(--muted); font-size: 0.85rem; line-height: 1.35; }
@media (max-width: 1100px) { .feats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 561px) and (max-width: 1100px) {
  .feats li:nth-child(4) { border-left: 0; }
  .feats li:nth-child(n+4) { border-top: 1px solid var(--paper-2); }
}
@media (max-width: 560px) {
  .feats-panel { filter: none; }
  .feats { --cut: 12px; gap: 8px; background: none; clip-path: none; }
  .feats li, .feats li + li { border: 0; }
  .feats a { padding: 12px 8px 14px; background: var(--card); clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
  .feats img { width: 56px; height: 56px; margin-bottom: 4px; }
  .feats b { font-size: 0.88rem; }
  .feats small { display: none; }
}
@media (max-width: 359px) { .feats { grid-template-columns: repeat(2, 1fr); } }

/* Steps with a 3D icon (getting started), or the top of a real screen (what members see), above the step's rule.
   Phones: two to a row. */
.steps > li > img { order: -1; width: 80px; height: 80px; margin: 0 0 4px -8px; }
.peeks li { border-top: 0; padding-top: 0; }
.peeks li::before { border-top: 2px solid var(--ink); padding-top: 16px; }
.peek { order: -1; display: block; width: 100%; max-width: 220px; aspect-ratio: 390 / 540; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
@media (max-width: 560px) {
  #start .steps, .steps.peeks { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  #start .steps h3 { font-size: 1.1rem; }
  .steps > li > img { width: 64px; height: 64px; }
}


/* GymTalon Growth page: services as rows (what the gym gets, then the points), then how it ties into the app */
.svc .mod-text > p { color: var(--ink); font-size: 1.1rem; }
.svc-body { display: grid; gap: 20px; align-content: start; }
.svc .ticks { grid-template-columns: 1fr 1fr; gap: 12px 32px; font-size: 1.02rem; }
.with { --cut: 12px; background: var(--card); padding: 14px 18px; font-size: 0.95rem; }
.with b { color: var(--accent-ink); margin-right: 8px; }
@media (max-width: 640px) { .svc .ticks { grid-template-columns: 1fr; } }

/* Real estate page: a sticky "For" filter, the ten stages as a rail (a flowchart), two flow diagrams, then each
   stage's fixes as small cards (today, the fix, the number it moves). The filter hides cards and empty stages. */
.re [id] { scroll-margin-top: 124px; }
/* The renders are on white; multiply drops the white into the paper (and the hero's grid) behind them */
.re-art { margin: 0; }
.re-art img, .stage-head img { mix-blend-mode: multiply; }
.re-art img { width: 100%; height: auto; }
.re-filter[hidden], .re [hidden] { display: none; }
.re-filter .tab-links { align-items: center; }
.re-filter .tab-links > span { flex: none; padding-right: 4px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.re-filter button { all: unset; cursor: pointer; padding: 14px 10px 12px; font-weight: 600; font-size: 0.95rem; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.re-filter button:hover, .re-filter button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.re-filter button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* The chain: phase brackets over a rail of stage icons, joined by a line */
.chain-panel { --cut: 22px; background: #fff; padding: 32px clamp(16px, 3vw, 32px) 28px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.phases { display: grid; grid-template-columns: 3fr 2fr 2fr 3fr; gap: 12px; margin-bottom: 22px; }
.phases span { border-top: 2px solid var(--ink); padding-top: 8px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-align: center; }
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, 1fr); }
.chain li { position: relative; }
.chain li:not(:last-child)::after { content: ""; position: absolute; top: 37px; left: 50%; width: 100%; height: 2px; background: var(--ink); }
.chain a { position: relative; z-index: 1; display: grid; justify-items: center; align-content: start; gap: 2px; padding: 0 4px; text-align: center; text-decoration: none; }
.chain img { width: 76px; height: 76px; margin-bottom: 8px; padding: 6px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--ink); transition: transform .2s ease; }
.chain a:hover img { transform: translateY(-3px); }
.chain .n { font-size: 0.75rem; font-weight: 600; color: var(--accent-ink); letter-spacing: 0.08em; }
.chain b { color: var(--ink); font-size: 0.95rem; font-weight: 600; line-height: 1.25; }
.chain small { color: var(--muted); font-size: 0.8rem; }
.chain a:hover b, .chain-plus a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.chain a.off, .chain-plus a.off { opacity: .3; }
.chain-plus { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.chain-plus a { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; text-decoration: none; }
.chain-plus img { width: 64px; height: 64px; }
.chain-plus b { display: block; color: var(--ink); font-weight: 600; }
.chain-plus small { display: block; color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
@media (max-width: 1000px) {
  .phases { display: none; }
  .chain { grid-template-columns: repeat(5, 1fr); row-gap: 28px; }
  .chain li:nth-child(5)::after { display: none; }
}
@media (max-width: 560px) {
  .chain { grid-template-columns: 1fr; row-gap: 0; }
  .chain li:not(:last-child)::after, .chain li:nth-child(5)::after { display: block; top: 38px; left: 31px; width: 2px; height: 100%; }
  .chain a { grid-template-columns: 64px 1fr; justify-items: start; align-items: center; column-gap: 14px; padding: 0 0 16px; text-align: left; }
  .chain img { grid-row: span 3; width: 64px; height: 64px; margin: 0; }
  .chain a > :not(img) { grid-column: 2; }
  .chain-plus { grid-template-columns: 1fr; }
}

/* Flow diagrams on the ink band: one update fanning out to its jobs, and an enquiry's timeline */
.diagrams { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); }
@media (max-width: 900px) { .diagrams { grid-template-columns: 1fr; } }
.diagrams h3 { margin-bottom: 26px; }
.fan { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: center; }
.fan-src { display: grid; gap: 2px; padding: 18px 18px 16px; background: var(--accent); }
.fan-src b { color: #fff; font-size: 1.1rem; line-height: 1.3; }
.fan-src small { color: #fff; opacity: .85; font-size: 0.82rem; }
.fan-out { position: relative; list-style: none; margin: 0 0 0 28px; padding: 0 0 0 22px; border-left: 2px solid var(--accent-hi); display: grid; gap: 10px; }
.fan-out::before { content: ""; position: absolute; left: -30px; top: 50%; width: 28px; height: 2px; background: var(--accent-hi); }
.fan-out li { position: relative; padding: 10px 14px; background: rgba(255, 255, 255, .07); }
.fan-out li::before { content: ""; position: absolute; left: -22px; top: 50%; width: 22px; height: 2px; background: var(--accent-hi); }
.fan-out b { display: block; color: #fff; font-size: 0.98rem; font-weight: 600; }
.fan-out small { color: var(--on-ink-muted); font-size: 0.85rem; }
@media (max-width: 560px) {
  .fan { grid-template-columns: 1fr; }
  .fan-out { margin: 28px 0 0 18px; }
  .fan-out::before { left: -2px; top: -28px; width: 2px; height: 28px; }
}
.flow { list-style: none; margin: 0; padding: 0; }
.flow li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; }
.flow time { padding-top: 1px; color: var(--accent-hi); font-size: 0.82rem; font-weight: 600; text-align: right; white-space: nowrap; }
.flow div { position: relative; padding: 0 0 18px 20px; border-left: 2px solid rgba(255, 255, 255, .2); }
.flow li:last-child div { border-left-color: transparent; padding-bottom: 0; }
.flow div::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; background: var(--accent-hi); }
.flow b { display: block; color: #fff; font-weight: 600; }
.flow span { color: var(--on-ink-muted); font-size: 0.92rem; }

/* A stage: its icon, number and name, then its fixes three to a row */
.stage { padding: 40px 0; border-top: 1px solid var(--line); }
.stage-head { display: grid; grid-template-columns: 80px 1fr; column-gap: 18px; row-gap: 2px; align-items: center; margin-bottom: 22px; }
.stage-head img { grid-row: span 3; width: 80px; height: 80px; }
.stage-head > :not(img) { grid-column: 2; }
.stage-head h3 { font-size: 1.55rem; letter-spacing: -0.02em; }
.stage-head p { color: var(--muted); }
.fixes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-content: start; }
.fix { --cut: 12px; display: grid; gap: 8px; align-content: start; padding: 20px 20px 16px; background: var(--card); clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.fix h4 { margin: 0 0 2px; color: var(--ink); font-size: 1.06rem; font-weight: 600; line-height: 1.3; }
.fix p { display: grid; grid-template-columns: 62px 1fr; gap: 8px; font-size: 0.94rem; line-height: 1.45; }
.fix p::before { padding-top: 3px; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.fix .was { color: var(--muted); }
.fix .was::before { content: "Today"; }
.fix .now { color: var(--ink); }
.fix .now::before { content: "Fix"; color: var(--accent-ink); }
.fix .moves { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.88rem; font-weight: 600; }
.fix .moves::before { content: "Measure"; color: var(--muted); }
.fix .for { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.fix .for li { padding: 2px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; }
@media (max-width: 1000px) { .fixes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  /* Phones: a stage's cards are one row to swipe, peeking at the next, instead of a long stack */
  .fixes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 10px 0; }
  .fix { scroll-snap-align: start; }
  .fix p { grid-template-columns: 1fr; gap: 0; }
  .stage-head { grid-template-columns: 64px 1fr; column-gap: 14px; }
  .stage-head img { width: 64px; height: 64px; }
  .stage-head h3 { font-size: 1.35rem; }
}

/* HomeTalon: the product band, and its prototype in a popup (an iframe, loaded on first open) */
.re-product .ticks { grid-template-columns: 1fr 1fr; gap: 12px 28px; margin: 0; }
.re-who { margin-top: 22px; font-size: 0.95rem; }
@media (max-width: 560px) { .re-product .ticks { grid-template-columns: 1fr; } }
.portal-dlg { --cut: 18px; width: min(1180px, calc(100vw - 32px)); height: min(860px, calc(100dvh - 32px)); max-width: none; max-height: none; padding: 0; border: 0; background: var(--paper); }
.portal-dlg[open] { display: grid; grid-template-rows: auto 1fr; }
.portal-dlg::backdrop { background: rgba(17, 19, 24, .72); }
html:has(.portal-dlg[open]) { overflow: hidden; }
.portal-bar { display: flex; align-items: center; gap: 18px; padding: 6px 8px 6px 18px; background: var(--ink); color: #fff; }
.portal-bar b { flex: 1; font-weight: 600; }
.portal-bar a { color: var(--on-ink); font-size: 0.92rem; text-underline-offset: 3px; }
.portal-bar button { all: unset; cursor: pointer; width: 40px; height: 40px; text-align: center; font-size: 1.6rem; line-height: 40px; color: #fff; }
.portal-bar button:focus-visible { outline: 2px solid var(--accent); }
.portal-dlg iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 560px) { .portal-dlg { width: calc(100vw - 16px); height: calc(100dvh - 16px); } }


/* Case study pages (case-studies/…): one sector problem told as problem, see it run, what people get, what it's
   worth, how it's measured. First: the PUF panel line, with a line simulation and a money model. */
.cs [id] { scroll-margin-top: 88px; }
.cs-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.cs .hero .cs-kicker + h1 { margin-top: 14px; }
.cs-file .cs-found { padding: 18px 0 20px; border-top: 1px solid rgba(255, 255, 255, .14); display: grid; gap: 12px; }
.cs-found-h { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-ink-muted); font-weight: 600; }
.cs-found-row { display: grid; gap: 2px; padding-left: 14px; border-left: 3px solid rgba(255, 255, 255, .25); }
.cs-found-row span { font-size: 0.82rem; color: var(--on-ink-muted); }
.cs-found-row b { font-size: 1.15rem; font-weight: 600; color: var(--on-ink); letter-spacing: -0.01em; }
.cs-found-row.was b { color: var(--on-ink-muted); }
.cs-found-row.now { border-left-color: var(--accent-hi); }
.cs-found-row.now b { color: #fff; }
.cs-meta { margin: 0; }
.cs-meta div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 0.94rem; }
.cs-meta dt { color: var(--on-ink-muted); }
.cs-meta dd { margin: 0; color: var(--on-ink); }

/* The format strip: five parts every case study has */
.cs-format { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.cs-format h2 { margin-bottom: 16px; }
.cs-format ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; counter-reset: part; }
.cs-format a { display: grid; gap: 2px; text-decoration: none; padding-top: 12px; border-top: 2px solid var(--ink); }
.cs-format a::before { counter-increment: part; content: "0" counter(part); font-size: 0.75rem; font-weight: 600; color: var(--accent-ink); letter-spacing: .08em; }
.cs-format b { color: var(--ink); font-weight: 600; font-size: 0.98rem; }
.cs-format small { color: var(--muted); font-size: 0.86rem; line-height: 1.4; }
.cs-format a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
@media (max-width: 1100px) { .cs-format ol { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cs-format ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Where a defect gets caught: stages across, two rows (today, with line vision) */
.cs-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cs-track li { display: grid; grid-template-rows: auto 1fr 1fr; gap: 6px; }
.cs-track b { display: grid; gap: 2px; align-content: start; padding: 10px 0 4px; border-top: 2px solid var(--ink); color: var(--ink); font-weight: 600; font-size: 0.95rem; line-height: 1.25; }
.cs-track b span { font-size: 0.72rem; color: var(--muted); letter-spacing: .08em; }
.cs-track p { min-height: 74px; padding: 10px 10px 9px; font-size: 0.84rem; line-height: 1.35; border: 1px dashed var(--line); color: var(--muted); }
.cs-track p.part { border: 1px solid var(--ink-2); color: var(--ink-2); background: var(--card); }
.cs-track p.was.hit { border: 0; background: var(--ink); color: #fff; }
.cs-track p.now.hit { border: 0; background: var(--accent); color: #fff; }
.cs-track p.now:not(.hit):not(:empty) { border: 1px solid var(--accent); color: var(--accent-ink); background: var(--card); }
.cs-track-key { display: flex; gap: 22px; margin-top: 14px; font-size: 0.86rem; color: var(--muted); }
.cs-track-key span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin: 0 8px -1px 0; }
.cs-track-key .was::before { background: var(--ink); }
.cs-track-key .now::before { background: var(--accent); }
.cs-cost { margin-top: 44px; }
@media (max-width: 860px) {
  /* Phones: stages down, the two rows side by side */
  .cs-track { grid-template-columns: 1fr; gap: 0; }
  .cs-track li { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
  .cs-track b { border-top: 0; padding: 6px 0; font-size: 0.9rem; }
  .cs-track p { min-height: 0; padding: 8px; font-size: 0.8rem; }
  .cs-track p:empty { border-color: transparent; }
}

/* The line simulation */
.cs-sim { display: grid; gap: 14px; }
.cs-sim-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cs-seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, .25); }
.cs-seg button, .cs-play { all: unset; cursor: pointer; padding: 9px 16px; font-weight: 600; font-size: 0.95rem; color: var(--on-ink-muted); }
.cs-seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.cs-play { border: 1px solid rgba(255, 255, 255, .25); color: var(--on-ink); }
.cs-seg button:focus-visible, .cs-play:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.cs-counts { display: flex; gap: 22px; margin: 0 0 0 auto; }
.cs-counts div { display: grid; }
.cs-counts dt { font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); font-weight: 600; }
.cs-counts dd { margin: 0; font-size: 1.5rem; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cs-counts div:last-child dd { color: var(--accent-hi); }
.cs-sim-stage { position: relative; background: #191c23; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); overflow-x: auto; }
.cs-sim-stage svg { width: 100%; height: auto; }
/* Phones see the inspection half of the line (the script crops the view): larger labels to match */
.cs-sim.narrow .sim-labels text { font-size: 22px; }
.cs-sim.narrow .p-num { font-size: 17px; }
.cs-sim.narrow .p-flag { font-size: 18px; }
.cs-sim .p-body { fill: url(#p-ribs); }
.cs-sim .p-band { fill: url(#p-band); }
.cs-sim.heat .p-body, .cs-sim.heat .p-band { fill: url(#g-heat); }
.cs-sim .p-void { opacity: 0; transition: opacity .2s; }
.cs-sim.heat .p-void { opacity: 1; }
.cs-sim.heat .p-dent { opacity: 0; }
.cs-sim [data-beam] { transition: opacity .15s; }
.cs-sim .fire [data-beam] { opacity: .5; }
.cs-sim [data-saw] { transform-box: fill-box; transform-origin: center; animation: cs-spin 1s linear infinite; }
.cs-sim.paused [data-saw] { animation-play-state: paused; }
@keyframes cs-spin { to { transform: rotate(360deg); } }
.cs-scale { position: absolute; left: 12px; bottom: 10px; display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--on-ink-muted); opacity: 0; transition: opacity .2s; }
.cs-scale i { width: 90px; height: 8px; background: linear-gradient(90deg, #2b2f8f, #7a3fa0, #f6c343, #e2611c); }
.cs-sim.heat .cs-scale { opacity: 1; }
.cs-log { background: rgba(255, 255, 255, .05); padding: 14px 16px 6px; }
.cs-log-h { display: flex; justify-content: space-between; font-size: 0.72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--on-ink-muted); padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.cs-log-h span:last-child { color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.cs-log ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, auto); grid-auto-flow: column; column-gap: 28px; align-content: start; min-height: 132px; }
.cs-log li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 0.86rem; line-height: 1.4; color: var(--on-ink-muted); animation: cs-in .3s ease; }
.cs-log time { color: var(--on-ink-muted); font-variant-numeric: tabular-nums; }
.cs-log li b { color: var(--on-ink); font-weight: 600; }
.cs-log li.hold b { color: var(--accent-hi); }
.cs-log li.pattern { margin: 6px 0; padding: 8px 10px; background: var(--accent); color: #fff; border: 0; }
.cs-log li.pattern time, .cs-log li.pattern b { color: #fff; }
@keyframes cs-in { from { opacity: 0; transform: translateY(-4px); } }
.cs-note { margin-top: 16px; font-size: 0.88rem; color: var(--muted); max-width: 52em; }
.band-ink .cs-note { color: var(--on-ink-muted); }
@media (max-width: 700px) { .cs-log ol { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; min-height: 264px; } .cs-counts { margin-left: 0; } }

/* Outputs: the real message, record and report, each with who gets it */
.cs-outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.cs-out { margin: 0; display: grid; gap: 16px; }
.cs-out > div { --cut: 14px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.cs-out figcaption { display: grid; gap: 4px; padding-top: 12px; border-top: 2px solid var(--ink); }
.cs-out figcaption b { color: var(--ink); font-weight: 600; }
.cs-out figcaption span { color: var(--muted); font-size: 0.94rem; }
.cs-msg { background: var(--paper-2); padding: 16px; display: grid; gap: 10px; }
.cs-msg-from { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); }
.cs-msg-from b { color: var(--ink); }
.cs-bubble { background: #fff; padding: 14px 14px 12px; display: grid; gap: 10px; font-size: 0.92rem; line-height: 1.45; color: var(--ink-2); box-shadow: 0 1px 0 var(--line); }
.cs-bubble b { color: var(--ink); }
.cs-thumb { position: relative; height: 74px; background: linear-gradient(90deg, #f6c343, #f08a24 55%, #e2611c); overflow: hidden; }
.cs-thumb::before { content: ""; position: absolute; left: 22%; top: 18%; width: 34%; height: 64%; background: radial-gradient(closest-side, #2b2f8f, #7a3fa0 60%, transparent); }
.cs-thumb i { position: absolute; left: 20%; top: 12%; width: 38%; height: 76%; border: 2px solid #fff; }
.cs-reply { display: flex; gap: 8px; }
.cs-reply span { flex: 1; text-align: center; padding: 8px 6px; background: #fff; border: 1px solid var(--line); font-size: 0.85rem; font-weight: 600; color: var(--accent-ink); }
.cs-pass { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.cs-pass-top { display: grid; gap: 2px; padding: 16px 18px; background: var(--ink); color: var(--on-ink-muted); }
.cs-pass-top span { font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--accent-hi); }
.cs-pass-top b { color: #fff; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.cs-pass-top small { font-size: 0.85rem; }
.cs-pass dl { margin: 0; padding: 4px 18px; }
.cs-pass dl div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.cs-pass dt { color: var(--muted); }
.cs-pass dd { margin: 0; color: var(--ink); }
.cs-pass dd.ok::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; background: var(--accent-hi); clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%); }
.cs-pass-foot { padding: 12px 18px 16px; font-size: 0.85rem; color: var(--muted); }
.cs-report { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 16px 18px 18px; display: grid; gap: 14px; }
.cs-report-h { display: grid; }
.cs-report-h b { color: var(--ink); font-size: 1.1rem; font-weight: 600; }
.cs-report-h span { font-size: 0.85rem; color: var(--muted); }
.cs-report-kpis { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cs-report-kpis div { background: var(--paper); padding: 10px; }
.cs-report-kpis dt { font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.cs-report-kpis dd { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.cs-report-kpis small { display: block; font-size: 0.76rem; font-weight: 400; color: var(--muted); }
.cs-report-sub { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.cs-bars { list-style: none; margin: -6px 0 0; padding: 0; display: grid; gap: 10px; }
.cs-bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 0.85rem; color: var(--ink-2); }
.cs-bars i { grid-column: 1; height: 8px; background: linear-gradient(90deg, var(--accent) var(--w), var(--paper-2) var(--w)); }
.cs-bars b { grid-column: 2; grid-row: 1 / span 2; align-self: end; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .cs-outs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cs-outs { grid-template-columns: 1fr; } }

/* The money model */
.cs-calc { --cut: 22px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--card); }
.cs-calc-in { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; padding: 30px 28px; align-content: start; }
.cs-calc label { display: grid; gap: 6px; align-content: start; font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.cs-calc label small { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.cs-unit { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.cs-unit input[type=number] { width: 100%; min-width: 0; max-width: 140px; font: inherit; font-size: 1.05rem; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; }
.cs-unit input[type=number]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--ink); }
.cs-unit input[type=range] { flex: 1; accent-color: var(--accent); }
.cs-unit output { min-width: 3em; font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.cs-calc-out { background: var(--ink); color: var(--on-ink-muted); padding: 30px 28px; display: grid; gap: 10px; align-content: start; }
.cs-calc-k { font-size: 0.72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.cs-calc-big { font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 600; color: #fff; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.cs-calc-yr b { color: var(--accent-hi); font-weight: 600; }
.cs-calc-sum { margin: 10px 0 0; }
.cs-calc-sum div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 0.92rem; }
.cs-calc-sum dd { margin: 0; color: var(--on-ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.cs-calc-f { padding: 10px 12px; background: rgba(255, 255, 255, .06); font-size: 0.88rem; color: var(--on-ink); font-variant-numeric: tabular-nums; }
.cs-calc-left { font-size: 0.85rem; }
@media (max-width: 900px) { .cs-calc { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cs-calc-in { grid-template-columns: 1fr; padding: 24px 20px; } .cs-calc-out { padding: 24px 20px; } }

.cs-spec { margin-top: 44px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cs-spec summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-weight: 600; font-size: 1.08rem; color: var(--ink); }
.cs-spec summary::-webkit-details-marker { display: none; }
.cs-spec summary::after { content: "+"; position: absolute; right: 4px; top: 15px; font-size: 1.5rem; font-weight: 400; color: var(--accent); }
.cs-spec[open] summary::after { content: "–"; }
.cs-spec .facts { margin-bottom: 24px; }
.cs-spec .facts dd { color: var(--muted); }

.cs-targets { margin-top: 48px; border-top: 2px solid var(--accent); }
.cs-targets [role=row] { display: grid; grid-template-columns: 1.2fr .8fr 1.6fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); color: var(--on-ink-muted); font-size: 0.95rem; }
.cs-targets [role=row] > :first-child { color: #fff; font-weight: 600; }
.cs-targets [role=row] > :nth-child(2) { color: var(--accent-hi); font-weight: 600; }
.cs-targets [role=row].cs-targets-h > * { font-size: 0.72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); font-weight: 600; }
@media (max-width: 640px) {
  .cs-targets [role=row] { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .cs-targets [role=row] > :nth-child(3) { grid-column: 1 / -1; font-size: 0.88rem; }
  .cs-targets .cs-targets-h > :nth-child(3) { display: none; }
}

.cs-also { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-also li { --cut: 12px; display: grid; gap: 2px; padding: 16px 18px; background: var(--card); clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.cs-also b { color: var(--ink); font-weight: 600; }
.cs-also small { color: var(--muted); font-size: 0.88rem; }
@media (max-width: 520px) { .cs-also { grid-template-columns: 1fr; } }

/* Case study: from drum to wall. A map of lots → lab gate → mix runs → panels → sites; a view highlights one
   path and the card below it explains it */
.cs-seg-paper { border-color: var(--line); flex-wrap: wrap; }
.cs-seg-paper button { color: var(--ink-2); }
.cs-seg-paper button:focus-visible { outline-color: var(--accent); }
.cs-trace { display: grid; gap: 14px; }
.cs-trace-bar { justify-self: start; }
.cs-trace-map { --cut: 18px; background: var(--card); overflow-x: auto; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.cs-trace-map svg { width: 100%; height: auto; }
.cs-trace.tall .t-a { font-size: 12.5px; }
.cs-trace.tall .t-b { font-size: 11px; }
.t-rule { stroke: var(--line); }
.t-heads text { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); }
.t-gate { stroke: var(--accent-hi); stroke-width: 2; stroke-dasharray: 4 4; }
.t-node, .t-badge, .t-l { transition: opacity .25s; }
.t-node rect { fill: var(--paper); stroke: var(--line); stroke-width: 1.2; transition: fill .25s, stroke .25s; }
.t-blocked rect { stroke-dasharray: 4 3; }
.t-a { font-size: 13px; font-weight: 600; fill: var(--ink); }
.t-b { font-size: 11.5px; fill: var(--muted); }
.t-badge rect { fill: var(--ink); }
.t-badge.no rect { fill: var(--accent); }
.t-badge text { font-size: 12px; font-weight: 700; fill: #fff; }
.t-link { fill: none; stroke: #cfcabe; stroke-width: 1.6; transition: stroke .25s; }
.t-flow { fill: none; stroke: var(--accent-hi); stroke-width: 2.4; stroke-dasharray: 2 12; stroke-linecap: round; opacity: 0; }
.cs-trace.live .t-flow { opacity: .6; animation: t-flow 1.1s linear infinite; }
@keyframes t-flow { to { stroke-dashoffset: -14; } }
.cs-trace.focus .t-node:not(.on), .cs-trace.focus .t-badge:not(.on) { opacity: .28; }
.cs-trace.focus .t-l:not(.on) { opacity: .12; }
.cs-trace.focus .t-l:not(.on) .t-flow { display: none; }
.cs-trace.focus .t-l.on .t-link { stroke: var(--accent); stroke-width: 2.4; }
.t-node.on rect { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.t-node.bad rect { fill: var(--accent); stroke: var(--accent); }
.t-node.bad text { fill: #fff; }
.t-pin { font-size: 11px; font-weight: 700; fill: var(--accent-ink); opacity: 0; transition: opacity .25s; }
.cs-trace[data-mode="panel"] .t-pin { opacity: 1; }
.cs-trace-card { --cut: 18px; background: var(--card); padding: 24px 26px 26px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); display: grid; gap: 20px; }
.cs-trace-card h3 { font-size: 1.4rem; letter-spacing: -0.015em; margin: 4px 0 6px; }
.cs-trace-card p { color: var(--muted); max-width: 48em; }
.cs-tc-k, .cs-tc-g { font-size: 0.72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink) !important; }
.cs-tc-g { color: var(--muted) !important; margin: 0 0 6px; }
.cs-tc-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 26px; }
.cs-tc-grid > div > .cs-tc-g:not(:first-child) { margin-top: 18px; }
.cs-tc-dl { margin: 0; }
.cs-tc-dl div { display: grid; gap: 1px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.cs-tc-dl dt { color: var(--muted); font-size: 0.82rem; }
.cs-tc-dl dd { margin: 0; display: grid; }
.cs-tc-dl dd b { color: var(--ink); font-weight: 600; }
.cs-tc-dl dd b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--accent-hi); clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%); }
.cs-tc-dl dd small { color: var(--muted); font-size: 0.8rem; padding-left: 15px; }
.cs-tc-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cs-tc-vs > div { padding: 18px 20px; display: grid; gap: 6px; align-content: start; }
.cs-tc-vs .was { background: var(--paper-2); }
.cs-tc-vs .now { background: var(--ink); }
.cs-tc-vs b { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.cs-tc-vs .now b { color: #fff; }
.cs-trace-card .cs-tc-vs .now p { color: var(--on-ink-muted); }
.cs-tc-vs .now .cs-tc-g { color: var(--accent-hi) !important; }
.cs-gates { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; margin-top: 48px; }
.cs-gates dl { margin: 0; }
.cs-gates dl div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.cs-gates dt { color: var(--ink); font-weight: 600; }
.cs-gates dd { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .cs-tc-grid { grid-template-columns: 1fr 1fr; } .cs-gates { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .cs-tc-grid, .cs-tc-vs { grid-template-columns: 1fr; }
  .cs-trace-card { padding: 20px 18px; }
  .cs-gates dl div { grid-template-columns: 1fr; gap: 2px; }
  /* Phones: each result on one row beside its name, so the panel card stays short */
  .cs-tc-dl div { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: baseline; }
  .cs-tc-dl dd small { padding-left: 0; }
  .cs-tc-dl dd b::before { display: none; }
}

/* Case study: where it pays off. One tab per industry, each with its own picture: a floor plan, a thermal wipe,
   a ten-year cut through a wall */
.cs-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.cs-tabs button { all: unset; cursor: pointer; display: grid; gap: 2px; padding: 14px 16px; border-top: 2px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .03); }
.cs-tabs button b { color: #fff; font-weight: 600; font-size: 1.05rem; }
.cs-tabs button small { color: var(--on-ink-muted); font-size: 0.86rem; }
.cs-tabs button[aria-selected="true"] { border-top-color: var(--accent-hi); background: rgba(255, 255, 255, .08); }
.cs-tabs button:hover { background: rgba(255, 255, 255, .06); }
.cs-tabs button:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.cs-ind { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.cs-ind[hidden] { display: none; }
.cs-ind-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; min-height: 42px; margin-bottom: 12px; }
.cs-status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .25); color: var(--on-ink) !important; font-weight: 600; font-size: 0.88rem; }
.cs-status::before { content: ""; width: 8px; height: 8px; background: var(--on-ink-muted); }
.cs-status.bad { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.cs-status.bad::before { background: #fff; }
.cs-hint { font-size: 0.92rem; }
.cs-ind-text h3 { font-size: 1.5rem; letter-spacing: -0.015em; }
.cs-ind-k { margin-top: 20px; font-size: 0.72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.cs-ind-text .ticks { margin-top: 10px; gap: 8px; font-size: 0.95rem; }
.cs-ind-text .cs-ind-k + p { margin-top: 8px; font-size: 0.95rem; }
.band-ink .cs-ind-res { color: #fff; font-weight: 600; font-size: 1.05rem; }
.cs-plan-wrap, .cs-age-wrap { background: #191c23; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); overflow-x: auto; }
.cs-plan-wrap svg { width: 100%; height: auto; }
.cs-age-wrap svg { width: 100%; height: auto; }
.cs-ind > * { min-width: 0; }
@media (max-width: 1000px) { .cs-ind { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .cs-tabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
}

/* Pharma floor plan */
.p-room { fill: rgba(255, 255, 255, .03); }
.p-b { fill: rgba(244, 118, 8, .07); }
.p-name { font-size: 13px; font-weight: 600; fill: var(--on-ink-muted); }
.p-pa { font-size: 26px; font-weight: 600; fill: #fff; }
.p-wall { stroke: #a3a8b2; stroke-width: 5; }
.p-joint { fill: #191c23; }
.p-leak { opacity: 0; transition: opacity .3s; }
.fault .p-leak { opacity: 1; }
.p-leak rect { fill: var(--accent); }
.p-crack { fill: none; stroke: #fff; stroke-width: 1.5; }
.p-leak-t { font-size: 11px; font-weight: 600; fill: var(--accent-hi); }
.p-small { font-size: 11px; fill: var(--on-ink-muted); }
.p-delta.bad { fill: var(--accent-hi); font-weight: 600; }
.p-count { font-size: 22px; font-weight: 600; fill: #fff; }
.over .p-count { fill: var(--accent-hi); }
.p-track { fill: rgba(255, 255, 255, .12); }
.p-fill { fill: var(--on-ink); }
.over .p-fill { fill: var(--accent-hi); }
.p-limit { stroke: #fff; stroke-width: 2; }
.p-air { fill: #8fb4ff; }
.p-dirt { fill: #f6c343; }

/* Cold store: the eye view under a draggable thermal view */
.cs-wipe { position: relative; overflow: hidden; aspect-ratio: 800 / 360; background: #191c23; touch-action: pan-y; }
.cs-wipe svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cs-wipe-top { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.cs-wipe.narrow { aspect-ratio: 520 / 360; }
.cs-wipe.narrow .h-a { font-size: 20px; }
.cs-wipe.narrow .h-b { font-size: 15px; }
.cs-wipe-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.cs-wipe-line i { position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%); background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.cs-wipe-line i::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-weight: 700; font-style: normal; font-size: 1rem; letter-spacing: .1em; }
.cs-wipe-tag { position: absolute; top: 10px; padding: 4px 8px; background: rgba(17, 19, 24, .72); color: #fff; font-size: 0.7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.cs-wipe-tag.l { left: 10px; }
.cs-wipe-tag.r { right: 10px; }
.cs-wipe input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cs-wipe:has(input:focus-visible) { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.w-room { fill: #dcd9d2; }
.w-ceil { fill: #cfccc4; }
.w-panel { fill: #f3f2ee; }
.w-rib { stroke: #e3e1db; stroke-width: 1; }
.w-jnt { stroke: #bdb9b0; stroke-width: 2; }
.w-floor { fill: #8f8b84; }
.w-evap { fill: #c9ccd1; }
.w-evap-fan { fill: #9ea3ab; }
.w-frost { fill: #fff; stroke: #dfe6ee; }
.w-stain { fill: #d6cfbd; opacity: .8; }
.w-crate { fill: #b98a55; stroke: #8a6236; }
.w-slat { stroke: #8a6236; }
.h-room { fill: #1f2c85; }
.h-ceil { fill: #2b3fa0; }
.h-jnt { stroke: #2b3fa0; stroke-width: 3; }
.h-floor { fill: #283a9c; }
.h-evap { fill: #141c4f; }
.h-evap-fan { fill: #0e1440; }
.h-crate { fill: #4a3a9e; stroke: #5b3fa8; }
.h-lead { stroke: #fff; stroke-width: 1; }
.h-call rect { fill: rgba(17, 19, 24, .8); }
.h-a { font-size: 13px; font-weight: 600; fill: #fff; }
.h-b { font-size: 11px; fill: #c9ccd6; }

/* Food and dairy: ten years through two walls */
.cs-year { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 14px; color: var(--on-ink-muted); font-size: 0.95rem; }
.cs-year span { white-space: nowrap; }
.cs-year b { display: inline-block; min-width: 2.2em; color: #fff; font-variant-numeric: tabular-nums; }
.cs-year input { flex: 1; accent-color: var(--accent-hi); }
.a-title { font-size: 14px; font-weight: 600; fill: #fff; }
.a-title.bad { fill: var(--accent-hi); }
.a-warm { fill: rgba(244, 118, 8, .1); }
.a-cold { fill: rgba(120, 160, 255, .1); }
.a-zone { font-size: 11px; fill: var(--on-ink-muted); }
.a-foam { fill: #e9d9a6; }
.a-skin, .a-skin-o { fill: #9ea3ab; }
.a-void { fill: #2a2d35; }
.a-wet { fill: rgba(110, 140, 220, .35); }
.a-drop { fill: #8fb4ff; }
.a-ice { fill: #fff; }
.a-gap { fill: #191c23; }
.a-frost { fill: #fff; }
.a-air { fill: #f6c343; }
.a-dripdrop { fill: #8fb4ff; }
.a-k { font-size: 11px; fill: var(--on-ink-muted); }
.a-track { fill: rgba(255, 255, 255, .12); }
.a-bar { fill: var(--on-ink); }
.a-bar.bad { fill: var(--accent-hi); }
.a-val { font-size: 13px; font-weight: 600; fill: #fff; }
.a-tag { font-size: 11px; font-weight: 600; fill: #fff; transition: opacity .3s; }

.eyebrow.cs-more-h { margin-top: 52px; }
.cs-more { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cs-more li { display: grid; gap: 2px; padding: 16px 18px; background: rgba(255, 255, 255, .05); }
.cs-more b { color: #fff; font-weight: 600; }
.cs-more small { color: var(--on-ink-muted); font-size: 0.88rem; }
@media (max-width: 900px) { .cs-more { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cs-more { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .cs-trace.live .t-flow { animation: none; } .cs-sim [data-saw] { animation: none; } }

/* Case studies index: a card per case study (story and results; what to try on the page), then the format */
.csx-card { --cut: 22px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); background: var(--card); text-decoration: none; color: inherit; transition: background .15s; }
.csx-card:hover { background: #fff; }
.csx-card:hover .link-arrow::after { transform: translateX(3px); }
.csx-main { padding: 32px 30px 30px; display: grid; gap: 16px; align-content: start; }
.csx-main .cs-kicker { margin: 0; }
.csx-main h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.csx-main > p { color: var(--muted); max-width: 40em; }
.csx-stats { margin: 6px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.csx-stats div { border-top: 2px solid var(--ink); padding-top: 10px; display: grid; gap: 4px; align-content: start; }
.csx-stats dt { font-size: 0.8rem; color: var(--muted); }
.csx-stats dd { margin: 0; display: grid; color: var(--ink); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.csx-stats small { font-size: 0.82rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.csx-side { background: var(--ink); color: var(--on-ink-muted); padding: 30px 28px; }
.csx-side-h { font-size: 0.72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }
.csx-side ol { list-style: none; margin: 0; padding: 0; counter-reset: try; }
.csx-side li { display: grid; grid-template-columns: 30px 1fr; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.csx-side li::before { counter-increment: try; content: "0" counter(try); grid-row: span 2; font-size: 0.78rem; font-weight: 600; color: var(--accent-hi); padding-top: 3px; }
.csx-side b { color: #fff; font-weight: 600; }
.csx-side small { color: var(--on-ink-muted); font-size: 0.86rem; }
@media (max-width: 900px) { .csx-card { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .csx-main { padding: 24px 20px; } .csx-side { padding: 24px 20px; } .csx-stats { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Case study, illustrated story (/case-studies/puf-panel-story) ----------
   Pictures are AI-generated illustrations (the page explains how they were made).
   Motion is CSS driven by --p, a 0 to 1 scroll progress the page script sets on [data-scroll]. */
.st img { max-width: 100%; height: auto; display: block; }
.st-hero { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 6vw, 72px); overflow: hidden;
  background: radial-gradient(60% 70% at 78% 40%, #fbe3cf 0%, rgba(244, 242, 236, 0) 70%), var(--paper); }
.st-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.st-hero h1 { margin: 14px 0 22px; font-size: clamp(2.3rem, 5.2vw, 4.2rem); }
.st-hero h1 .s { color: var(--accent); }
.st-hero .actions { margin-top: 28px; }
.st-other { margin-top: 22px; font-size: 0.92rem; color: var(--muted); }
.st-other a { color: var(--accent-ink); font-weight: 600; }
.st-art { position: relative; margin: 0; }
.st-art > img { width: 100%; }
.st-art .st-kelvin { position: absolute; left: -4%; bottom: -6%; width: 30%; filter: drop-shadow(0 10px 16px rgba(17, 19, 24, .18)); }
.st-art .st-bubble { position: absolute; left: 25%; bottom: 10%; max-width: 15em; }
.st-bob { animation: st-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes st-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1.5deg); } }

.st-bubble { position: relative; background: var(--card); color: var(--ink); padding: 12px 16px; border-radius: 16px; font-size: 0.95rem; line-height: 1.4;
  box-shadow: 0 6px 24px rgba(17, 19, 24, .1); }
.st-bubble::before { content: ""; position: absolute; left: -7px; bottom: 16px; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); }
.st-bubble b { color: var(--accent-ink); }

.st-map { list-style: none; padding: 0; margin: clamp(32px, 5vw, 56px) 0 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: st; }
.st-map a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.9rem; transition: border-color .15s, transform .15s; }
.st-map a:hover { border-color: var(--accent-hi); transform: translateY(-1px); }
.st-map a::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 0.75rem; }

.st-ch { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.st-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: clamp(32px, 5vw, 52px); }
.st-head .section-head { margin-bottom: 0; }
.st-guide { display: flex; align-items: flex-end; gap: 6px; max-width: 360px; }
.st-guide img { width: 112px; flex: none; }
.st-guide .st-bubble { margin-bottom: 24px; }
.band-ink .st-bubble { background: #22252d; color: var(--on-ink); box-shadow: none; }
.band-ink .st-bubble b { color: var(--accent-hi); }

/* 1 · made the same */
.st-recipe { display: grid; grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: center; }
.st-ingr { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; }
.st-ingr li { --q: clamp(0, calc(var(--p, 1) * 2.2 - var(--i) * .25), 1); display: grid; gap: 10px; justify-items: center; text-align: center;
  opacity: calc(.12 + var(--q) * .88); transform: translateY(calc((1 - var(--q)) * 28px)); }
.st-ingr img { height: clamp(70px, 9vw, 120px); width: auto; object-fit: contain; }
.st-ingr b { font-size: 0.85rem; line-height: 1.25; }
.st-ingr small { display: block; color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.st-gate { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: 0.82rem; max-width: 9em; }
.st-gate span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--accent-hi); font-size: 1.4rem; }
.st-build { display: grid; justify-items: center; }
.st-layers { --q: clamp(0, calc(var(--p, 1) * 1.8 - .5), 1); display: grid; justify-items: center; }
.st-layers img { width: min(100%, 340px); }
.st-layers img + img { margin-top: calc(var(--overlap, -12%) + (1 - var(--q)) * 16%); }
.st-layer-key { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 0.82rem; color: var(--muted); }
.st-layer-key b { color: var(--ink); }
.st-facts { margin-top: clamp(32px, 5vw, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.st-facts p { border-top: 2px solid var(--ink); padding-top: 14px; color: var(--muted); }
.st-facts b { display: block; color: var(--ink); margin-bottom: 4px; }

/* 2 · the secret */
.st-secret { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.st-secret figure { margin: 0; display: grid; gap: 12px; }
.st-secret figcaption { font-size: 0.92rem; color: var(--on-ink-muted); }
.st-secret figcaption b { color: #fff; }
.st-wipe { --x: 55%; position: relative; overflow: hidden; border-radius: 6px; touch-action: pan-y; cursor: ew-resize; background: #111; user-select: none; }
.st-wipe img { width: 100%; pointer-events: none; }
.st-wipe .st-wipe-top { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.st-wipe-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.st-wipe-line::after { content: "\2194"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.st-wipe-tag { position: absolute; top: 12px; padding: 4px 9px; font-size: 0.72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(17, 19, 24, .72); color: #fff; pointer-events: none; }
.st-wipe-tag.l { left: 12px; } .st-wipe-tag.r { right: 12px; }
.st-wipe input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.st-wipe:focus-within { outline: 3px solid var(--accent-hi); outline-offset: 3px; }

/* 3 · two roads */
.st-roads-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.st-track { position: relative; height: clamp(64px, 8vw, 96px); margin-bottom: 8px; }
.st-track::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; border-bottom: 3px dashed var(--line); }
.st-track img { position: absolute; bottom: 0; height: 100%; width: auto; left: calc(var(--p, 0) * (100% - var(--tw, 160px))); }
.st-frames { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: fr; }
.st-frames li { display: grid; gap: 12px; align-content: start; }
.st-frames figure { margin: 0; position: relative; background: var(--card); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 0 var(--line); }
.st-frames figure::before { counter-increment: fr; content: counter(fr); position: absolute; left: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 0.8rem; font-weight: 600; z-index: 1; }
.st-frames img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.st-frames h3 { font-size: 1.05rem; }
.st-frames p { color: var(--muted); font-size: 0.93rem; }
.st-cost { display: inline-flex; gap: 6px; align-items: center; justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.st-cost.bad { background: #fbe4e1; color: #a1271b; }
.st-cost.good { background: #e2f1e6; color: #22663a; }
.st-road[hidden] { display: none; }
.st-road { animation: st-in .35s ease; }
@keyframes st-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.st-sum { margin-top: 28px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 20px; background: var(--card); border-left: 4px solid var(--accent-hi); }
.st-sum img { width: 76px; }
.st-sum p { color: var(--ink-2); }

/* 4 · rooms */
.st-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 32px); }
.st-room { margin: 0; display: grid; gap: 14px; align-content: start; }
.st-room-pic { position: relative; }
.st-spot { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--accent-hi);
  color: #fff; font: 600 0.8rem/1 var(--sans); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.st-spot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent-hi); animation: st-ping 2s ease-out infinite; pointer-events: none; }
.st-spot[aria-pressed="true"] { background: #fff; color: var(--ink); }
@keyframes st-ping { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.5); } }
.st-room h3 { font-size: 1.2rem; }
.st-room ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: sp; }
.st-room ol li { position: relative; padding: 8px 10px 8px 40px; border-radius: 6px; color: var(--on-ink-muted); font-size: 0.92rem; transition: background .2s, color .2s; }
.st-room ol li::before { counter-increment: sp; content: counter(sp); position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: #2a2d35; color: var(--accent-hi); display: grid; place-items: center; font-size: 0.72rem; font-weight: 600; }
.st-room ol li.on { background: #22252d; color: #fff; }
.st-room .res { color: #fff; font-weight: 600; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 12px; }

/* 5 to 7 */
.st-pilot li img { width: 92px; height: 92px; object-fit: contain; margin-bottom: 4px; }

/* how the pictures were made */
.st-flow { list-style: none; padding: 0; margin: 0 0 clamp(32px, 5vw, 48px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: fl; }
.st-flow li { background: var(--card); padding: 16px; display: grid; gap: 6px; align-content: start; }
.st-flow li::before { counter-increment: fl; content: "0" counter(fl); font-size: 0.75rem; font-weight: 600; color: var(--accent-ink); letter-spacing: .08em; }
.st-flow b { font-size: 0.98rem; }
.st-flow small { color: var(--muted); font-size: 0.86rem; }
.st-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.st-gallery figure { margin: 0; background: var(--card); display: grid; grid-template-rows: auto 1fr; }
.st-gallery .pic { aspect-ratio: 1; display: grid; place-items: center; padding: 10px; overflow: hidden;
  background: repeating-conic-gradient(#ebe8e0 0 25%, #f8f6f1 0 50%) 0 0 / 16px 16px; }
.st-gallery .pic.solid { background: var(--paper-2); padding: 0; }
.st-gallery .pic img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.st-gallery .pic.solid img { width: 100%; height: 100%; object-fit: cover; max-height: none; }
.st-gallery figcaption { padding: 12px 14px 14px; display: grid; gap: 6px; align-content: start; font-size: 0.84rem; color: var(--ink-2); }
.st-gallery figcaption q { font-style: italic; }
.st-gallery figcaption small { color: var(--muted); }

@media (max-width: 1000px) {
  .st-recipe { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .st-gate { grid-auto-flow: column; max-width: none; align-items: center; text-align: left; }
  .st-gate span { transform: rotate(90deg); }
  .st-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-rooms { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
  .st-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .st-hero-grid, .st-secret { grid-template-columns: minmax(0, 1fr); }
  .st-head { grid-template-columns: minmax(0, 1fr); }
  .st-art { margin-top: 12px; }
}
@media (max-width: 640px) {
  .st-ingr { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .st-facts { grid-template-columns: minmax(0, 1fr); }
  .st-art { margin-bottom: 64px; }
  .st-art .st-bubble { left: 27%; bottom: -15%; font-size: 0.85rem; max-width: 14em; }
  .st-guide img { width: 84px; }
  .st-sum { grid-template-columns: minmax(0, 1fr); }
  .st-sum img { width: 60px; }
}
@media (max-width: 520px) {
  .st-frames { grid-template-columns: minmax(0, 1fr); }
  .st-flow { grid-template-columns: minmax(0, 1fr); }
  .st-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .st-bob, .st-spot::after, .st-road { animation: none; } }
.csx-card + .csx-card { margin-top: 20px; }
.csx-story .csx-side { background: radial-gradient(80% 60% at 50% 0%, #3a2a1c 0%, var(--ink) 70%); }
.csx-story .csx-side img { width: 120px; height: auto; margin: -8px 0 8px; }

/* the line, built from its machines (puf-panel-story, chapter 1) */
.st-line-wrap { margin-top: clamp(40px, 6vw, 72px); }
.st-line { position: relative; aspect-ratio: 1983 / 793; }
.st-line .st-part { position: absolute; height: auto; --q: clamp(0, calc(var(--p, 1) * 2.6 - var(--i) * .2), 1);
  opacity: var(--q); transform: translateY(calc((1 - var(--q)) * -36px)); }
.st-mover { position: absolute; width: 13%; left: 60%; top: 50%; opacity: 0; z-index: 4; pointer-events: none; }
.st-line.run .st-mover { animation: st-glide 9s linear infinite; animation-delay: var(--d); }
.st-line.run .st-mover.bad { animation-name: st-hold; }
@keyframes st-glide { 0% { left: 58%; opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { left: 84%; opacity: 0; } }
@keyframes st-hold { 0% { left: 58%; top: 50%; opacity: 0; } 8% { opacity: 1; } 55% { left: 73%; top: 50%; } 75% { left: 76%; top: 64%; opacity: 1; } 90%, 100% { left: 78%; top: 70%; opacity: 0; } }
.st-beam { position: absolute; left: 77.5%; top: 41%; width: 6%; height: 17%; z-index: 5; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(244, 118, 8, .55), rgba(244, 118, 8, 0)); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
.st-line.run .st-beam { animation: st-beam 1.5s ease-in-out infinite; }
@keyframes st-beam { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
.st-line-key { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px; counter-reset: lk; font-size: 0.86rem; color: var(--muted); }
.st-line-key li::before { counter-increment: lk; content: counter(lk) " · "; color: var(--accent-ink); font-weight: 600; }
.st-dir { margin: clamp(28px, 4vw, 44px) 0 14px; max-width: 46em; display: grid; gap: 6px; }
.st-dir h3 { font-size: 1.15rem; }
.st-dir p { color: var(--muted); font-size: 0.94rem; }
.st-dirs > .st-dir:first-child { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .st-line.run .st-mover, .st-line.run .st-beam { animation: none; } }
/* hero: Kelvin sits in the empty sky above the stack, the bubble to his left */
.st-art { padding-top: 12%; }
.st-art .st-kelvin { left: auto; right: -1%; top: -4%; bottom: auto; width: 21%; }
.st-art .st-bubble { left: auto; right: 21%; top: 0; bottom: auto; max-width: 17em; }
.st-art .st-bubble::before { left: auto; right: -7px; bottom: auto; top: 18px; }
@media (max-width: 640px) {
  .st-art { padding-top: 26%; margin-bottom: 0; }
  .st-art .st-kelvin { width: 26%; top: -2%; }
  .st-art .st-bubble { right: 25%; top: 0; bottom: auto; left: 0; font-size: 0.82rem; }
}
.st-wipe { --x: 78%; }
.st-mover { top: 53%; }
@keyframes st-glide { 0% { left: 58%; top: 53.5%; opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { left: 84%; top: 52%; opacity: 0; } }
@keyframes st-hold { 0% { left: 58%; top: 53.5%; opacity: 0; } 8% { opacity: 1; } 55% { left: 73%; top: 53%; } 75% { left: 75%; top: 66%; opacity: 1; } 90%, 100% { left: 76%; top: 72%; opacity: 0; } }
.st-track img { transform: scaleX(-1); }
.st-pinned { position: relative; }
.st-pin { position: absolute; width: 18%; aspect-ratio: 1.8; transform: translate(-50%, -50%); border: 2px dashed var(--accent-hi); border-radius: 50%; pointer-events: none;
  animation: st-pin 2.4s ease-in-out infinite; }
@keyframes st-pin { 0%, 100% { opacity: .5; transform: translate(-50%, -50%) scale(.95); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .st-pin { animation: none; } }
/* exploded panel: the top layer always paints over the one below; apart at first, closing up as you scroll */
.st-layers img { position: relative; }
.st-layers img:nth-child(1) { z-index: 3; }
.st-layers img:nth-child(2) { z-index: 2; margin-top: calc(-21% + (1 - var(--q)) * 26%); }
.st-layers img:nth-child(3) { z-index: 1; margin-top: calc(-25% + (1 - var(--q)) * 30%); }
.st-layers { --q: clamp(0, calc(var(--p, 1) * 1.6 - .45), 1); }
.st-layers { width: min(100%, 340px); }
.st-layers img { width: 100%; }
/* layers move with transforms in a fixed box, so the page doesn't shift while they close */
.st-layers { padding: 20% 0 22%; }
.st-layers img:nth-child(1) { transform: translateY(calc((1 - var(--q)) * -58%)); }
.st-layers img:nth-child(2) { margin-top: -21%; }
.st-layers img:nth-child(3) { margin-top: -25%; transform: translateY(calc((1 - var(--q)) * 78%)); }
@media (max-width: 1000px) { .st-gate { margin: 8px 0 4px; } }

/* ---------- Case study, motion explainer (/case-studies/puf-panel-motion) ----------
   One flat side-on look. Every scene is a .mo-stage: AI-drawn kit pieces placed in % of the stage and moved in CSS.
   Animations run only while a stage is on screen (.on, set by the page script) and motion isn't paused
   (html.mo-paused, also set for prefers-reduced-motion). The resting styles are the still frame. */
.mo img { max-width: 100%; height: auto; display: block; }
.mo-hero { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 5vw, 56px); overflow: hidden; }
.mo-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.mo-hero h1 { margin: 14px 0 22px; font-size: clamp(2.3rem, 5.2vw, 4.2rem); }
.mo-hero h1 .s { color: var(--accent); }
.mo-hero .actions { margin-top: 28px; }
.mo-other { margin-top: 22px; font-size: 0.92rem; color: var(--muted); }
.mo-other a { color: var(--accent-ink); font-weight: 600; }
.mo-hero-art { position: relative; }
.mo-hero-art .mo-hero-bubble { position: absolute; left: 2%; top: 0; max-width: 17em; z-index: 2; }
.mo-hero-art .mo-hero-bubble::before { content: ""; position: absolute; left: 22%; bottom: -7px; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); }

.mo-bubble { position: relative; background: var(--card); color: var(--ink); padding: 12px 16px; border-radius: 16px; font-size: 0.95rem; line-height: 1.4;
  box-shadow: 0 6px 24px rgba(17, 19, 24, .1); }
.mo-bubble b { color: var(--accent-ink); }
.band-ink .mo-bubble { background: #22252d; color: var(--on-ink); box-shadow: none; }
.band-ink .mo-bubble b { color: var(--accent-hi); }
.mo-guide { display: flex; align-items: flex-end; gap: 10px; max-width: 380px; }
.mo-guide img { width: 96px; flex: none; }
.mo-guide .mo-bubble { margin-bottom: 30px; }
.mo-guide .mo-bubble::before { content: ""; position: absolute; left: -7px; bottom: 16px; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); }

.mo-mapbar { margin-top: clamp(28px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.mo-map { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: mo; }
.mo-map a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.9rem; transition: border-color .15s; }
.mo-map a:hover { border-color: var(--accent-hi); }
.mo-map a::before { counter-increment: mo; content: counter(mo); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 0.75rem; }
.mo-pause { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--ink); background: transparent;
  font: 600 0.88rem/1 var(--sans); color: var(--ink); cursor: pointer; }
.mo-pause i { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.mo-pause[aria-pressed="true"] i { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

.mo-ch { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.mo-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: clamp(32px, 5vw, 52px); }
.mo-head .section-head { margin-bottom: 0; }

/* the stage */
.mo-stage { position: relative; aspect-ratio: 16 / 9; container-type: inline-size; overflow: hidden; }
.mo-stage > * { position: absolute; margin: 0; }
.mo-stage img { max-width: none; height: auto; }
.mo-stage .mo-key { left: 0; right: 0; bottom: 0; height: 0; list-style: none; padding: 0; z-index: 8; }
.mo-key li { position: absolute; bottom: 0; transform: translateX(-50%); white-space: nowrap; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.mo-key li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-hi); margin-right: 6px; vertical-align: 1px; }
@keyframes mo-spin { to { rotate: 360deg; } }
@keyframes mo-none { to { opacity: 0; } }

/* a panel that can be seen "through the thermal camera": the tint takes the panel's own shape */
.mo .pnl, .mo .mv { width: 34%; }
.mo .pnl > img:first-child, .mo .mv > img:first-child { width: 100%; }
.mo .pnl::before, .mo .mv::before { content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, #ff7a00, #ffb000 40%, #ff8c00 70%, #ff6a00);
  -webkit-mask: url(/img/case-studies/puf-motion/panel.webp) 0 0 / 100% 100%; mask: url(/img/case-studies/puf-motion/panel.webp) 0 0 / 100% 100%; }
.mo .cold { position: absolute; left: 50%; top: 30%; width: 24%; height: 60%; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, #0a5bd8 0 40%, #3fb6ff 70%, rgba(63, 182, 255, 0)); }
.mo .rtag { position: absolute; width: 11%; left: 62%; top: -80%; opacity: 0; transform-origin: 20% 30%; }
.mo .bad::before, .mo .pnl.p2::before { opacity: .9; }
.mo .bad .cold, .mo .pnl.p2 .cold { opacity: 1; }
.mo .bad .rtag, .mo .pnl.p2 .rtag { opacity: 1; top: -70%; }

/* hero: Kelvin scans two panels on the rollers */
.mo-s-hero { aspect-ratio: 5 / 4; margin-top: 4.6em; }
.mo-s-hero .rollers { width: 44%; left: 30%; bottom: 8%; }
.mo-s-hero .rollers.r2 { left: 62%; }
.mo-s-hero .pnl { bottom: 26.5%; left: 36%; }
.mo-s-hero .pnl.p2 { left: 64%; }
.mo-s-hero .kel { width: 40%; left: 0; bottom: 8%; }
.mo-s-hero .kel img { width: 100%; }
html:not(.mo-paused) .mo-s-hero.on .pnl { animation: mo-hero-pnl 8s linear infinite; }
html:not(.mo-paused) .mo-s-hero.on .pnl.p2 { animation-delay: -4s; }
html:not(.mo-paused) .mo-s-hero.on .pnl::before { animation: mo-scan-warm 8s linear infinite; animation-delay: inherit; }
html:not(.mo-paused) .mo-s-hero.on .pnl .cold, html:not(.mo-paused) .mo-s-hero.on .pnl .rtag { animation: mo-none 8s linear infinite; animation-delay: inherit; }
html:not(.mo-paused) .mo-s-hero.on .pnl.p2 .cold { animation-name: mo-scan-cold; }
html:not(.mo-paused) .mo-s-hero.on .pnl.p2 .rtag { animation-name: mo-tag; }
html:not(.mo-paused) .mo-s-hero.on .kel img { animation: mo-nod 2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes mo-hero-pnl { 0% { left: 18%; opacity: 0; } 5% { opacity: 1; } 90% { opacity: 1; } 100% { left: 96%; opacity: 0; } }
@keyframes mo-scan-warm { 0%, 6%, 34%, 100% { opacity: 0; } 12%, 26% { opacity: .9; } }
@keyframes mo-scan-cold { 0%, 8% { opacity: 0; } 14%, 100% { opacity: 1; } }
@keyframes mo-tag { 0%, 18% { opacity: 0; top: -160%; transform: rotate(-30deg); } 26% { opacity: 1; top: -70%; transform: rotate(10deg); } 32%, 100% { opacity: 1; top: -70%; transform: none; } }
@keyframes mo-nod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg) translateY(-1%); } }

/* 1 · made the same */
.mo-recipe { display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: center; }
.mo-ingr { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; }
.mo-ingr li { --q: clamp(0, calc(var(--p, 1) * 2.2 - var(--i) * .25), 1); display: grid; gap: 10px; justify-items: center; text-align: center;
  opacity: calc(.12 + var(--q) * .88); transform: translateY(calc((1 - var(--q)) * 36px)); }
.mo-ingr span { position: relative; display: block; }
.mo-ingr img { height: clamp(64px, 8vw, 110px); width: auto; max-width: 100%; object-fit: contain; }
.mo-ingr .ok { position: absolute; right: -4px; top: -6px; width: 24px; height: 24px; border-radius: 50%; background: #22663a; box-shadow: 0 0 0 3px var(--paper);
  transform: scale(clamp(0, calc(var(--q) * 3 - 2), 1)); }
.mo-ingr .ok::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mo-ingr b { font-size: 0.85rem; line-height: 1.25; }
.mo-ingr small { display: block; color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.mo-gate { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: 0.82rem; max-width: 9em; }
.mo-gate span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--accent-hi); font-size: 1.4rem; }
.mo-build { display: grid; justify-items: center; width: 100%; }
.mo-layers { --q: clamp(0, calc(var(--p, 1) * 1.8 - .5), 1); display: grid; justify-items: center; width: min(100%, 360px); padding: 10% 0 12%; }
.mo-layers img { width: 100%; }
.mo-layers img:nth-child(1) { position: relative; z-index: 1; transform: translateY(calc(18% - (1 - var(--q)) * 50%)); }
.mo-layers img:nth-child(3) { transform: translateY(calc(-40% + (1 - var(--q)) * 160%)); }
.mo-layer-key { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 0.82rem; color: var(--muted); }
.mo-layer-key b { color: var(--ink); }

.mo-line-wrap { margin-top: clamp(40px, 6vw, 72px); }
.mo-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--card); border-radius: 6px; box-shadow: 0 1px 0 var(--line); }
.mo-line .mo-stage { aspect-ratio: 16 / 6.4; overflow: visible; clip-path: inset(-60px 0 -40px 0); }
.mo-line .mo-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1.6cqw; height: 2px; background: var(--line); }
.mo-line { padding-bottom: 28px; }
.mo-line .mo-key { bottom: -24px; }

/* front of the line: coil, pour, press. Positions come from the pieces themselves: the strip runs at the
   pour head's sheet level and through the press's belt gap; the dashed ring sits on the uncoiler's coil. */
.mo-s-front .uncoiler { width: 22%; left: .5%; bottom: 1.59cqw; z-index: 2; }
.mo-s-front .spin { left: .85%; bottom: 5.79cqw; width: 12.5cqw; height: 12.5cqw; z-index: 3; border-radius: 50%; border: .45cqw dashed rgba(35, 38, 45, .45); }
.mo-s-front .pour { width: 24%; left: 24%; bottom: 1.59cqw; z-index: 2; }
.mo-s-front .press { width: 44%; left: 54%; bottom: 1.01cqw; z-index: 3; }
.mo-s-front .strip { left: 12%; right: 3%; bottom: 6.48cqw; height: 1.2cqw; z-index: 1;
  background: repeating-linear-gradient(90deg, #b8bec6 0 3cqw, #969da7 3cqw 3.3cqw); }
.mo-s-front .foam { left: 35.4%; bottom: 7.65cqw; width: 1.2cqw; height: 2.4cqw; z-index: 3; border-radius: 0 0 3px 3px;
  background: repeating-linear-gradient(180deg, #f2e6c6 0 .8cqw, #e2cf9c .8cqw 1.6cqw); }
.mo-s-front .heat { left: 62%; width: 30%; bottom: 4.25cqw; height: 7.43cqw; z-index: 4; pointer-events: none; opacity: .5;
  background: radial-gradient(closest-side, rgba(244, 118, 8, .5), rgba(244, 118, 8, 0)); }
html:not(.mo-paused) .mo-s-front.on .strip { animation: mo-strip 1.2s linear infinite; }
html:not(.mo-paused) .mo-s-front.on .spin { animation: mo-spin 4s linear infinite; }
html:not(.mo-paused) .mo-s-front.on .foam { animation: mo-pour .4s linear infinite; }
html:not(.mo-paused) .mo-s-front.on .heat { animation: mo-glow 2.4s ease-in-out infinite; }
@keyframes mo-strip { to { background-position: 3.3cqw 0; } }
@keyframes mo-pour { to { background-position: 0 1.6cqw; } }
@keyframes mo-glow { 0%, 100% { opacity: .3; } 50% { opacity: .9; } }

/* end of the line: saw, camera, stacker; one panel in three is held */
.mo-s-end .saw { width: 25%; left: 0; bottom: 1.59cqw; z-index: 2; }
.mo-s-end .blade { width: 4.2%; left: 9.65%; bottom: 7.59cqw; z-index: 3; }
.mo-s-end .rollers { width: 16.8%; left: 24%; bottom: 1.59cqw; }
.mo-s-end .rollers.r2 { left: 40.6%; } .mo-s-end .rollers.r3 { left: 57.2%; }
.mo-s-end .gantry { width: 28%; left: 35%; bottom: 1.59cqw; z-index: 4; }
.mo-s-end .cam { width: 4%; left: 47%; bottom: 11.15cqw; z-index: 5; }
.mo-s-end .beam, .mo-s-b1 .beam { z-index: 4; pointer-events: none; opacity: .5;
  background: linear-gradient(180deg, rgba(244, 118, 8, .75), rgba(244, 118, 8, .1)); clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); }
.mo-s-end .beam { left: 44%; width: 10%; bottom: 10.30cqw; height: 1.27cqw; }
.mo-s-end .stacker { width: 24%; left: 76%; bottom: 1.59cqw; z-index: 3; }
.mo-s-end .mv { width: 18%; left: 24%; bottom: 7.27cqw; z-index: 3; opacity: 0; }
.mo-s-end .mv.bad { left: 40%; opacity: 1; }
.mo-hold { z-index: 6; padding: 3px 8px; border-radius: 4px; background: #c8321e; color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mo-s-end .mo-hold { left: 55%; bottom: 19.12cqw; }
html:not(.mo-paused) .mo-s-end.on .blade { animation: mo-spin .5s linear infinite; }
html:not(.mo-paused) .mo-s-end.on .mv { animation: mo-go 9s linear infinite; }
html:not(.mo-paused) .mo-s-end.on .m2 { animation-name: mo-held; animation-delay: -3s; }
html:not(.mo-paused) .mo-s-end.on .m3 { animation-delay: -6s; }
html:not(.mo-paused) .mo-s-end.on .mv::before { animation: mo-warm 9s linear infinite; animation-delay: inherit; }
html:not(.mo-paused) .mo-s-end.on .mv .cold, html:not(.mo-paused) .mo-s-end.on .mv .rtag { animation: mo-none 9s linear infinite; animation-delay: inherit; }
html:not(.mo-paused) .mo-s-end.on .m2 .cold { animation-name: mo-cold; }
html:not(.mo-paused) .mo-s-end.on .m2 .rtag { animation-name: mo-tag2; }
html:not(.mo-paused) .mo-s-end.on .beam { animation: mo-beam 3s ease-in-out infinite; }
html:not(.mo-paused) .mo-s-end.on .mo-hold { animation: mo-holdtag 9s linear infinite; animation-delay: -3s; }
@keyframes mo-go { 0% { left: 14%; opacity: 0; } 5% { opacity: 1; } 92% { opacity: 1; } 100% { left: 76%; opacity: 0; } }
@keyframes mo-held { 0% { left: 14%; opacity: 0; bottom: 7.27cqw; } 5% { opacity: 1; } 38% { left: 40%; bottom: 7.27cqw; } 56% { left: 40%; bottom: 7.27cqw; }
  68% { left: 46%; bottom: 1.59cqw; opacity: 1; } 88% { left: 48%; bottom: 1.59cqw; opacity: 1; } 100% { left: 48%; bottom: 1.59cqw; opacity: 0; } }
@keyframes mo-warm { 0%, 30%, 52%, 100% { opacity: 0; } 35%, 47% { opacity: .9; } }
@keyframes mo-cold { 0%, 32% { opacity: 0; } 37%, 100% { opacity: 1; } }
@keyframes mo-tag2 { 0%, 41% { opacity: 0; top: -160%; transform: rotate(-30deg); } 48% { opacity: 1; top: -70%; transform: rotate(10deg); } 54%, 100% { opacity: 1; top: -70%; transform: none; } }
@keyframes mo-beam { 0%, 100% { opacity: .3; } 50% { opacity: .95; } }
@keyframes mo-holdtag { 0%, 42% { opacity: 0; transform: translateY(6px); } 48%, 82% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; } }

.mo-facts { margin-top: clamp(32px, 5vw, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mo-facts p { border-top: 2px solid var(--ink); padding-top: 14px; color: var(--muted); }
.mo-facts b { display: block; color: var(--ink); margin-bottom: 4px; }

/* 2 · the secret */
.mo-secret { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.mo-secret figure { margin: 0; display: grid; gap: 12px; }
.mo-secret figcaption { font-size: 0.92rem; color: var(--on-ink-muted); }
.mo-secret figcaption b { color: #fff; }
.mo-s-cause { aspect-ratio: 16 / 9; background: #e9e6de; border-radius: 6px; }
.mo-s-cause .drum { width: 17%; left: 5%; bottom: 14%; }
.mo-s-cause .therm { left: 25%; bottom: 14%; width: 3.4cqw; height: 26cqw; border-radius: 99px; background: #fff; border: .5cqw solid #c9c5bb; overflow: hidden; }
.mo-s-cause .therm i { position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: #2a7fe0; }
.mo-s-cause .deg { left: 31%; bottom: 40%; color: var(--ink); font-size: 0.9rem; white-space: nowrap; }
.mo-s-cause .deg b { display: block; font-weight: 700; }
.mo-s-cause .deg .w { position: absolute; opacity: 0; color: var(--accent-ink); }
.mo-s-cause .deg .c { color: #1f5fae; }
.mo-s-cause .void { width: 56%; left: 42%; bottom: 20%; }
.mo-s-cause .pin { left: 63%; bottom: 48%; width: 16%; height: 9%; border-radius: 50%; border: .5cqw solid #1f8fff; box-shadow: 0 0 0 .4cqw rgba(31, 143, 255, .25); }
html:not(.mo-paused) .mo-s-cause.on .therm i { animation: mo-cool 6s ease-in-out infinite; }
html:not(.mo-paused) .mo-s-cause.on .deg .w { animation: mo-showw 6s ease-in-out infinite; }
html:not(.mo-paused) .mo-s-cause.on .deg .c { animation: mo-showc 6s ease-in-out infinite; }
html:not(.mo-paused) .mo-s-cause.on .pin { animation: mo-pin 6s ease-out infinite; }
@keyframes mo-cool { 0%, 15% { height: 80%; background: #f47608; } 45%, 100% { height: 52%; background: #2a7fe0; } }
@keyframes mo-showw { 0%, 20% { opacity: 1; } 35%, 100% { opacity: 0; } }
@keyframes mo-showc { 0%, 30% { opacity: 0; } 45%, 100% { opacity: 1; } }
@keyframes mo-pin { 0%, 45% { transform: scale(.4); opacity: 0; } 55%, 85% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
.mo-wipe { --x: 50%; position: relative; overflow: hidden; border-radius: 6px; touch-action: pan-y; cursor: ew-resize; background: #111; user-select: none; }
.mo-wipe img { width: 100%; pointer-events: none; }
.mo-wipe .mo-wipe-top { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.mo-wipe-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.mo-wipe-line::after { content: "\2194"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.mo-wipe-tag { position: absolute; top: 12px; padding: 4px 9px; font-size: 0.72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(17, 19, 24, .72); color: #fff; pointer-events: none; }
.mo-wipe-tag.l { left: 12px; } .mo-wipe-tag.r { right: 12px; }
.mo-wipe input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.mo-wipe:focus-within { outline: 3px solid var(--accent-hi); outline-offset: 3px; }

/* 3 · two roads: four little scenes per road, each built from the kit */
.mo-roads-bar { margin-bottom: 22px; }
.mo-frames { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: fr; }
.mo-frames li { position: relative; display: grid; gap: 12px; align-content: start; }
.mo-frames .mo-stage { aspect-ratio: 4 / 3; background: var(--card); border-radius: 6px; box-shadow: 0 1px 0 var(--line); }
.mo-frames li::before { counter-increment: fr; content: counter(fr); position: absolute; left: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 0.78rem; font-weight: 600; z-index: 9; }
.mo-frames h3 { font-size: 1.05rem; }
.mo-frames p { color: var(--muted); font-size: 0.93rem; }
.mo-cost { display: inline-flex; gap: 6px; align-items: center; justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.mo-cost.bad { background: #fbe4e1; color: #a1271b; }
.mo-cost.good { background: #e2f1e6; color: #22663a; }
.mo-road[hidden] { display: none; }
.mo-sum { margin-top: 28px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 20px; background: var(--card); border-left: 4px solid var(--accent-hi); }
.mo-sum img { width: 76px; }
.mo-stage .who, .mo-stage .sup, .mo-stage .worker { bottom: 6%; height: 74%; width: auto; }
.mo-card { z-index: 6; background: var(--ink); color: #fff; padding: 6px 9px; border-radius: 6px; font-size: 0.72rem; line-height: 1.3;
  display: grid; gap: 2px; max-width: 52%; box-shadow: 0 6px 18px rgba(17, 19, 24, .25); }
.mo-card small { color: var(--on-ink-muted); font-size: 0.68rem; }
@keyframes mo-card { 0%, 50% { opacity: 0; transform: translateY(8px) scale(.96); } 60%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mo-pop { 0%, 45% { opacity: 0; transform: translateY(6%); } 55%, 100% { opacity: 1; transform: none; } }

/* A1 the truck leaves */
.mo-s-a1 .factory { width: 64%; left: 2%; bottom: 20%; }
.mo-s-a1 .road { left: 0; right: 0; bottom: 6%; height: 14%; background-color: #3a3e47;
  background-image: linear-gradient(90deg, #f4f2ec 50%, transparent 50%); background-size: 8cqw .6cqw; background-repeat: repeat-x; background-position: 0 50%; }
.mo-s-a1 .truck { width: 64%; left: 28%; bottom: 12%; z-index: 2; }
.mo-s-a1 .truck .body { width: 100%; }
.mo-s-a1 .wheel { position: absolute; width: 11.8%; bottom: -3.6%; }
.mo-s-a1 .w1 { left: 4.1%; } .mo-s-a1 .w2 { left: 64.1%; } .mo-s-a1 .w3 { left: 78.1%; }
html:not(.mo-paused) .mo-s-a1.on .truck { animation: mo-drive 6s cubic-bezier(.45, 0, .7, 1) infinite; }
html:not(.mo-paused) .mo-s-a1.on .wheel { animation: mo-spin .8s linear infinite; }
@keyframes mo-drive { 0%, 14% { transform: translateX(-24%); opacity: 1; } 84% { transform: translateX(110%); opacity: 1; } 85%, 100% { transform: translateX(-24%); opacity: 0; } }

/* A2 / B3 the wall goes up */
.mo-s-a2 .frame, .mo-s-b3 .frame { width: 70%; left: 2%; bottom: 6%; opacity: .35; }
.mo-stage .wp { height: 52%; width: auto; bottom: 6%; }
.mo-stage .wp.w1 { left: 3%; } .mo-stage .wp.w2 { left: 19%; } .mo-stage .wp.w3 { left: 35%; } .mo-stage .wp.w4 { left: 51%; }
.mo-s-a2 .wp.bowed { opacity: 1; }
.mo-s-a2 .wp.straight { opacity: 0; }
.mo-s-a2 .who, .mo-s-b3 .who { right: 2%; }
html:not(.mo-paused) .mo-stage.on .wp { animation: mo-rise 6s ease-out infinite; }
html:not(.mo-paused) .mo-stage.on .wp.w2 { animation-delay: .3s; } html:not(.mo-paused) .mo-stage.on .wp.w3 { animation-delay: .6s; } html:not(.mo-paused) .mo-stage.on .wp.w4 { animation-delay: .9s; }
html:not(.mo-paused) .mo-s-a2.on .wp.straight { animation-name: mo-unbow; }
html:not(.mo-paused) .mo-s-a2.on .wp.bowed { animation-name: mo-bow; animation-delay: 0s; }
html:not(.mo-paused) .mo-s-a2.on .who, html:not(.mo-paused) .mo-s-b3.on .who { animation: mo-pop 6s ease-out infinite; }
@keyframes mo-rise { 0% { transform: translateY(105%); opacity: 0; } 12%, 100% { transform: none; opacity: 1; } }
@keyframes mo-unbow { 0% { transform: translateY(105%); opacity: 0; } 12%, 36% { transform: none; opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes mo-bow { 0%, 36% { opacity: 0; transform: scaleX(.85); } 52%, 100% { opacity: 1; transform: none; } }
.mo-s-b3 .mo-card { left: 5%; top: 14%; max-width: 46%; border-left: 3px solid #3bb36a; }
html:not(.mo-paused) .mo-s-b3.on .mo-card { animation: mo-card 6s ease-out infinite; }

/* A3 / B4 the cold store, also used in the rooms */
.mo-store .room { width: 100%; left: 0; top: 50%; translate: 0 -50%; }
.mo-store .crate { width: 17%; bottom: 17%; z-index: 2; }
.mo-store .crate.c1 { left: 20%; } .mo-store .crate.c2 { left: 38%; } .mo-store .crate.c3 { left: 56%; }
.mo-s-a3 .frost { width: 15%; left: 58%; top: 34%; z-index: 1; }
.mo-s-a3 .ice { width: 22%; left: 52%; top: 31%; z-index: 1; }
.mo-s-a3 .crate.rot { z-index: 3; }
.mo-s-a3 .who, .mo-s-b4 .who { right: 1%; z-index: 4; height: 48%; bottom: 17%; }
.mo-store .air { width: 22%; z-index: 1; opacity: .7; }
.mo-store .air.a1 { left: 44%; top: 40%; } .mo-store .air.a2 { left: 22%; top: 50%; }
.mo-temp { z-index: 4; background: #1f5fae; color: #fff; padding: 3px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.mo-s-b4 .mo-temp { left: 8%; top: 22%; }
html:not(.mo-paused) .mo-s-a3.on .frost { animation: mo-frost 7s ease-in infinite; transform-origin: 50% 0; }
html:not(.mo-paused) .mo-s-a3.on .ice { animation: mo-ice 7s ease-in infinite; transform-origin: 50% 0; }
html:not(.mo-paused) .mo-s-a3.on .crate.rot { animation: mo-rot 7s ease-in infinite; }
html:not(.mo-paused) .mo-s-a3.on .who { animation: mo-pop 7s ease-out infinite; }
html:not(.mo-paused) .mo-store.on .air { animation: mo-air 4s ease-in-out infinite; }
html:not(.mo-paused) .mo-store.on .air.a2 { animation-delay: -2s; }
@keyframes mo-frost { 0%, 10% { opacity: 0; transform: scaleY(.3); } 60%, 100% { opacity: 1; transform: none; } }
@keyframes mo-ice { 0%, 30% { opacity: 0; transform: scaleY(0); } 70%, 100% { opacity: 1; transform: none; } }
@keyframes mo-rot { 0%, 45% { opacity: 0; } 75%, 100% { opacity: 1; } }
@keyframes mo-air { 0% { transform: translateX(-30%); opacity: 0; } 30%, 70% { opacity: .75; } 100% { transform: translateX(40%); opacity: 0; } }

/* A4 the phone call */
.mo-s-a4 .factory { width: 82%; left: -8%; bottom: 6%; opacity: .22; }
.mo-s-a4 .who { left: 38%; height: 82%; }
.mo-s-a4 .ring { left: 62%; top: 14%; width: 9cqw; height: 9cqw; border-radius: 50%; border: .7cqw solid #c8321e; border-left-color: transparent; border-bottom-color: transparent; opacity: .8; }
.mo-s-a4 .ring.r2 { width: 14cqw; height: 14cqw; top: 10%; left: 60%; } .mo-s-a4 .ring.r3 { width: 19cqw; height: 19cqw; top: 6%; left: 58%; }
.mo-s-a4 .note { left: 5%; top: 56%; background: #fff; color: #a1271b; font-weight: 700; font-size: 0.8rem; padding: 6px 10px; border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
html:not(.mo-paused) .mo-s-a4.on .ring { animation: mo-ringa 1.6s ease-out infinite; }
html:not(.mo-paused) .mo-s-a4.on .ring.r2 { animation-delay: .2s; } html:not(.mo-paused) .mo-s-a4.on .ring.r3 { animation-delay: .4s; }
html:not(.mo-paused) .mo-s-a4.on .who { animation: mo-shake 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
html:not(.mo-paused) .mo-s-a4.on .note { animation: mo-card 5s ease-out infinite; }
@keyframes mo-ringa { 0% { opacity: 0; } 30% { opacity: .9; } 100% { opacity: 0; } }
@keyframes mo-shake { 0%, 60%, 100% { transform: none; } 66% { transform: rotate(-1.2deg); } 72% { transform: rotate(1.2deg); } 78% { transform: rotate(-.8deg); } }

/* B1 caught at the line */
.mo-s-b1 .rollers { width: 40%; left: 0; bottom: 8%; }
.mo-s-b1 .rollers.r2 { left: 40%; }
.mo-s-b1 .gantry { width: 64%; left: 18%; bottom: 8%; z-index: 4; }
.mo-s-b1 .cam { width: 8%; left: 46%; bottom: 39.4%; z-index: 5; }
.mo-s-b1 .beam { left: 40%; width: 20%; bottom: 35%; height: 5%; }
.mo-s-b1 .mv { width: 36%; left: 32%; bottom: 27%; z-index: 3; }
.mo-s-b1 .lane { left: 0; right: 0; bottom: 3%; height: 2.5%; background: repeating-linear-gradient(90deg, #c8321e 0 3cqw, #f4f2ec 3cqw 6cqw); opacity: .8; }
.mo-s-b1 .mo-hold { right: 4%; bottom: 8%; }
.mo-s-b1 .mv::before { opacity: .9; } .mo-s-b1 .mv .cold, .mo-s-b1 .mv .rtag { opacity: 1; } .mo-s-b1 .mv .rtag { top: -70%; }
html:not(.mo-paused) .mo-s-b1.on .mv { animation: mo-b1 7s ease-in-out infinite; }
html:not(.mo-paused) .mo-s-b1.on .mv::before { animation: mo-b1warm 7s linear infinite; }
html:not(.mo-paused) .mo-s-b1.on .mv .cold { animation: mo-b1cold 7s linear infinite; }
html:not(.mo-paused) .mo-s-b1.on .mv .rtag { animation: mo-b1tag 7s ease-out infinite; }
html:not(.mo-paused) .mo-s-b1.on .beam { animation: mo-beam 1.4s ease-in-out infinite; }
@keyframes mo-b1 { 0% { left: -40%; bottom: 27%; } 30%, 55% { left: 32%; bottom: 27%; } 75%, 92% { left: 58%; bottom: 3%; opacity: 1; } 100% { left: 58%; bottom: 3%; opacity: 0; } }
@keyframes mo-b1warm { 0%, 24% { opacity: 0; } 32%, 100% { opacity: .9; } }
@keyframes mo-b1cold { 0%, 32% { opacity: 0; } 40%, 100% { opacity: 1; } }
@keyframes mo-b1tag { 0%, 42% { opacity: 0; top: -160%; transform: rotate(-30deg); } 50% { opacity: 1; top: -70%; transform: rotate(10deg); } 56%, 100% { opacity: 1; top: -70%; transform: none; } }

/* B2 the supervisor's phone */
.mo-s-b2 .sup { left: 4%; }
.mo-s-b2 .worker { right: 2%; height: 64%; }
.mo-s-b2 .mo-card { left: 30%; top: 5%; max-width: 40%; border-left: 3px solid #c8321e; }
html:not(.mo-paused) .mo-s-b2.on .mo-card { animation: mo-card 6s ease-out infinite; animation-delay: -2.4s; }
html:not(.mo-paused) .mo-s-b2.on .worker { animation: mo-tap 1.2s ease-in-out infinite; transform-origin: 40% 100%; }
@keyframes mo-tap { 0%, 100% { transform: none; } 40% { transform: rotate(1.4deg); } 55% { transform: rotate(-.4deg); } }

/* 4 · rooms */
.mo-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 32px); }
.mo-room { margin: 0; display: grid; gap: 14px; align-content: start; }
.mo-room-pic { position: relative; aspect-ratio: 2 / 1; container-type: inline-size; }
.mo-room-pic > * { position: absolute; }
.mo-room-pic .room { width: 100%; left: 0; top: 0; translate: none; }
.mo-r-store .crate { bottom: 13%; }
.mo-r-dairy .air { width: 26%; left: 37%; top: 52%; opacity: .6; }
html:not(.mo-paused) .mo-r-dairy.on .air { animation: mo-air 4s ease-in-out infinite; }
.mo-spot { z-index: 5; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--accent-hi);
  color: #fff; font: 600 0.8rem/1 var(--sans); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.mo-spot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent-hi); opacity: 0; pointer-events: none; }
html:not(.mo-paused) .mo-room-pic.on .mo-spot::after { animation: mo-ping 2s ease-out infinite; }
.mo-spot[aria-pressed="true"] { background: #fff; color: var(--ink); }
@keyframes mo-ping { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.5); } }
.mo-room h3 { font-size: 1.2rem; }
.mo-room ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: sp; }
.mo-room ol li { position: relative; padding: 8px 10px 8px 40px; border-radius: 6px; color: var(--on-ink-muted); font-size: 0.92rem; transition: background .2s, color .2s; }
.mo-room ol li::before { counter-increment: sp; content: counter(sp); position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: #2a2d35; color: var(--accent-hi); display: grid; place-items: center; font-size: 0.72rem; font-weight: 600; }
.mo-room ol li.on { background: #22252d; color: #fff; }
.mo-room .res { color: #fff; font-weight: 600; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 12px; }

/* 5 to 7, and how the pictures were made */
.mo-pilot li img { width: 92px; height: 92px; object-fit: contain; margin-bottom: 4px; }
.mo-flow { list-style: none; padding: 0; margin: 0 0 clamp(32px, 5vw, 48px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: fl; }
.mo-flow li { background: var(--card); padding: 16px; display: grid; gap: 6px; align-content: start; }
.mo-flow li::before { counter-increment: fl; content: "0" counter(fl); font-size: 0.75rem; font-weight: 600; color: var(--accent-ink); letter-spacing: .08em; }
.mo-flow b { font-size: 0.98rem; }
.mo-flow small { color: var(--muted); font-size: 0.86rem; }
.mo-flow q { font-style: italic; }
.mo-dir { margin: clamp(28px, 4vw, 44px) 0 14px; max-width: 46em; display: grid; gap: 6px; }
.mo-dir h3 { font-size: 1.15rem; }
.mo-dir p { color: var(--muted); font-size: 0.94rem; }
.mo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mo-gallery figure { margin: 0; background: var(--card); display: grid; grid-template-rows: auto 1fr; }
.mo-gallery .pic { aspect-ratio: 3 / 2; display: grid; place-items: center; padding: 10px; overflow: hidden;
  background: repeating-conic-gradient(#ebe8e0 0 25%, #f8f6f1 0 50%) 0 0 / 16px 16px; }
.mo-gallery .pic.solid { background: var(--paper-2); padding: 0; }
.mo-gallery .pic img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.mo-gallery .pic.solid img { width: 100%; height: 100%; object-fit: cover; max-height: none; }
.mo-gallery figcaption { padding: 12px 14px 14px; display: grid; gap: 6px; align-content: start; font-size: 0.84rem; color: var(--ink-2); }
.mo-gallery figcaption q { font-style: italic; }
.mo-gallery figcaption small { color: var(--muted); }

@media (max-width: 1000px) {
  .mo-recipe { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .mo-gate { grid-auto-flow: column; max-width: none; align-items: center; text-align: left; }
  .mo-gate span { transform: rotate(90deg); }
  .mo-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-rooms { grid-template-columns: minmax(0, 1fr); max-width: 620px; margin: 0 auto; }
  .mo-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mo-hero-grid, .mo-secret, .mo-head { grid-template-columns: minmax(0, 1fr); }
  .mo-line { grid-template-columns: minmax(0, 1fr); }
  .mo-line .mo-stage + .mo-stage { border-top: 1px dashed var(--line); }
  .mo-hero-art .mo-hero-bubble { position: relative; left: auto; top: auto; max-width: 22em; margin-left: 10%; }
  .mo-hero-art .mo-hero-bubble::before { bottom: auto; top: -7px; left: 14%; }
  .mo-s-hero { aspect-ratio: 16 / 10; margin-top: 4px; }
}
@media (max-width: 640px) {
  .mo-ingr { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .mo-facts { grid-template-columns: minmax(0, 1fr); }
  .mo-guide img { width: 76px; }
  .mo-sum { grid-template-columns: minmax(0, 1fr); }
  .mo-sum img { width: 60px; }
  .mo-key li { font-size: 0.68rem; }
  .mo-hero-bubble { font-size: 0.86rem; }
}
@media (max-width: 520px) {
  .mo-frames { grid-template-columns: minmax(0, 1fr); }
  .mo-flow { grid-template-columns: minmax(0, 1fr); }
  .mo-gallery { grid-template-columns: minmax(0, 1fr); }
}
