/* ==========================================================================
   AISensus design system (see DESIGN.md)
   Direction: One motif. The quarter-circle from the AISensus mark (a sensor's
   ripple) is the only shape: tabs, buttons, frames, tiles, the hero, the footer.
   One face: Rubik. Ground swaps by chapter; ink stays near-black; safety orange
   is the action and the motif.
   ========================================================================== */

/* Rubik (SIL Open Font License), self-hosted: no third-party font requests */
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/rubik-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: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/rubik-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; }

:root {
  color-scheme: light;

  /* Grounds (industrial paint and office paper) */
  --dark: #151716;          /* machine-room dark */
  --dark-2: #222624;        /* one tone step up */
  --grey: #CBD0CC;          /* RAL 7035, cabinet grey */
  --grey-2: #BBC1BC;
  --green: #BCCABB;         /* machine-tool green, lightened */
  --green-2: #AABAA9;
  --blue: #C5D2DF;          /* form-paper blue */
  --blue-2: #B2C2D2;
  --paper: #EEEFEB;         /* office paper */
  --paper-2: #E0E2DD;

  /* Ink */
  --ink: #141414;
  --muted: #3C413F;
  --on-dark: #F2F3F0;
  --on-dark-muted: #AEB4B0;

  /* Accent: RAL 2004 pure orange */
  --accent: #F44611;
  --accent-hover: #FF6A3A;
  --accent-ink: #141414;
  --accent-soft: #F9875F;

  --ok: #2F9E5E;

  /* Type: five steps */
  --font: "Rubik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --s-small: 14px;
  --s-body: clamp(17px, 1rem + 0.2vw, 19px);
  --s-lead: clamp(20px, 1.1rem + 0.5vw, 24px);
  --s-head: clamp(28px, 1rem + 1.4vw, 36px);
  --s-display: clamp(46px, 7vw, 120px);

  /* Frame */
  --m: clamp(20px, 3.2vw, 48px);
  --max: 1440px;
  --gap-section: clamp(64px, 7vw, 120px);

  /* The motif: one quarter-round shoulder (top-right) */
  --r: 28px;
  --r-lg: clamp(56px, 8vw, 140px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: rgba(244, 70, 17, .25); }
@media (pointer: fine) { html { overscroll-behavior: none; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--s-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[id] { scroll-margin-top: 24px; }

.skip { position: absolute; left: var(--m); top: -100px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px 18px; border-radius: 0 14px 0 0; font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.frame { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--m); }

/* ---------- Grounds ---------- */
.g-dark  { background: var(--dark);  color: var(--on-dark); }
.g-grey  { background: var(--grey); }
.g-green { background: var(--green); }
.g-blue  { background: var(--blue); }
.g-paper { background: var(--paper); }

/* ---------- Type helpers ---------- */
.display { font-size: var(--s-display); line-height: 1; letter-spacing: -0.035em; }
.head { font-size: var(--s-head); line-height: 1.1; }
.lead { font-size: var(--s-lead); line-height: 1.4; }
.small { font-size: var(--s-small); }
.muted { color: var(--muted); }
.g-dark .muted { color: var(--on-dark-muted); }

/* ---------- Buttons (motif: one round shoulder) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px;
  border: 0; border-radius: 0 var(--r) 0 0;
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--s-body); font-weight: 500; text-decoration: none;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-ink { background: var(--ink); color: var(--on-dark); }
.btn-ink:hover { background: #2C302E; }
.btn-light { background: var(--on-dark); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: var(--s-body); border-radius: 0 20px 0 0; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Bars ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--s-lead); letter-spacing: -0.03em; text-decoration: none; }
.wordmark svg { width: 30px; height: 30px; }
.wordmark .tld { font-weight: 400; opacity: .7; }

/* Index hero bar: wordmark dead centre, one action right */
.bar-hero { display: grid; grid-template-columns: 1fr auto 1fr; }
.bar-hero .left { display: flex; gap: 28px; font-size: var(--s-body); }
.bar-hero .left a, .bar-hero .right a:not(.btn) { text-decoration: none; color: var(--on-dark); }
.bar-hero .left a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar-hero .right { justify-self: end; }
@media (max-width: 760px) { .bar-hero .left { display: none; } .bar-hero { grid-template-columns: auto 1fr; } .bar-hero .wordmark { justify-self: start; } }

/* Sub page bar */
.bar-page nav { display: flex; align-items: center; gap: 6px; }
.bar-page nav a:not(.btn) { padding: 12px 14px; text-decoration: none; font-size: var(--s-body); font-weight: 500; }
.bar-page nav a:not(.btn):hover, .bar-page nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.bar-page nav .btn { margin-left: 10px; }
.menu-btn { display: none; min-height: 44px; padding: 0 18px; background: var(--ink); color: var(--on-dark); border: 0; border-radius: 0 20px 0 0; font-size: var(--s-body); font-weight: 500; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .bar-page { flex-wrap: wrap; }
  .bar-page nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 20px; }
  .menu-open .bar-page nav { display: flex; }
  .bar-page nav a:not(.btn) { padding: 14px 0; font-size: var(--s-lead); }
  .bar-page nav .btn { margin: 12px 0 0; }
}

/* ==========================================================================
   INDEX HERO: tabbed folder stack
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column;
}
.hero-copy { text-align: center; padding-top: clamp(32px, 6vh, 72px); }
.hero-copy h1 { font-size: var(--s-display); line-height: .98; letter-spacing: -0.04em; max-width: 14ch; margin: 0 auto; }
.hero-copy p { font-size: var(--s-lead); line-height: 1.4; max-width: 46ch; margin: clamp(24px, 3vh, 40px) auto 0; color: var(--on-dark); }

.folders {
  --off: 64px; --tab: 44px;
  position: relative;
  width: calc(100% - 2 * var(--m)); max-width: calc(var(--max) - 2 * var(--m)); margin: clamp(40px, 7vh, 88px) auto 0;
  flex: 1; min-height: calc(var(--off) * 4 + 220px);
}
.folder {
  position: absolute; left: 0; right: 0; bottom: -2px;
  top: calc(var(--i) * var(--off) + var(--tab));
  background: var(--c); color: var(--ink);
  text-decoration: none;
  border-radius: 0 var(--r) 0 0;
  transition: transform .35s var(--ease);
}
.folder .tab {
  position: absolute; bottom: 100%; left: var(--x);
  height: var(--tab); padding: 0 22px 0 20px;
  display: flex; align-items: center;
  background: var(--c); color: var(--ink);
  font-size: var(--s-body); font-weight: 500; white-space: nowrap;
  border-radius: 0 22px 0 0;
}
a.folder:hover { transform: translateY(-10px); }
a.folder:hover .tab { text-decoration: underline; text-underline-offset: 4px; }
.folder.front {
  border-radius: 0 var(--r-lg) 0 0;
  padding: 32px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
}
.folder.front p { max-width: 40ch; }
.folder.front .tab { left: 0; }
.js .folder { animation: folderIn .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes folderIn { from { transform: translateY(70px); } to { transform: none; } }
@media (max-width: 760px) {
  .hero-copy { text-align: left; padding-top: 40px; }
  .hero-copy h1 { margin: 0; font-size: 12vw; }
  .hero-copy p { margin-left: 0; font-size: var(--s-body); }
  .folders { --off: 52px; --tab: 36px; width: calc(100% - 2 * var(--m)); margin-top: 40px; min-height: calc(52px * 4 + 230px); }
  .folder .tab { font-size: var(--s-small); padding: 0 16px 0 14px; border-radius: 0 16px 0 0; }
  .folder.front { padding: 24px 20px; }
  .folder.front .btn { width: 100%; }
}

/* ==========================================================================
   INTRO: statement with inline thumbnails
   ========================================================================== */
.intro { padding: clamp(96px, 20vh, 220px) 0; }
.statement {
  font-size: var(--s-head);
  font-weight: 500; line-height: 1.32; letter-spacing: -0.015em;
  max-width: 34ch; margin: 0 auto; text-align: center;
}
.thumb {
  display: inline-block; vertical-align: -0.12em;
  height: 0.95em; width: 1.35em; margin: 0 0.14em;
  border-radius: 0 0.45em 0 0; overflow: hidden;
  background: var(--dark);
}
.thumb svg { width: 100%; height: 100%; }
@media (max-width: 760px) { .statement { text-align: left; font-size: var(--s-lead); } .intro { padding: 96px 0; } }

/* ==========================================================================
   SHOWCASE: square plate, spare text (the live thing)
   ========================================================================== */
.showcase { display: grid; grid-template-columns: 1fr 1fr; min-height: 88svh; }
.showcase .plate-side { display: grid; place-items: center; padding: 40px var(--m); }
.plate {
  width: min(100%, 78svh); aspect-ratio: 1;
  background: var(--dark); color: var(--on-dark);
  border-radius: 0 var(--r-lg) 0 0; overflow: hidden;
  position: relative;
}
.plate .pane { position: absolute; inset: 0; display: flex; flex-direction: column; padding: clamp(18px, 2.4vw, 32px); }
.plate .pane[hidden] { display: none; }
.showcase .text-side { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px var(--m) 40px clamp(20px, 3vw, 56px); }
.stabs { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.stabs button {
  background: none; border: 0; padding: 10px 0; min-height: 44px;
  font-size: var(--s-body); font-weight: 400; color: var(--muted);
  border-bottom: 3px solid transparent; transition: color .2s, border-color .2s;
}
.stabs button[aria-selected="true"] { color: var(--ink); font-weight: 500; border-bottom-color: var(--accent); }
.stabs button:hover { color: var(--ink); }
.showcase h2 { font-size: var(--s-head); font-weight: 600; }
.showcase .desc { max-width: 34ch; margin-top: 32px; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cell {
  min-height: 72px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none; font-weight: 500; font-size: var(--s-body);
  transition: background-color .2s;
}
.cell svg { width: 20px; height: 20px; flex-shrink: 0; transition: transform .25s var(--ease); }
.cell:hover svg { transform: translateX(4px); }
.cell-ink { background: var(--ink); color: var(--on-dark); border-radius: 0 var(--r) 0 0; }
.cell-ink:hover { background: #2C302E; }
.cell-tone { background: var(--paper-2); color: var(--ink); }
.g-blue .cell-tone { background: var(--blue-2); }
.cell-tone:hover { background: var(--grey-2); }
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; min-height: 0; }
  .showcase .plate-side { padding: 56px var(--m) 0; }
  .plate { width: 100%; }
  .showcase .text-side { padding: 28px var(--m) 72px; gap: 28px; }
  .stabs button { font-size: var(--s-body); }
  .cells { grid-template-columns: 1fr; }
  .cell { min-height: 60px; }
}

/* ==========================================================================
   Interface fragments (data-ui): the product's own look
   ========================================================================== */
[data-ui] { font-variant-numeric: tabular-nums; }
.ui-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: var(--s-small); color: var(--on-dark-muted); margin-bottom: 14px; }
.ui-title b { color: var(--on-dark); font-weight: 500; font-size: var(--s-body); }
.live-dot { display: inline-flex; align-items: center; gap: 7px; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Belt (vision QC) */
.belt-wrap { position: relative; flex: 1; min-height: 180px; background: var(--dark-2); border-radius: 0 var(--r) 0 0; overflow: hidden; }
.belt { position: absolute; left: 0; right: 0; top: 50%; height: 44%; transform: translateY(-50%); background-color: #2B2F2D; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='10'%3E%3Crect x='22' width='22' height='10' fill='%23323634'/%3E%3C/svg%3E"); background-size: 44px 100%; }
.belt.moving { animation: beltMove .8s linear infinite; }
@keyframes beltMove { to { background-position: 44px 0; } }
.scanner { position: absolute; top: 8%; bottom: 8%; left: 50%; width: 30%; transform: translateX(-50%); border: 2px dashed rgba(244, 70, 17, .8); border-radius: 0 18px 0 0; z-index: 3; pointer-events: none; }
.scanner .beam { position: absolute; left: 6px; right: 6px; height: 3px; background: var(--accent); top: 8%; animation: scan 1.4s ease-in-out infinite alternate; }
@keyframes scan { to { transform: translateY(var(--travel, 160px)); } }
.part { position: absolute; top: 50%; left: 0; width: var(--ps, 76px); height: var(--ps, 76px); margin-top: calc(var(--ps, 76px) / -2); z-index: 2; will-change: transform; }
.part svg { width: 100%; height: 100%; }
.part .box { position: absolute; inset: -6px; border: 2px solid transparent; border-radius: 0 12px 0 0; }
.part .lbl { position: absolute; left: -6px; bottom: calc(100% + 8px); font-size: var(--s-small); font-weight: 500; padding: 2px 8px; border-radius: 0 8px 0 0; white-space: nowrap; opacity: 0; }
.part.ok .box { border-color: var(--ok); }
.part.ok .lbl { background: var(--ok); color: var(--ink); opacity: 1; }
.part.bad .box { border-color: var(--accent); }
.part.bad .lbl { background: var(--accent); color: var(--accent-ink); opacity: 1; }
.ui-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.ui-stats div { background: var(--dark-2); padding: 10px 14px; }
.ui-stats div:last-child { border-radius: 0 16px 0 0; }
.ui-stats span { display: block; font-size: var(--s-small); color: var(--on-dark-muted); }
.ui-stats b { display: block; font-size: var(--s-lead); font-weight: 500; letter-spacing: -0.02em; }
.ui-stats b.bad { color: var(--accent-soft); }

/* Field extraction (invoice) */
.fields { display: grid; gap: 4px; flex: 1; align-content: start; }
.f-row { display: grid; grid-template-columns: 9em 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; background: var(--dark-2); font-size: var(--s-small); transition: background-color .3s; }
.f-row.active { background: #3A2A22; }
.f-row .k { color: var(--on-dark-muted); font-size: var(--s-small); }
.f-row .v { min-height: 1.4em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conf { font-size: var(--s-small); padding: 1px 8px; background: rgba(47, 158, 94, .22); color: #8FE0B0; opacity: 0; transition: opacity .3s; }
.conf.show { opacity: 1; }
.verdicts { display: grid; gap: 6px; margin-top: 12px; }
.verdict { display: flex; align-items: center; gap: 10px; font-size: var(--s-small); color: var(--on-dark-muted); transition: color .3s; }
.verdict i { width: 18px; height: 18px; flex-shrink: 0; border-radius: 0 9px 0 0; background: var(--dark-2); display: grid; place-items: center; transition: background-color .3s; }
.verdict i svg { width: 11px; height: 11px; opacity: 0; }
.verdict.done { color: var(--on-dark); }
.verdict.done i { background: var(--ok); }
.verdict.done i svg { opacity: 1; }
.verdict.flag { color: #F6C26B; }
.verdict.flag i { background: #F6C26B; }
.verdict.flag i svg { opacity: 1; }

/* Inbox */
.mails { display: grid; gap: 4px; flex: 1; align-content: start; }
.mail { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; background: var(--dark-2); transition: background-color .3s; }
.mail.working { background: #2E3330; }
.mail .from { font-weight: 500; font-size: var(--s-small); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .subj { grid-column: 1 / -1; font-size: var(--s-small); color: var(--on-dark-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .ai { grid-column: 1 / -1; font-size: var(--s-small); color: #A9C8F0; max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
.mail.done .ai { max-height: 48px; }
.lab { font-size: var(--s-small); font-weight: 500; padding: 2px 9px; border-radius: 0 8px 0 0; white-space: nowrap; opacity: 0; transition: opacity .3s; }
.mail.done .lab { opacity: 1; }
.lab.order { background: #2F9E5E; color: var(--ink); }
.lab.urgent { background: var(--accent); color: var(--accent-ink); }
.lab.invoice { background: #A9C8F0; color: var(--ink); }
.lab.hr { background: #D9C3F0; color: var(--ink); }
.lab.info { background: #5B615E; color: #fff; }

/* ==========================================================================
   FEATURES: specimens on colour tiles
   ========================================================================== */
.features { padding: var(--gap-section) 0; }
.features-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 clamp(16px, 2vw, 32px); }
.features-head { grid-column: 1 / 4; }
.features-head h2 { font-size: var(--s-head); font-weight: 600; }
.features-head p { margin-top: 20px; max-width: 30ch; }
.tiles { grid-column: 4 / 13; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 10px; }
figure.tile { margin: 0; min-width: 0; }
.tile .art { aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--c); border-radius: 0 var(--r) 0 0; overflow: hidden; }
.tile.wide { grid-column: span 2; }
.tile.wide .art { aspect-ratio: 8 / 5; }
.tile .art > * { width: 78%; height: auto; max-height: 72%; }
.tile.wide .art > * { width: 84%; }
.tile h3 { font-size: var(--s-lead); font-weight: 500; margin-top: 16px; letter-spacing: -0.015em; }
.tile p { margin-top: 6px; color: var(--on-dark-muted); font-size: var(--s-body); }
@media (max-width: 1100px) { .features-head { grid-column: 1 / -1; margin-bottom: 40px; } .tiles { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 28px 8px; }
  .tile.wide { grid-column: 1 / -1; order: -1; }
  .tile h3 { font-size: var(--s-body); }
  .tile p { font-size: var(--s-small); }
}

/* ==========================================================================
   HOW IT WORKS: stages as one bar
   ========================================================================== */
.process { padding: var(--gap-section) 0; }
.process h2 { font-size: var(--s-display); max-width: 12ch; }
.stagebar { display: flex; gap: 6px; margin-top: 64px; }
.stage { flex: var(--w) 1 0; min-width: 18%; display: flex; flex-direction: column; gap: 18px; }
.stage .seg { height: 22vh; min-height: 150px; background: var(--c); color: var(--ink); padding: 20px; font-size: var(--s-lead); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; transform-origin: left center; }
.stage:last-child .seg { border-radius: 0 var(--r-lg) 0 0; }
.stage .seg.dark { background: var(--dark); color: var(--on-dark); }
.stage p { font-size: var(--s-body); max-width: 22ch; padding-right: 12px; }
.stage p b { font-weight: 600; }
.js .stagebar .seg { transform: scaleX(0); transition: transform 1s var(--ease); transition-delay: calc(var(--n) * 140ms); }
.js .stagebar.in .seg { transform: none; }
@media (max-width: 760px) {

  .stagebar { flex-direction: column; margin-top: 40px; }
  .stage { flex: none; min-width: 0; }
  .stage .seg { height: calc(var(--w) * 4.5svh); min-height: 72px; }
  .stage p { font-size: var(--s-body); max-width: none; }
  .js .stagebar .seg { transform-origin: top center; transform: scaleY(0); }
}

/* ==========================================================================
   PROOF: large marks on tiles (integrations, set in type)
   ========================================================================== */
.proof { padding: var(--gap-section) 0; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.board > * { aspect-ratio: 3 / 2; background: var(--paper-2); padding: 24px; }
.board .lead-tile { grid-column: span 2; aspect-ratio: auto; background: var(--accent); color: var(--accent-ink); border-radius: 0 var(--r-lg) 0 0; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.board .lead-tile h2 { font-size: var(--s-head); font-weight: 600; max-width: 14ch; }
.board .lead-tile p { max-width: 40ch; }
.board .name { font-size: var(--s-head); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.board .name small { font-size: var(--s-small); font-weight: 400; color: var(--muted); letter-spacing: 0; }
@media (max-width: 900px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .board .lead-tile { grid-column: 1 / -1; }
  .board .name { font-size: var(--s-lead); padding: 18px; }
}

/* ==========================================================================
   PRICING: two plans, two fields
   ========================================================================== */
.plans { display: grid; grid-template-columns: 5fr 7fr; }
.plan { min-height: 86svh; padding: clamp(28px, 3vw, 48px) var(--m) clamp(28px, 3vw, 48px); display: flex; flex-direction: column; }
.plan:first-child { padding-left: max(var(--m), calc((100vw - var(--max)) / 2 + var(--m))); }
.plan:last-child { padding-right: max(var(--m), calc((100vw - var(--max)) / 2 + var(--m))); }
.plan h2 { font-size: var(--s-display); font-weight: 500; }
.plan .who { font-size: var(--s-lead); max-width: 26ch; margin-top: 24px; line-height: 1.35; }
.plan .inc { max-width: 46ch; margin-top: 28px; }
.plan .foot { margin-top: auto; padding-top: 48px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.plan .figure { font-size: var(--s-display); font-weight: 500; letter-spacing: -0.04em; line-height: .9; }
.plan .figure small { font-size: var(--s-body); letter-spacing: 0; font-weight: 400; margin-left: 10px; }
.plan.dark { background: var(--dark); color: var(--on-dark); }

@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; }
  .plan { min-height: 70svh; padding: 32px 20px !important; }
  .plan.dark { order: -1; }


  .plan .foot .btn { width: 100%; }
}

/* ==========================================================================
   FAQ: accordion of filled tiles
   ========================================================================== */
.faq { padding: var(--gap-section) 0; }
.faq-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 32px; align-items: start; }
.faq h2 { font-size: var(--s-head); font-weight: 600; position: sticky; top: 96px; max-width: 10ch; }
.faq-list { display: grid; gap: 8px; }
.faq details { background: var(--grey-2); border-radius: 0 var(--r) 0 0; transition: background-color .25s; }
.faq summary {
  list-style: none; cursor: pointer; min-height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 24px; font-size: var(--s-lead); font-weight: 500; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 16px; height: 3px; background: currentColor; transition: transform .3s var(--ease); }
.faq summary .pm::after { transform: rotate(90deg); }
.faq details[open] { background: var(--accent); color: var(--accent-ink); }
.faq details[open] .pm::after { transform: rotate(0deg); }
.faq summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.faq .ans { padding: 0 24px 26px; font-size: var(--s-body); max-width: 52ch; }
@media (max-width: 900px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq h2 { position: static; max-width: none; }
  .faq summary { font-size: var(--s-body); min-height: 64px; padding: 16px 20px; }
  .faq .ans { font-size: var(--s-body); padding: 0 20px 22px; }
}

/* ==========================================================================
   CONTACT: clip-out coupon form
   ========================================================================== */
.contact { padding: clamp(96px, 9vw, 120px) 0; }
.coupon {
  --notch: 14px;
  width: calc(100% * 10 / 12); margin: 0 auto;
  min-height: 0; aspect-ratio: 2.2 / 1;
  display: grid; grid-template-columns: 46fr 54fr;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 0 var(--r-lg) 0 0;
  -webkit-mask: radial-gradient(circle var(--notch) at 46% 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at 46% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; /* taste-skill-ignore: notch mask, not a visible gradient */
          mask: radial-gradient(circle var(--notch) at 46% 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at 46% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; /* taste-skill-ignore: notch mask, not a visible gradient */
}
.coupon .stub { padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; border-right: 5px dotted var(--paper); }
.coupon h2 { font-size: var(--s-head); font-weight: 600; max-width: 14ch; }
.coupon .stub p { font-size: var(--s-body); max-width: 36ch; }
.coupon .stub a { font-weight: 500; }
.coupon form { padding: 40px 48px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.coupon input, .coupon textarea {
  width: 100%; min-height: 52px; padding: 14px 16px;
  background: var(--accent-soft); color: var(--ink);
  border: 2px solid transparent; border-radius: 0; outline: none;
  font: inherit; font-size: var(--s-body);
  transition: border-color .2s;
}
.coupon textarea { resize: vertical; min-height: 52px; height: 96px; }
.coupon input::placeholder, .coupon textarea::placeholder { color: #4A2414; }
.coupon input:focus-visible, .coupon textarea:focus-visible { border-color: var(--ink); }
.coupon input[aria-invalid="true"] { border-color: var(--ink); background: #FBB59B; }
.coupon .err { font-size: var(--s-small); font-weight: 500; min-height: 0; }
.coupon button[type="submit"] { min-height: 56px; background: var(--ink); color: var(--on-dark); border: 0; border-radius: 0 0 0 0; font-size: var(--s-body); font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background-color .2s; }
.coupon button[type="submit"]:hover { background: #2C302E; }
.coupon button svg { width: 18px; height: 18px; }
.coupon .note { font-size: var(--s-small); }
@media (max-width: 1100px) { .coupon { aspect-ratio: auto; width: 100%; } }
@media (max-width: 760px) {
  .coupon {
    grid-template-columns: 1fr; border-radius: 0 56px 0 0;
    -webkit-mask: radial-gradient(circle var(--notch) at 0 var(--cut, 40%), transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% var(--cut, 40%), transparent 98%, #000) right / 51% 100% no-repeat; /* taste-skill-ignore: notch mask */
            mask: radial-gradient(circle var(--notch) at 0 var(--cut, 40%), transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% var(--cut, 40%), transparent 98%, #000) right / 51% 100% no-repeat; /* taste-skill-ignore: notch mask */
  }
  .coupon .stub { padding: 32px 22px; border-right: 0; border-bottom: 5px dotted var(--paper); }
  .coupon form { padding: 28px 22px 32px; }
  .coupon input, .coupon textarea { min-height: 54px; }
}

/* ==========================================================================
   FOOTER: the mark, built large
   ========================================================================== */
.site-footer { padding: clamp(72px, 8vw, 120px) 0 32px; }
.bigmark { display: flex; align-items: flex-end; gap: clamp(16px, 3vw, 48px); height: 34svh; min-height: 220px; }
.bigmark svg { height: 100%; width: auto; flex-shrink: 0; }
.bigmark .name { font-size: var(--s-display); font-weight: 600; letter-spacing: -0.06em; line-height: .78; white-space: nowrap; }
.foot-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; margin-top: 56px; font-size: var(--s-small); }
.foot-links { grid-column: 1 / 9; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-links h3 { font-size: var(--s-small); font-weight: 500; color: var(--on-dark-muted); letter-spacing: 0; margin-bottom: 12px; }
.foot-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-links a { text-decoration: none; display: inline-block; padding: 6px 0; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-contact { grid-column: 9 / 13; display: grid; gap: 12px; align-content: start; justify-items: end; text-align: right; font-size: var(--s-body); }
.foot-contact a { font-weight: 500; }
.foot-last { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; font-size: var(--s-small); color: var(--on-dark-muted); }
@media (max-width: 900px) {
  .bigmark { height: auto; min-height: 0; gap: 14px; }
  .bigmark svg { width: 30%; height: auto; }
  .bigmark .name { font-size: 11vw; }

  .foot-links { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .foot-contact { grid-column: 1 / -1; justify-items: start; text-align: left; }
}

/* ==========================================================================
   SUB PAGES
   ========================================================================== */
.page-hero { position: relative; overflow: hidden; padding: clamp(56px, 10vh, 120px) 0 clamp(80px, 14vh, 160px); }
.page-hero .disc {
  position: absolute; z-index: 0; right: 0; top: 0;
  width: min(62vw, 92svh); aspect-ratio: 1;
  background: var(--accent);
  border-radius: 0 0 0 100%;
}
.page-hero .frame { position: relative; z-index: 1; }
.page-hero h1 { font-size: var(--s-display); letter-spacing: -0.04em; line-height: .98; max-width: 9.5ch; }
.page-hero .sub { font-size: var(--s-lead); max-width: 40ch; margin-top: 36px; line-height: 1.4; }
.page-hero .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 44px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: clamp(56px, 9vh, 104px); max-width: 860px; }
.facts div { background: var(--c, var(--paper)); padding: 20px 22px; }
.facts div:last-child { border-radius: 0 var(--r) 0 0; }
.facts b { display: block; font-size: var(--s-head); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.facts span { display: block; margin-top: 10px; font-size: var(--s-body); }
.facts-note { font-size: var(--s-small); margin-top: 12px; color: var(--muted); max-width: 70ch; }
@media (max-width: 760px) {
  .page-hero { padding-top: 0; }
  .page-hero .disc { position: relative; display: block; width: 72vw; margin: 0 0 32px auto; }

  .facts { grid-template-columns: 1fr; }
}

/* Demo sections */
.demo-sec { padding: var(--gap-section) 0; }
.demo-sec .intro-row { display: grid; grid-template-columns: 7fr 5fr; gap: 32px; align-items: end; margin-bottom: 48px; }
.demo-sec h2 { font-size: var(--s-display); max-width: 13ch; }
.demo-sec .intro-row p { max-width: 40ch; }
.demo { background: var(--dark); color: var(--on-dark); padding: clamp(16px, 2vw, 28px); border-radius: 0 var(--r-lg) 0 0; }
.demo-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-right: clamp(24px, 4vw, 80px); }
.demo-top b { font-weight: 500; }
.ctrls { display: flex; gap: 8px; flex-wrap: wrap; }
.ctrl { min-height: 44px; padding: 0 18px; border: 0; background: var(--dark-2); color: var(--on-dark); font-size: var(--s-body); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: background-color .2s; }
.ctrl:hover { background: #343937; }
.ctrl.primary { background: var(--accent); color: var(--accent-ink); border-radius: 0 18px 0 0; }
.ctrl.primary:hover { background: var(--accent-hover); }
.ctrl svg { width: 14px; height: 14px; }
.demo-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; }
.demo-body .belt-wrap { min-height: 320px; --ps: 88px; --travel: 230px; }
.side { display: grid; gap: 8px; align-content: start; }
.side .stat { background: var(--dark-2); padding: 14px 16px; }
.side .stat span { display: block; font-size: var(--s-small); color: var(--on-dark-muted); }
.side .stat b { display: block; font-size: var(--s-head); font-weight: 500; letter-spacing: -0.03em; }
.side .stat b.bad { color: var(--accent-soft); }
.side .stat b.good { color: #8FE0B0; }
.qlog { background: var(--dark-2); padding: 10px 14px; font-size: var(--s-small); color: var(--on-dark-muted); height: 150px; overflow: hidden; }
.qlog div { padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qlog .r { color: var(--accent-soft); }
@media (max-width: 900px) {
  .demo-sec .intro-row { grid-template-columns: 1fr; margin-bottom: 32px; }

  .demo-body { grid-template-columns: minmax(0, 1fr); }
  .demo-body .belt-wrap { min-height: 240px; --ps: 66px; --travel: 170px; }
  .side { grid-template-columns: 1fr 1fr; }
  .qlog { grid-column: 1 / -1; height: 120px; }
}

/* Predictive maintenance */
.pdm { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; }
.chart { background: var(--dark-2); padding: 16px; }
.chart svg { width: 100%; height: auto; }
.chart-key { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: var(--s-small); color: var(--on-dark-muted); margin-top: 8px; }
.chart-key i { display: inline-block; width: 16px; height: 4px; vertical-align: middle; margin-right: 6px; }
.assets { display: grid; gap: 8px; align-content: start; }
.asset { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; background: var(--dark-2); border: 2px solid transparent; padding: 12px 14px; text-align: left; min-height: 64px; transition: border-color .2s, background-color .2s; }
.asset:hover { background: #2C302E; }
.asset[aria-pressed="true"] { border-color: var(--accent); }
.asset b { font-size: var(--s-body); font-weight: 500; }
.asset small { grid-column: 1 / -1; font-size: var(--s-small); color: var(--on-dark-muted); }
.health { font-size: var(--s-small); font-weight: 500; padding: 2px 9px; border-radius: 0 8px 0 0; }
.health.g { background: #2F9E5E; color: var(--ink); }
.health.w { background: #F6C26B; color: var(--ink); }
.health.r { background: var(--accent); color: var(--accent-ink); }
.call { margin-top: 10px; padding: 16px 18px; background: #3A2A22; font-size: var(--s-body); line-height: 1.5; }
.call.ok { background: #1F3328; }
.call b { font-weight: 600; }
@media (max-width: 900px) { .pdm { grid-template-columns: minmax(0, 1fr); } .assets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .asset small { display: none; } }

/* Invoice demo */
.inv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.doc { background: var(--paper); color: var(--ink); padding: 24px; font-size: var(--s-small); line-height: 1.45; position: relative; }
.doc .d-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.doc .d-brand { font-weight: 600; font-size: var(--s-body); }
.doc .d-title { font-size: var(--s-head); font-weight: 500; letter-spacing: -0.03em; text-align: right; }
.doc .m { color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: var(--s-small); }
.doc th { text-align: left; font-weight: 500; padding: 7px 4px; border-bottom: 2px solid var(--ink); }
.doc td { padding: 7px 4px; border-bottom: 1px solid #D5D8D2; }
.doc .n { text-align: right; }
.doc .tot { display: grid; justify-content: end; gap: 3px; }
.doc .tot div { display: grid; grid-template-columns: 110px 96px; text-align: right; }
.doc .tot .g { font-weight: 600; font-size: var(--s-body); padding-top: 6px; border-top: 2px solid var(--ink); }
.hl { transition: background-color .3s, box-shadow .3s; }
.hl.on { background: rgba(244, 70, 17, .2); box-shadow: 0 0 0 2px var(--accent); } /* taste-skill-ignore: field highlight inside data-ui invoice */
.hl.done { background: rgba(47, 158, 94, .14); }
.doc .scan { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--accent); opacity: 0; }
.doc.scanning .scan { opacity: 1; animation: docScan 1.4s linear infinite; }
@keyframes docScan { to { transform: translateY(var(--doc-h, 420px)); } }
.extract { background: var(--dark-2); padding: 14px; display: flex; flex-direction: column; }
.extract .fields .f-row { background: #2B2F2D; }
.extract .fields .f-row.active { background: #3A2A22; }
.timing { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; font-size: var(--s-small); color: var(--on-dark-muted); }
.timing b { color: var(--on-dark); font-weight: 500; }
@media (max-width: 900px) { .inv { grid-template-columns: minmax(0, 1fr); } .doc { padding: 18px; font-size: var(--s-small); } .doc table { font-size: var(--s-small); } }
@media (max-width: 480px) { .f-row { grid-template-columns: 7em 1fr auto; } .doc .tot div { grid-template-columns: 80px 86px; } }

/* Inbox demo */
.inbox-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; }
.inbox-body .mails { gap: 6px; }
.inbox-body .mail { padding: 14px 16px; }
@media (max-width: 900px) { .inbox-body { grid-template-columns: minmax(0, 1fr); } .inbox-body .side { grid-template-columns: 1fr 1fr; } }

/* Use-case index with preview (signature move) */
.uses { padding: var(--gap-section) 0; }
.uses-head { display: grid; grid-template-columns: 7fr 5fr; gap: 32px; align-items: end; margin-bottom: 56px; }
.uses-head h2 { font-size: var(--s-display); max-width: 12ch; }
.uses-head p { max-width: 40ch; }
.uses-grid { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.uses-list { list-style: none; margin: 0; padding: 0; }
.use { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 18px 0; color: var(--on-dark); }
.use .nm { position: relative; display: block; font-size: var(--s-head); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; transition: color .24s; }
.use .im { display: block; margin-top: 6px; font-size: var(--s-body); color: var(--on-dark-muted); }
.uses-list.dim .use .nm { color: var(--on-dark-muted); }
.uses-list.dim .use.on .nm { color: var(--on-dark); }
.use .nm::before { content: ""; position: absolute; left: -0.75em; top: .3em; width: .5em; height: .5em; background: var(--accent); border-radius: 0 100% 0 0; opacity: 0; transform: scale(.96); transform-origin: bottom left; transition: transform .24s var(--ease), opacity .24s; vertical-align: .08em; }
.use.on .nm::before { transform: none; opacity: 1; }
.no-js .uses-list .detail { display: block; margin: 8px 0 24px; }
.no-js .preview { display: none; }
.preview { position: sticky; top: 32px; background: var(--paper); color: var(--ink); border-radius: 0 var(--r-lg) 0 0; padding: clamp(24px, 3vw, 40px); min-height: 520px; }
.preview .brief { display: flex; justify-content: space-between; gap: 12px; font-size: var(--s-small); color: var(--muted); margin-bottom: 14px; padding-right: 40px; }
.preview .detail .what { color: var(--ink); }
.preview .detail dt { color: var(--muted); }
.preview .detail dd.big { color: var(--ink); font-weight: 600; }
.preview .detail dd.big::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .4em; background: var(--accent); border-radius: 0 100% 0 0; }
.preview .pv { transition: opacity .24s; }
.preview .pv.fade { opacity: 0; }
.detail h3 { font-size: var(--s-head); font-weight: 500; }
.detail .what { margin-top: 18px; color: var(--on-dark); }
.detail dl { margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.detail dl .w { grid-column: 1 / -1; }
.detail dt { font-size: var(--s-small); color: var(--on-dark-muted); margin-bottom: 4px; }
.detail dd { margin: 0; font-size: var(--s-body); }
.detail dd.big { font-size: var(--s-lead); font-weight: 500; color: var(--accent-soft); line-height: 1.3; }
.uses-list .detail { display: none; }
@media (max-width: 1000px) {
  .uses-head { grid-template-columns: 1fr; }

  .uses-grid { grid-template-columns: 1fr; }
  .preview { display: none; }
  .uses-list .detail { margin-top: 4px; padding: 20px; background: var(--dark-2); border-radius: 0 var(--r) 0 0; }
  .uses-list li.open .detail, .no-js .uses-list .detail { display: block; }
  .use { cursor: pointer; padding: 18px 40px 18px 0; position: relative; }
  .use::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: var(--s-head); line-height: 1; color: var(--accent); }
  .uses-list li.open .use::after { content: "−"; }
  .uses-list .detail h3 { display: none; }
  .uses-list .detail .what { margin-top: 0; }
  .use .nm::before { display: none; }
}
@media (max-width: 520px) { .detail dl { grid-template-columns: 1fr; } }

/* CTA coupon on sub pages reuses .contact/.coupon */

/* ---------- Entrances ---------- */
.js .rv { opacity: .45; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 75ms); }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
  .js .stagebar .seg { transform: none; }
}

/* Hero: the open front folder holds the live feed */
.folder.front { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; overflow: hidden; }
.front-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.feed { background: var(--dark); color: var(--on-dark); padding: 20px 22px; border-radius: 0 var(--r) 0 0; min-height: 420px; }
.feed ul { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 12px; padding: 10px 0; font-size: var(--s-small); line-height: 1.45; animation: feedIn .5s var(--ease) both; }
.feed li + li { background: none; }
.feed time { color: var(--on-dark-muted); }
.feed .src { font-weight: 500; }
.feed .chip { display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: 0 6px 0 0; font-weight: 500; }
.feed .chip.f { background: var(--accent); color: var(--accent-ink); }
.feed .chip.o { background: #A9C8F0; color: var(--ink); }
.feed .res { display: block; color: var(--on-dark-muted); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .folder.front { grid-template-columns: 1fr; gap: 24px; }
  .folder.front .tab { left: 0; }
  .feed { min-height: 300px; }
}

.nw { white-space: nowrap; }

/* Sub page hero: a live fragment on the motif's stage */
.hero-ui { position: absolute; z-index: 2; right: max(var(--m), calc((100vw - var(--max)) / 2 + var(--m))); top: 50%; translate: 0 -42%; width: min(440px, 34vw); background: var(--dark); color: var(--on-dark); padding: 22px; border-radius: 0 var(--r) 0 0; }
.hero-ui .rows { display: grid; gap: 4px; }
.hero-ui .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; background: var(--dark-2); padding: 12px 14px; }
.hero-ui .row b { font-weight: 500; }
.hero-ui .row small { grid-column: 1 / -1; font-size: var(--s-small); color: var(--on-dark-muted); }
@media (max-width: 900px) {
  .page-hero { display: flex; flex-direction: column; }
  .page-hero .frame { order: 1; }
  .hero-ui { order: 2; position: relative; right: auto; top: auto; translate: none; width: auto; margin: 40px var(--m) 0; }
}


/* Pause control for looping fragments (Vercel guideline: autoplay > 5 s needs a pause) */
.ui-pause { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 2px 0 8px; background: none; border: 0; color: var(--on-dark-muted); font-size: var(--s-small); }
.ui-pause::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; }
.ui-pause[aria-pressed="true"]::before { animation: none; background: var(--on-dark-muted); }
.ui-pause:hover { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Lessons: claim and answer, on alternating tone bands */
.lessons { padding: var(--gap-section) 0; }
.lessons-head { display: grid; grid-template-columns: 7fr 5fr; gap: 32px; align-items: end; margin-bottom: 48px; }
.lessons-head h2 { font-size: var(--s-display); max-width: 12ch; }
.lessons-head p { max-width: 40ch; }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lesson-list li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; align-items: baseline; padding: 32px clamp(20px, 3vw, 40px); background: var(--paper-2); }
.g-grey .lesson-list li { background: var(--grey-2); }
.g-green .lesson-list li { background: var(--green-2); }
.lesson-list li:first-child { border-radius: 0 var(--r-lg) 0 0; }
.lesson-list h3 { font-size: var(--s-head); font-weight: 500; }
.lesson-list p { max-width: 58ch; }
@media (max-width: 900px) {
  .lessons-head { grid-template-columns: 1fr; margin-bottom: 32px; }
  .lesson-list li { grid-template-columns: 1fr; padding: 24px 20px; }
  .lesson-list li:first-child { border-radius: 0 56px 0 0; }
}

.preview .detail dl .pr { order: -1; }

/* Language switcher */
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: var(--s-small); font-weight: 600; letter-spacing: 0.02em; text-decoration: none; }
.lang:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar-hero .right { display: flex; align-items: center; gap: 6px; }
.bar-hero .right .lang { color: var(--on-dark); }
@media (max-width: 900px) { .bar-page nav .lang { padding: 14px 0; font-size: var(--s-lead); } }
@media (max-width: 900px) {
  .asset { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .asset .health { justify-self: start; }
}

/* Legal pages */
.legal { padding: clamp(48px, 8vh, 96px) 0 var(--gap-section); }
.legal .frame > * { max-width: 72ch; }
.legal h1 { font-size: var(--s-display); letter-spacing: -0.04em; line-height: .98; max-width: 14ch; }
.legal .lead { margin-top: 28px; }
.legal h2 { font-size: var(--s-lead); font-weight: 600; letter-spacing: -0.01em; margin-top: 48px; }
.legal p { margin-top: 14px; }
.legal p a, .legal dd a { font-weight: 500; }
.facts-list { margin: 40px 0 0; display: grid; gap: 6px; }
.facts-list div { display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr); gap: 8px 24px; padding: 16px 20px; background: var(--paper-2); }
.facts-list div:first-child { border-radius: 0 var(--r) 0 0; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; font-weight: 500; }
.todo { background: var(--accent); color: var(--accent-ink); padding: 0 6px; }
.coupon .note a { font-weight: 500; }
@media (max-width: 620px) { .facts-list div { grid-template-columns: 1fr; gap: 2px; } }
