/* SPDX-License-Identifier: MIT */
/* SPDX-FileCopyrightText: 2026 OpenTea Developers */

/* Tokens follow DESIGN.md (values from apps/web/src/styles/globals.css). */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-vietnamese-400-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-vietnamese-600-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-vietnamese-700-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/be-vietnam-pro-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --background: #f6f7f4;
  --foreground: #101814;
  --card: #ffffff;
  --border: #e3e8e2;
  --primary: #176c4b;
  --primary-hover: #125c3f;
  --primary-foreground: #ffffff;
  --primary-subtle: #e7f1eb;
  --focus: #176c4b;
  --accent: #176c4b;
  --accent-subtle: #e7f1eb;
  --muted-foreground: #5b6761;
  --ink-secondary: #3d4a43;
  --sidebar-bg: #0f2a20;
  --sidebar-darker: #0a1f17;
  --sidebar-foreground: #ffffff;
  --sidebar-muted: #bcd3c6;
  --surface-sunken: #eef2ee;
  --success: #15803d;
  --success-subtle: #dcfce7;
  --info: #1d4ed8;
  --info-subtle: #dbeafe;
  --code-bg: #0c1d16;
  --code-fg: #e6efe9;
  --shadow-card: 0 1px 2px rgba(10,31,23,.04), 0 12px 32px -16px rgba(10,31,23,.16);
  --shadow-stage: 0 40px 80px -30px rgba(7,25,18,.55);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #07130e;
    --foreground: #e8efe9;
    --card: #0d1d16;
    --border: #1b3328;
    --primary: #d6f05c;
    --primary-hover: #e2f67f;
    --primary-foreground: #0b1712;
    --primary-subtle: #1d2a14;
    --focus: #d6f05c;
    --accent: #d6f05c;
    --accent-subtle: #1d2a14;
    --muted-foreground: #93a79b;
    --ink-secondary: #b9c9bf;
    --sidebar-bg: #0a1a13;
    --sidebar-darker: #06120d;
    --sidebar-foreground: #e8efe9;
    --sidebar-muted: #a9c2b4;
    --surface-sunken: #0c1a14;
    --success: #4ade80;
    --success-subtle: #12301f;
    --info: #60a5fa;
    --info-subtle: #132640;
    --code-bg: #06120d;
    --code-fg: #e6efe9;
    --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 24px 48px -28px rgba(0,0,0,.7);
    --shadow-stage: 0 40px 80px -30px rgba(0,0,0,.75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #07130e;
  --foreground: #e8efe9;
  --card: #0d1d16;
  --border: #1b3328;
  --primary: #d6f05c;
  --primary-hover: #e2f67f;
  --primary-foreground: #0b1712;
  --primary-subtle: #1d2a14;
  --focus: #d6f05c;
  --accent: #d6f05c;
  --accent-subtle: #1d2a14;
  --muted-foreground: #93a79b;
  --ink-secondary: #b9c9bf;
  --sidebar-bg: #0a1a13;
  --sidebar-darker: #06120d;
  --sidebar-foreground: #e8efe9;
  --sidebar-muted: #a9c2b4;
  --surface-sunken: #0c1a14;
    --success: #4ade80;
    --success-subtle: #12301f;
    --info: #60a5fa;
    --info-subtle: #132640;
  --code-bg: #06120d;
  --code-fg: #e6efe9;
  --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 24px 48px -28px rgba(0,0,0,.7);
  --shadow-stage: 0 40px 80px -30px rgba(0,0,0,.75);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--primary); color: var(--primary-foreground);
  padding: 8px 14px; border-radius: var(--radius-md); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 1024px) { .wrap { padding: 0 24px; } }
section { padding: 56px 0; }
@media (min-width: 1024px) { section { padding: 88px 0; } }
.section-head { max-width: 720px; margin-bottom: 32px; }
.eyebrow {
  display: inline-block; color: var(--accent); font-weight: 600;
  font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem); font-weight: 700; }
.section-head p { margin-top: 12px; color: var(--ink-secondary); font-size: 1.0625rem; }
.lead { font-size: 1.0625rem; color: var(--ink-secondary); }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.8125rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-md);
  font: inherit; font-weight: 600; text-decoration: none; border: 1px solid var(--border);
  background: var(--card); color: var(--foreground); cursor: pointer;
  transition: background 150ms cubic-bezier(0.2, 0, 0, 1), border-color 150ms cubic-bezier(0.2, 0, 0, 1);
}
.btn:hover { color: var(--foreground); border-color: var(--muted-foreground); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-foreground); }
.btn-light { background: transparent; color: var(--sidebar-foreground); border-color: rgba(255, 255, 255, 0.35); }
.btn-light:hover { background: rgba(255, 255, 255, 0.08); color: var(--sidebar-foreground); border-color: rgba(255, 255, 255, 0.6); }
.btn-solid-light { background: #ffffff; color: #143c2d; border-color: transparent; }
.btn-solid-light:hover { background: #e7f0ea; color: #143c2d; }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 0.875rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--sidebar-bg) 94%, transparent);
  color: var(--sidebar-foreground);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sidebar-foreground); text-decoration: none; font-weight: 700; }
.brand:hover { color: var(--sidebar-foreground); }
.brand img { width: 34px; height: 34px; border-radius: var(--radius-md); }
.brand span small { display: block; font-weight: 500; font-size: 0.75rem; color: var(--sidebar-muted); white-space: nowrap; }
@media (max-width: 1239px) { .brand span small { display: none; } }
.brand span { white-space: nowrap; }
.nav-links { display: flex; gap: 2px; margin-left: 16px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
@media (max-width: 1199px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; }
  .nav-links { order: 3; width: 100%; margin: 0; padding: 0 0 10px; }
}
.nav-links a { white-space: nowrap; color: var(--sidebar-muted); text-decoration: none; padding: 8px 9px; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.9rem; }
.nav-links a:hover { color: var(--sidebar-foreground); background: rgba(255, 255, 255, 0.07); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tool {
  min-height: 44px; min-width: 44px; padding: 8px 12px; border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; color: var(--sidebar-foreground);
  font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
}
.tool:hover { background: rgba(255, 255, 255, 0.08); color: var(--sidebar-foreground); }
.tool[hidden] { display: none; }
.tool-gh { display: none; }
@media (min-width: 880px) { .tool-gh { display: inline-flex; } }
@media (max-width: 879px) {
  .tool-gh { display: none; }
}

@media (max-width: 639px) {
  .brand span { display: none; }
  .tool { padding: 8px 10px; font-size: 0.8125rem; }
  .site-header .wrap { gap: 8px; }
}

/* Hero phone: beside the dashboard on wide screens, below it on narrow ones (never covering it) */
@media (max-width: 1199px) {
  .stage { display: flex; flex-direction: column; gap: 16px; }
  .phone { position: relative; right: auto; bottom: auto; width: 46%; min-width: 0; max-width: 220px; align-self: flex-end; }
}

/* Hero */
.hero {
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(76, 195, 138, 0.22), transparent 60%),
    linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-darker));
  color: var(--sidebar-foreground);
  padding: 44px 0 64px;
  overflow: hidden;
}
@media (min-width: 1024px) { .hero { padding: 72px 0 96px; } }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; } }
.hero .eyebrow { color: #f2b544; }
.hero h1 {
  font-size: clamp(2.1rem, 1.35rem + 3.2vw, 3.5rem);
  font-weight: 700; letter-spacing: -0.02em;
}
.hero-lead { margin-top: 18px; font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); color: var(--sidebar-muted); max-width: 36em; }
.hero-dev { margin-top: 14px; font-size: 0.9375rem; color: var(--sidebar-muted); max-width: 40em; }
.hero-dev code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85em; color: #e3ece6; background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-facts li {
  padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: var(--sidebar-foreground);
}

