/* ===== Brand tokens ===== */
:root {
  --ink: #15123a;          /* deep indigo — text & dark surfaces */
  --ink-2: #4a4766;        /* secondary text */
  --ink-3: #6d6a87;        /* muted text */
  --bg: #fbfaf6;           /* warm paper */
  --surface: #ffffff;
  --tint: #f2f0ea;
  --line: #e4e1d8;
  --brand: #2b1f8f;        /* indigo — primary actions */
  --brand-hover: #3a2db0;
  --accent: #e9a23b;       /* Angkor saffron — highlights */
  --accent-ink: #8a5a0f;   /* saffron as readable text */
  --wave: #13a89e;         /* teal — audio / data motif */
  --ok: #1b7a4a;
  --err: #b3261e;
  --on-brand: #ffffff;
  --dark-bg: #15123a;
  --dark-ink: #ecebf6;
  --dark-ink-2: #b9b6d3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(21,18,58,.06), 0 8px 24px rgba(21,18,58,.08);
  --font: "Plus Jakarta Sans", "Kantumruy Pro", system-ui, sans-serif;
  --font-zh: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-km: "Kantumruy Pro", "Plus Jakarta Sans", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ecebf6; --ink-2: #b9b6d3; --ink-3: #8f8cad;
    --bg: #0f0d26; --surface: #19163a; --tint: #141133; --line: #2c2856;
    --brand: #b9b0ff; --brand-hover: #d2ccff; --on-brand: #15123a;
    --accent-ink: #f1bd6a; --wave: #3fd3c6;
    --dark-bg: #08071a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ecebf6; --ink-2: #b9b6d3; --ink-3: #8f8cad;
  --bg: #0f0d26; --surface: #19163a; --tint: #141133; --line: #2c2856;
  --brand: #b9b0ff; --brand-hover: #d2ccff; --on-brand: #15123a;
  --accent-ink: #f1bd6a; --wave: #3fd3c6;
  --dark-bg: #08071a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
html[lang="km"] body { font-family: var(--font-km); font-size: 17px; line-height: 1.8; }
[lang="km"] { font-family: var(--font-km); }
html[lang^="zh"] body { font-family: var(--font-zh); line-height: 1.75; }
[lang^="zh"] { font-family: var(--font-zh); }
html[lang^="zh"] :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.35; }
html[lang^="zh"] :is(.eyebrow, .spec-title) { letter-spacing: .04em; }
html[lang^="zh"] :is(.tabs button, .form input, .form select, .form textarea) { font-family: var(--font-zh); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
html[lang="km"] :is(h1, h2, h3) { line-height: 1.5; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 14px; }

.eyebrow {
  display: inline-block; margin-bottom: .8rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink);
}
html[lang="km"] .eyebrow { letter-spacing: 0; font-size: .9rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .15s, transform .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.12rem; color: var(--ink); }
.logo-mark { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-km { font-family: "Kantumruy Pro", sans-serif; font-weight: 500; font-size: .8rem; color: var(--accent-ink); letter-spacing: 0; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav-drop-btn:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.nav { align-items: center; }
.nav-drop { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font: 500 .95rem var(--font); min-height: 44px;
}
html[lang="km"] .nav-drop-btn { font-family: var(--font-km); }
html[lang^="zh"] .nav-drop-btn { font-family: var(--font-zh); }
.chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.nav-drop-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.drop-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: -14px; min-width: 220px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow);
}
.nav-drop-btn[aria-expanded="true"] + .drop-menu { display: grid; }
.drop-menu a { padding: 10px 12px; border-radius: 8px; }
.drop-menu a:hover { background: var(--tint); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--surface); }
.lang-switch a {
  display: inline-grid; place-items: center; text-decoration: none;
  min-width: 44px; height: 36px; border: 0; border-radius: 9px; background: transparent;
  color: var(--ink-2); font: 600 .88rem var(--font); cursor: pointer;
}
.lang-switch a[lang="km"] { font-family: var(--font-km); }
.lang-switch a[lang^="zh"] { font-family: var(--font-zh); }
html[lang^="zh"] body { font-family: var(--font-zh); line-height: 1.75; }
[lang^="zh"] { font-family: var(--font-zh); }
html[lang^="zh"] :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.35; }
html[lang^="zh"] :is(.eyebrow, .spec-title) { letter-spacing: .04em; }
html[lang^="zh"] :is(.tabs button, .form input, .form select, .form textarea) { font-family: var(--font-zh); }
.lang-switch a[aria-current] { background: var(--ink); color: var(--bg); }
.menu-btn { display: none; }

