/* Slate Cue website
 * Slate + off-white base, one teal accent. Light/dark follow the system.
 * Text/background pairs are chosen for WCAG AA contrast in both themes.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #526073;
  --line: #dde3ea;
  --line-strong: #c5cfda;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-soft: #e2f4f1;
  --accent-ink: #0b5c56;
  --on-accent: #ffffff;
  --focus: #0f766e;
  --shadow: 0 1px 2px rgb(15 23 42 / .05), 0 8px 24px -12px rgb(15 23 42 / .18);
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --ok-bg: #e2f4f1;   --ok-ink: #0b5c56;
  --warn-bg: #fdf1d8; --warn-ink: #7a4a05;
  --road-bg: #e9eaf7; --road-ink: #3f3f86;
  --err-bg: #fdecec;  --err-ink: #a11d1d;
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1180px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2c;
    --surface-2: #17223a;
    --ink: #e7ecf3;
    --ink-2: #c6d0dd;
    --muted: #9aa7b8;
    --line: #223049;
    --line-strong: #31415e;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-soft: #0f2e30;
    --accent-ink: #5eead4;
    --on-accent: #042f2e;
    --focus: #5eead4;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -14px rgb(0 0 0 / .6);
    --code-bg: #070b15;
    --ok-bg: #0f2e30;   --ok-ink: #5eead4;
    --warn-bg: #33250a; --warn-ink: #fcd58a;
    --road-bg: #22234a; --road-ink: #c3c4f5;
    --err-bg: #3a1414;  --err-ink: #fca5a5;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.8vw, 2.4rem); letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
h4 { font-size: 1rem; }
h2.h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
strong { color: var(--ink); font-weight: 650; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

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

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--bg); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .65em 1.15em; border-radius: 10px;
  font: inherit; font-size: .98rem; font-weight: 600; line-height: 1.2; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); padding-inline: .6em; }
.btn-ghost:hover { color: var(--accent-ink); }
.btn-sm { min-height: 38px; padding: .5em .9em; font-size: .92rem; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Dev warning ---------- */
.dev-banner { background: #fde68a; color: #422006; font-size: .9rem; border-bottom: 1px solid #f59e0b; }
.dev-banner .container { padding-top: 8px; padding-bottom: 8px; }
.dev-banner summary { cursor: pointer; font-weight: 600; }
.dev-banner ul { columns: 2 220px; margin: 8px 0 4px; font-family: var(--mono); font-size: .82rem; }
.dev-banner code { background: rgb(255 255 255 / .5); padding: 0 4px; border-radius: 4px; }
.draft-note {
  border: 1px dashed #d97706; background: #fef3c7; color: #422006;
  padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 24px; font-size: .95rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 1.2rem; letter-spacing: -0.03em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; }
.brand-word b { color: var(--accent-ink); font-weight: 750; }
.logo-bg { fill: #0f172a; }
.logo-line { stroke: #94a3b8; }
.logo-cue { stroke: #2dd4bf; }
.logo-dot { fill: #2dd4bf; }
@media (prefers-color-scheme: dark) { .logo-bg { fill: #1b2a45; } }

.nav { display: none; align-items: center; gap: 4px; margin-left: 8px; flex: 1; }
.nav-actions { display: none; margin-left: auto; align-items: center; gap: 8px; }
@media (min-width: 1000px) {
  .nav, .nav-actions { display: flex; }
  .mobile-nav { display: none; }
}
.nav-item { position: relative; }
.nav-item > summary, .nav-link {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 550; font-size: .97rem; text-decoration: none;
}
.nav-item > summary::-webkit-details-marker { display: none; }
.nav-item > summary .icon { width: 1em; height: 1em; transition: transform .15s; }
.nav-item[open] > summary .icon { transform: rotate(180deg); }
.nav-item > summary:hover, .nav-link:hover, .nav-item[open] > summary { color: var(--ink); background: var(--surface-2); }
.nav-item.is-active > summary, .nav-link.is-active { color: var(--ink); }
.nav-panel {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 300px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px;
}
.nav-panel a {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: var(--ink);
}
.nav-panel a:hover, .nav-panel a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.nav-panel .icon { color: var(--accent-ink); margin-top: 2px; }
.nav-panel strong { display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 600; }
.nav-panel small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.4; margin-top: 2px; }

.mobile-nav { margin-left: auto; }
.mobile-nav > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; color: var(--ink); border: 1px solid var(--line);
}
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav .icon-close { display: none; }
.mobile-nav[open] .icon-open { display: none; }
.mobile-nav[open] .icon-close { display: block; }
.mobile-panel {
  position: absolute; left: 0; right: 0; top: 68px; max-height: calc(100vh - 68px); overflow-y: auto;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px 16px 24px;
}
.mobile-panel h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; font-weight: 650; }
.mobile-panel ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.mobile-panel a { display: block; padding: 9px 0; color: var(--ink); text-decoration: none; font-weight: 550; }
.mobile-panel .btn-row { margin-top: 20px; }
.mobile-panel .btn { flex: 1; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
/* Home page only (it is long): skip layout/paint of off-screen sections until they
 * scroll near the viewport. Not used on pages with dark code blocks, where it makes
 * accessibility checkers misread the background colour. */
main:has(> .hero) > section:not(:first-child) { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { font-size: 1.1rem; color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 12px;
}
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--muted); max-width: 640px; }

.grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: relative;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); font-size: .98rem; }
a.card { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { a.card:hover { transform: none; } }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 16px;
}
.card-icon .icon { width: 22px; height: 22px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 600; color: var(--accent-ink); font-size: .95rem; }
.card-link .icon { width: 1em; height: 1em; transition: transform .15s; }
a.card:hover .card-link .icon { transform: translateX(3px); }

.check-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { color: var(--accent-ink); margin-top: 3px; width: 1.1em; height: 1.1em; }

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 650; letter-spacing: .01em;
  padding: 3px 9px; border-radius: 999px; line-height: 1.4; white-space: nowrap; vertical-align: middle;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-live { background: var(--ok-bg); color: var(--ok-ink); }
.badge-early { background: var(--warn-bg); color: var(--warn-ink); }
.badge-roadmap { background: var(--road-bg); color: var(--road-ink); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; overflow: hidden; }
@media (min-width: 900px) { .hero { padding: 88px 0 104px; } }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--accent-ink); }
.hero .lead { margin-bottom: 32px; }
.hero-note { margin-top: 20px; font-size: .92rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.hero-note .icon { color: var(--accent-ink); }

/* Animated illustration: a document is scanned and becomes structured fields. */
.hero-visual { position: relative; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .hero-visual { grid-template-columns: .85fr 44px 1.15fr; align-items: center; gap: 0; } }
.hv-doc, .hv-fields {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; position: relative; overflow: hidden;
}
.hv-doc { transform: rotate(-1.5deg); }
.hv-doc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.hv-doc-title { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--ink); white-space: nowrap; }
.hv-doc-photo { font-size: .68rem; color: var(--muted); display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.hv-doc-photo .icon { width: 12px; height: 12px; }
.hv-line { height: 8px; border-radius: 4px; background: var(--surface-2); margin: 9px 0; position: relative; }
.hv-line.w80 { width: 80%; } .hv-line.w60 { width: 60%; } .hv-line.w45 { width: 45%; } .hv-line.w70 { width: 70%; }
.hv-rows { margin-top: 14px; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.hv-row { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; }
.hv-row .hv-line { margin: 0; flex: 1; }
.hv-row .hv-line.amt { flex: 0 0 22%; }
.hv-total { display: flex; justify-content: flex-end; margin-top: 12px; }
.hv-total .hv-line { width: 34%; background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
/* Static by default (no JS, reduced motion, first paint). site.js adds .is-playing
 * after the page has loaded, so the animation never competes with page load.
 * Only opacity/transform animate, which the compositor handles without repaints. */
.hv-hl::after {
  content: ""; position: absolute; inset: -5px; border: 2px solid var(--accent); border-radius: 7px; opacity: 0;
}
.hv-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 36px; opacity: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
}
.is-playing .hv-hl::after { animation: hv-hl 6s infinite; }
.is-playing .hv-hl.h2::after { animation-delay: .6s; } .is-playing .hv-hl.h3::after { animation-delay: 1.2s; } .is-playing .hv-hl.h4::after { animation-delay: 1.8s; }
.is-playing .hv-scan { animation: hv-scan 6s infinite; }
.hv-arrow { display: none; color: var(--accent-ink); justify-self: center; }
@media (min-width: 560px) { .hv-arrow { display: block; } }
.hv-arrow .icon { width: 28px; height: 28px; }
.hv-fields-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: .78rem; color: var(--muted); font-family: var(--mono); }
.hv-field {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center;
  padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); margin-top: 8px;
  font-size: .86rem;
}
/* Fields are wiped in left-to-right with clip-path (never faded), so visible text keeps full contrast. */
.is-playing .hv-field { clip-path: inset(0 100% 0 0); animation: hv-field 6s infinite; }
/* child 1 is the header row, so fields start at child 2 */
.is-playing .hv-field:nth-child(3) { animation-delay: .6s; }
.is-playing .hv-field:nth-child(4) { animation-delay: 1.2s; }
.is-playing .hv-field:nth-child(5) { animation-delay: 1.8s; }
.is-playing .hv-field:nth-child(6) { animation-delay: 2.4s; }
.hv-key { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.hv-val { color: var(--ink); font-weight: 600; grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hv-conf { grid-column: 2; grid-row: 1 / span 2; font-size: .72rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); }
.hv-conf.review { background: var(--warn-bg); color: var(--warn-ink); }
.hv-src { grid-column: 1 / -1; font-size: .72rem; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.hv-src .icon { width: 12px; height: 12px; }
@keyframes hv-scan { 0% { transform: translateY(-40px); opacity: 0; } 8% { opacity: 1; } 45% { transform: translateY(300px); opacity: 1; } 55%, 100% { transform: translateY(300px); opacity: 0; } }
@keyframes hv-field { 0%, 12% { clip-path: inset(0 100% 0 0); } 22%, 90% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 100%); } }
@keyframes hv-hl { 0%, 10% { opacity: 0; } 16%, 30% { opacity: 1; } 40%, 100% { opacity: 0; } }