.stage { position: relative; min-height: 0; }
.browser {
  background: var(--card); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-stage); border: 1px solid rgba(255, 255, 255, 0.12);
}
.browser-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: var(--surface-sunken); border-bottom: 1px solid var(--border);
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c9d4cc; display: block; }
.browser-bar i:nth-child(1) { background: #e0a46b; }
.browser-bar i:nth-child(2) { background: #d6c85c; }
.browser-bar i:nth-child(3) { background: #7fc497; }
.browser img { width: 100%; height: auto; }
.phone {
  position: absolute; right: 2%; bottom: -28px; width: 34%; min-width: 118px; max-width: 190px;
  background: #0b1712; padding: 8px; border-radius: 30px;
  box-shadow: var(--shadow-stage); border: 1px solid rgba(255, 255, 255, 0.16);
}
.phone img { border-radius: 22px; width: 100%; height: auto; }
.hero-stage-wrap { padding-bottom: 20px; }
@media (min-width: 1024px) { .hero-stage-wrap { padding-bottom: 40px; padding-right: 8%; } }
.stage-caption { margin-top: 14px; font-size: 0.8125rem; color: var(--sidebar-muted); }

/* Problem cards */
.cards-3 { display: grid; gap: 16px; }
@media (min-width: 840px) { .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-card);
}
.card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--ink-secondary); }
.card .icon-badge {
  width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--primary-subtle);
  color: var(--primary); display: grid; place-items: center; margin-bottom: 14px;
}
.card .icon-badge svg { width: 22px; height: 22px; }

/* Tiers */
.tiers-desktop { display: none; width: 100%; height: auto; }
.tiers-mobile { display: block; width: 100%; height: auto; max-width: 420px; margin: 0 auto; }
@media (min-width: 760px) {
  .tiers-desktop { display: block; }
  .tiers-mobile { display: none; }
}
.tier-cards { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 840px) { .tier-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tier-card { border-top: 4px solid var(--primary); }
.tier-card:nth-child(2) { border-top-color: var(--accent); }
.tier-card:nth-child(3) { border-top-color: var(--sidebar-bg); }
[data-theme="dark"] .tier-card:nth-child(3) { border-top-color: #6dd3a2; }
.tier-card .tier-no { font-size: 0.8125rem; font-weight: 700; color: var(--muted-foreground); }
.tier-card ul { margin-top: 12px; display: grid; gap: 6px; }
.tier-card li { padding-left: 16px; position: relative; color: var(--ink-secondary); font-size: 0.9375rem; }
.tier-card li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* Feature groups */
.feature { display: grid; gap: 28px; align-items: center; padding: 40px 0; border-top: 1px solid var(--border); }
.feature:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; }
  .feature.reverse .feature-media { order: 2; }
}
.feature h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); font-weight: 700; margin-bottom: 12px; }
.feature p { color: var(--ink-secondary); }
.feature ul { margin-top: 16px; display: grid; gap: 8px; }
.feature li { padding-left: 22px; position: relative; color: var(--ink-secondary); }
.feature li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 5px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg);
}
.feature .tag {
  display: inline-block; margin-top: 16px; font-size: 0.8125rem; font-weight: 600;
  color: var(--muted-foreground); border: 1px dashed var(--border); border-radius: 999px; padding: 4px 10px;
}
.feature-media figure { margin: 0; }
.feature-media figure + figure { margin-top: 16px; }
.shot {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.shot img { width: 100%; height: auto; }
.feature-media .pair { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: start; }
.feature-media .pair.landscape { grid-template-columns: minmax(0, 1fr); }
.feature-media .pair .phone-shot { border-radius: 26px; padding: 6px; background: #0b1712; border: 0; }
.feature-media .pair .phone-shot img { border-radius: 20px; }
figcaption { font-size: 0.8125rem; color: var(--muted-foreground); padding: 10px 2px 0; }
.no-shot {
  border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 28px; color: var(--muted-foreground);
  background: var(--surface-sunken); font-size: 0.9375rem;
}
.feature-grid-3 { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 840px) { .feature-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Gallery */
.gallery { display: grid; gap: 16px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery figure { margin: 0; }
.gallery a.zoom { display: block; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; background: var(--card); box-shadow: var(--shadow-card); }
.gallery a.zoom:hover { border-color: var(--muted-foreground); }
.gallery img { width: 100%; height: auto; }
.gallery figcaption { font-size: 0.875rem; color: var(--ink-secondary); padding: 10px 4px 0; }
.gallery .zoom-hint { color: var(--primary); font-weight: 600; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%;
}
.lightbox::backdrop { background: rgba(5, 14, 10, 0.86); }
.lightbox-inner { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; box-sizing: border-box; }
.lightbox img { max-height: calc(100vh - 110px); max-width: 100%; width: auto; height: auto; border-radius: var(--radius-md); }
.lightbox p { color: #e3ece6; font-size: 0.9375rem; text-align: center; max-width: 60em; }
.lightbox .close {
  position: absolute; top: 12px; right: 12px; min-width: 44px; min-height: 44px;
  border-radius: var(--radius-md); border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(0, 0, 0, 0.4);
  color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.lightbox .close:hover { background: rgba(0, 0, 0, 0.6); }

/* Developers */
.hero-grid > *, .feature > *, .feature-media > *, .pair > *, .dev-grid > *, .two-col > *, .cards-3 > *, .tier-cards > *, .gallery > li { min-width: 0; }
.dev-grid { display: grid; gap: 24px; }
@media (min-width: 960px) { .dev-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 32px; } }
pre.code {
  margin: 0; background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius-lg);
  padding: 18px 18px; overflow-x: auto; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem; line-height: 1.6; border: 1px solid var(--border);
}
pre.code .c { color: #8ea398; }
pre.code .k { color: #f2b544; }
pre.code .s { color: #9be3b9; }
.cmd {
  margin-top: 12px; background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius-md);
  padding: 12px 14px; overflow-x: auto; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 0.8125rem; white-space: pre;
}
.bullets { display: grid; gap: 12px; margin-top: 16px; }
.bullets li { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--ink-secondary); }
.bullets strong { color: var(--foreground); display: block; margin-bottom: 2px; }
.stack-list { margin-top: 12px; display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); }
.stack-list div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 16px; border-top: 1px solid var(--border); }
.stack-list div:first-child { border-top: 0; }
.stack-list dt { font-weight: 700; }
.stack-list dd { margin: 0; color: var(--ink-secondary); font-size: 0.9rem; }
@media (min-width: 640px) { .stack-list div { grid-template-columns: 180px 1fr; gap: 16px; } }

/* Open source / status */
.two-col { display: grid; gap: 16px; }
@media (min-width: 840px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.link-list { display: grid; gap: 10px; margin-top: 14px; }
.link-list a {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card);
  text-decoration: none; color: var(--foreground); font-weight: 600;
}
.link-list a span:last-child { color: var(--primary); }
.link-list a:hover { border-color: var(--primary); color: var(--foreground); }
.status {
  border-radius: var(--radius-xl); padding: 28px; background: var(--card); border: 1px solid var(--border);
  border-left: 6px solid var(--accent); box-shadow: var(--shadow-card);
}
.version-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; background: var(--primary-subtle); color: var(--primary); }
.pill.warn { background: var(--accent-subtle); color: var(--accent); }
.status ul { margin-top: 12px; display: grid; gap: 10px; }
.status li { padding-left: 22px; position: relative; color: var(--ink-secondary); }
.status li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Footer */
.site-footer { background: var(--sidebar-darker); color: var(--sidebar-muted); padding: 40px 0 48px; }
.site-footer .wrap { display: grid; gap: 20px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }
.site-footer a { color: var(--sidebar-foreground); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer .brand { color: var(--sidebar-foreground); }
.site-footer p { font-size: 0.875rem; }

/* Tier diagram (inline SVG; colours come from the page tokens so both themes work) */
.t-band-core { fill: var(--sidebar-bg); }
.t-band-app { fill: var(--primary-subtle); }
.t-band-mini { fill: var(--accent-subtle); }
.t-chip-core { fill: rgba(255, 255, 255, 0.08); stroke: rgba(255, 255, 255, 0.22); }
.t-chip { fill: var(--card); stroke: var(--border); }
.t-chip-mini { fill: var(--card); stroke: var(--accent); }
.t-title-core { fill: var(--sidebar-foreground); }
.t-desc-core { fill: var(--sidebar-muted); }
.t-title { fill: var(--foreground); }
.t-desc { fill: var(--ink-secondary); }
.t-label { fill: var(--foreground); }
.t-label-mini { fill: var(--accent); }
.t-link { stroke: var(--primary); stroke-width: 2; fill: none; }
.t-link-text { fill: var(--ink-secondary); }
.t-font { font-family: "Be Vietnam Pro", system-ui, sans-serif; }

/* Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Round 1: stats strip, section bands, tall traceability frame, notes */
.stats { background: var(--card); border-bottom: 1px solid var(--border); }
.stats ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 22px 0; }
@media (min-width: 840px) { .stats ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats li { padding: 8px 14px; border-left: 3px solid var(--primary); margin: 6px 0; }
.stats strong { display: block; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.1; color: var(--primary); font-weight: 700; }
.stats span { display: block; font-size: 0.875rem; color: var(--ink-secondary); margin-top: 4px; }
section.band { background: var(--surface-sunken); }
.shot.tall .frame-top { position: relative; max-height: 560px; overflow: hidden; }
.shot.tall .frame-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--card));
}
.shot.tall .frame-top img { width: 100%; height: auto; }
.shot.tall a.zoom { display: block; }
.feature-note { margin-top: 14px; font-size: 0.9rem; color: var(--muted-foreground); }

