/* Sufa Technologies. One stylesheet for every page. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  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";
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  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 {
  --bg: #f4f6fa;
  --white: #ffffff;
  --ink: #0b1b3a;
  --ink-2: #2c3a57;
  --muted: #56637c;
  --line: #dce2eb;
  --line-2: #c9d1de;
  --cobalt: #0066ff;
  --cobalt-ink: #0052d6;
  --deep: #0a2f9e;
  --navy: #0a1a3f;
  --navy-2: #13275a;
  --on-navy: #ffffff;
  --on-navy-muted: #aab7d4;
  --sky: #6aa6ff;
  --live: #0e9f62;
  --live-ink: #0a7a4b;
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(18px, 4.5vw, 56px);
  --max: 1320px;
  --head: 68px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --spring: cubic-bezier(0.34, 1.5, 0.5, 1);
  --shadow: 0 1px 2px rgba(11, 27, 58, 0.06), 0 12px 32px -12px rgba(11, 27, 58, 0.18);
  --shadow-lg: 0 2px 4px rgba(11, 27, 58, 0.06), 0 30px 60px -24px rgba(11, 27, 58, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 16px); }
body {
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--cobalt); color: var(--white); }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  font-weight: 600;
  border-radius: 6px;
}
.skip:focus { top: 12px; }

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

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.site-head.is-scrolled { box-shadow: 0 8px 24px -16px rgba(11, 27, 58, 0.3); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--head); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 36px; height: auto; transition: transform 0.5s var(--spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand-word { font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.16em; }
.brand-word b { color: var(--cobalt); font-weight: 700; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
}
.site-nav a:not(.lang)::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 6px;
  height: 2px;
  background: var(--cobalt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav a[aria-current="true"] { color: var(--ink); }
.site-nav .lang {
  margin-left: 8px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.site-nav .lang:hover { background: var(--ink); color: var(--white); }
.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--cobalt);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}
@media (max-width: 1020px) { .site-nav .opt { display: none; } }
@media (max-width: 560px) {
  .site-nav .opt-s { display: none; }
  .site-nav a { padding: 0 8px; font-size: 0.875rem; }
  .site-nav a:not(.lang)::after { left: 8px; right: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 30px; }
  .brand-word { font-size: 0.9375rem; letter-spacing: 0.12em; }
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.25s, transform 0.4s var(--spring), box-shadow 0.3s;
}
.btn:hover { background: var(--cobalt); transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(0, 102, 255, 0.6); }
.btn:active { transform: translateY(0); }
.btn .arr, .text-link .arr {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.35s var(--spring);
}
.btn .arr::after, .text-link .arr::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  box-sizing: border-box;
}
.btn:hover .arr, .text-link:hover .arr { transform: translateX(5px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--white); }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 0.9375rem; }
.ext::after { content: "\2197"; font-weight: 500; margin-left: 2px; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.text-link span:first-child {
  background: linear-gradient(var(--cobalt), var(--cobalt)) no-repeat 0 100% / 0 2px;
  transition: background-size 0.35s var(--ease);
  padding-bottom: 2px;
}
.text-link:hover span:first-child { background-size: 100% 2px; }

/* ---------- Section scaffolding ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.sec-head { margin-bottom: clamp(36px, 5vw, 72px); max-width: 900px; }
.sec-index {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.sec-index span {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 24px;
  padding: 0 8px;
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--cobalt);
  clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%);
}
.sec-title {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 22ch;
  text-wrap: balance;
}
.sec-lead {
  margin-top: 22px;
  max-width: 60ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--white);
  padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(11, 27, 58, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 27, 58, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 35%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 35%, #000 25%, transparent 75%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 980px) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .hero-visual { width: 112%; max-width: 720px; justify-self: start; }
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 26px;
}
.tick { width: 26px; height: 12px; background: var(--cobalt); transform: skewX(-22deg); flex-shrink: 0; }
.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 4.25rem);
  font-weight: 600;
  font-stretch: 94%;
  text-wrap: balance;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero-title .ln { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.04em; }
.hero-title .ln > span { display: block; }
.hero-title em { font-style: normal; color: var(--cobalt); }
.hero-lead {
  margin-top: clamp(22px, 3vw, 32px);
  max-width: 54ch;
  font-size: clamp(1.0625rem, 1.45vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
}
.hero-actions { margin-top: clamp(28px, 3.5vw, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

/* Device composition */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1 / 0.92;
  justify-self: center;
  --px: 0;
  --py: 0;
}
.ribbon {
  position: absolute;
  background: linear-gradient(160deg, var(--cobalt) 0%, var(--deep) 100%);
  transform: skewX(-22deg);
  border-radius: 6px;
}
.ribbon.r1 { left: 16%; top: 30%; width: 15%; height: 74%; translate: calc(var(--px) * -10px) calc(var(--py) * -8px); }
.ribbon.r2 { left: 74%; top: 52%; width: 9%; height: 50%; background: linear-gradient(160deg, #3d86ff 0%, var(--cobalt) 100%); opacity: 0.9; translate: calc(var(--px) * -16px) calc(var(--py) * -12px); }
.device { position: absolute; }
.dev-browser { right: 0; top: 6%; width: 86%; translate: calc(var(--px) * 8px) calc(var(--py) * 6px); }
.dev-a { left: 0; bottom: 0; width: 31%; translate: calc(var(--px) * 18px) calc(var(--py) * 14px); }
.dev-b { left: 36%; bottom: -3%; width: 31%; translate: calc(var(--px) * 26px) calc(var(--py) * 20px); }
.dev-inner { transition: transform 0.6s var(--spring); }

.browser {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(11, 27, 58, 0.08);
  overflow: hidden;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  background: #eef1f6;
  border-bottom: 1px solid var(--line);
}
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: #c7cfdc; }
.browser-bar i:first-child { background: #ff6159; }
.browser-bar i:nth-child(2) { background: #ffbd2e; }
.browser-bar i:nth-child(3) { background: #28c941; }
.browser img { width: 100%; }
.phone {
  position: relative;
  aspect-ratio: 540 / 1173;
  border-radius: 13% / 6%;
  background: var(--white);
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 6px #34405a, var(--shadow-lg);
  overflow: hidden;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
/* Dynamic Island: 31% of the screen width, 29% as tall as wide, 3% of the screen width below the top edge (top % is of the height, hence .0138 = .03 / (1173 / 540)) */
.phone::before { content: ""; position: absolute; z-index: 2; top: 1.38%; left: 50%; width: 31%; aspect-ratio: 100 / 29; translate: -50% 0; background: #05070b; border-radius: 999px; pointer-events: none; }

/* Product board */
.board {
  position: relative;
  margin-top: clamp(48px, 6vw, 80px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.board-title { font-size: 1rem; font-weight: 600; }
.board-note { font-size: 0.875rem; color: var(--muted); }
.board table { width: 100%; border-collapse: collapse; }
.board th, .board td { text-align: left; padding: 16px 24px; vertical-align: middle; }
.board thead th { font-size: 0.8125rem; font-weight: 600; color: var(--muted); background: #f8f9fc; border-bottom: 1px solid var(--line); }
.board tbody tr { border-top: 1px solid var(--line); transition: background-color 0.2s; }
.board tbody tr:first-child { border-top: 0; }
.board tbody tr:hover { background: #f7f9fd; }
.board tbody th a { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.0625rem; text-decoration: none; }
.board tbody th a:hover span { color: var(--cobalt-ink); }
.board tbody th img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; box-shadow: 0 0 0 1px var(--line); background: var(--white); }
.board tbody th img.pad { padding: 4px; }
.board td { color: var(--ink-2); font-size: 0.9688rem; }
.board td .status { display: flex; }
@media (max-width: 760px) {
  .board thead { display: none; }
  .board table, .board tbody, .board tr, .board th, .board td { display: block; }
  .board tbody tr { padding: 16px 20px; }
  .board th, .board td { padding: 0; }
  .board td { margin-top: 6px; display: flex; gap: 10px; }
  .board td::before { content: attr(data-label); min-width: 84px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; padding-top: 2px; }
  .board-head { padding: 16px 20px; }
}

/* Status markers */
.status { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 0.9375rem; color: var(--ink-2); }
.status::before {
  content: "";
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--muted);
}
.status.live { color: var(--live-ink); }
.status.live::before { background: var(--live); box-shadow: 0 0 0 0 rgba(14, 159, 98, 0.5); }
.status.soon::before { box-shadow: inset 0 0 0 2px var(--cobalt); background: rgba(0, 102, 255, 0.15); }
.status.dev::before { box-shadow: inset 0 0 0 2px var(--muted); background: repeating-linear-gradient(-45deg, var(--muted) 0 1.5px, transparent 1.5px 3.5px); }

/* ---------- Company ---------- */
.company { background: var(--bg); }
.company-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); }
@media (min-width: 960px) { .company-grid { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr); align-items: start; } }
.company-text p { font-size: clamp(1.0625rem, 1.35vw, 1.1875rem); color: var(--ink-2); max-width: 62ch; }
.company-text p + p { margin-top: 1.1em; }
.company-text p:first-child { font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.42; color: var(--ink); letter-spacing: -0.01em; }
.facts {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 26px 10px;
  box-shadow: var(--shadow);
}
.facts h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.facts h3::before { content: ""; width: 18px; height: 9px; background: var(--cobalt); transform: skewX(-22deg); }
.facts div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.facts div:first-of-type { border-top: 0; }
.facts dt { font-size: 0.875rem; color: var(--muted); font-weight: 500; }
.facts dd { font-size: 0.9688rem; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 480px) { .facts div { grid-template-columns: 1fr; gap: 2px; } .facts { padding: 22px 20px 6px; } }
.facts dd a { color: var(--cobalt-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.areas { margin-top: clamp(64px, 8vw, 112px); }
.areas-title { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 22px; }
.area-list { border-top: 2px solid var(--ink); counter-reset: area; }
.area {
  position: relative;
  display: grid;
  gap: 6px 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-2);
}
.area::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--cobalt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.area:hover::before { transform: scaleX(1); }
.area-n { font-size: 0.875rem; font-weight: 700; color: var(--cobalt-ink); font-variant-numeric: tabular-nums; padding-top: 6px; }
.area h4 { font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.area p { color: var(--muted); max-width: 60ch; }
.area-tag { font-size: 0.9375rem; font-weight: 600; color: var(--ink); text-decoration: none; align-self: start; padding-top: 4px; display: inline-flex; gap: 8px; align-items: center; }
a.area-tag:hover { color: var(--cobalt-ink); }
@media (min-width: 900px) {
  .area { grid-template-columns: 56px minmax(0, 0.9fr) minmax(0, 1.3fr) 120px; align-items: start; padding: 30px 0; }
  .area-tag { justify-self: end; }
}

/* ---------- Products ---------- */
.products { background: var(--white); padding-bottom: 0; }
.prod-nav {
  position: sticky;
  top: var(--head);
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.prod-nav .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.pn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 12px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  transition: color 0.25s;
}
.pn + .pn { border-left: 1px solid var(--line); }
.pn img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; box-shadow: 0 0 0 1px var(--line); background: var(--white); transition: transform 0.45s var(--spring); }
.pn img.pad { padding: 3px; }
.pn small { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.pn:hover, .pn[aria-current="true"] { color: var(--ink); }
.pn:hover img, .pn[aria-current="true"] img { transform: scale(1.1) rotate(-4deg); }
.pn-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--cobalt); transform-origin: left; transform: scaleX(0); }
.pn[aria-current="true"] .pn-bar { transform: scaleX(var(--p, 1)); }
@media (max-width: 640px) {
  .pn { flex-direction: column; justify-content: center; gap: 4px; min-height: 64px; padding: 6px 4px; font-size: 0.875rem; }
  .pn small { display: none; }
  .pn img { width: 24px; height: 24px; border-radius: 6px; }
}

.chapter { padding: clamp(64px, 8vw, 120px) 0; border-bottom: 1px solid var(--line); }
.chapter:last-child { border-bottom: 0; }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); align-items: start; }
@media (min-width: 900px) {
  .chapter-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .chapter.flip .stage-col { order: 2; }
  .chapter.wide .chapter-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .stage-col { position: sticky; top: calc(var(--head) + 64px + 32px); }
}

/* Stage: phone screens (one visible at a time on wide screens, a swipe row on narrow ones) */
.stage { position: relative; }
.stage-phones {
  position: relative;
  width: min(100%, 330px);
  margin: 0 auto;
  aspect-ratio: 540 / 1173;
}
.stage-phones .phone {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}
.stage-phones .phone img { transform: translateY(18px) scale(0.985); transition: transform 0.7s var(--spring); }
.stage-phones .phone.is-on { visibility: visible; opacity: 1; transition: opacity 0.45s var(--ease), visibility 0s; }
.stage-phones .phone.is-on img { transform: none; }
.stage-back {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 58%;
  height: 84%;
  translate: -50% 0;
  background: linear-gradient(165deg, rgba(0, 102, 255, 0.14), rgba(0, 102, 255, 0.04));
  transform: skewX(-22deg);
  border-radius: 8px;
}
.chapter[data-product="fiscbox"] .stage-back { background: linear-gradient(165deg, rgba(10, 47, 158, 0.14), rgba(10, 47, 158, 0.03)); }
.stage-dots { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.stage-dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--line-2); transition: background-color 0.3s, width 0.4s var(--spring); }
.stage-dots i.is-on { background: var(--cobalt); width: 34px; }
@media (max-width: 899px) {
  .stage { margin: 0 calc(var(--gutter) * -1); }
  .stage-phones {
    display: flex;
    gap: 18px;
    width: auto;
    aspect-ratio: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px var(--gutter) 22px;
    scrollbar-width: none;
  }
  .stage-phones::-webkit-scrollbar { display: none; }
  .stage-phones .phone { position: relative; inset: auto; flex: 0 0 auto; width: min(58vw, 240px); visibility: visible; opacity: 1; scroll-snap-align: center; margin: 6px; }
  .stage-phones .phone img { transform: none; }
  .stage-back, .stage-dots { display: none; }
}

/* Stage: browser with a highlight that follows the active capability */
.stage-browser { position: relative; }
.stage-browser .shot-wrap { position: relative; }
.hl {
  position: absolute;
  border: 2px solid var(--cobalt);
  background: rgba(0, 102, 255, 0.1);
  border-radius: 6px;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.12);
  opacity: 0;
  left: 0.6%; top: 16%; width: 14.6%; height: 21%;
  transition: left 0.6s var(--spring), top 0.6s var(--spring), width 0.6s var(--spring), height 0.6s var(--spring), opacity 0.3s;
  pointer-events: none;
}
.js .stage-browser .hl { opacity: 1; }
.stage-browser[data-cap="1"] .hl { left: 0.6%; top: 16%; width: 14.6%; height: 21.2%; }
.stage-browser[data-cap="2"] .hl { left: 0.6%; top: 41.6%; width: 14.6%; height: 8.8%; }
.stage-browser[data-cap="3"] .hl { left: 0.6%; top: 54.4%; width: 14.6%; height: 8.6%; }
.stage-browser[data-cap="4"] .hl { left: 0.6%; top: 67.2%; width: 14.6%; height: 8.6%; }
.stage-browser[data-cap="5"] .hl { left: 17.2%; top: 33.8%; width: 82.2%; height: 13.6%; }
.stage-caption { margin-top: 16px; font-size: 0.875rem; color: var(--muted); }

/* Chapter body */
.ch-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.ch-icon { width: 68px; height: 68px; border-radius: 17px; object-fit: contain; box-shadow: 0 0 0 1px var(--line), var(--shadow); background: var(--white); flex-shrink: 0; }
.ch-icon.pad { padding: 9px; }
.ch-name { font-size: clamp(2.25rem, 4.4vw, 3.5rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; margin-bottom: 8px; }
.ch-tagline { font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; max-width: 30ch; }
.ch-text { margin-top: 16px; color: var(--ink-2); max-width: 62ch; }
.ch-for { margin-top: 16px; color: var(--muted); max-width: 62ch; font-size: 0.9688rem; padding-left: 16px; border-left: 3px solid var(--cobalt); }
.ch-for strong { color: var(--ink); font-weight: 600; }

.caps { margin-top: clamp(28px, 3vw, 40px); counter-reset: cap; border-top: 1px solid var(--line); }
.cap {
  position: relative;
  counter-increment: cap;
  padding: 22px 0 22px 58px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s;
}
.cap::before {
  content: counter(cap, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 23px;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  transition: color 0.3s;
}
.cap::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 22px;
  bottom: 22px;
  width: 4px;
  background: var(--cobalt);
  transform: skewX(-12deg) scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--spring);
}
.cap h4 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.cap p { margin-top: 6px; color: var(--muted); max-width: 60ch; transition: color 0.3s; }
.js .cap.is-on::before { color: var(--cobalt-ink); }
.js .cap.is-on::after { transform: skewX(-12deg) scaleY(1); }
.js .cap.is-on p { color: var(--ink-2); }
@media (min-width: 900px) {
  .cap { padding-top: 28px; padding-bottom: 28px; }
  .cap::before { top: 29px; }
  .cap::after { top: 28px; bottom: 28px; }
}
.pro { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: var(--cobalt-ink); vertical-align: 2px; margin-left: 6px; }

.ch-meta { margin-top: clamp(28px, 3vw, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.ch-meta div { padding: 14px 0; border-top: 1px solid var(--line-2); }
@media (max-width: 480px) { .ch-meta { grid-template-columns: 1fr; } }
.ch-meta dt { font-size: 0.8125rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.ch-meta dd { font-size: 0.9688rem; font-weight: 500; color: var(--ink); }
.ch-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.ch-note { margin-top: 24px; font-size: 0.9375rem; color: var(--muted); }

/* ---------- Approach (navy band) ---------- */
.approach {
  background: var(--navy);
  color: var(--on-navy);
  clip-path: polygon(0 clamp(24px, 4vw, 64px), 100% 0, 100% 100%, 0 100%);
  margin-top: calc(clamp(24px, 4vw, 64px) * -1);
  padding-top: calc(clamp(72px, 10vw, 140px) + clamp(24px, 4vw, 64px));
  overflow: hidden;
}
.approach::before {
  content: "";
  position: absolute;
  right: -6%;
  top: 0;
  width: 38%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.22), rgba(0, 102, 255, 0));
  transform: skewX(-22deg);
  pointer-events: none;
}
.approach .sec-index { color: var(--on-navy-muted); }
.approach .sec-lead { color: var(--on-navy-muted); }
.approach .wrap { position: relative; }
.ledger { border-top: 1px solid rgba(255, 255, 255, 0.22); }
.ledger-row {
  position: relative;
  display: grid;
  gap: 18px 48px;
  padding: clamp(28px, 3.5vw, 44px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
@media (min-width: 900px) { .ledger-row { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.6fr); } }
.ledger-row h3 { display: flex; align-items: baseline; gap: 16px; font-size: clamp(1.375rem, 2.3vw, 1.875rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ledger-row h3 span { font-size: 0.9375rem; font-weight: 700; color: var(--sky); font-variant-numeric: tabular-nums; }
.ledger-row ul { display: grid; gap: 4px; }
.ledger-row li {
  position: relative;
  padding: 10px 0 10px 30px;
  color: #dbe3f4;
  font-size: clamp(1rem, 1.25vw, 1.0938rem);
  max-width: 66ch;
}
.ledger-row li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 12px;
  height: 7px;
  background: var(--sky);
  transform: skewX(-22deg);
}
.ledger-row li strong { color: var(--white); font-weight: 600; }

/* ---------- Technology ---------- */
.tech { background: var(--white); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tech-grid { gap: 16px; }
.tech-grid .tile { padding: 22px 22px 20px; }
.tech-grid .tile strong { font-size: 1.125rem; }
.tech-grid .tile span { margin-top: 6px; }
.tile {
  position: relative;
  padding: 16px 18px 15px;
  background: var(--bg);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--spring), box-shadow 0.3s, background-color 0.3s;
}
.tile:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); background: var(--white); }
.tile strong { display: block; font-weight: 600; font-size: 1.0313rem; letter-spacing: -0.01em; }
.tile span { display: block; color: var(--muted); font-size: 0.9375rem; margin-top: 2px; line-height: 1.45; }
.tile small { display: block; margin-top: 10px; font-size: 0.8125rem; font-weight: 600; color: var(--cobalt-ink); }

/* ---------- Studio ---------- */
.studio { background: var(--bg); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
@media (min-width: 980px) { .studio-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.studio-copy .big { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--ink-2); margin-top: 26px; }
.studio-copy .big strong { color: var(--ink); }
.studio-copy .small { margin-top: 20px; color: var(--muted); font-size: 0.9688rem; }
.studio-copy a, .doc a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.studio-copy a:hover, .doc a:hover { color: var(--cobalt-ink); }

.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1.05fr) 44px minmax(0, 1fr);
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
}
.pipe-box { border-radius: 10px; padding: 16px; font-size: 0.9375rem; line-height: 1.4; }
.pipe-src { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.pipe-src b, .pipe-dest b { display: block; font-size: 0.8125rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.pipe-hub { background: var(--navy); color: var(--white); text-align: center; padding: 20px 14px; }
.pipe-hub img { width: 44px; margin: 0 auto 10px; filter: drop-shadow(0 4px 10px rgba(0, 102, 255, 0.4)); }
.pipe-hub span { display: block; font-weight: 600; }
.pipe-hub small { display: block; font-size: 0.8125rem; color: var(--on-navy-muted); margin-top: 4px; }
.pipe-line {
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--cobalt) 0 8px, transparent 8px 14px);
  background-size: 14px 2px;
}
.pipe-dest .channels-title { font-size: 0.8125rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.channels { display: grid; gap: 6px; }
.channels li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem;
  font-weight: 600;
}
.channels li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); flex-shrink: 0; }
@media (max-width: 640px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipe-line { width: 2px; height: 30px; margin: 0 auto; background: repeating-linear-gradient(180deg, var(--cobalt) 0 8px, transparent 8px 14px); background-size: 2px 14px; }
}