/* ===== Hero ===== */
.hero { padding: 72px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); font-weight: 800; }
html[lang="km"] .hero h1 { font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--brand); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 45%, transparent) 62%); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: var(--ink-2); font-size: .95rem; }
.hero-points li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }

/* Demo card */
.demo {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 18px; position: relative;
}
.demo::before {
  content: ""; position: absolute; inset: -40px -60px auto auto; width: 260px; height: 260px; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%);
}
.demo-head { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-3); margin-bottom: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.demo-file { margin-left: 8px; font-family: ui-monospace, Menlo, monospace; }
.demo-badge { margin-left: auto; padding: 3px 10px; border-radius: 999px; font-weight: 600; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.wave { display: flex; align-items: center; gap: 3px; height: 72px; padding: 0 4px; border-radius: 12px; background: var(--tint); }
.wave span { flex: 1; border-radius: 3px; background: var(--wave); opacity: .85; transform-origin: center; }
.wave span.b { background: var(--brand); }
@media (prefers-reduced-motion: no-preference) {
  .wave span { animation: pulse 1.8s ease-in-out infinite; animation-delay: var(--d); }
  @keyframes pulse { 50% { transform: scaleY(.55); } }
}
.demo-time { display: flex; justify-content: space-between; font: .72rem ui-monospace, Menlo, monospace; color: var(--ink-3); margin: 6px 4px 12px; }
.segments { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.segments li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.seg-meta { font: .74rem ui-monospace, Menlo, monospace; color: var(--ink-3); }
.seg-meta b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; margin-right: 6px; background: var(--ink); color: var(--bg); font-family: var(--font); }
.segments li:nth-child(2) .seg-meta b { background: var(--wave); color: #fff; }
.segments p { font-size: 1.12rem; margin: 6px 0 2px; line-height: 1.7; }
.seg-gloss { display: block; font-size: .85rem; color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags i { font: normal .72rem ui-monospace, Menlo, monospace; padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-ink); }

/* ===== Strip ===== */
.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-inner { display: flex; align-items: center; gap: 24px; padding: 18px 0; flex-wrap: wrap; }
.strip-label { font-size: .85rem; color: var(--ink-3); font-weight: 600; }
.strip ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.strip li { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--ink-2); }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head.left { text-align: left; margin-left: 0; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; }
html[lang="km"] .section-head h2 { font-weight: 700; }
.section-head p:not(.eyebrow) { color: var(--ink-2); font-size: 1.08rem; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: .95rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px;
  border-left: 2px solid var(--wave); border-bottom: 2px solid var(--wave); transform: rotate(-45deg);
}
html[lang="km"] .ticks li::before { top: .6em; }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.card h3 { font-size: 1.2rem; }
.card > p { color: var(--ink-2); font-size: .97rem; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Why Khmer — always dark */
.section-dark { background: var(--dark-bg); color: var(--dark-ink); }
.section-dark .section-head p:not(.eyebrow) { color: var(--dark-ink-2); }
.section-dark .eyebrow { color: var(--accent); }
.why-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.why-grid .section-head { text-align: left; margin: 0; }
.why-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0; }
.why-list > div { border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 22px; background: rgba(255,255,255,.03); }
.why-list dt { font-weight: 700; font-size: 1.05rem; display: grid; gap: 6px; margin-bottom: 8px; }
.km-sample { font-family: var(--font-km); font-size: 1.6rem; font-weight: 600; color: var(--accent); line-height: 1.6; }
.why-list dd { margin: 0; color: var(--dark-ink-2); font-size: .95rem; }

/* Tabs */
.tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.tabs button {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font: 600 .95rem var(--font); cursor: pointer;
}
html[lang="km"] .tabs button { font-family: var(--font-km); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 40px;
}
.panel[hidden] { display: none; }
.panel h3 { font-size: 1.5rem; }
.panel p { color: var(--ink-2); margin: 0; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; }
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 42px; right: -17px; width: 18px; height: 2px; background: var(--accent);
}
.step-n {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; margin-bottom: 14px;
  background: var(--accent); color: #2a1a00; font-weight: 800;
}
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--ink-2); font-size: .93rem; margin: 0; }