/* ---------- Problem statements ---------- */
.problem { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; }
.problem h3 { font-size: 1.15rem; }
.problem p { color: var(--muted); margin: 0; }

/* ---------- Platform diagram ---------- */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 32px); }
.diagram-modules { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .diagram-modules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .diagram-modules { grid-template-columns: repeat(4, 1fr); } }
.dm {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg);
  transition: border-color .15s;
}
.dm:hover { border-color: var(--accent); color: inherit; }
.dm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.dm-top .icon { color: var(--accent-ink); width: 22px; height: 22px; }
.dm h3 { font-size: 1.05rem; margin: 0 0 4px; }
.dm p { font-size: .9rem; color: var(--muted); margin: 0; }
.diagram-connect { display: grid; grid-template-columns: repeat(4, 1fr); height: 28px; }
.diagram-connect span { border-left: 2px dashed var(--line-strong); margin-left: 50%; }
@media (max-width: 999px) { .diagram-connect { grid-template-columns: 1fr; } .diagram-connect span:not(:first-child) { display: none; } }
.engine {
  border-radius: 12px; padding: 18px 20px; background: var(--ink); color: var(--bg);
  display: grid; gap: 12px;
}
@media (prefers-color-scheme: dark) { .engine { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); } }
.engine-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.engine-title .icon { color: #2dd4bf; }
.engine-parts { display: flex; flex-wrap: wrap; gap: 8px; }
.engine-parts span { font-size: .82rem; padding: 4px 10px; border-radius: 999px; border: 1px solid rgb(148 163 184 / .4); }
.diagram-inputs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; font-size: .85rem; color: var(--muted); align-items: center; }
.diagram-inputs .chip { border: 1px solid var(--line); background: var(--bg); padding: 4px 10px; border-radius: 999px; color: var(--ink-2); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { counter-increment: step; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .95rem; margin-bottom: 16px;
}
.step-num::before { content: counter(step); }

/* ---------- Split / feature rows ---------- */
.split { display: grid; gap: 40px; align-items: start; }
.split > *, .grid > *, .cta-band > * { min-width: 0; } /* let <pre> scroll instead of widening the page */
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.wide-left { grid-template-columns: 1.2fr 1fr; } }
.feature { display: flex; gap: 16px; }
.feature .card-icon { margin: 0; }
.feature h3 { font-size: 1.05rem; margin-bottom: .3em; }
.feature p { color: var(--muted); font-size: .97rem; margin: 0; }