/* ---------- Contact ---------- */
.contact { background: var(--white); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); }
@media (min-width: 980px) { .contact-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; } }
.mail-link {
  display: inline-block;
  font-size: clamp(1.375rem, 3.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--cobalt), var(--cobalt)) no-repeat 0 100% / 100% 3px;
  padding: 0 0 8px;
  transition: background-size 0.45s var(--ease), color 0.3s;
}
.mail-link:hover { background-size: 100% 100%; color: var(--white); }
.contact-intro { margin-top: 22px; color: var(--muted); max-width: 52ch; }
.contact-list div { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .contact-list div { grid-template-columns: 200px 1fr; gap: 20px; } }
.contact-list dt { font-size: 0.9063rem; color: var(--muted); }
.contact-list dd { font-weight: 500; overflow-wrap: anywhere; }
.contact-list dd a { text-decoration: underline; text-decoration-color: var(--cobalt); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.contact-list dd a:hover { color: var(--cobalt-ink); }
.contact-list address { font-style: normal; }

/* ---------- Simple page hero (404) ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--white); padding: clamp(80px, 12vw, 160px) 0; border-bottom: 1px solid var(--line); }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; margin-top: 4px; }
.page-hero .hero-lead { max-width: 52ch; }
.page-code { font-size: 0.9375rem; font-weight: 700; color: var(--cobalt-ink); display: flex; gap: 12px; align-items: center; }
.cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Legal pages ---------- */
.legal-head { position: relative; overflow: hidden; background: var(--white); padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.legal-head .wrap { position: relative; }
.legal-head h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; margin-top: 10px; }
.legal-head .meta { margin-top: 14px; color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.legal-lead { margin-top: 20px; max-width: 62ch; font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); color: var(--ink-2); }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(64px, 9vw, 120px); }
@media (min-width: 960px) {
  .doc-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 72px; align-items: start; }
  .toc { position: sticky; top: calc(var(--head) + 28px); }
}
.toc { background: var(--bg); border-radius: 12px; padding: 20px 20px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.toc-title { font-size: 0.875rem; font-weight: 700; margin-bottom: 8px; }
.toc li a { display: block; padding: 6px 0; font-size: 0.9375rem; color: var(--ink-2); text-decoration: none; border-top: 1px solid var(--line); }
.toc li:first-child a { border-top: 0; }
.toc li a:hover { color: var(--cobalt-ink); }
@media (max-width: 959px) {
  .toc ul { columns: 2; column-gap: 24px; }
  .toc li { break-inside: avoid; }
  .toc li a { border-top: 0; }
}
@media (max-width: 480px) { .toc ul { columns: 1; } }
.doc { max-width: 74ch; }
.doc section { padding-top: 8px; }
.doc section + section { margin-top: 36px; }
.doc h2 { display: flex; align-items: baseline; gap: 14px; font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 14px; }
.doc h2 span { flex-shrink: 0; min-width: 30px; height: 24px; display: inline-grid; place-items: center; padding: 0 7px; font-size: 0.8125rem; font-weight: 700; color: var(--white); background: var(--cobalt); clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%); transform: translateY(-3px); }
.doc h3 { font-size: 1.125rem; font-weight: 600; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink-2); margin-bottom: 12px; font-size: 1.0313rem; }
.doc strong { color: var(--ink); }
.doc ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 16px; }
.doc li::marker { color: var(--cobalt); }
.summary { background: var(--bg); border-radius: 14px; padding: 24px 26px 12px; box-shadow: inset 0 0 0 1px var(--line); border-left: 4px solid var(--cobalt); }
.summary h2 { font-size: 1.25rem; }