/* Quality */
.quality-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.feature-list li { padding-left: 20px; border-left: 3px solid var(--wave); }
.feature-list h3 { font-size: 1.08rem; margin-bottom: .25em; }
.feature-list p { color: var(--ink-2); margin: 0; font-size: .97rem; }
.spec { background: #120f33; color: #e6e4f5; border-radius: 20px; padding: 24px; box-shadow: var(--shadow); position: sticky; top: 96px; }
.spec-title { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #f1bd6a; }
html[lang="km"] .spec-title { letter-spacing: 0; font-size: .95rem; }
.spec pre { margin: 0 0 18px; overflow-x: auto; font: .8rem/1.65 ui-monospace, Menlo, monospace; }
.spec code { font-family: ui-monospace, Menlo, "Kantumruy Pro", monospace; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li { font-size: .8rem; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); color: #cfcce6; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 52px 18px 22px; font-weight: 600; position: relative; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--ink-3); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 22px 18px; margin: 0; color: var(--ink-2); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; }
.contact-grid > div > p { color: var(--ink-2); font-size: 1.08rem; }
.contact-direct { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.contact-direct li { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-direct li > span:first-child { min-width: 90px; color: var(--ink-3); font-size: .92rem; }
.contact-direct a { color: var(--brand); font-weight: 600; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input:not([type="checkbox"]), .form select, .form textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 400 1rem var(--font);
}
html[lang="km"] .form :is(input, select, textarea) { font-family: var(--font-km); }
.form textarea { resize: vertical; }
.form :is(input, select, textarea):focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.form [aria-invalid="true"] { border-color: var(--err); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form .check {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-weight: 500; cursor: pointer;
}
.check:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.form-error { color: var(--err); margin: 0; font-size: .92rem; }
.form-note { margin: 0; font-size: .82rem; color: var(--ink-3); text-align: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid nav { display: grid; align-content: start; gap: 10px; }
.footer-grid nav a, .footer-contact a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.footer-grid nav a:hover, .footer-contact a:hover { color: var(--ink); text-decoration: underline; }
.footer-h { font-weight: 700; font-size: .85rem; color: var(--ink); margin: 0 0 4px; }
.footer-brand p { color: var(--ink-3); margin: 10px 0 0; font-size: .95rem; max-width: 30ch; }
.footer-contact { line-height: 2; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; color: var(--ink-3); font-size: .88rem; }
.footer-scam { font-weight: 600; }

/* ===== Responsive ===== */
@media (max-width: 1060px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: inline-grid; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav.open .nav-drop-btn { display: none; }
  .nav.open .drop-menu { display: grid; position: static; box-shadow: none; border: 0; padding: 0; min-width: 0; background: none; }
  .nav.open .drop-menu a { border-radius: 0; padding: 12px 0; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li::after { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .why-grid, .quality-grid, .contact-grid, .panel { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .spec { position: static; }
  .section { padding: 72px 0; }
}
@media (max-width: 620px) {
  .hide-sm { display: none; }
  .hero { padding: 44px 0 48px; }
  .cards, .why-list, .steps, .checks, .form .row { grid-template-columns: 1fr; }
  .panel { padding: 24px; }
  .form { padding: 20px; }
  .logo .brand-name { font-size: 1rem; }
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; }
}

/* ===== Inner pages ===== */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; max-width: 22ch; }
html[lang="km"] .page-hero h1 { font-weight: 700; }
.page-hero .lead { max-width: 44em; }
.page-hero .hero-ctas { margin-bottom: 0; }
.notice {
  display: inline-flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); font-weight: 600; font-size: .95rem;
}
.mission { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.mission h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.mission p { font-size: 1.2rem; color: var(--ink-2); }
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.values li, .roles li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.values, .roles { padding: 0; margin: 0; }
.values h3, .roles h3 { font-size: 1.1rem; }
.values p, .roles p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.value-n { display: block; font-weight: 800; color: var(--accent-ink); margin-bottom: 10px; }
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.team li { text-align: center; }
.avatar {
  width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); font-weight: 800; font-size: 1.6rem;
  border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--accent);
}
.team h3 { font-size: 1.05rem; margin-bottom: 2px; }
.team .role { color: var(--accent-ink); font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
.team .bio { color: var(--ink-3); font-size: .9rem; margin: 0; }
.cta-band { background: var(--dark-bg); color: var(--dark-ink); border-radius: 24px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--dark-ink-2); }
.cta-band .btn-ghost { background: transparent; color: var(--dark-ink); border-color: rgba(255,255,255,.3); }
.cta-band .btn-primary { background: var(--accent); color: #2a1a00; }

/* Join */
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.roles .card-icon { margin-bottom: 14px; }
.roles .req { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--ink-3); }
.roles .req b { color: var(--ink-2); }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; max-width: 760px; margin: 0 auto; }
.join-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.form-consent { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px; font-weight: 500 !important; }
.form-consent input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.form-consent a { color: var(--brand); }
.form [aria-invalid="true"][type="checkbox"] { outline: 2px solid var(--err); outline-offset: 2px; }

.steps-4 { grid-template-columns: repeat(4, 1fr); }
.join-grid h2, .contact-grid h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; }
.join-grid > div > p { color: var(--ink-2); }
.join-grid a { color: var(--brand); }

/* Datasets */
.ds-custom { border-style: dashed; border-width: 2px; background: transparent; justify-content: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filters button {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font: 600 .95rem var(--font); cursor: pointer;
}
html[lang="km"] .filters button { font-family: var(--font-km); }
html[lang^="zh"] .filters button { font-family: var(--font-zh); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ds-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.ds-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.ds-card[hidden] { display: none; }
.ds-type { align-self: flex-start; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
[data-type="speech"] .ds-type { color: var(--wave); background: color-mix(in srgb, var(--wave) 14%, transparent); }
[data-type="vision"] .ds-type { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
[data-type="text"] .ds-type { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ds-card h3 { font-size: 1.2rem; }
.ds-card > p { color: var(--ink-2); font-size: .96rem; }
.ds-specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 20px; font-size: .9rem; }
.ds-specs dt { color: var(--ink-3); }
.ds-specs dd { margin: 0; font-weight: 600; }
.ds-card > .btn, .ds-actions { margin-top: auto; align-self: flex-start; }
.ds-note { color: var(--ink-3); font-size: .9rem; margin-top: 20px; }

/* Legal */
.legal { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 96px; display: grid; gap: 4px; font-size: .92rem; }
.toc a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.toc a:hover { color: var(--ink); }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--brand); }
.meta { color: var(--ink-3); font-size: .92rem; margin-top: 12px; }

@media (max-width: 1060px) {
  .values, .roles, .team, .steps-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .mission, .join-grid, .legal { grid-template-columns: 1fr; gap: 32px; }
  .ds-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
  .cta-band { padding: 32px 24px; }
}
@media (max-width: 620px) {
  .values, .roles, .who, .steps-4 { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 0 40px; }
}

/* ===== Commitments band ===== */
.stats { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid > div { display: grid; gap: 4px; padding: 28px 24px; border-left: 1px solid var(--line); }
.stats-grid > div:first-child { border-left: 0; padding-left: 0; }
.stats-grid b { font-size: 2rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.stats-grid span { color: var(--ink-2); font-size: .93rem; }

/* ===== Engagement models ===== */
.models { grid-template-columns: repeat(4, 1fr); }
.model { display: flex; flex-direction: column; }
.model-n { font: 700 .85rem ui-monospace, Menlo, monospace; color: var(--accent-ink); margin-bottom: 14px; }
.model-best { font-size: .9rem; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: var(--tint); }
.model-best b { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
html[lang="km"] .model-best b { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.model-link { margin-top: auto; color: var(--brand); font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.model-link:hover { text-decoration: underline; }

/* ===== Word-boundary demo ===== */
.seg-toggle {
  display: inline-flex; align-items: center; min-height: 40px; margin-top: 12px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); background: transparent; color: var(--dark-ink); font: 600 .85rem var(--font);
}
html[lang="km"] .seg-toggle { font-family: var(--font-km); }
.seg-toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #2a1a00; }
.seg span { transition: background .2s; border-radius: 4px; }
.seg.on span { background: rgba(233,162,59,.18); margin-right: .25em; padding: 0 .15em; box-shadow: inset 0 -2px 0 var(--wave); }

/* ===== Quality report ===== */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.report-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; margin: 0; }
.report-file { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--ink-3); }
.report-file .demo-file { margin: 0; }
.report-meta { color: var(--ink-3); font-size: .92rem; margin: 10px 0 24px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { display: grid; gap: 6px; padding: 18px; border-radius: 14px; background: var(--tint); }
.metric-k { font-size: .88rem; color: var(--ink-2); font-weight: 600; }
.metric b { font-size: 1.7rem; font-weight: 800; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--v); background: linear-gradient(90deg, var(--brand), var(--wave)); border-radius: inherit; }
.metric-t { font-size: .8rem; color: var(--ink-3); }
.report-note { margin: 18px 0 0; font-size: .85rem; color: var(--ink-3); }

/* ===== Estimator ===== */
.est { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.est-form, .est-out { border-radius: 20px; padding: 28px; border: 1px solid rgba(255,255,255,.12); }
.est-form { background: rgba(255,255,255,.04); display: grid; gap: 22px; align-content: start; }
.est-out { background: color-mix(in srgb, var(--accent) 10%, #1c1747); display: grid; gap: 18px; align-content: start; }
.est-field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.est-field > span, .est-field > label, .est-field legend { font-weight: 600; font-size: .92rem; color: var(--dark-ink); padding: 0; margin-bottom: 8px; }
.est select, .est input[type="number"] {
  min-height: 46px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2);
  background: #0f0c2b; color: var(--dark-ink); font: 400 1rem var(--font); width: 100%;
}
html[lang="km"] .est :is(select, input, .seg-ctl span) { font-family: var(--font-km); }
.est-vol { display: grid; grid-template-columns: 1fr 110px; gap: 10px 14px; align-items: center; }
.est-vol input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 44px; }
.est-unit { grid-column: 1 / -1; color: var(--dark-ink-2); font-size: .88rem; margin-top: -6px; }
.seg-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.06); }
.seg-ctl label { position: relative; cursor: pointer; }
.seg-ctl input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-ctl span { display: grid; place-items: center; min-height: 42px; padding: 0 10px; border-radius: 9px; font-weight: 600; font-size: .92rem; color: var(--dark-ink-2); text-align: center; }
.seg-ctl input:checked + span { background: var(--dark-ink); color: #15123a; }
.seg-ctl input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 1px; }
.est-k { margin: 0; font-size: .85rem; color: var(--dark-ink-2); font-weight: 600; }
.est-big { margin: 2px 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: #fff; line-height: 1.2; }
.est-small { font-size: 1rem; font-weight: 600; color: var(--dark-ink-2); }
.est-out .ticks li { color: var(--dark-ink-2); }
.btn-accent { background: var(--accent); color: #2a1a00; }
.btn-accent:hover { background: #f1b354; }
.est-fine { margin: 0; font-size: .8rem; color: var(--dark-ink-2); text-align: center; }

/* ===== Project brief wizard ===== */
.wiz-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 0 0 4px; counter-reset: none; }
.wiz-steps li { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-3); padding-bottom: 10px; border-bottom: 3px solid var(--line); }
.wiz-steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--tint); font-weight: 700; font-size: .8rem; flex: none; }
.wiz-steps li[aria-current="step"] { color: var(--ink); border-color: var(--brand); }
.wiz-steps li[aria-current="step"] span { background: var(--brand); color: var(--on-brand); }
.wiz-steps li.done { color: var(--ink-2); border-color: var(--wave); }
.wiz-steps li.done span { background: var(--wave); color: #fff; }
.wiz-pane { display: grid; gap: 16px; }
.wiz-nav { display: flex; gap: 10px; }
.wiz-nav .btn { flex: 1; }

/* ===== Dataset catalog ===== */
.catalog-bar { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.catalog-bar .filters { margin: 0; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.search input {
  width: 100%; min-height: 46px; padding: 10px 14px 10px 42px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 1rem var(--font);
}
html[lang="km"] .search input { font-family: var(--font-km); }
.search input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.ds-count { color: var(--ink-3); font-size: .9rem; margin: 0 0 20px; }
.ds-empty { padding: 28px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }
.ds-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ds-top .ds-type { margin: 0; }
.ds-status { font-size: .75rem; font-weight: 600; color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.ds-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.ds-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ds-add { border: 1.5px solid var(--brand); color: var(--brand); background: transparent; }
.ds-add .on, .ds-add[aria-pressed="true"] .off { display: none; }
.ds-add[aria-pressed="true"] .on { display: inline; }
.ds-add[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.ds-card:has(.ds-add[aria-pressed="true"]) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.select-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,.25); width: max-content; max-width: calc(100% - 32px);
}
.select-bar p { margin: 0; font-size: .92rem; }
.select-bar .btn-primary { background: var(--accent); color: #2a1a00; }
.sheet {
  width: min(880px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 32px; border: 1px solid var(--line);
  border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.sheet::backdrop { background: rgba(10, 8, 30, .55); backdrop-filter: blur(3px); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-head .ds-type { margin: 0; }
.sheet-head svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sheet h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; }
.sheet-desc { color: var(--ink-2); }
.sheet-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; margin-top: 20px; }
.sheet-h { font-weight: 700; font-size: .9rem; margin: 0 0 8px; }
.sheet .spec { position: static; }
.sheet .spec pre { white-space: pre; max-height: 300px; overflow: auto; }
.sheet-fine { margin: 0; font-size: .78rem; color: #b9b6d3; }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.sheet .ds-add { border-color: var(--brand); }

@media (max-width: 1060px) {
  .models, .metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .est, .sheet-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid > div { border-left: 0; padding-left: 0; }
}
@media (max-width: 620px) {
  .models, .metrics { grid-template-columns: 1fr; }
  .stats-grid > div { padding: 18px 12px 18px 0; }
  .stats-grid b { font-size: 1.6rem; }
  .report, .est-form, .est-out { padding: 22px; }
  .sheet { padding: 22px; }
  .wiz-steps b { display: none; }
  .search { max-width: none; }
}
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; }
  .logo { gap: 8px; }
  .logo .brand-name { font-size: .9rem; }
  .lang-switch a { min-width: 36px; padding: 0 6px; white-space: nowrap; }
  .icon-btn { width: 40px; height: 40px; }
}
/* Let grid columns shrink below long code lines (they scroll instead). */
:is(.quality-grid, .est, .sheet-grid, .hero-grid, .contact-grid) > * { min-width: 0; }

/* Newer services: same card, with a "New" badge */
.card-new-svc .ticks { margin-top: 16px; }
.card-new { display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--accent); color: #2a1a00; }

/* ===== Chat button (Telegram / WhatsApp / email) ===== */
.chat-dock { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: grid; justify-items: end; gap: 10px; }
.chat-fab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 .95rem var(--font); background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 24px rgba(0,0,0,.22); transition: transform .15s;
}
html[lang="km"] .chat-fab { font-family: var(--font-km); }
html[lang^="zh"] .chat-fab { font-family: var(--font-zh); }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat-fab .i-close, .chat-fab[aria-expanded="true"] .i-chat { display: none; }
.chat-fab[aria-expanded="true"] .i-close { display: block; }
.chat-menu {
  width: 280px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,.25); display: grid; gap: 2px;
}
.chat-menu[hidden] { display: none; }
.chat-menu-h { margin: 6px 10px 6px; font-size: .82rem; font-weight: 600; color: var(--ink-3); }
.chat-opt { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.chat-opt:hover, .chat-opt:focus-visible { background: var(--tint); }
.chat-opt b { display: block; font-size: .95rem; }
.chat-sub { display: block; font-size: .8rem; color: var(--ink-3); overflow-wrap: anywhere; }
.chat-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; color: #fff; }
.chat-ic svg { width: 20px; height: 20px; fill: currentColor; }
.chat-ic.tg { background: #229ed9; }
.chat-ic.wa { background: #25d366; }
.chat-ic.em { background: var(--accent); color: #2a1a00; }
.chat-ic.em svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .chat-menu:not([hidden]) { animation: chat-in .16s ease-out; }
  @keyframes chat-in { from { opacity: 0; transform: translateY(8px); } }
}
@media (max-width: 620px) {
  .chat-dock { right: 16px; bottom: 16px; }
  .chat-fab { width: 54px; height: 54px; padding: 0; justify-content: center; }
  .chat-fab span { display: none; }
  .chat-menu { width: min(280px, calc(100vw - 32px)); }
  .select-bar { left: 16px; transform: none; bottom: 16px; max-width: calc(100% - 96px); }
}

/* ===== Form confirmation ===== */
form.is-done > :not(.form-done) { display: none !important; }
.form-done { display: grid; gap: 14px; justify-items: start; padding: 8px 0; outline: none; }
.done-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 1.5rem; font-weight: 800; background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.form-done h3 { font-size: 1.35rem; margin: 0 0 6px; }
.form-done p { color: var(--ink-2); margin: 0 0 6px; }
.done-alt { font-size: .92rem; }
.link-btn { padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 0; }
.done-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.done-alt a { color: var(--brand); font-weight: 600; }

/* ===== 404 ===== */
.notfound { text-align: center; }
.nf-code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; line-height: 1; margin: 0 0 12px; background: linear-gradient(90deg, #3b4fd8, var(--wave), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
.notfound h1 span { color: var(--ink-3); font-weight: 600; }
.notfound .lead { margin: 0 auto; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0 20px; }
.nf-lang a { color: var(--brand); font-weight: 600; }

/* ===== Services menu ===== */
.drop-wide { min-width: 480px; }
.nav-drop-btn[aria-expanded="true"] + .drop-wide { grid-template-columns: 1fr 1fr; }
.drop-all { grid-column: 1 / -1; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px !important; color: var(--brand) !important; font-weight: 700; }
@media (max-width: 1060px) {
  .nav.open .drop-wide { grid-template-columns: 1fr; min-width: 0; }
  .nav.open .drop-all { border-top: 0; }
}

/* ===== Home service cards: "Learn more" ===== */
#services .card { display: flex; flex-direction: column; }
.card-link { margin-top: auto; padding-top: 18px; color: var(--brand); font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: flex-end; }
.card-link:hover { text-decoration: underline; }

/* ===== Service pages ===== */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; font-size: .9rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.svc-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.svc-hero-icon {
  width: 168px; height: 168px; border-radius: 40px; display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, #3b4fd8 22%, transparent), color-mix(in srgb, var(--wave) 22%, transparent) 55%, color-mix(in srgb, var(--accent) 28%, transparent));
  color: var(--brand); box-shadow: var(--shadow);
}
.svc-hero-icon svg { width: 76px; height: 76px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.svc-h { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; margin-bottom: 20px; }
html[lang="km"] .svc-h { font-weight: 700; }
.svc-inc-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.svc-ticks { gap: 14px; }
.svc-ticks li { font-size: 1.02rem; }
.svc-aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; }
.fmt-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.fmt-chips li { font: .82rem ui-monospace, Menlo, monospace; padding: 5px 10px; border-radius: 8px; background: var(--tint); border: 1px solid var(--line); }
.svc-sample-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
.svc-sample-grid > * { min-width: 0; }
.svc-sample-grid .spec { position: static; }
.svc-sample-grid .spec pre { margin: 0; white-space: pre; }
.svc-note { color: var(--ink-3); font-size: .92rem; }
.related { margin-bottom: 40px; }
.related-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.related-card p { color: var(--ink-2); font-size: .95rem; }
.related-card .model-link { margin-top: auto; }
.svc-band .hero-ctas { margin: 0; }
@media (max-width: 900px) {
  .svc-hero-grid, .svc-inc-grid, .svc-sample-grid { grid-template-columns: 1fr; gap: 28px; }
  .svc-hero-icon { display: none; }
}

/* ===== Why specialists: "More reasons" ===== */
.why-right { display: grid; gap: 16px; }
.why-more-btn {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); background: transparent; color: var(--dark-ink); font: 600 .95rem var(--font);
}
html[lang="km"] .why-more-btn { font-family: var(--font-km); }
html[lang^="zh"] .why-more-btn { font-family: var(--font-zh); }
.why-more-btn:hover { border-color: var(--accent); color: var(--accent); }
.why-more-btn .on, .why-more-btn[aria-expanded="true"] .off { display: none; }
.why-more-btn[aria-expanded="true"] .on { display: inline; }
.why-more-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) {
  .why-more:not([hidden]) > div { animation: why-in .25s ease-out both; }
  .why-more > div:nth-child(2) { animation-delay: .04s; } .why-more > div:nth-child(3) { animation-delay: .08s; }
  .why-more > div:nth-child(4) { animation-delay: .12s; } .why-more > div:nth-child(5) { animation-delay: .16s; } .why-more > div:nth-child(6) { animation-delay: .2s; }
  @keyframes why-in { from { opacity: 0; transform: translateY(8px); } }
}

.svc-demo { margin: 14px 0 0; font-size: .92rem; }
.svc-demo a { color: var(--brand); font-weight: 600; }

/* ===== Partners ===== */
.partners { padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.partners-title { margin: 0 0 16px; text-align: center; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
html[lang="km"] .partners-title, html[lang^="zh"] .partners-title { letter-spacing: 0; font-size: .95rem; }
.partner-logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.partner-logos li { flex: 0 1 210px; min-width: 150px; }
.partner-logos li { display: grid; place-items: center; height: 76px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.partner-logos a { display: grid; place-items: center; width: 100%; height: 100%; }
/* Logos sit on white tiles in both themes, so dark logos stay readable at night. */
.partner-logos img { max-width: 100%; max-height: 44px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.partner-logos li:hover img { filter: none; opacity: 1; }
@media (max-width: 520px) { .partner-logos li { flex-basis: calc(50% - 6px); min-width: 0; height: 64px; } }