.compare { display: grid; gap: 20px; }
@media (min-width: 800px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare ol { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
.compare .card.after { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.compare h3 { display: flex; align-items: center; gap: 8px; }

/* ---------- Page head ---------- */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background: var(--surface); }
@media (min-width: 900px) { .page-head { padding: 80px 0 56px; } }
.page-head h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); max-width: 860px; }
.page-head .lead { max-width: 720px; margin-bottom: 0; }
.page-head .btn-row { margin-top: 28px; }
.page-head-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.breadcrumbs { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); }

.page-head-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1000px) {
  .page-head.has-visual .page-head-grid { grid-template-columns: 1fr minmax(0, 480px); gap: 56px; }
  .page-head.has-visual h1 { font-size: clamp(2rem, 1.2rem + 1.7vw, 2.6rem); }
}
.page-head-grid > * { min-width: 0; }

/* ---------- Product mockups (HTML illustrations, theme-aware) ---------- */
.mock-fig { margin: 0; }
.mock, .mock-phone {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; font-size: .86rem; color: var(--ink-2);
}
.mock-cap { margin-top: 10px; font-size: .8rem; color: var(--muted); text-align: right; }
.mock-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.mock-dots { display: inline-flex; gap: 5px; }
.mock-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.mock-title { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.mock-body { padding: 14px; display: grid; gap: 10px; }
.mock-chip { display: inline-block; font-size: .72rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.mock-chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
.mock-chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.mock-chip.err { background: var(--err-bg); color: var(--err-ink); }
.mock-chip.road { background: var(--road-bg); color: var(--road-ink); }
.mock-btn { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); font-weight: 600; font-size: .78rem; color: var(--ink); white-space: nowrap; }
.mock-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mock-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 4px; }