/* ---------- Footer ---------- */
.site-foot { background: var(--navy); color: var(--on-navy-muted); font-size: 0.9375rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: clamp(56px, 7vw, 88px); padding-bottom: 40px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); } }
.foot-brand .brand { color: var(--white); }
.foot-brand p { margin-top: 18px; max-width: 38ch; line-height: 1.55; }
.foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
@media (min-width: 640px) { .foot-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.foot-h { color: var(--white); font-weight: 600; margin-bottom: 12px; font-size: 0.9375rem; }
.foot-nav li + li { margin-top: 8px; }
.foot-nav a { text-decoration: none; transition: color 0.2s; }
.foot-nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.foot-nav .soon { opacity: 0.75; }
.foot-base {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.875rem;
}
.foot-base a { text-decoration: none; }
.foot-base a:hover { color: var(--white); }

/* ---------- Motion (only when welcome) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .ln > span { animation: rise 1s var(--ease) both; }
  .hero-title .ln:nth-child(2) > span { animation-delay: 0.1s; }
  .hero-kicker { animation: fade-up 0.8s var(--ease) both; }
  .hero-lead { animation: fade-up 0.8s var(--ease) 0.3s both; }
  .hero-actions { animation: fade-up 0.8s var(--ease) 0.42s both; }
  .hero-grid { animation: grid-in 1.6s var(--ease) both; }
  .ribbon { animation: ribbon-in 1.1s var(--spring) 0.15s both; }
  .ribbon.r2 { animation-delay: 0.28s; }
  .dev-browser .dev-inner { animation: pop-in 1s var(--spring) 0.3s both, float 9s ease-in-out 1.4s infinite; }
  .dev-a .dev-inner { animation: pop-in 1s var(--spring) 0.5s both, float 7s ease-in-out 1.6s infinite; }
  .dev-b .dev-inner { animation: pop-in 1s var(--spring) 0.65s both, float 8s ease-in-out 1.9s infinite reverse; }
  .device:hover .dev-inner { animation-play-state: paused; }
  .status.live::before { animation: ping 2.4s ease-out infinite; }
  .pipe-line { animation: flow 0.7s linear infinite; }
  @media (max-width: 640px) { .pipe-line { animation-name: flow-y; } }

  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.9s var(--spring); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .sec-title.reveal { transform: translateY(0.5em); clip-path: inset(0 0 100% 0); transition: opacity 0.6s var(--ease), transform 0.9s var(--ease), clip-path 0.9s var(--ease); }
  .js .sec-title.reveal.in { clip-path: inset(-20% -5% -20% -5%); }
  .js .area.reveal:nth-child(2), .js .ledger-row.reveal:nth-child(2) { transition-delay: 0.06s; }
  .js .area.reveal:nth-child(3), .js .ledger-row.reveal:nth-child(3) { transition-delay: 0.12s; }
  .js .area.reveal:nth-child(4), .js .ledger-row.reveal:nth-child(4) { transition-delay: 0.18s; }
  .js .tiles.reveal .tile { opacity: 0; transform: translateY(18px) scale(0.97); transition: opacity 0.5s var(--ease), transform 0.7s var(--spring), box-shadow 0.3s, background-color 0.3s; }
  .js .tiles.reveal { opacity: 1; transform: none; }
  .js .tiles.reveal.in .tile { opacity: 1; transform: none; }
  .js .tiles.reveal.in .tile:nth-child(2) { transition-delay: 0.06s, 0.06s, 0s, 0s; }
  .js .tiles.reveal.in .tile:nth-child(3) { transition-delay: 0.12s, 0.12s, 0s, 0s; }
  .js .tiles.reveal.in .tile:nth-child(4) { transition-delay: 0.18s, 0.18s, 0s, 0s; }
  .js .tiles.reveal.in .tile:nth-child(5) { transition-delay: 0.24s, 0.24s, 0s, 0s; }
  .js .tiles.reveal.in .tile:nth-child(6) { transition-delay: 0.3s, 0.3s, 0s, 0s; }
  .js .channels.reveal li { opacity: 0; transform: translateX(-12px); transition: opacity 0.4s var(--ease), transform 0.6s var(--spring); }
  .js .channels.reveal { opacity: 1; transform: none; }
  .js .channels.reveal.in li { opacity: 1; transform: none; }
  .js .channels.reveal.in li:nth-child(2) { transition-delay: 0.08s; }
  .js .channels.reveal.in li:nth-child(3) { transition-delay: 0.16s; }
  .js .channels.reveal.in li:nth-child(4) { transition-delay: 0.24s; }
  .js .channels.reveal.in li:nth-child(5) { transition-delay: 0.32s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes grid-in { from { opacity: 0; background-position: 0 30px; } }
@keyframes ribbon-in { from { opacity: 0; transform: skewX(-22deg) translateY(40px) scaleY(0.6); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(48px) scale(0.92); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(14, 159, 98, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(14, 159, 98, 0); } }
@keyframes flow { to { background-position: 14px 0; } }
@keyframes flow-y { to { background-position: 0 14px; } }
.ch-note a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--cobalt); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.ch-note a:hover { color: var(--cobalt-ink); }
@media (max-width: 899px) {
  .chapter-grid { gap: 0; }
  .chapter-body { display: contents; }
  .ch-head { order: -1; }
  .stage-col { margin: 4px 0 28px; }
}
@media (max-width: 560px) {
  .cap { padding-left: 42px; }
  .cap::after { left: 26px; width: 3px; }
  .tile { padding: 14px 16px 13px; }
}
.site-foot .brand img, .pipe-hub img { background: var(--white); border-radius: 10px; padding: 6px; filter: none; }
.site-foot .brand img { width: 42px; }
.pipe-hub img { width: 50px; }

/* OAuth callback page (tiktok-callback.html) */
.legal { width: calc(100% - 2 * var(--gutter)); max-width: 760px; margin: clamp(40px, 7vw, 88px) auto; padding: clamp(28px, 4vw, 48px); background: var(--white); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
body:has(.legal) { background: var(--bg); }
.legal h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 16px; }
.legal h2 { font-size: 1.375rem; font-weight: 600; margin-bottom: 12px; }
.legal p { color: var(--ink-2); margin-bottom: 14px; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.legal code { font-size: 0.9em; background: var(--bg); padding: 2px 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line); overflow-wrap: anywhere; }
.legal a { color: var(--cobalt-ink); }
.legal-links { margin-top: 24px; font-size: 0.9375rem; }

/* 404: one page for both languages */
.nf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }
@media (min-width: 900px) { .nf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } .nf-block + .nf-block { border-left: 1px solid var(--line); padding-left: 72px; } }
@media (max-width: 899px) { .nf-block + .nf-block { border-top: 1px solid var(--line); padding-top: 48px; } }
.nf-block h1, .nf-block h2 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; margin-top: 4px; }
.nf-block .hero-lead { margin-top: 18px; }
.site-foot .foot-base:only-child { border-top: 0; padding-top: 28px; }
