/* Đồng Đường — marketing landing page. Tokens mirror frontend/src/shared/styles/tokens.css. */

/* ---------- Tokens ---------- */
:root {
  --bg: #edf1ee;
  --surface: #ffffff;
  --sunk: #f5f8f6;
  --ink: #16211d;
  --muted: #5a6962;
  --line: #d3dcd7;
  --edge: #7c8e86;
  --jade: #1e6a55;
  --jade-soft: #dbece5;
  --on-accent: #ffffff;
  --lacquer: #a8352a;
  --lacquer-soft: #f7e3df;
  --amber: #e0a23a;
  --amber-soft: #fbefd8;
  --dead-bg: #eceeec;
  --band-bg: #16211d;
  --band-ink: #e3ebe6;
  --band-muted: #a9b8b0;
  --band-line: #2c3a34;
  --shadow-sm: 0 1px 0 var(--line), 0 8px 24px -18px rgba(10, 30, 20, 0.35);
  --shadow-lg: 0 1px 0 var(--line), 0 30px 60px -32px rgba(10, 30, 20, 0.45);

  --f-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --header-h: 64px;
  --container: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1412;
    --surface: #17201c;
    --sunk: #121915;
    --ink: #e3ebe6;
    --muted: #97a79f;
    --line: #2a3631;
    --edge: #6e8178;
    --jade: #5cbe9c;
    --jade-soft: #1c362e;
    --on-accent: #0e1412;
    --lacquer: #e4735f;
    --lacquer-soft: #3a201b;
    --amber: #f2bb5c;
    --amber-soft: #3a2f18;
    --dead-bg: #1c2320;
    --band-bg: #0a0f0d;
    --band-line: #24302b;
    --shadow-sm: 0 1px 0 var(--line), 0 8px 24px -18px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 1px 0 var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.2; }
h1, h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: lining-nums; }
.cost-v, .cal-block .d, .step-n, .h3-lg, .form-success h3 { font-variant-numeric: lining-nums; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--jade); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--jade); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.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;
}
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark.sm { width: 18px; height: 18px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container.narrow { max-width: 820px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--jade); color: var(--on-accent); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none; transition: top 0.15s;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- Buttons, pills, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--jade); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--jade); border-color: var(--jade); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--jade) 88%, var(--ink)); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 13px 24px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn .ic { width: 16px; height: 16px; }
.link-btn { border: 0; background: none; color: var(--jade); font-weight: 600; font-size: 13px; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; }

.pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 1px 9px; border-radius: 999px; letter-spacing: 0.02em; white-space: nowrap; }
.pill-admin { background: var(--jade); color: var(--on-accent); }
.pill-editor { background: var(--amber-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--amber); }
.pill-viewer { background: var(--sunk); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

.kbd {
  display: inline-block; min-width: 1.6em; text-align: center; font-family: var(--f-mono); font-size: 0.8em;
  padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface);
}
.mono-chip { font-family: var(--f-mono); font-size: 0.85em; background: var(--jade-soft); color: var(--jade); padding: 1px 6px; border-radius: 5px; white-space: nowrap; }

.av {
  --h: 150;
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
  background: linear-gradient(140deg, hsl(var(--h) 42% 48%), hsl(calc(var(--h) + 30) 40% 34%));
}
.av-sm { width: 28px; height: 28px; font-size: 11px; }
.av-xs { width: 20px; height: 20px; font-size: 8px; }
.av.gray { filter: grayscale(1); opacity: 0.75; }