.mock-split { display: grid; grid-template-columns: 38% 1fr; }
.mock-doc { padding: 14px; border-right: 1px solid var(--line); background: var(--bg); }
@media (max-width: 440px) { .mock-split { grid-template-columns: 1fr; } .mock-doc { display: none; } }
.md-head { font-size: .62rem; font-weight: 700; letter-spacing: .08em; color: var(--ink); margin-bottom: 8px; }
.md-line { height: 7px; border-radius: 4px; background: var(--surface-2); margin: 8px 0; }
.md-line.w70 { width: 70%; } .md-line.w60 { width: 60%; } .md-line.w50 { width: 50%; } .md-line.w40 { width: 40%; }
.md-line.hl { box-shadow: 0 0 0 2px var(--accent); }
.md-line.hl-warn { box-shadow: 0 0 0 2px #d97706; }
.md-rows { border-top: 1px dashed var(--line-strong); margin-top: 10px; padding-top: 4px; }
.md-total { display: flex; justify-content: flex-end; } .md-total .md-line { width: 45%; }
.mock-fields { padding: 10px 14px; display: grid; gap: 2px; align-content: start; }
.mf { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; padding: 6px 8px; border-radius: 8px; }
.mf.is-review { background: var(--warn-bg); }
.mf-k { font-size: .72rem; color: var(--muted); grid-column: 1; }
.mf-v { font-weight: 600; color: var(--ink); grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mf .mock-chip { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

.mock-flag { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--err-bg); }
.mock-flag .icon { color: var(--err-ink); margin-top: 2px; width: 18px; height: 18px; }
.mock-flag strong { display: block; color: var(--ink); font-weight: 650; }
.mock-flag span { color: var(--ink-2); font-size: .8rem; }
.mock-flag.pass { background: var(--ok-bg); }
.mock-flag.pass .icon { color: var(--ok-ink); }

.mock-rank { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mock-rank .rank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .8rem; }
.mock-rank strong { display: block; color: var(--ink); }
.mock-rank span { font-size: .8rem; }
.mock-note { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); margin: 0; }
.mock-note .icon { width: 14px; height: 14px; }

.mock-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mock-stats.three { grid-template-columns: repeat(3, 1fr); }
.mock-stats > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.mock-stats small { display: block; color: var(--muted); font-size: .72rem; }
.mock-stats strong { color: var(--ink); font-size: 1rem; }
.mock-stats .t-ok { color: var(--ok-ink); } .mock-stats .t-warn { color: var(--warn-ink); }
.mock-bars { display: flex; align-items: flex-end; gap: 10px; height: 90px; padding: 4px 4px 18px; border-bottom: 1px solid var(--line); }
.mock-bars span { flex: 1; height: var(--h); background: color-mix(in srgb, var(--accent) 70%, var(--surface)); border-radius: 5px 5px 0 0; position: relative; }
.mock-bars i { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-style: normal; font-size: .68rem; color: var(--muted); }

.mock-table { width: 100%; border-collapse: collapse; }
.mock-table th { text-align: left; font-size: .72rem; font-weight: 600; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.mock-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); color: var(--ink); }
.mock-table td:last-child, .mock-table th:last-child { text-align: right; }