/* Round 2: deep hero with motion, device depth and floating cards */
.hero-deep { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(172deg, #0f3324 0%, #0b2319 58%, #081a13 100%); }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-bg .glow { position: absolute; border-radius: 50%; filter: blur(56px); opacity: 0.6; animation: drift 22s ease-in-out infinite alternate; }
.hero-bg .g1 { width: 560px; height: 560px; left: -160px; top: -180px; background: radial-gradient(circle, rgba(76, 195, 138, 0.55), transparent 65%); }
.hero-bg .g2 { width: 640px; height: 640px; right: -220px; bottom: -260px; background: radial-gradient(circle, rgba(242, 181, 68, 0.22), transparent 65%); animation-delay: -9s; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(48px, -34px, 0) scale(1.08); } }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; }
.contours path { fill: none; stroke: rgba(160, 230, 190, 0.13); stroke-width: 1.2; }
.hero-deep .wrap { position: relative; }
.hero-deep .hero-grid { align-items: center; }
.eyebrow-light { color: #f2b544; }
.hl { color: inherit; background: linear-gradient(transparent 58%, rgba(76, 195, 138, 0.38) 58%); padding: 0 4px; border-radius: 4px; }
.proof { margin-top: 26px; font-size: 0.8125rem; color: var(--sidebar-muted); opacity: 0.9; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.stage3d { position: relative; perspective: 1600px; margin: 0; padding-bottom: 36px; }
@media (min-width: 1200px) { .stage3d { padding-right: 6%; padding-bottom: 56px; } }
.dev-browser {
  background: var(--card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 18px 40px -12px rgba(0, 0, 0, 0.55), 0 50px 90px -30px rgba(0, 0, 0, 0.7);
  transform: rotateY(-9deg) rotateX(5deg) rotateZ(-0.6deg); transform-origin: 20% 50%;
  animation: rise 1s cubic-bezier(0.2, 0, 0, 1) both;
}
.dev-browser img { width: 100%; height: auto; }
.dev-phone {
  position: absolute; right: 0; bottom: 0; width: 30%; min-width: 118px; max-width: 200px;
  background: #06120d; padding: 8px; border-radius: 30px; border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -18px rgba(0, 0, 0, 0.75);
  animation: rise 1s cubic-bezier(0.2, 0, 0, 1) 0.15s both;
}
.dev-phone img { border-radius: 22px; width: 100%; height: auto; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: rgba(17, 34, 25, 0.82); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius-lg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--sidebar-foreground);
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.6); animation: rise 1s cubic-bezier(0.2, 0, 0, 1) 0.45s both;
}
.float-card span { display: block; font-size: 0.75rem; color: var(--sidebar-muted); }
.float-card strong { display: block; font-size: 0.9375rem; }
.float-card .small { font-size: 0.7rem; }
.card-qr { left: -2%; top: 8%; max-width: 230px; }
.card-qr .qr-motif { width: 64px; height: 64px; flex: 0 0 auto; background: #f5f7f3; border-radius: 8px; padding: 5px; }
.card-qr .qr-motif rect { fill: #143c2d; }
.card-sensor { right: 4%; top: -4%; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: #4cc38a; box-shadow: 0 0 0 0 rgba(76, 195, 138, 0.6); animation: pulse 2s ease-out infinite; flex: 0 0 auto; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0.6); } 80%, 100% { box-shadow: 0 0 0 14px rgba(76, 195, 138, 0); } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; } }
@media (max-width: 1199px) {
  .stage3d { padding-bottom: 0; }
  .dev-browser { transform: none; }
  .dev-phone { position: relative; width: 40%; max-width: 180px; margin: -36px 0 0 auto; }
  .card-qr { left: 0; top: auto; bottom: auto; margin-top: 16px; position: relative; }
  .card-sensor { position: relative; right: auto; top: auto; margin-top: 12px; }
}
@media (max-width: 639px) {
  .card-qr { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-deep *, .hero-deep *::before, .hero-deep *::after { animation: none !important; }
  .dev-browser { transform: none; }
}
.site-header { transition: padding 200ms cubic-bezier(0.2, 0, 0, 1), box-shadow 200ms; }
.site-header.scrolled { box-shadow: 0 6px 24px -12px rgba(0, 0, 0, 0.5); }
.site-header.scrolled .wrap { min-height: 52px; }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }

.hero-copy h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.25rem); }
.hl.nowrap { white-space: nowrap; }
.stage3d { padding-bottom: 72px; }
.stage-caption { position: absolute; left: 0; bottom: 0; max-width: 56%; margin: 0; }
@media (max-width: 1199px) { .stage-caption { position: static; max-width: none; margin-top: 16px; } }
.card-qr { left: -3%; top: auto; bottom: 14%; }
@media (max-width: 1199px) { .card-qr { bottom: auto; } }

/* Round 2: story (sticky stage in JavaScript mode), bento grid, screen tabs */
.story-sec { background: var(--background); }
.story { display: grid; gap: 28px; }
.story-steps { display: grid; gap: 12px; counter-reset: none; }
.story-step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid transparent; transition: background 200ms, border-color 200ms; }
.story-step h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 6px; }
.story-step p { color: var(--ink-secondary); }
.step-no { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-subtle); color: var(--primary); font-weight: 700; }
.story-stage { display: grid; gap: 20px; }
.story-panel { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 16px; box-shadow: var(--shadow-card); }
.story-panel > img { border-radius: var(--radius-lg); width: 100%; height: auto; }
.story-panel figcaption { font-size: 0.875rem; color: var(--muted-foreground); padding: 12px 4px 0; }
.frame-top.lot { max-height: 520px; overflow: hidden; position: relative; border-radius: var(--radius-lg); }
.frame-top.lot::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--card)); }
.frame-top.lot img { width: 100%; height: auto; }
.qr-stage { text-align: center; padding: 24px 12px; }
.qr-stage .qr-motif { width: min(240px, 70%); height: auto; background: #f5f7f3; padding: 14px; border-radius: 18px; }
.qr-stage .qr-motif rect { fill: #143c2d; }
.qr-stage p { margin-top: 14px; color: var(--muted-foreground); font-size: 0.875rem; }
.illo { width: 100%; height: auto; display: block; }
.ill-card { fill: var(--surface-sunken); stroke: var(--border); }
.ill-row { fill: var(--card); stroke: var(--border); }
.ill-h { fill: var(--muted-foreground); font-size: 15px; font-weight: 600; font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.ill-t { fill: var(--foreground); font-size: 19px; font-weight: 700; font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.ill-s { fill: var(--ink-secondary); font-size: 14px; font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.ill-ok { fill: var(--success-subtle); }
.ill-okt { fill: var(--success); font-size: 13px; font-weight: 600; font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.ill-track { fill: var(--surface-sunken); }
.ill-fill { fill: var(--primary); }
.ill-leaf { fill: var(--primary); opacity: 0.9; }
.ill-vein { fill: none; stroke: var(--primary-subtle); stroke-width: 4; stroke-linecap: round; }
.ill-spot { fill: var(--accent); }
@media (min-width: 1024px) {
  .story { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; gap: 56px; }
  .js .story-stage { position: sticky; top: 96px; height: 540px; display: block; }
  .js .story-panel { position: absolute; inset: 0; opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 450ms cubic-bezier(0.2, 0, 0, 1), transform 450ms cubic-bezier(0.2, 0, 0, 1); pointer-events: none; overflow: auto; }
  .js .story-panel.is-active { opacity: 1; transform: none; pointer-events: auto; }
  .js .story-step.is-current { background: var(--card); border-color: var(--border); box-shadow: var(--shadow-card); }
  .js .story-step.is-current .step-no { background: var(--primary); color: var(--primary-foreground); }
}

/* Bento grid: cards of two sizes on wide screens, one column on phones */
.bento { display: grid; gap: 16px; }
@media (min-width: 720px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bento-card.wide { grid-column: span 2; } }
@media (min-width: 1100px) { .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bento-card.wide { grid-column: span 2; } }
.bento-card {
  position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--radius-xl);
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-card); overflow: hidden;
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1), box-shadow 200ms cubic-bezier(0.2, 0, 0, 1), border-color 200ms;
}
.bento-card:hover, .bento-card:focus-within { transform: translate3d(0, -4px, 0); box-shadow: 0 18px 40px -20px rgba(9, 35, 25, 0.35); border-color: var(--primary); }
.bento-ic { width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--primary-subtle); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.bento-ic svg { width: 24px; height: 24px; }
.bento-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.bento-card p { color: var(--ink-secondary); }
.bento-vis { margin-top: auto; padding-top: 18px; }
.mini-chart { width: 100%; height: 150px; display: block; }
.mini-chart .grid path { stroke: var(--border); stroke-width: 1; }
.mini-chart .area { fill: var(--primary-subtle); }
.mini-chart .line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 0; }
.mini-chart .dots circle { fill: var(--accent); }
.bento-qr .qr-motif { width: 96px; height: 96px; background: #f5f7f3; padding: 8px; border-radius: 12px; }
.bento-qr .qr-motif rect { fill: #143c2d; }
.snippet { margin: 0; background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius-md); padding: 12px 14px; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 0.8125rem; overflow-x: auto; white-space: pre; }
.snippet .k { color: #f2b544; }
.wave { width: 100%; height: 60px; }
.wave-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.bento-dev { width: 64px; height: 110px; border-radius: 14px; border: 3px solid var(--primary); display: flex; flex-direction: column; gap: 8px; padding: 10px 8px; }
.bento-dev span { height: 14px; border-radius: 6px; background: var(--primary-subtle); }
.bento-dev span:first-child { background: var(--primary); }
.bento-shield { width: 64px; height: 64px; color: var(--primary); }
.bento-shield svg { width: 64px; height: 64px; }

/* Screen tabs: radio inputs, so the arrow keys work without JavaScript */
.showcase { display: grid; gap: 20px; }
.sc-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sc-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-tab {
  min-height: 44px; display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card); color: var(--ink-secondary); font-weight: 600; font-size: 0.9375rem;
  transition: background 150ms, color 150ms, border-color 150ms;
}
.sc-tab:hover { border-color: var(--primary); color: var(--foreground); }
.sc-input:focus-visible + .sc-tabs .sc-tab, .sc-input:focus-visible ~ .sc-tabs .sc-tab { outline: none; }
.sc-input:focus-visible ~ .sc-tabs label[for] { }
.sc-panels { position: relative; }
.sc-panel { display: none; margin: 0; }
.sc-panel figcaption { margin-top: 12px; color: var(--muted-foreground); font-size: 0.9375rem; }
.sc-panel .shot { border-radius: var(--radius-xl); }
#sc1:checked ~ .sc-tabs label[for="sc1"], #sc2:checked ~ .sc-tabs label[for="sc2"], #sc3:checked ~ .sc-tabs label[for="sc3"],
#sc4:checked ~ .sc-tabs label[for="sc4"], #sc5:checked ~ .sc-tabs label[for="sc5"], #sc6:checked ~ .sc-tabs label[for="sc6"] {
  background: var(--primary); color: var(--primary-foreground); border-color: var(--primary);
}
#sc1:checked ~ .sc-panels .sc-p1, #sc2:checked ~ .sc-panels .sc-p2, #sc3:checked ~ .sc-panels .sc-p3,
#sc4:checked ~ .sc-panels .sc-p4, #sc5:checked ~ .sc-panels .sc-p5, #sc6:checked ~ .sc-panels .sc-p6 { display: block; }
.showcase:focus-within .sc-tabs { outline: none; }
#sc1:focus-visible ~ .sc-tabs label[for="sc1"] { outline: 3px solid var(--focus); outline-offset: 3px; }
#sc2:focus-visible ~ .sc-tabs label[for="sc2"] { outline: 3px solid var(--focus); outline-offset: 3px; }
#sc3:focus-visible ~ .sc-tabs label[for="sc3"] { outline: 3px solid var(--focus); outline-offset: 3px; }
#sc4:focus-visible ~ .sc-tabs label[for="sc4"] { outline: 3px solid var(--focus); outline-offset: 3px; }
#sc5:focus-visible ~ .sc-tabs label[for="sc5"] { outline: 3px solid var(--focus); outline-offset: 3px; }
#sc6:focus-visible ~ .sc-tabs label[for="sc6"] { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (min-width: 720px) { .bento-card:last-child { grid-column: 1 / -1; } }

/* Round 2: architecture flows, developer section, rich footer, band transitions */
.tiers-desktop .flow { outline: none; cursor: default; }
.tiers-desktop .flow line.t-link, .tiers-desktop .flow polygon { transition: stroke-width 200ms, opacity 200ms; }
.tiers-desktop .flow-a line.t-link { stroke-dasharray: 7 6; animation: flowdash 1.1s linear infinite; }
.tiers-desktop .flow-b line.t-link { stroke-dasharray: 7 6; animation: flowdash 1.6s linear infinite; }
.tiers-desktop .flow:hover line, .tiers-desktop .flow:focus-visible line { stroke-width: 3.5; }
.tiers-desktop .flow:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.tiers-desktop .flow:hover text, .tiers-desktop .flow:focus-visible text { font-weight: 700; }
.tiers-desktop:has(.flow-a:hover) .flow-b, .tiers-desktop:has(.flow-a:focus-visible) .flow-b { opacity: 0.3; }
.tiers-desktop:has(.flow-b:hover) .flow-a, .tiers-desktop:has(.flow-b:focus-visible) .flow-a { opacity: 0.3; }
@keyframes flowdash { to { stroke-dashoffset: -26; } }
.arch-legend { display: grid; gap: 10px; margin: 20px auto 0; max-width: 760px; }
.legend-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--border); color: var(--ink-secondary); transition: border-color 200ms, opacity 200ms; }
.legend-item strong { color: var(--foreground); }
.legend-item:hover { border-color: var(--primary); }
.legend-hint { font-size: 0.8125rem; color: var(--muted-foreground); }
.sw { width: 28px; height: 6px; border-radius: 3px; margin-top: 9px; flex: 0 0 auto; }
.sw-a { background: var(--primary); }
.sw-b { background: var(--accent); }
.arch:has(.legend-a:hover) .legend-b { opacity: 0.5; }
.arch:has(.legend-b:hover) .legend-a { opacity: 0.5; }
@media (prefers-reduced-motion: reduce) { .tiers-desktop .flow line.t-link { animation: none !important; } }