.eyebrow {
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--jade); margin-bottom: 10px;
}
.eyebrow-amber { color: var(--ink); display: inline-block; background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber); padding: 2px 10px; border-radius: 999px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -22px rgba(0, 0, 0, 0.5); }
.nav-row { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-display); font-weight: 700; font-size: 21px; color: var(--ink); text-decoration: none; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.site-nav ul { list-style: none; display: flex; gap: 2px; }
.site-nav ul a {
  display: block; padding: 7px 11px; border-radius: 999px; color: var(--muted);
  text-decoration: none; font-weight: 500; font-size: 14px; transition: color 0.15s, background 0.15s;
}
.site-nav ul a:hover { color: var(--ink); }
.site-nav ul a.active { color: var(--jade); background: var(--jade-soft); }
.nav-cta { padding: 9px 16px; font-size: 14px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; place-items: center; }
.nav-toggle-bars { display: grid; gap: 4px; }
.nav-toggle-bars i { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1040px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; flex-direction: column; align-items: stretch;
    gap: 12px; padding: 16px 20px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.4); max-height: calc(100dvh - var(--header-h)); overflow: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .site-nav.open { visibility: visible; opacity: 1; transform: none; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 12px 14px; font-size: 16px; border-radius: 10px; }
  .nav-cta { padding: 13px 16px; font-size: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 48px 0 72px;
  background:
    radial-gradient(50% 60% at 85% 20%, color-mix(in srgb, var(--jade) 16%, transparent), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, color-mix(in srgb, var(--amber) 14%, transparent), transparent 70%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image: radial-gradient(var(--line) 1px, transparent 1.3px); background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero-grid { position: relative; display: grid; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(36px, 7.4vw, 62px); line-height: 1.06; }
.hero h1 em { font-style: italic; color: var(--jade); }
.hero .lead { margin-top: 18px; font-size: clamp(16px, 2.2vw, 18.5px); color: var(--muted); max-width: 58ch; }
.hero-clan { margin-top: 14px; color: var(--muted); max-width: 58ch; }
.hero-clan strong { color: var(--ink); }
.clan-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px 1px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-family: var(--f-display); font-weight: 700; white-space: nowrap;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 14px; color: var(--muted); }
.hero-trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .ic { width: 17px; height: 17px; color: var(--jade); }

.hero-visual { position: relative; min-width: 0; }
.mock-app {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; position: relative;
}
.mock-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mock-brand { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 700; font-size: 15px; white-space: nowrap; }
.mock-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 12px; white-space: nowrap; overflow: hidden; }
.mock-search .ic { width: 14px; height: 14px; }
.mock-bell { position: relative; display: grid; place-items: center; color: var(--muted); }
.mock-bell b { position: absolute; top: -6px; right: -8px; background: var(--lacquer); color: #fff; font-size: 9px; min-width: 15px; height: 15px; border-radius: 999px; display: grid; place-items: center; padding: 0 3px; border: 2px solid var(--surface); }
.mock-chips { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.mock-chips-lbl { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.up-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 7px; font-size: 12px; white-space: nowrap; }
.up-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--jade); flex: none; }
.up-chip.gio .dot { background: var(--lacquer); box-shadow: 0 0 0 3px var(--lacquer-soft); }
.up-chip.amb .dot { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.up-chip.bd .dot { background: var(--jade); box-shadow: 0 0 0 3px var(--jade-soft); }

.mock-stage-wrap {
  position: relative; container-type: inline-size; overflow: hidden; padding-bottom: 50px;
  background-color: var(--sunk); background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 20px 20px;
}
.mock-stage { --u: 0.25cqw; position: relative; width: 100%; aspect-ratio: 4 / 3; transform-origin: 50% 40%; transition: transform 0.3s ease; }
.mock-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mock-edges.mob { display: none; }
.edge { fill: none; stroke: var(--edge); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.edge.sp { stroke: var(--jade); stroke-width: 2; }
.edge.div { stroke-dasharray: 5 4; }
.edge.ad { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 6 4; }
.ring { fill: var(--surface); stroke: var(--jade); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.elbl { font-family: var(--f-body); font-size: 10px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--sunk); stroke-width: 4px; stroke-linejoin: round; }

.tcard {
  position: absolute; left: calc(var(--x) / 400 * 100%); top: calc(var(--y) / 300 * 100%);
  width: 22%; height: calc(112 / 300 * 100%);
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--u) * 9);
  padding: calc(var(--u) * 5) calc(var(--u) * 5) 0; display: flex; flex-direction: column; align-items: center; text-align: center;
  font-size: calc(var(--u) * 8);
}
.tcard .ttags { display: flex; justify-content: flex-end; width: 100%; height: calc(var(--u) * 11); }
.ttag, .ttag-dead { font-size: calc(var(--u) * 6.4); font-weight: 600; line-height: 1.5; padding: 0 calc(var(--u) * 3); border-radius: calc(var(--u) * 3); white-space: nowrap; }
.ttag { color: var(--jade); background: var(--jade-soft); }
.ttag.amber { color: var(--ink); background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber); }
.ttag-dead { color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.tcard .av { width: calc(var(--u) * 28); height: calc(var(--u) * 28); font-size: calc(var(--u) * 9.5); }
.tnm { margin-top: calc(var(--u) * 4); font-size: calc(var(--u) * 8.6); line-height: 1.25; font-weight: 600; }
.tage { margin-top: calc(var(--u) * 2); font-size: calc(var(--u) * 7.2); font-weight: 600; color: var(--jade); white-space: nowrap; }
.tdt { font-size: calc(var(--u) * 6.6); color: var(--muted); font-family: var(--f-mono); }
.tcard.dead { background: var(--dead-bg); }
.tcard.dead .tnm, .tcard.dead .tage { color: var(--muted); }
.tcard .tband {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--u) * 14); display: grid; place-items: center;
  font-size: calc(var(--u) * 6.8); font-weight: 600; border-radius: 0 0 calc(var(--u) * 8) calc(var(--u) * 8);
  background: var(--lacquer); color: #fff;
}
.tcard.ev-gio { border-color: var(--lacquer); animation: glow 2.6s ease-in-out infinite; }
.tcard.sel { border-color: var(--jade); box-shadow: 0 0 0 calc(var(--u) * 3) var(--jade-soft); }
.tcard.adopt { border-color: color-mix(in srgb, var(--amber) 60%, var(--line)); }
.hdl {
  position: absolute; width: calc(var(--u) * 16); height: calc(var(--u) * 16); border-radius: 50%;
  background: var(--jade); color: var(--on-accent); display: grid; place-items: center;
  font-size: calc(var(--u) * 12); line-height: 1; font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.hdl.t { top: calc(var(--u) * -8); left: 50%; translate: -50% 0; }
.hdl.b { bottom: calc(var(--u) * -8); left: 50%; translate: -50% 0; }
.hdl.l { left: calc(var(--u) * -8); top: 50%; translate: 0 -50%; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px 1px color-mix(in srgb, var(--lacquer) 30%, transparent); }
  50% { box-shadow: 0 0 26px 7px color-mix(in srgb, var(--lacquer) 50%, transparent); }
}

.mock-minimap {
  position: absolute; right: 10px; top: 10px; width: 18%; aspect-ratio: 4 / 3; border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line);
}
.mock-minimap i { position: absolute; width: 18%; height: 22%; border-radius: 2px; background: var(--edge); opacity: 0.55; }
.mock-minimap b { position: absolute; left: 4%; top: 4%; width: 70%; height: 80%; border: 1.5px solid var(--jade); border-radius: 3px; background: color-mix(in srgb, var(--jade) 10%, transparent); }
.mock-zoom {
  position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; box-shadow: var(--shadow-sm);
}
.zbtn { border: 0; background: none; min-width: 30px; height: 30px; border-radius: 7px; font-weight: 600; font-size: 15px; }
.zbtn:hover { background: var(--jade-soft); color: var(--jade); }
.zfit { font-size: 12px; padding: 0 8px; }
.mock-zoom output { font-size: 11px; min-width: 38px; text-align: center; color: var(--muted); }