.mock-phone { max-width: 360px; margin: 0 auto; border-radius: 26px; border: 8px solid var(--ink); }
@media (prefers-color-scheme: dark) { .mock-phone { border-color: var(--surface-2); } }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--accent); color: var(--on-accent); }
.chat-head strong { display: block; font-size: .9rem; color: inherit; }
.chat-head small { display: block; font-size: .72rem; opacity: .9; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--on-accent); color: var(--accent); font-weight: 700; font-size: .75rem; }
.chat { padding: 14px 12px; display: grid; gap: 8px; background: var(--bg); }
.msg { max-width: 85%; padding: 8px 11px; border-radius: 12px; line-height: 1.45; color: var(--ink); }
.msg.me { justify-self: end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.msg.bot { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg[lang="hi"] { font-family: "Nirmala UI", "Noto Sans Devanagari", "Mangal", var(--font); }
.msg-file { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.msg-file .icon { width: 16px; height: 16px; }
.msg-src { display: flex; gap: 4px; align-items: center; margin-top: 6px; font-size: .72rem; color: var(--muted); font-family: var(--font); }
.msg-src .icon { width: 12px; height: 12px; }

/* ---------- Code blocks ---------- */
.code {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid rgb(148 163 184 / .2); font-size: .8rem; color: #94a3b8; font-family: var(--mono); }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font-size: .82rem; line-height: 1.6; }
.code .k { color: #7dd3fc; } .code .s { color: #99f6e4; } .code .n { color: #fcd34d; } .code .c { color: #94a3b8; }
.code-note { font-size: .85rem; color: var(--muted); margin-top: 10px; }

.doc-types { display: grid; gap: 16px; }
@media (min-width: 700px) { .doc-types { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .doc-types { grid-template-columns: repeat(3, 1fr); } }
.doc-types .card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.doc-types .card h3 .icon { color: var(--accent-ink); }
.doc-types ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .94rem; }

.note { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .96rem; }
.note .icon { margin-top: 3px; }
.note.road { background: var(--road-bg); color: var(--road-ink); }

/* ---------- Architecture SVG ---------- */
.arch { width: 100%; height: auto; font-family: var(--font); }
.arch .box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.2; }
.arch .box-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
.arch .box-dark { fill: var(--ink); }
.arch .t { fill: var(--ink); font-size: 15px; font-weight: 650; }
.arch .ts { fill: var(--muted); font-size: 12.5px; }
.arch .t-inv { fill: var(--bg); font-size: 15px; font-weight: 650; }
.arch .ts-inv { fill: var(--bg); opacity: .8; font-size: 12.5px; }
.arch .lbl { fill: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .08em; }
.arch .wire { stroke: var(--line-strong); stroke-width: 1.6; fill: none; }
.arch .wire-a { stroke: var(--accent); stroke-width: 1.8; fill: none; }
.arch .arrowhead { fill: var(--line-strong); }
.arch .arrowhead-a { fill: var(--accent); }
.arch-scroll { overflow-x: auto; }
.arch-scroll svg { min-width: 760px; }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; color: var(--ink); font-size: .94rem; margin-bottom: 6px; }
.field .req { color: var(--err-ink); }
.field .opt { color: var(--muted); font-weight: 400; font-size: .85rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent); outline-offset: 0; border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--err-ink); }
.field-error { color: var(--err-ink); font-size: .87rem; margin-top: 6px; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 20px; }
.form-foot small { color: var(--muted); font-size: .85rem; max-width: 420px; }
.form-msg { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: .96rem; }
.form-msg:empty { display: none; }
.form-msg.ok { background: var(--ok-bg); color: var(--ok-ink); }
.form-msg.err { background: var(--err-bg); color: var(--err-ink); }
.form-done .form-grid, .form-done .form-foot, .form-done .cf-turnstile { display: none; }
.cf-turnstile { margin-top: 16px; min-height: 65px; }

/* ---------- CTA band ---------- */
.cta-band { display: grid; gap: 40px; align-items: start; }
@media (min-width: 1000px) { .cta-band { grid-template-columns: .9fr 1.1fr; gap: 64px; } }
.contact-lines { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.contact-lines li { display: flex; gap: 12px; align-items: flex-start; }
.contact-lines .icon { color: var(--accent-ink); margin-top: 3px; }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--accent); }
.price { font-size: 1.9rem; font-weight: 750; color: var(--ink); letter-spacing: -0.03em; margin: 8px 0 4px; }
.price-sub { color: var(--muted); font-size: .92rem; margin-bottom: 20px; }
.price-card .check-list { margin-bottom: 24px; flex: 1; font-size: .96rem; }