.dev-stack { display: grid; gap: 24px; }
@media (min-width: 1024px) { .dev-stack { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; } }
.term { border-radius: var(--radius-xl); overflow: hidden; background: var(--code-bg); border: 1px solid #1c3a2c; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.55); min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: #0a1c15; border-bottom: 1px solid #1c3a2c; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3d5a4c; display: block; }
.term-bar span { margin-left: auto; font-size: 0.75rem; color: #8ea398; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }
.term-body { margin: 0; padding: 18px; color: #e3ece6; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 0.8125rem; line-height: 1.8; overflow-x: auto; white-space: pre; }
.term-body .p { color: #4cc38a; }
.term-body .c { color: #8ea398; }
.codetabs { min-width: 0; display: grid; gap: 14px; }
.codetabs .sc-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.code-panels { position: relative; }
.code-panel { display: none; }
.code-panel p { margin-bottom: 8px; }
.code-x { margin: 0; background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius-lg); padding: 16px 18px; overflow-x: auto; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 0.8125rem; line-height: 1.65; white-space: pre; border: 1px solid #1c3a2c; }
.code-x .k { color: #f2b544; }
.code-x .c { color: #8ea398; }
.codebox { position: relative; }
.cbtn { position: absolute; top: 10px; right: 10px; min-height: 36px; padding: 4px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(0, 0, 0, 0.35); color: #e3ece6; font: inherit; font-size: 0.8rem; cursor: pointer; }
.cbtn:hover { background: rgba(0, 0, 0, 0.55); }
.cbtn[hidden] { display: none; }
#ct1:checked ~ .sc-tabs label[for="ct1"], #ct2:checked ~ .sc-tabs label[for="ct2"], #ct3:checked ~ .sc-tabs label[for="ct3"] { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
#ct1:checked ~ .code-panels .ct-p1, #ct2:checked ~ .code-panels .ct-p2, #ct3:checked ~ .code-panels .ct-p3 { display: block; }
#ct1:focus-visible ~ .sc-tabs label[for="ct1"], #ct2:focus-visible ~ .sc-tabs label[for="ct2"], #ct3:focus-visible ~ .sc-tabs label[for="ct3"] { outline: 3px solid var(--focus); outline-offset: 3px; }
.guarantees { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 840px) { .guarantees { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guar { padding: 22px; border-radius: var(--radius-xl); background: var(--card); border: 1px solid var(--border); border-top: 4px solid var(--primary); box-shadow: var(--shadow-card); }
.guar h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.guar p { color: var(--ink-secondary); font-size: 0.9375rem; }
.devdocs { margin-top: 24px; }
.devdocs a { font-weight: 600; }

.band { position: relative; }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: -40px; height: 42px; background: var(--surface-sunken); border-radius: 0 0 50% 50% / 0 0 100% 100%; pointer-events: none; }
.band.dark-curve::before { background: var(--background); }

.foot-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 0.8fr; } }
.foot-grid nav { display: grid; gap: 8px; align-content: start; }
.foot-grid nav a { color: var(--sidebar-muted); text-decoration: none; font-size: 0.9375rem; min-height: 28px; }
.foot-grid nav a:hover { color: var(--sidebar-foreground); text-decoration: underline; }
.foot-h { font-weight: 700; color: var(--sidebar-foreground); margin-bottom: 4px; }
.foot-lic { font-size: 0.8125rem; }

.codetabs { grid-template-columns: minmax(0, 1fr); }
.code-panels, .code-panel, .codebox { min-width: 0; max-width: 100%; }
.term-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Round 3: illustration colours (light and dark set explicitly) and bento visuals */
:root { --viz-track: #e3e9e4; --viz-line: #176c4b; --viz-dot: #b45309; --viz-dim: #9aa8a0; --viz-frame: #0b1712; --viz-ink: #19231e; }
:root[data-theme="dark"] { --viz-track: #1f3a2d; --viz-line: #4cc38a; --viz-dot: #f2b544; --viz-dim: #5f7a6c; --viz-frame: #06120d; --viz-ink: #e3ece6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --viz-track: #1f3a2d; --viz-line: #4cc38a; --viz-dot: #f2b544; --viz-dim: #5f7a6c; --viz-frame: #06120d; --viz-ink: #e3ece6; } }
.ill-card { fill: var(--surface-sunken); stroke: var(--border); }
.ill-row { fill: var(--card); stroke: var(--border); }
.ill-h, .ill-t { fill: var(--foreground); }
.ill-s { fill: var(--ink-secondary); }
.ill-ok { fill: var(--success-subtle); }
.ill-okt { fill: var(--success); }
.ill-track { fill: var(--viz-track); }
.ill-fill { fill: var(--primary); }
.ill-leaf { fill: var(--primary); }
.ill-vein { stroke: var(--primary-subtle); }
.ill-spot { fill: var(--accent); }
.illo text { font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.viz { display: block; width: 100%; height: auto; }
.viz text { font-family: "Be Vietnam Pro", system-ui, sans-serif; fill: var(--ink-secondary); font-size: 12px; }
.viz .v-strong { fill: var(--viz-ink); font-weight: 700; font-size: 14px; }
.viz .v-axis { stroke: var(--viz-track); stroke-width: 1; }
.viz .v-bar { fill: var(--viz-line); }
.viz .v-bar2 { fill: var(--viz-dot); }
.viz .v-bar3 { fill: var(--viz-dim); }
.viz .v-line { fill: none; stroke: var(--viz-line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.viz .v-area { fill: var(--viz-line); opacity: 0.14; }
.viz .v-dot { fill: var(--viz-dot); }
.viz .v-ring { fill: none; stroke: var(--viz-dot); stroke-width: 2; opacity: 0.6; transform-origin: center; animation: ring 2s ease-out infinite; }
@keyframes ring { from { transform: scale(0.6); opacity: 0.7; } to { transform: scale(2.4); opacity: 0; } }
.viz .seg-a { stroke: var(--viz-line); } .viz .seg-b { stroke: var(--viz-dot); } .viz .seg-c { stroke: var(--viz-dim); }
.viz .frame-line { fill: none; stroke: var(--viz-dot); stroke-width: 3; stroke-linecap: round; }
.viz .box { fill: var(--card); stroke: var(--border); }
.viz .box-off { fill: var(--surface-sunken); stroke: var(--border); }
.viz .row { fill: var(--surface-sunken); }
.viz .row-on { fill: var(--primary-subtle); stroke: var(--primary); stroke-width: 1.5; }
.viz .row-off { fill: var(--viz-track); opacity: 0.6; }
.viz .pill-on { fill: var(--primary); }
.viz .pill-on-t { fill: var(--primary-foreground); font-weight: 700; }
.viz .token { fill: var(--accent-subtle); stroke: var(--accent); }
.viz .token-t { fill: var(--accent); font-weight: 700; }
.viz .flow { fill: none; stroke: var(--viz-line); stroke-width: 2; stroke-dasharray: 6 6; }
.bento-vis { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; margin-top: 16px; }
.bento-vis.dash-viz { min-height: 230px; }
.bento-vis.center { justify-content: center; }
.qr-frame { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface-sunken); border: 1px solid var(--border); align-self: flex-start; }
.qr-frame .qr-motif { width: 128px; height: 128px; background: #f5f7f3; padding: 10px; border-radius: 10px; }
.qr-frame .qr-motif rect { fill: #143c2d; }
.qr-frame .corner { position: absolute; width: 18px; height: 18px; border: 3px solid var(--primary); }
.qr-frame .c-tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.qr-frame .c-tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.qr-frame .c-bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.qr-frame .c-br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.qr-frame .scan { position: absolute; left: 16px; right: 16px; top: 50%; height: 2px; background: var(--viz-dot); opacity: 0.85; }
.qr-frame code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 0.8125rem; color: var(--foreground); }
.qr-wrap { display: flex; gap: 16px; align-items: center; }
.qr-wrap p { font-size: 0.8125rem; color: var(--muted-foreground); }
.man { margin: 0; background: var(--code-bg); color: #e3ece6; border-radius: var(--radius-md); padding: 14px 16px; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 0.78rem; line-height: 1.7; overflow-x: auto; white-space: pre; border: 1px solid #1c3a2c; }
.man .k { color: #f2b544; } .man .s { color: #9be3b9; } .man .c { color: #8ea398; } .man .b { color: #e3ece6; }
.shots-pair { display: grid; grid-template-columns: 0.62fr 1fr; gap: 12px; align-items: end; }
.shot-phone { background: var(--viz-frame); border-radius: 24px; padding: 6px; height: 200px; overflow: hidden; border: 1px solid var(--border); }
.shot-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 18px; }
.shot-desk { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); height: 150px; background: var(--card); }
.shot-desk img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.bento-card:last-child .bento-vis { min-height: 150px; }
.viz .bar-s { fill: var(--viz-dim); opacity: 0.6; } .viz .bar-off { fill: var(--viz-track); }
.viz text { font-size: 14px; }
.man { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Round 4: navigation fits from 360 to 1920 px. Seven links inline from 1280 px; below that a menu button
   (a checkbox, so it works without JavaScript) opens the same list under the header. */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.nav-btn {
  display: none; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.22); color: var(--sidebar-foreground); font-weight: 600; font-size: 0.875rem; cursor: pointer;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.08); }
@media (max-width: 1279px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; }
  .header-tools { order: 2; }
  .nav-btn { display: inline-flex; }
  .nav-links { display: none; order: 3; width: 100%; flex-wrap: wrap; margin: 0; padding: 0 0 12px; gap: 4px; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-toggle:checked ~ .header-tools .nav-btn { background: rgba(255, 255, 255, 0.12); }
  .nav-toggle:focus-visible ~ .header-tools .nav-btn { outline: 3px solid var(--focus); outline-offset: 3px; }
  .nav-links a { padding: 10px 12px; }
}
@media (min-width: 1280px) { .nav-links { display: flex; } }
/* Access diagram: intrinsic size on the card, labels at body size */
.bento-card.full .viz { max-width: 420px; margin: 0 auto; }
@media (min-width: 1280px) {
  .site-header .nav-links { margin-left: 8px; }
  .site-header .nav-links a { padding: 8px 7px; }
}
/* Round 4: story panels centre their content in the sticky stage (no empty band under short panels) */
@media (min-width: 1024px) {
  .js .story-stage { height: 500px; }
  .js .story-panel { display: flex; flex-direction: column; justify-content: center; }
}

/* R5 header: slim, translucent, one line; five links; icon theme switch; menu below 1100 px */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(10, 31, 23, 0.72); color: #fff; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid rgba(255, 255, 255, 0.07); transition: background 200ms cubic-bezier(0.2, 0, 0, 1); }
.site-header.scrolled { background: rgba(7, 19, 14, 0.9); }
.site-header .bar { display: flex; align-items: center; gap: 0; min-height: 64px; transition: min-height 200ms cubic-bezier(0.2, 0, 0, 1); }
.site-header.scrolled .bar { min-height: 56px; }
.site-header .brand { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.site-header .brand img { width: 28px; height: 28px; border-radius: 8px; }
.site-header .brand:hover { color: #fff; }
.site-header .nav-links { display: flex; gap: 2px; margin-left: 40px; }
.site-header .nav-links a { color: rgba(255, 255, 255, 0.72); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; white-space: nowrap; transition: color 150ms, background 150ms; }
.site-header .nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.site-header .header-tools { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.site-header .lang { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.5); }
.site-header .lang a { color: inherit; text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.site-header .lang a:hover { color: #fff; }
.site-header .lang a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.1); }
.site-header .icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: transparent; color: #fff; display: inline-grid; place-items: center; cursor: pointer; transition: background 150ms; }
.site-header .icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.site-header .icon-btn[hidden] { display: none; }
.site-header .icon-btn svg { width: 18px; height: 18px; }
.site-header .hdr-gh { background: #fff; color: #0f2a20; font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap; transition: background 150ms; }
.site-header .hdr-gh:hover { background: #e7f1eb; color: #0f2a20; }
.site-header .nav-toggle { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.site-header .nav-btn { display: none; }
:root[data-theme="dark"] .site-header .hdr-gh, :root[data-theme="dark"] .site-header .hdr-gh { background: var(--primary); color: var(--primary-foreground); }
@media (prefers-color-scheme: dark) {

:root[data-theme="dark"] .site-header .hdr-gh, :root:not([data-theme="light"]) .site-header .hdr-gh { background: var(--primary); color: var(--primary-foreground); }
}
:root[data-theme="dark"] .site-header .hdr-gh:hover, :root[data-theme="dark"] .site-header .hdr-gh:hover { background: #e2f67f; color: var(--primary-foreground); }
@media (prefers-color-scheme: dark) {

:root[data-theme="dark"] .site-header .hdr-gh:hover, :root:not([data-theme="light"]) .site-header .hdr-gh:hover { background: #e2f67f; color: var(--primary-foreground); }
}
@media (max-width: 1099px) {
  .site-header .nav-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; margin-left: auto; margin-right: 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
  .site-header .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px; margin: 0; padding: 8px 16px 18px; background: rgba(7, 19, 14, 0.96); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .site-header .nav-links a { font-size: 16px; padding: 12px 14px; }
  .site-header .nav-toggle:checked ~ .nav-links { display: flex; }
  .site-header .nav-toggle:checked ~ .nav-btn { background: rgba(255, 255, 255, 0.12); }
  .site-header .nav-toggle:focus-visible ~ .nav-btn { outline: 3px solid var(--focus); outline-offset: 3px; }
}
@media (max-width: 639px) { .site-header .brand span { display: none; } .site-header .hdr-gh { display: none; } }

/* R5 hero: one headline, one sentence, two actions; the lime accent is the only accent in the hero */
.hero-deep { --hero-accent: #d6f05c; background: radial-gradient(120% 80% at 80% 0%, rgba(76, 195, 138, 0.14), transparent 60%), linear-gradient(180deg, #0f2a20 0%, #0a1f17 100%); padding: 96px 0 120px; }
@media (min-width: 1024px) { .hero-deep { padding: 128px 0 160px; } }
.hero-deep .eyebrow { color: rgba(255, 255, 255, 0.62); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; margin-bottom: 24px; }
.hero-deep h1 { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; color: #fff; max-width: 13em; }
.hero-deep .hl { color: var(--hero-accent); }
.hero-deep .hero-lead { margin-top: 24px; font-size: 20px; line-height: 1.5; color: #c9dcd1; max-width: 32em; }
.hero-deep .hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-deep .btn { min-height: 48px; padding: 12px 22px; border-radius: 999px; font-size: 16px; }
.hero-deep .btn-solid-light { background: var(--hero-accent); color: #0b1712; border-color: transparent; font-weight: 600; }
.hero-deep .btn-solid-light:hover { background: #e2f67f; color: #0b1712; }
.hero-deep .btn-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.hero-deep .btn-light:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.hero-deep .stage3d { margin-top: 72px; }
@media (min-width: 1024px) { .hero-deep .stage3d { margin-top: 0; } }

/* R5 proof strip: three countable facts, no cards */
.proof-strip { padding: 48px 0; background: var(--background); border-bottom: 1px solid var(--border); }
.proof-grid { display: grid; gap: 32px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proof-grid > div { display: grid; gap: 6px; }
.proof-grid strong { font-size: clamp(2.25rem, 1.6rem + 1.6vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--foreground); }
.proof-grid span { font-size: 15px; color: var(--muted-foreground); line-height: 1.45; max-width: 16em; }
@media (max-width: 639px) { .proof-grid { grid-template-columns: 1fr; gap: 24px; } }

/* R5 story: borderless steps; the current step takes the accent tint; the stage is one soft card */
.story-sec { background: var(--background); padding: 120px 0; }
@media (min-width: 1024px) { .story-sec { padding: 144px 0; } }
.story { gap: 56px; }
.story-steps { gap: 4px; }
.story-step { padding: 18px 20px; border-radius: var(--radius-lg); border: 0; background: transparent; gap: 16px; }
.story-step h3 { font-size: 18px; margin-bottom: 4px; letter-spacing: -0.01em; }
.story-step p { font-size: 16px; line-height: 1.5; color: var(--muted-foreground); }
.step-no { width: 32px; height: 32px; font-size: 14px; background: var(--surface-sunken); color: var(--ink-secondary); }
.story-panel { border: 0; border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-card); padding: 20px; }
.story-panel figcaption { font-size: 14px; color: var(--muted-foreground); }
.js .story-step.is-current { background: var(--primary-subtle); border-color: transparent; box-shadow: none; }
.js .story-step.is-current .step-no { background: var(--primary); color: var(--primary-foreground); }
.story-sec .section-head { margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.1; }
.section-head p { font-size: 18px; line-height: 1.5; color: var(--muted-foreground); }
.section-head .eyebrow { color: var(--muted-foreground); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; }

/* R5 capabilities: tiles on the surface tint, no outlines, one radius and one shadow */
.bento-sec { background: var(--background); padding: 120px 0; }
@media (min-width: 1024px) { .bento-sec { padding: 144px 0; } }
.bento-sec .section-head { margin-bottom: 56px; }
.bento { gap: 20px; }
.bento-card { background: var(--card); border: 0; border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-card); }
.bento-card:hover, .bento-card:focus-within { transform: translate3d(0, -3px, 0); border-color: transparent; box-shadow: 0 24px 48px -24px rgba(10, 31, 23, 0.28); }
.bento-card h3 { font-size: 20px; letter-spacing: -0.015em; margin-bottom: 6px; }
.bento-card p { font-size: 16px; line-height: 1.5; color: var(--muted-foreground); max-width: 34em; }
.bento-ic { display: none; }
.bento-vis { margin-top: 24px; }

/* R5 showcase: one large frame per screen, one shadow, quiet tabs */
.showcase-sec { background: var(--background); padding: 0 0 120px; }
@media (min-width: 1024px) { .showcase-sec { padding-bottom: 144px; } }
.showcase { gap: 28px; }
.sc-tabs { gap: 6px; }
.sc-tab { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 0; background: var(--surface-sunken); color: var(--ink-secondary); font-size: 15px; font-weight: 600; }
.sc-tab:hover { background: var(--border); color: var(--foreground); }
#sc1:checked ~ .sc-tabs label[for="sc1"], #sc2:checked ~ .sc-tabs label[for="sc2"], #sc3:checked ~ .sc-tabs label[for="sc3"],
#sc4:checked ~ .sc-tabs label[for="sc4"], #sc5:checked ~ .sc-tabs label[for="sc5"], #sc6:checked ~ .sc-tabs label[for="sc6"] {
  background: var(--primary); color: var(--primary-foreground); border-color: transparent;
}
.sc-panel { border-radius: var(--radius-xl); }
.sc-panel .zoom { display: block; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-stage); background: var(--card); }
.sc-panel .zoom img { display: block; width: 100%; height: auto; }
.sc-panel figcaption { margin-top: 16px; font-size: 15px; color: var(--muted-foreground); }
.sc-panels { min-height: 0; }

/* R5 architecture: three neutral glass layers, quiet chips, the accent only on the flows */
.t-band-core, .t-band-app, .t-band-mini { fill: var(--card); stroke: var(--border); stroke-width: 1; }
.t-chip, .t-chip-core, .t-chip-mini { fill: var(--surface-sunken); stroke: none; }
.t-title, .t-title-core, .t-label, .t-label-mini { fill: var(--foreground); }
.t-desc, .t-desc-core { fill: var(--muted-foreground); }
.t-link { stroke: var(--accent); }
.tiers-desktop polygon { fill: var(--accent) !important; }
.tiers-desktop .flow-a line.t-link, .tiers-desktop .flow-b line.t-link { stroke-width: 2; }
.tiers-desktop .flow-a:hover line, .tiers-desktop .flow-a:focus-visible line,
.tiers-desktop .flow-b:hover line, .tiers-desktop .flow-b:focus-visible line { stroke-width: 3; }
.tiers-desktop text.t-link-text { fill: var(--muted-foreground); }
.tiers-mobile .t-link { stroke: var(--accent); }

.legend-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.arch-legend { gap: 8px; }
.arch:has(.legend-a:focus-visible) .flow-b, .arch:has(.legend-a:hover) .flow-b { opacity: 0.3; }
.arch:has(.legend-b:focus-visible) .flow-a, .arch:has(.legend-b:hover) .flow-a { opacity: 0.3; }
.arch:has(.legend-a:focus-visible) .flow-a line.t-link, .arch:has(.legend-a:hover) .flow-a line.t-link,
.arch:has(.legend-b:focus-visible) .flow-b line.t-link, .arch:has(.legend-b:hover) .flow-b line.t-link { stroke-width: 3.5; }
.arch .flow { transition: opacity 200ms cubic-bezier(0.2, 0, 0, 1); }

/* R5 tier cards: borderless, one shadow, no coloured top edges */
.tier-cards { gap: 20px; margin-top: 40px; }
.tier-card { border: 0 !important; border-top: 0 !important; border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-card); padding: 28px; }
.tier-card:nth-child(n) { border-top: 0 !important; }
.tier-card .tier-no { font-size: 13px; font-weight: 600; color: var(--muted-foreground); letter-spacing: 0; }
.tier-card h3 { font-size: 20px; letter-spacing: -0.015em; margin: 6px 0 10px; }
.tier-card ul { gap: 8px; margin-top: 0; }
.tier-card li { font-size: 16px; line-height: 1.5; color: var(--muted-foreground); padding-left: 16px; }
.tier-card li::before { background: var(--primary); opacity: 0.6; }

/* R5 developers: no wave dividers; the terminal and tabs share the card radius; guarantees are borderless */
.band::before { display: none; }
.band { background: var(--background); }
.developers-sec { background: var(--background); padding: 120px 0; }
#developers { padding: 120px 0; }
@media (min-width: 1024px) { #developers { padding: 144px 0; } }
.term, .code-x, .codebox pre { border-radius: var(--radius-xl); }
.term { box-shadow: var(--shadow-stage); border: 0; }
.guar { border: 0 !important; border-top: 0 !important; border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-card); padding: 26px; }
.guar h3 { font-size: 18px; letter-spacing: -0.01em; margin-bottom: 6px; }
.guar p { font-size: 16px; line-height: 1.5; color: var(--muted-foreground); }
.guarantees { gap: 20px; }
.devdocs a { color: var(--primary); }

/* R5 closing band: licence, version, calls to action and the known limits in one block */
.closing { background: var(--sidebar-bg); color: var(--sidebar-foreground); padding: 120px 0; }
@media (min-width: 1024px) { .closing { padding: 144px 0; } }
.closing-grid { display: grid; gap: 56px; }
@media (min-width: 1024px) { .closing-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.closing h2 { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.1; color: #fff; }
.closing-lead { margin-top: 16px; font-size: 18px; color: #c9dcd1; }
.closing-lead span { color: #fff; font-weight: 600; }
.closing-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.closing .btn { min-height: 46px; padding: 11px 20px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.closing .btn-primary { background: var(--hero-accent, #d6f05c); color: #0b1712; border-color: transparent; }
.closing .btn-primary:hover { background: #e2f67f; color: #0b1712; }
.closing .btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.24); }
.closing .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.closing-limits h3 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.closing-limits ul { display: grid; gap: 12px; }
.closing-limits li { font-size: 16px; line-height: 1.5; color: #bcd3c6; padding-left: 18px; position: relative; }
.closing-limits li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }

/* R5 footer: quiet, four columns, hairline top edge */
.site-footer { background: var(--sidebar-darker); color: var(--sidebar-muted); padding: 72px 0 56px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.site-footer .foot-grid { gap: 40px; }
.site-footer .foot-h { font-size: 13px; font-weight: 600; color: #e8efe9; margin-bottom: 8px; }
.site-footer .foot-grid nav a { font-size: 15px; color: #a9c2b4; }
.site-footer .foot-grid nav a:hover { color: #fff; text-decoration: none; }
.site-footer p { font-size: 15px; line-height: 1.55; }
.site-footer .foot-lic { color: #8fa89b; font-size: 14px; }

/* R5 dark: capability tiles, tier cards and guarantees get a hairline edge instead of a light shadow */
:root[data-theme="dark"] .bento-card, :root[data-theme="dark"] .tier-card, :root[data-theme="dark"] .guar,
:root[data-theme="dark"] .bento-card, :root[data-theme="dark"] .tier-card, :root[data-theme="dark"] .guar {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 48px -28px rgba(0, 0, 0, 0.7);
}
@media (prefers-color-scheme: dark) {


/* R5 dark: capability tiles, tier cards and guarantees get a hairline edge instead of a light shadow */
:root[data-theme="dark"] .bento-card, :root[data-theme="dark"] .tier-card, :root[data-theme="dark"] .guar,
:root:not([data-theme="light"]) .bento-card, :root:not([data-theme="light"]) .tier-card, :root:not([data-theme="light"]) .guar {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 48px -28px rgba(0, 0, 0, 0.7);
}
}

/* R5 dark: the story stage is an elevated surface with a hairline; the active step is lime-tinted */
:root[data-theme="dark"] .story-panel, :root[data-theme="dark"] .story-panel {
  background: #0d1d16; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 80px -36px rgba(0, 0, 0, 0.8);
}
@media (prefers-color-scheme: dark) {


/* R5 dark: the story stage is an elevated surface with a hairline; the active step is lime-tinted */
:root[data-theme="dark"] .story-panel, :root:not([data-theme="light"]) .story-panel {
  background: #0d1d16; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 80px -36px rgba(0, 0, 0, 0.8);
}
}
:root[data-theme="dark"] .js .story-step.is-current, :root[data-theme="dark"] .js .story-step.is-current { background: rgba(214, 240, 92, 0.08); }
@media (prefers-color-scheme: dark) {

:root[data-theme="dark"] .js .story-step.is-current, :root:not([data-theme="light"]) .js .story-step.is-current { background: rgba(214, 240, 92, 0.08); }
}
:root[data-theme="dark"] .js .story-step.is-current .step-no, :root[data-theme="dark"] .js .story-step.is-current .step-no { background: #d6f05c; color: #0b1712; }
@media (prefers-color-scheme: dark) {

:root[data-theme="dark"] .js .story-step.is-current .step-no, :root:not([data-theme="light"]) .js .story-step.is-current .step-no { background: #d6f05c; color: #0b1712; }
}

/* R5 dark: the closing band gets a faint lime glow instead of a flat fill; the showcase frames get the same hairline */
:root[data-theme="dark"] .closing, :root[data-theme="dark"] .closing {
  background: radial-gradient(70% 90% at 90% 0%, rgba(214, 240, 92, 0.07), transparent 60%), linear-gradient(180deg, #0a1a13 0%, #06120d 100%);
}
@media (prefers-color-scheme: dark) {


/* R5 dark: the closing band gets a faint lime glow instead of a flat fill; the showcase frames get the same hairline */
:root[data-theme="dark"] .closing, :root:not([data-theme="light"]) .closing {
  background: radial-gradient(70% 90% at 90% 0%, rgba(214, 240, 92, 0.07), transparent 60%), linear-gradient(180deg, #0a1a13 0%, #06120d 100%);
}
}
:root[data-theme="dark"] .sc-panel .zoom, :root[data-theme="dark"] .sc-panel .zoom {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 80px -36px rgba(0, 0, 0, 0.8);
}
@media (prefers-color-scheme: dark) {

:root[data-theme="dark"] .sc-panel .zoom, :root:not([data-theme="light"]) .sc-panel .zoom {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 80px -36px rgba(0, 0, 0, 0.8);
}
}

/* R5 dark: the service chips sit one step lighter than their layer, so they stay readable on the glass */
:root[data-theme="dark"] .t-chip, :root[data-theme="dark"] .t-chip-core, :root[data-theme="dark"] .t-chip-mini,
:root[data-theme="dark"] .t-chip, :root[data-theme="dark"] .t-chip-core, :root[data-theme="dark"] .t-chip-mini {
  fill: #15301f;
}
@media (prefers-color-scheme: dark) {


/* R5 dark: the service chips sit one step lighter than their layer, so they stay readable on the glass */
:root[data-theme="dark"] .t-chip, :root[data-theme="dark"] .t-chip-core, :root[data-theme="dark"] .t-chip-mini,
:root:not([data-theme="light"]) .t-chip, :root:not([data-theme="light"]) .t-chip-core, :root:not([data-theme="light"]) .t-chip-mini {
  fill: #15301f;
}
}

/* R5 hero: the floating lot card stays inside the stage column, so it cannot run into the copy */
.hero-deep .card-qr { left: 0; }

/* R5 hero: the copy follows its column; fixed measures no longer push the sentence under the stage */
.hero-deep .hero-lead, .hero-deep h1 { max-width: 100%; }

/* R5 hero: the accent phrase stays on one line */
.hero-deep .hl { white-space: nowrap; }

/* Hero headline: two lines by design ("… số" / "cho hợp tác xã chè"); sized so the second line fits its column. */
.hero-deep h1 { font-size: clamp(2.05rem, 1.15rem + 2.75vw, 3.3rem); }
.hero-deep h1 .hl { white-space: nowrap; }
/* Story stage: the picture takes the room that is left, so the caption is never cut off at the bottom of the card. */
@media (min-width: 1024px) {
  .js .story-panel { justify-content: flex-start; overflow: hidden; }
  .js .story-panel > img, .js .story-panel > svg, .js .story-panel > .frame-top { flex: 1 1 auto; min-height: 0; }
  .js .story-panel > img, .js .story-panel > .frame-top img { object-fit: cover; object-position: top; height: 100%; }
  .js .story-panel figcaption { flex: none; }
  .js .story-panel > .qr-stage { margin-block: auto; }
}