.hero-toast {
  position: absolute; right: -10px; bottom: -26px; display: flex; gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--lacquer);
  border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow-lg); max-width: 300px; font-size: 13px; line-height: 1.35;
  animation: floaty 6s ease-in-out infinite;
}
.hero-toast b { display: block; font-weight: 600; }
.hero-toast small { color: var(--muted); font-size: 12px; }
.toast-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--lacquer-soft); color: var(--lacquer); display: grid; place-items: center; flex: none; }
.toast-ic .ic { width: 17px; height: 17px; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (max-width: 560px) {
  .mock-top .pill, .mock-top .av { display: none; }
  .mock-stage { aspect-ratio: 1 / 1; --u: 0.34cqw; }
  .mock-edges { display: none; }
  .mock-edges.mob { display: block; }
  .tcard { left: calc(var(--mx) / 400 * 100%); top: calc(var(--my) / 400 * 100%); width: 28%; height: 37.5%; }
  .tage { white-space: normal; line-height: 1.3; }
  .tdt { display: none; }
  .hero-toast { position: relative; right: auto; top: auto; margin: -14px 12px 0; max-width: none; z-index: 2; }
  .mock-minimap { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section h2 { font-size: clamp(28px, 4.6vw, 42px); }
.section-lead { margin-top: 14px; font-size: 17px; color: var(--muted); }
.h3-lg { font-family: var(--f-display); font-size: clamp(22px, 3vw, 28px); margin-bottom: 12px; }
.split { display: grid; gap: 40px; align-items: start; }
.split > * { min-width: 0; }
.split .section-lead { margin-bottom: 20px; }

.checks { list-style: none; display: grid; gap: 10px; margin-top: 20px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--jade-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E6A55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 13px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235CBE9C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }
}

/* Value strip */
.value-strip { padding: 0 0 72px; margin-top: -8px; }
.value-grid { display: grid; gap: 14px; }
.value { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); }
.value h2 { font-family: var(--f-body); font-size: 17px; font-weight: 700; letter-spacing: 0; margin: 14px 0 6px; }
.value p { font-size: 14.5px; color: var(--muted); }
.vic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.vic.jade { background: var(--jade-soft); color: var(--jade); }
.vic.lacquer { background: var(--lacquer-soft); color: var(--lacquer); }
.vic.amber { background: var(--amber-soft); color: color-mix(in srgb, var(--amber) 60%, var(--ink)); }

/* LOD strip */
.lod { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.lod-step { text-align: center; }
.lod-step p { margin-top: 8px; font-size: 13px; color: var(--muted); }
.lod-step p .mono { color: var(--jade); margin-right: 4px; }
.lod-box {
  width: 170px; height: 110px; border-radius: var(--radius-md); border: 1px solid var(--line); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background-color: var(--sunk); background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 14px 14px;
}
.mini-card { display: flex; flex-direction: column; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 11px; }
.mini-card .av { width: 30px; height: 30px; font-size: 11px; }
.mini-card b { margin-top: 3px; font-size: 11.5px; }
.mini-card small { color: var(--jade); font-weight: 600; font-size: 10px; }
.mini-compact { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 3px; font-size: 11px; }
.lod-dots { display: grid; grid-template-columns: repeat(6, 10px); gap: 12px 14px; align-content: center; justify-content: center; flex-direction: row; }
.lod-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--jade); opacity: 0.75; }
.lod-dots i.r { background: var(--lacquer); }
.lod-dots i.a { background: var(--amber); }
.lod-arrow { color: var(--edge); font-size: 22px; }

/* Feature cards */
.fgrid { display: grid; gap: 16px; }
.fcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); }
.fcard h3 { font-size: 18px; margin: 14px 0 12px; }
.fcard ul { list-style: none; display: grid; gap: 8px; font-size: 14.5px; color: var(--muted); }
.fcard li { position: relative; padding-left: 16px; }
.fcard li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--jade); }
.fcard strong, .fcard em { color: var(--ink); }
.fic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--jade-soft); color: var(--jade); }
.fic.lacquer { background: var(--lacquer-soft); color: var(--lacquer); }
.fic.amber { background: var(--amber-soft); color: color-mix(in srgb, var(--amber) 60%, var(--ink)); }
.edge-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.edge-legend span { display: inline-flex; align-items: center; gap: 6px; }
.edge-legend svg { width: 34px; height: 10px; overflow: visible; }

/* Contacts */
.contact-split { margin-top: 56px; padding: 28px; border-radius: var(--radius-lg); background: var(--jade-soft); align-items: center; }
.contact-split p { color: color-mix(in srgb, var(--ink) 80%, var(--muted)); }
.contact-mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
.cm-head { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cm-head small { display: block; color: var(--muted); font-size: 12.5px; }
.cm-list { list-style: none; display: grid; gap: 4px; margin-top: 8px; }
.cm-list li { display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-size: 13px; }
.cm-list li > span:nth-child(2) { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.3; }
.cm-list li b { display: block; color: var(--ink); font-size: 13px; font-weight: 500; }
.cm-list .ic { color: var(--jade); width: 18px; height: 18px; }
.cm-list em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--jade); background: var(--jade-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cm-list em.ghost { background: none; padding: 4px; color: var(--muted); }
.cm-list em.ghost .ic { color: var(--muted); width: 16px; height: 16px; }
.zalo, .msgr { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-weight: 700; font-size: 11px; color: #fff; flex: none; }
.zalo { background: #0068ff; }
.msgr { background: linear-gradient(135deg, #0a7cff, #a033ff); border-radius: 50%; }

/* ---------- Demo shell ---------- */
.demo {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-lg);
}
.section.alt .demo { background: var(--bg); }
.demo-label { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.demo-label .mono { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-accent); background: var(--jade); padding: 2px 8px; border-radius: 999px; }
.demo-hint { margin-top: 12px; font-size: 13px; color: var(--muted); }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inp {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inp:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px var(--jade-soft); }
.inp[aria-invalid='true'] { border-color: var(--lacquer); box-shadow: 0 0 0 3px var(--lacquer-soft); }
.field-err { color: var(--lacquer); font-size: 13px; min-height: 0; margin-top: 4px; }
.field-err:empty { display: none; }

/* Demo 1: search */
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.combo { position: relative; flex: 1 1 200px; min-width: 0; }
.combo .inp { padding-left: 38px; }
.combo-ic { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.year-filter { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 3px; flex: 0 1 130px; }
.sug {
  list-style: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 36px -16px rgba(0, 0, 0, 0.4); padding: 4px; max-height: 320px; overflow: auto;
}
.sug li { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 9px; cursor: pointer; }
.sug li[aria-selected='true'], .sug li:hover { background: var(--jade-soft); }
.sug li b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.sug li small { display: block; font-size: 12px; color: var(--muted); }
.sug mark { background: var(--amber-soft); color: inherit; border-radius: 3px; box-shadow: inset 0 -2px 0 var(--amber); }
.sug .none { color: var(--muted); font-size: 14px; cursor: default; }
.sug .none:hover { background: none; }
.mini-tree {
  margin-top: 14px; padding: 16px 12px; border-radius: 12px; border: 1px solid var(--line); overflow-x: auto;
  background-color: var(--sunk); background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 18px 18px;
  display: grid; gap: 14px; justify-items: center;
}
.gen { display: flex; gap: 10px; justify-content: center; align-items: center; position: relative; min-width: max-content; }
.gen-label { position: absolute; left: -2px; top: 50%; translate: -100% -50%; font-family: var(--f-mono); font-size: 10px; color: var(--muted); }
.pcard {
  width: 108px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; line-height: 1.3; transition: border-color 0.2s, box-shadow 0.2s;
}
.pcard .av { width: 32px; height: 32px; font-size: 11px; }
.pcard b { font-size: 12px; font-weight: 600; margin-top: 3px; }
.pcard small { color: var(--muted); font-family: var(--f-mono); font-size: 10px; }
.pcard .pa { color: var(--jade); font-weight: 600; }
.pcard.dead { background: var(--dead-bg); }
.pcard.dead .av { filter: grayscale(1); opacity: 0.7; }
.pcard.dead b, .pcard.dead .pa { color: var(--muted); }
.pcard .ptag { font-size: 9.5px; font-weight: 600; padding: 0 5px; border-radius: 4px; background: var(--jade-soft); color: var(--jade); }
.pcard .ptag.amber { background: var(--amber-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--amber); }
.pcard.match { border-color: var(--jade); box-shadow: 0 0 0 3px var(--jade-soft); }
.pcard.flash { animation: flash 1.6s ease-out 1; border-color: var(--jade); }
@keyframes flash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--jade) 70%, transparent); }
  40% { box-shadow: 0 0 0 14px transparent; }
  60% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--jade) 60%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}
.collapse-btn {
  border: 1px dashed var(--edge); background: var(--surface); color: var(--jade); font-weight: 600; font-size: 12px;
  border-radius: 999px; padding: 5px 12px;
}
.collapse-btn:hover { border-color: var(--jade); }

/* Demo 2: age + lunar */
.age-grid { display: grid; gap: 16px; }
.age-grid fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.age-grid legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; }
.age-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.age-grid label small { font-size: 11px; }
.row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.age-form, .lunar-form { background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.section.alt .age-form, .section.alt .lunar-form { background: var(--surface); }
.age-out { margin-top: 12px; display: grid; gap: 10px; }
.age-card { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.age-card b { display: block; color: var(--jade); font-size: 16px; }
.age-card small { display: block; color: var(--muted); font-size: 12px; }
.age-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.age-dl div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.age-dl dt { font-size: 12px; color: var(--muted); }
.age-dl dd { margin: 0; font-size: 24px; font-weight: 600; }
.lunar-out { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.lunar-out p { font-size: 14px; }
.cal-block { width: 72px; flex: none; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-block .m { display: block; background: var(--lacquer); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 0; }
.cal-block .d { display: block; font-family: var(--f-display); font-size: 30px; font-weight: 700; line-height: 1.2; }
.cal-block .y { display: block; font-size: 10px; color: var(--muted); padding-bottom: 4px; }

.ev-types { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-type { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; font-size: 13px; line-height: 1.3; }
.ev-type small { color: var(--muted); font-size: 11.5px; }
.ev-type.gio { border-left-color: var(--lacquer); }
.ev-type.bd { border-left-color: var(--jade); }
.ev-type.amb { border-left-color: var(--amber); }
.glow-key { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 0 8px; border-radius: 6px; margin: 2px 2px; border: 1.5px solid; }
.glow-key.gio { color: var(--lacquer); border-color: var(--lacquer); box-shadow: 0 0 10px -2px var(--lacquer); }
.glow-key.amb { color: var(--ink); border-color: var(--amber); box-shadow: 0 0 10px -2px var(--amber); }
.glow-key.bd { color: var(--jade); border-color: var(--jade); box-shadow: 0 0 10px -2px var(--jade); }

.upcoming { margin-top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.upc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; margin-bottom: 10px; }
.upc-head b { font-size: 16px; }
.upc-head .mono { font-size: 11px; color: var(--muted); }
.upc-list { list-style: none; display: grid; }
.upc-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.upc-date { width: 120px; flex: none; line-height: 1.25; }
.upc-date b { display: block; font-size: 14px; }
.upc-date small { color: var(--muted); font-size: 11px; }

/* Demo 4: privacy */
.ptypes { display: flex; flex-wrap: wrap; gap: 8px; }
.ptype-card { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; line-height: 1.3; }
.ptype-card small { color: var(--muted); font-size: 11.5px; }
.ptype-card.ev { background: var(--lacquer-soft); border-color: transparent; }
.ptype-card.mem { background: var(--amber-soft); border-color: transparent; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.post-head { display: flex; gap: 10px; align-items: center; }
.post-who b { display: block; font-size: 14px; }
.post-who small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.ptype-tag { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); }
.priv-badge { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.priv-badge .ic { width: 13px; height: 13px; }
.priv-badge.private { color: var(--lacquer); }
.post-text { margin-top: 10px; font-size: 14.5px; }
.tag-link { color: var(--jade); font-weight: 600; }
.post-photos { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 60px 60px; gap: 4px; margin-top: 10px; border-radius: 10px; overflow: hidden; }
.post-photos i { background: linear-gradient(140deg, hsl(var(--h) 45% 62%), hsl(calc(var(--h) + 40) 40% 38%)); position: relative; }
.post-photos i:first-child { grid-row: span 2; }
.post-photos i b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 18px; background: rgba(0, 0, 0, 0.35); }
.post-actions { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--muted); }
.post-actions span { display: inline-flex; gap: 5px; align-items: center; }
.post-actions .ic { width: 16px; height: 16px; color: var(--lacquer); }
.pv-controls { margin-top: 14px; display: grid; gap: 10px; }
.seg { display: inline-flex; justify-self: start; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 8px 14px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.seg button .ic { width: 16px; height: 16px; }
.seg button[aria-pressed='true'] { background: var(--jade); color: var(--on-accent); }
.aud { padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); transition: opacity 0.2s; }
.aud[aria-disabled='true'] { opacity: 0.55; }
.aud-t { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px 3px 3px; font-size: 13px; background: var(--surface); font-weight: 500; }
.chip .av { width: 22px; height: 22px; font-size: 9px; }
.chip[aria-pressed='true'] { background: var(--jade-soft); border-color: var(--jade); color: var(--jade); }
.chip:disabled { cursor: not-allowed; }
.chip .pill { font-size: 9.5px; padding: 0 6px; }
.pv-who { list-style: none; margin-top: 14px; display: grid; gap: 4px; }
.pv-who li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); }
.pv-who li .nm { flex: 1; min-width: 0; }
.pv-who .see { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.pv-who .see .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.pv-who .see.y { color: var(--jade); }
.pv-who .see.n { color: var(--lacquer); }
.pv-who li.out { border-style: dashed; color: var(--muted); }
.pv-note { margin-top: 10px; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--lacquer-soft); color: var(--ink); }
.pv-note:empty { display: none; }
.pv-note.ok { background: var(--jade-soft); }

/* Demo 3: stories */
.story-rail { display: flex; gap: 16px; overflow-x: auto; padding: 6px 2px 10px; }
.sb-item { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; flex: none; position: relative; border-radius: 12px; }
.sb-ring { padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, var(--jade), var(--amber), var(--lacquer), var(--jade)); }
.sb-ring.seen { background: var(--line); }
.sb-ring .av { width: 62px; height: 62px; font-size: 18px; border: 3px solid var(--surface); }
.section .demo .sb-ring .av { border-color: var(--surface); }
.sb-name { font-size: 12px; line-height: 1.25; text-align: center; max-width: 76px; }
.sb-otd { position: absolute; top: 54px; left: 50%; translate: -50% 0; background: var(--lacquer); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 4px; white-space: nowrap; border: 2px solid var(--surface); letter-spacing: 0.04em; }
.otd-badge { display: inline-block; background: var(--lacquer); color: #fff; font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 4px; letter-spacing: 0.04em; }

.story-bg { position: fixed; inset: 0; z-index: 80; background: rgba(5, 9, 7, 0.94); display: grid; place-items: center; padding: 12px; }
.story {
  position: relative; width: min(400px, 100%); aspect-ratio: 9 / 16; max-height: calc(100dvh - 24px); border-radius: 16px; overflow: hidden;
  background: #111; color: #fff; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; touch-action: none;
  transition: transform 0.15s, opacity 0.15s;
}
.sart {
  --h: 150; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(120% 80% at 30% 20%, hsl(var(--h) 55% 42%), hsl(calc(var(--h) + 40) 45% 18%) 70%, #0b0f0d);
}
.sart .sy { font-family: var(--f-display); font-size: clamp(64px, 22vw, 96px); font-weight: 700; line-height: 1; opacity: 0.92; }
.sart .sl { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
.sshade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 22%, transparent 50%, rgba(0, 0, 0, 0.8)); pointer-events: none; }
.sbars { position: relative; z-index: 3; display: flex; gap: 4px; padding: 10px 10px 0; }
.sbars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); overflow: hidden; }
.sbars i b { display: block; height: 100%; width: 0; background: #fff; }
.shead { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.shead .av { border: 2px solid #fff; width: 36px; height: 36px; font-size: 12px; }
.sw { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.sw small { display: block; opacity: 0.75; font-size: 12px; }
.sbtn { border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 14px; display: grid; place-items: center; flex: none; }
.sbtn:hover { background: rgba(255, 255, 255, 0.26); }
.sbtn:focus-visible { outline-color: #fff; }
.sbtn .ic { width: 19px; height: 19px; }
.sbtn[aria-pressed='true'] { color: #ff7b6b; }
.sbtn[aria-pressed='true'] .ic { fill: currentColor; }
.snav { position: absolute; inset: 64px 0 120px; z-index: 2; cursor: pointer; }
.scap { position: relative; z-index: 3; margin-top: auto; padding: 0 16px 8px; pointer-events: none; }
.scap .otd { display: inline-block; background: #e4735f; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; letter-spacing: 0.04em; }
.scap p { font-size: 15.5px; line-height: 1.5; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.scap .st { margin-top: 8px; font-size: 12.5px; opacity: 0.9; }
.sfoot { position: relative; z-index: 3; display: flex; gap: 8px; align-items: center; padding: 10px 12px 14px; }
.sfoot input { flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; border-radius: 999px; padding: 9px 14px; font-size: 14px; }
.sfoot input::placeholder { color: rgba(255, 255, 255, 0.7); }
.sfoot input:focus { outline: 2px solid #fff; outline-offset: 1px; }
.story.paused .sbars i b { opacity: 0.7; }

/* Demo 5: bell */
.bell-app { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.bell-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bell-top .pill { margin-left: auto; }
.bell-wrap { position: relative; }
.bell-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink); }
.bell-btn:hover, .bell-btn[aria-expanded='true'] { border-color: var(--jade); color: var(--jade); }
.bell-badge {
  position: absolute; top: -5px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--lacquer); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface);
}
.bell-badge.bump { animation: bump 0.35s ease; }
@keyframes bump { 50% { transform: scale(1.25); } }
.bell-panel {
  position: absolute; right: -6px; top: calc(100% + 8px); z-index: 10; width: min(360px, calc(100vw - 48px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.45);
  max-height: 420px; overflow: auto;
}
.bp-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.bp-sec { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }
.bp-list { list-style: none; padding: 0 6px 6px; }
.bp-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; }
.bp-item:hover { background: var(--sunk); }
.bp-item.unread { background: color-mix(in srgb, var(--jade-soft) 60%, transparent); }
.bp-item .txt { flex: 1; min-width: 0; }
.bp-item .txt small { display: block; color: var(--muted); font-size: 12px; }
.bp-item .udot { width: 8px; height: 8px; border-radius: 50%; background: var(--jade); margin-top: 7px; flex: none; }
.bp-item:not(.unread) .udot { visibility: hidden; }
.bp-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 11px; }
.bp-ic.gio { background: var(--lacquer-soft); color: var(--lacquer); }
.bp-ic.bd { background: var(--jade-soft); color: var(--jade); }
.bp-ic.amb { background: var(--amber-soft); color: var(--ink); }
.bell-body { min-height: 360px; padding: 16px; display: grid; place-items: center; text-align: center; font-size: 14px; color: var(--muted); }
.bell-open { display: flex; gap: 12px; align-items: center; text-align: left; color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 12px; width: 100%; }
.bell-open small { display: block; color: var(--muted); font-size: 12px; }
.bell-more { color: var(--muted); font-size: 12.5px; padding: 6px 12px 10px; }

/* Accounts */
.acc-mock { display: grid; gap: 16px; }
.acc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-lg); }
.acc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.acc-head b { display: block; font-size: 15px; }
.acc-head small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.cred { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); margin-top: 8px; }
.cred-l { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }
.cred code { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.copy-btn.copied { border-color: var(--jade); color: var(--jade); }
.acc-note { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.acc-note .ic { color: var(--amber); width: 18px; height: 18px; }
.login-mini { justify-self: center; width: min(280px, 100%); display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.lm-brand { text-align: center; display: grid; justify-items: center; gap: 4px; margin-bottom: 6px; }
.lm-brand b { font-family: var(--f-display); font-size: 19px; }
.lm-brand small { color: var(--muted); font-size: 12px; }
.lm-field { border: 1px solid var(--line); background: var(--sunk); border-radius: 9px; padding: 8px 12px; font-size: 14px; font-family: var(--f-mono); }
.lm-btn { background: var(--jade); color: var(--on-accent); text-align: center; border-radius: 9px; padding: 9px; font-weight: 600; font-size: 14px; }

/* Roles table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.roles { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14.5px; }
.roles caption { text-align: left; padding: 14px 18px; font-weight: 600; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.roles th, .roles td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.roles thead th { background: var(--sunk); position: sticky; top: 0; }
.roles tbody th { font-weight: 500; width: 40%; }
.roles tbody th small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.roles td small { display: block; color: var(--muted); font-size: 12px; }
.roles tbody tr:last-child > * { border-bottom: 0; }
.roles tbody th:first-child { position: sticky; left: 0; background: var(--surface); }
.roles .row-strong > * { background: var(--lacquer-soft) !important; }
.yes, .no, .part { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.yes::before, .no::before, .part::before { content: ''; width: 18px; height: 18px; border-radius: 50%; flex: none; background-position: center; background-repeat: no-repeat; background-size: 12px; }
.yes { color: var(--jade); }
.yes::before { background-color: var(--jade-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E6A55' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }
.no { color: var(--lacquer); }
.no::before { background-color: var(--lacquer-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8352A' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E"); }
.part { color: var(--ink); }
.part::before { background-color: var(--amber-soft); box-shadow: inset 0 0 0 1.5px var(--amber); }
@media (prefers-color-scheme: dark) {
  .yes::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235CBE9C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }
  .no::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E4735F' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E"); }
}
.role-notes { display: grid; gap: 12px; margin-top: 16px; }
.note-card { padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.note-card b { color: var(--ink); }

/* Admin */
.admin-mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-lg); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat small { display: block; font-size: 12px; color: var(--muted); }
.stat b { font-size: 22px; font-weight: 600; }
.roles-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 14px; gap: 2px; }
.roles-bar i { min-width: 6px; }
.roles-bar .a { background: var(--jade); }
.roles-bar .e { background: var(--amber); }
.roles-bar .v { background: var(--line); }
.roles-bar-l { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.log { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.log-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.log-filters .chip { padding: 2px 10px; font-size: 12px; cursor: default; }
.log-filters .chip.on { background: var(--jade-soft); border-color: var(--jade); color: var(--jade); }
.log-list { list-style: none; display: grid; }
.log-list li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.log-list li span:nth-child(2) { flex: 1; min-width: 0; }
.log-list em { font-style: normal; color: var(--jade); font-weight: 600; }
.log-list time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Security band */
.dark-band { background: var(--band-bg); color: var(--band-ink); }
.dark-band .eyebrow { color: #5cbe9c; }
.dark-band .section-lead { color: var(--band-muted); }
.dark-band :focus-visible { outline-color: #5cbe9c; }
.sec-grid { display: grid; gap: 14px; }
.sec-item { border: 1px solid var(--band-line); border-radius: var(--radius-md); padding: 22px; background: rgba(255, 255, 255, 0.03); }
.sec-item .ic { width: 28px; height: 28px; color: #5cbe9c; }
.sec-item h3 { font-size: 17px; margin: 12px 0 6px; }
.sec-item p { color: var(--band-muted); font-size: 14.5px; }

/* UX grid */
.ux-grid { display: grid; gap: 14px; }
.ux { padding: 20px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); }
.ux .ic { width: 26px; height: 26px; color: var(--jade); }
.ux h3 { font-size: 16.5px; margin: 10px 0 6px; }
.ux p { color: var(--muted); font-size: 14.5px; }
.update-toast {
  margin: 28px auto 0; width: max-content; max-width: 100%; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 12px 10px 16px; font-size: 14px; box-shadow: var(--shadow-lg);
}
.update-toast .ic { width: 18px; height: 18px; }
.ut-btn { background: var(--jade); color: var(--on-accent); padding: 5px 12px; border-radius: 8px; font-weight: 600; margin-left: 6px; }
@media (prefers-color-scheme: dark) { .ut-btn { color: #0e1412; } }

/* Ops */
.ops-grid { display: grid; gap: 20px; }
.cost-card {
  border-radius: var(--radius-lg); padding: 28px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(90% 70% at 100% 0%, #2b8a6e, transparent 70%), linear-gradient(160deg, #1e6a55, #123f33);
}
.cost-l { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.cost-v { font-family: var(--f-display); font-size: 30px; margin-top: 4px; }
.cost-v span { font-size: 80px; line-height: 1; font-weight: 700; }
.cost-v small { font-size: 20px; opacity: 0.85; }
.cost-sub { margin-top: 10px; opacity: 0.85; }
.cost-list { list-style: none; display: grid; gap: 4px; margin-top: 6px; }
.cost-list b { font-size: 17px; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.stack span { font-family: var(--f-mono); font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.35); padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.ops-list { display: grid; gap: 10px; }
.ops-item { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--line); }
.ops-item .ic { width: 24px; height: 24px; color: var(--jade); margin-top: 2px; }
.ops-item h3 { font-size: 16px; margin-bottom: 4px; }
.ops-item p { color: var(--muted); font-size: 14.5px; }

/* Steps */
.steps { list-style: none; display: grid; gap: 14px; counter-reset: none; }
.step { position: relative; padding: 22px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--jade); color: var(--on-accent); font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.step h3 { font-size: 17px; margin: 12px 0 6px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); overflow: hidden; }
.faq-item h3 { font-size: 16.5px; font-weight: 600; }
.faq-item button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left;
  border: 0; background: none; padding: 16px 18px; font-weight: 600; line-height: 1.4;
}
.faq-item button::after {
  content: ''; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--jade-soft);
  background-image: linear-gradient(var(--jade), var(--jade)), linear-gradient(var(--jade), var(--jade));
  background-size: 10px 2px, 2px 10px; background-position: center; background-repeat: no-repeat; transition: transform 0.25s;
}
.faq-item button[aria-expanded='true']::after { transform: rotate(45deg); }
.faq-item button:focus-visible { outline-offset: -3px; }
.faq-a { padding: 0 18px 18px; color: var(--muted); font-size: 15px; }
.faq-a strong { color: var(--ink); }

/* Roadmap */
.road { list-style: none; display: grid; gap: 10px; }
.road li { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--radius-md); border: 1.5px dashed color-mix(in srgb, var(--amber) 70%, var(--line)); background: color-mix(in srgb, var(--amber-soft) 50%, transparent); font-weight: 500; }
.soon { align-self: flex-start; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; background: var(--amber); color: #2a1e05; padding: 1px 8px; border-radius: 999px; font-weight: 500; }

/* Contact */
.cta-band { background: linear-gradient(180deg, var(--bg), var(--jade-soft)); }
.contact-form, .form-success { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.field { display: grid; gap: 5px; }
.field label { font-weight: 600; font-size: 14px; }
.field label span { color: var(--lacquer); }
textarea.inp { resize: vertical; min-height: 84px; }
.form-note { font-size: 12.5px; color: var(--muted); }
.form-success { text-align: center; justify-items: center; }
.form-success:focus { outline: none; }
.form-success h3 { font-family: var(--f-display); font-size: 24px; }
.form-success p { color: var(--muted); }

/* Footer */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; gap: 20px; }
.footer-grid .brand { margin-bottom: 6px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-nav a:hover { color: var(--jade); text-decoration: underline; }
.footer-copy { font-size: 13px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive (mobile-first) ---------- */
@media (min-width: 620px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .fgrid { grid-template-columns: repeat(2, 1fr); }
  .sec-grid, .ux-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .road { grid-template-columns: repeat(2, 1fr); }
  .role-notes { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .age-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 2fr; align-items: start; }
  .footer-copy { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .section { padding: 104px 0; }
  .hero { padding: 64px 0 96px; }
  .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 56px; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split-demo { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
  .contact-split { grid-template-columns: 1.1fr 1fr; padding: 40px; }
  .value-grid { grid-template-columns: repeat(4, 1fr); }
  .fgrid { grid-template-columns: repeat(3, 1fr); }
  .sec-grid, .ux-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .road { grid-template-columns: repeat(4, 1fr); }
  .ops-grid { grid-template-columns: 0.8fr 1.2fr; }
  #su-kien .split-demo .age-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1100px) {
  #su-kien .split-demo .age-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 419px) {
  .container { padding-inline: 16px; }
  .demo { padding: 14px; }
  .hero-ctas .btn { width: 100%; }
  .row3 { grid-template-columns: 1fr 1fr 1fr; }
  .contact-split { padding: 20px; }
  .lod-arrow { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .tcard.ev-gio { box-shadow: 0 0 22px 5px color-mix(in srgb, var(--lacquer) 45%, transparent); }
  .pcard.flash { outline: 3px solid var(--jade); outline-offset: 2px; }
}

/* ---------- Pricing (open source vs. managed) ---------- */
.price-grid { display: grid; gap: 20px; }
.price-card {
  display: flex; flex-direction: column; gap: 6px; padding: 26px 24px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.price-card-feature { border: 2px solid var(--jade); background: linear-gradient(180deg, var(--jade-soft), var(--surface) 60%); }
.price-l { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--jade); font-weight: 600; }
.price-v { font-family: var(--f-display); font-size: clamp(28px, 6vw, 40px); line-height: 1.15; font-weight: 700; font-variant-numeric: lining-nums; }
.price-sub { color: var(--muted); }
.price-card .checks { margin-top: 12px; margin-bottom: 20px; }
.price-cta { margin-top: auto; align-self: flex-start; }
.price-note { margin-top: 16px; color: var(--muted); text-align: center; }
.price-note a { color: var(--jade); }
.ops-list-wide { margin-top: 32px; }
@media (min-width: 760px) {
  .price-grid { grid-template-columns: 1fr 1fr; }
  .ops-list-wide { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 419px) {
  .price-card { padding: 20px 18px; }
  .price-cta { align-self: stretch; text-align: center; }
}

/* ---------- Hero: live demo of the real app (demo/ = `pnpm build:demo` in frontend/) ---------- */
.hero-grid--demo { grid-template-columns: minmax(0, 1fr); gap: 36px; }
.hero-grid--demo .hero-copy { max-width: 820px; }
@media (min-width: 900px) {
  .hero-grid--demo { grid-template-columns: minmax(0, 1fr); gap: 44px; }
}
.try { scroll-margin-top: calc(var(--header-h) + 12px); display: grid; gap: 14px; }
.try-window {
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lg);
}
.try-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px;
  background: var(--sunk); border-bottom: 1px solid var(--line);
}
.try-dots { display: inline-flex; gap: 6px; }
.try-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.try-dots i:nth-child(1) { background: #e4735f; }
.try-dots i:nth-child(2) { background: #e8b44c; }
.try-dots i:nth-child(3) { background: #5cbe9c; }
.try-url {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.try-url .ic { width: 13px; height: 13px; color: var(--jade); flex: none; }
.try-full { flex: none; }
.try-frame { display: block; width: 100%; height: clamp(560px, 80vh, 720px); border: 0; background: #edf1ee; }
.try-file { margin: 0; padding: 48px 24px; text-align: center; color: var(--muted); }
.try-file code { font-family: var(--f-mono); font-size: 13px; }
.try-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.try-roles-lbl { font-weight: 600; font-size: 14px; margin-right: 4px; }
.try-role {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; line-height: 1.25; cursor: pointer;
}
.try-role small { font-weight: 400; font-size: 12px; color: var(--muted); }
.try-role:hover { border-color: var(--jade); }
.try-role[aria-pressed='true'] { border-color: var(--jade); background: var(--jade-soft); color: var(--jade); }
.try-reset { margin-left: auto; }
.try-note { margin: 0; font-size: 14px; color: var(--muted); }
.try-card { display: none; }
@media (max-width: 719px) {
  .try-window, .try-roles, .try-note { display: none; }
  .try-card {
    display: grid; gap: 8px; justify-items: start; padding: 22px; text-decoration: none; color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg);
  }
  .try-card b { font-family: var(--f-display); font-size: 20px; }
  .try-card > span:not(.btn):not(.try-card-ic) { color: var(--muted); font-size: 14.5px; }
  .try-card .btn { margin-top: 6px; }
  .try-card-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--jade-soft); color: var(--jade); }
  .try-card-ic .ic { width: 22px; height: 22px; }
}