/* ---------- Team ---------- */
.person { text-align: left; }
.person-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--surface-2); margin-bottom: 16px; display: grid; place-items: center; color: var(--muted); }
.person-photo .icon { width: 40px; height: 40px; }
.person-initials { background: var(--accent-soft); color: var(--accent-ink); font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.person h3 { margin-bottom: 2px; }
.person .role { color: var(--accent-ink); font-weight: 600; font-size: .95rem; margin-bottom: 12px; }

/* ---------- Careers ---------- */
.roles { display: grid; gap: 12px; }
.role { padding: 0; }
.role > summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; border-radius: var(--radius);
}
.role > summary::-webkit-details-marker { display: none; }
.role > summary:hover .role-title { color: var(--accent-ink); }
.role-main { display: grid; gap: 6px; min-width: 0; }
.role-title { font-size: 1.1rem; font-weight: 650; color: var(--ink); }
.role-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.role-meta span { display: inline-flex; align-items: center; gap: 5px; }
.role-meta .icon { width: 1em; height: 1em; }
.role-chevron { color: var(--muted); transition: transform .15s; }
.role[open] .role-chevron { transform: rotate(180deg); }
.role-body { padding: 0 24px 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.role-body p { color: var(--ink-2); }
.role-body h3 { font-size: 1rem; margin: 18px 0 8px; }
.role-body ul { color: var(--ink-2); margin-bottom: 20px; }

/* ---------- Prose (legal, blog) ---------- */
.prose { max-width: 740px; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.5em 0; padding-left: 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose pre { background: var(--code-bg); color: var(--code-ink); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .85rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1.2em 0; }
.prose th, .prose td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }
.prose-meta { color: var(--muted); font-size: .92rem; }
.toc { font-size: .92rem; }
.toc ol { padding-left: 1.2em; color: var(--muted); }

.post-list { display: grid; gap: 16px; max-width: 800px; }
.post-list time { color: var(--muted); font-size: .88rem; }
.post-list h2 { font-size: 1.3rem; margin: 6px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--muted); margin-top: 12px; max-width: 320px; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; font-weight: 650; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; display: grid; gap: 6px; }
.footer-legal p { margin: 0; }
.footer-legal .social { display: flex; gap: 14px; margin-top: 6px; }
.footer-legal .social a { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }

/* ---------- 404 ---------- */
.nf { text-align: center; max-width: 640px; margin: 0 auto; }
.nf-code { font-size: 5rem; font-weight: 800; color: var(--accent-ink); letter-spacing: -0.05em; line-height: 1; margin-bottom: 12px; }
.nf .btn-row { justify-content: center; margin: 28px 0 40px; }
.nf-links { display: grid; gap: 8px; text-align: left; }
@media (min-width: 640px) { .nf-links { grid-template-columns: 1fr 1fr; } }

.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-lg { margin-top: 48px; } .mt-md { margin-top: 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }
