/* ============================================================
   ai-token.lightuptotal.co.th — Design System
   Concept: "Tungsten over the server room" — the lighting
   company's warm light, carried into AI infrastructure.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #0A0E16;
  --bg-soft: #0E131E;
  --panel: #121926;
  --panel-2: #17202F;
  --line: rgba(233, 237, 245, 0.09);
  --line-strong: rgba(233, 237, 245, 0.18);
  --text: #E9EDF5;
  --muted: #98A2B8;
  --faint: #77849E;
  --amber: #FFB84D;
  --amber-deep: #F59E1B;
  --amber-ink: #0A0E16;
  --amber-soft: rgba(255, 184, 77, 0.12);
  --copper: #FF8A5C;
  --copper-soft: rgba(255, 138, 92, 0.12);
  --ok: #5AD8A6;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);

  --font: "IBM Plex Sans Thai", "IBM Plex Sans Thai Looped",
    -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 10px;
  --radius-s: 6px;
  --maxw: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
}

html[data-theme="light"] {
  --bg: #FFF9F2;
  --bg-soft: #FFF0E3;
  --panel: #FFFFFF;
  --panel-2: #FFF4EA;
  --line: rgba(38, 22, 10, 0.10);
  --line-strong: rgba(38, 22, 10, 0.22);
  --text: #26160A;
  --muted: #5C422A;
  --faint: #7D6244;
  --amber: #E07B1F;
  --amber-deep: #C25E0A;
  --amber-ink: #FFF9F2;
  --amber-soft: rgba(224, 123, 31, 0.10);
  --copper: #D96C2F;
  --copper-soft: rgba(217, 108, 47, 0.10);
  --ok: #166D4C;
  --shadow: 0 20px 48px rgba(224, 123, 31, 0.12);
  /* prices/tables keep a deeper accent so mono numbers stay readable */
  --amber-figure: #B34C00;
}

/* Light theme: warm lighting accents everywhere */
html[data-theme="light"] body {
  background:
    radial-gradient(1400px 600px at 50% -10%, var(--amber-soft), transparent 60%),
    var(--bg);
}
html[data-theme="light"] .hero {
  background:
    radial-gradient(1100px 480px at 78% -12%, var(--amber-soft), transparent 62%),
    var(--bg);
}
html[data-theme="light"] .seam .pulse {
  box-shadow: 0 0 14px 3px var(--amber-soft);
}
html[data-theme="light"] .seam .pulse {
  background: var(--amber);
  box-shadow: 0 0 12px 2px var(--amber-soft);
}
html[data-theme="light"] .kicker .dot { background: var(--amber); box-shadow: 0 0 10px var(--amber-soft); }
html[data-theme="light"] .stream-demo { background: #FFFDF9; }
html[data-theme="light"] .statbar .num { color: var(--amber-figure); }
html[data-theme="light"] .calc-out .calc-total { color: var(--amber-figure); }
html[data-theme="light"] .ticker-item .tk-price { color: var(--amber-figure); }
html[data-theme="light"] ::selection { background: var(--amber-figure); color: #FFF9F2; }

html[data-theme="light"] .tier.featured {
  animation: none;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(140deg, var(--amber), rgba(224, 123, 31, 0.18) 45%, var(--copper-soft) 55%, var(--copper)) border-box;
  box-shadow: 0 10px 30px rgba(224, 123, 31, 0.14);
}
html[data-theme="light"] .cta-band {
  background:
    radial-gradient(600px 220px at 12% 0%, var(--amber-soft), transparent 60%),
    radial-gradient(600px 220px at 95% 110%, var(--copper-soft), transparent 60%),
    var(--panel);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Bilingual content: one language visible at a time */
html[lang="th"] [data-en] { display: none; }
html[lang="en"] [data-th] { display: none; }
/* Thai script needs taller leading everywhere (tone marks stack) */
html[lang="th"] .display { line-height: 1.42; letter-spacing: -0.005em; }
html[lang="th"] h2 { line-height: 1.45; }
html[lang="th"] h3 { line-height: 1.5; }
html[lang="th"] .lede { line-height: 1.9; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--amber); }

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

::selection { background: var(--amber); color: var(--amber-ink); }

/* ---------- Layout primitives ---------- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 110px); }
.section + .section { padding-top: 0; }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }

.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

.display {
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  text-wrap: balance;
}

h3 { font-size: 1.2rem; font-weight: 600; margin: 0 0 10px; }

.lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  max-width: 62ch;
  margin: 0;
}

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .lede { margin-top: 14px; }

.small { font-size: 0.85rem; color: var(--faint); }

/* "Contact" standing in for a price — must read as actionable */
.contact-link {
  color: var(--amber);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--amber) 45%, transparent);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.contact-link:hover {
  color: var(--amber-figure, var(--amber));
  text-decoration-color: currentColor;
}
.tier-uptime .contact-link { font-size: 0.95rem; }
.calc-total .contact-link { font-size: 1.5rem; }
td.num .contact-link { font-size: 0.94rem; }
.ticker-item .contact-link { color: var(--amber); }

.mono { font-family: var(--mono); font-size: 0.92em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
}
.btn-primary:hover { background: var(--amber-deep); color: var(--amber-ink); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand > span {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1.2;
}
.brand-mark {
  flex: none;
  height: 36px;
  width: auto;
  display: block;
}
html[data-theme="dark"] .brand-mark {
  filter: brightness(0.9) contrast(1.05);
}
html[data-theme="light"] .brand-mark {
  filter: none;
  content: url("../img/LOGO_Black.png");
}
html[data-theme="light"] .site-footer .brand-mark {
  filter: brightness(0.9) saturate(1.05);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}
.main-nav a {
  padding: 8px 13px;
  border-radius: var(--radius-s);
  font-size: 0.94rem;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--text); background: var(--amber-soft); }
.main-nav a[aria-current="page"] { color: var(--amber); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px;
  font-size: 0.8rem;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--amber);
  color: var(--amber-ink);
}

.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover, .nav-toggle:hover { color: var(--amber); border-color: var(--amber); }

.nav-toggle { display: none; }
.lang-switch button { min-height: 32px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(64px, 10vw, 130px);
  padding-bottom: 0;
  background:
    radial-gradient(1100px 480px at 78% -12%, var(--amber-soft), transparent 62%),
    var(--bg);
}
.hero::before {
  /* dot lattice, fading down — the photon grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 880px; }

.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 26px;
}
.hero .kicker .dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  flex: none;
}

.hero .lede { margin-top: 24px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

/* the light seam: a wire with travelling pulses */
.seam {
  position: relative;
  height: 1px;
  margin-top: clamp(56px, 8vw, 90px);
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent);
}
.seam .pulse {
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 12px 2px var(--amber);
  animation: travel 7s linear infinite;
}
.seam .pulse:nth-child(2) { animation-duration: 11s; animation-delay: -3s; opacity: 0.75; }
.seam .pulse:nth-child(3) { animation-duration: 9s; animation-delay: -6s; background: var(--copper); box-shadow: 0 0 12px 2px var(--copper); }
@keyframes travel {
  from { left: -2%; }
  to   { left: 101%; }
}

.statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-inline: 1px solid var(--line);
}
.statbar .stat {
  padding: 26px 26px 30px;
  border-right: 1px solid var(--line);
}
.statbar .stat:last-child { border-right: 0; }
.statbar .num {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.statbar .label { color: var(--faint); font-size: 0.85rem; margin-top: 4px; }

/* ---------- Dual-service split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.split-half {
  padding: clamp(30px, 4.5vw, 54px);
  position: relative;
}
.split-half + .split-half { border-left: 1px solid var(--line); }

.split-half .service-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  margin-bottom: 22px;
}
.split-half h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-bottom: 12px; }
.split-half p { color: var(--muted); margin: 0 0 26px; }
.split-half ul { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 11px; }
.split-half li {
  position: relative;
  padding-left: 24px;
  color: var(--text);
  font-size: 0.97rem;
}
.split-half li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--svc, var(--amber));
}

.split-token { --svc: var(--amber); }
.split-gpu { --svc: var(--copper); }
.split-token .service-tag { border-color: rgba(255, 184, 77, 0.45); color: var(--amber); }
.split-gpu .service-tag { border-color: rgba(255, 138, 92, 0.45); color: var(--copper); }

.split-link {
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.split-token .split-link { color: var(--amber); }
.split-gpu .split-link { color: var(--copper); }

/* ---------- Feature rows / panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 36px);
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.feat { display: flex; flex-direction: column; gap: 8px; }
.feat .feat-icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-s);
  background: var(--amber-soft);
  color: var(--amber);
  margin-bottom: 6px;
  flex: none;
}
.feat h3 { font-size: 1.05rem; margin: 0; }
.feat p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.price {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 640px;
}
table.price th {
  text-align: left;
  font-weight: 500;
  color: var(--faint);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.price td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.price tr:last-child td { border-bottom: 0; }
table.price .num { font-family: var(--mono); white-space: nowrap; }
table.price .model-name { font-weight: 500; }
table.price .model-desc { color: var(--faint); font-size: 0.82rem; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.badge-amber { border-color: rgba(255,184,77,0.5); color: var(--amber); background: var(--amber-soft); }
.badge-copper { border-color: rgba(255,138,92,0.5); color: var(--copper); background: var(--copper-soft); }
.badge-ok { border-color: rgba(90,216,166,0.4); color: var(--ok); }

/* ---------- SLA tiers ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tier {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tier .tier-name {
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.tier .tier-uptime {
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 500;
}
.tier dl { margin: 0; display: grid; gap: 8px; font-size: 0.88rem; }
.tier dt { color: var(--faint); }
.tier dd { margin: 0; color: var(--text); }
/* pair each dt with its dd on one row */
.tier dl > dt { margin-top: 4px; }
.tier dl > dd { margin-bottom: 2px; }
.tier.featured { border-color: rgba(255, 184, 77, 0.55); box-shadow: 0 0 0 1px rgba(255, 184, 77, 0.25) inset; }
.tier.featured .tier-uptime { color: var(--amber); }

/* ---------- Code block ---------- */
.code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.code .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--faint);
  font-family: var(--mono);
}
.code pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--text);
}
.code .cm { color: var(--faint); }
.code .str { color: var(--amber); }
.code .kw { color: var(--copper); }

/* ---------- Steps (true sequence only) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding-top: 18px; border-top: 2px solid var(--line-strong); }
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--amber);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.02rem; }
.step p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  font-weight: 500;
  font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform 0.2s; flex: none; color: var(--faint); }
.faq details[open] summary .chev { transform: rotate(180deg); color: var(--amber); }
.faq .faq-body { padding: 0 4px 22px; color: var(--muted); max-width: 64ch; }

/* ---------- Calculator ---------- */
.calc {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.calc-form { padding: clamp(26px, 3.6vw, 40px); display: grid; gap: 20px; align-content: start; }
.calc-out {
  padding: clamp(26px, 3.6vw, 40px);
  background: var(--panel-2);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.calc-out .calc-total {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 500;
  color: var(--amber);
  letter-spacing: -0.01em;
}
.calc-out .calc-thb { color: var(--muted); font-family: var(--mono); }
.calc-out .calc-note { color: var(--faint); font-size: 0.82rem; margin-top: 12px; }

.field label {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.field select,
.field input[type="number"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}
.field select:focus-visible,
.field input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .field-full { grid-column: 1 / -1; }
textarea, input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
textarea { min-height: 130px; resize: vertical; }

/* ---------- Form status ---------- */
.form-status {
  display: none;
  margin: 14px 0 0;
  padding: 12px 15px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  font-size: 0.92rem;
  line-height: 1.6;
}
.form-status.show { display: block; }
.form-status .status-title { display: block; font-weight: 600; margin-bottom: 2px; }
.form-status .status-detail { display: block; font-size: 0.85rem; }
.form-status .status-detail:empty { display: none; }
.form-status .status-detail a { color: inherit; text-decoration: underline; }
.form-status.is-error {
  border-color: rgba(220, 80, 60, 0.55);
  color: #E8695A;
  background: rgba(220, 80, 60, 0.10);
}
.form-status.is-ok {
  border-color: rgba(90, 216, 166, 0.5);
  color: var(--ok);
  background: rgba(90, 216, 166, 0.10);
}
.form-status.is-pending { color: var(--muted); }

html[data-theme="light"] .form-status.is-error {
  color: #B3261E;
  border-color: rgba(179, 38, 30, 0.45);
  background: rgba(179, 38, 30, 0.06);
}

/* ---------- Form: honeypot, consent, meta, actions ---------- */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--faint);
}
.field-meta .char-count { font-family: var(--mono); white-space: nowrap; }
.field-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}
.field-consent input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--amber);
}
.field-consent label a { color: var(--amber); }
.field-consent input[aria-invalid="true"] { outline: 2px solid #DC503C; outline-offset: 1px; }
.form-actions { margin-top: 4px; }
.form-actions .btn[disabled] { opacity: 0.6; cursor: wait; }

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #DC503C;
  outline-color: #DC503C;
}

/* ============================================================
   DOCS / LEGAL / TRUST PAGES
   ============================================================ */

/* ---------- Wide footer (brand + 4 link columns + contact) ---------- */
.footer-grid-wide {
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr 1.1fr 1.3fr;
}
@media (max-width: 1240px) {
  .footer-grid-wide { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
}
@media (max-width: 900px) {
  .footer-grid-wide { grid-template-columns: 1.5fr 1fr 1fr; }
}
@media (max-width: 620px) {
  .footer-grid-wide { grid-template-columns: 1fr 1fr; }
}

/* ---------- Page kicker (eyebrow on subpages) ---------- */
.page-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 20px;
}
.page-kicker .dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  flex: none;
}

/* ---------- Docs layout: sidebar + article ---------- */
.docs {
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.docs-nav {
  position: sticky;
  top: 84px;
  font-size: 0.9rem;
}
.docs-nav h4 {
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  color: var(--faint);
  font-weight: 500;
  margin: 0 0 12px;
}
.docs-nav ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 3px; }
.docs-nav a {
  display: block;
  padding: 7px 11px;
  border-radius: var(--radius-s);
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}
.docs-nav a:hover { color: var(--text); background: var(--amber-soft); }
.docs-nav a[aria-current="page"] { color: var(--amber); background: var(--amber-soft); font-weight: 500; }

.docs-body { min-width: 0; }
.docs-body section { padding-top: 34px; scroll-margin-top: 88px; }
.docs-body section:first-child { padding-top: 0; }
.docs-body h2 {
  font-size: 1.5rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.docs-body h3 { font-size: 1.05rem; margin: 26px 0 10px; }
.docs-body p { color: var(--muted); }
.docs-body ul, .docs-body ol { color: var(--muted); padding-left: 22px; display: grid; gap: 7px; }
.docs-body code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ---------- Endpoint block ---------- */
.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 0.88rem;
  margin: 16px 0;
}
.endpoint .method {
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 4px;
  flex: none;
}
.method-get { background: rgba(90, 216, 166, 0.14); color: var(--ok); }
.method-post { background: var(--amber-soft); color: var(--amber); }
.method-del { background: rgba(220, 80, 60, 0.14); color: #E8695A; }

/* ---------- Legal / long-form prose ---------- */
.legal { max-width: 74ch; }
.legal h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal h3 { font-size: 1rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 0.97rem; }
.legal ul, .legal ol { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0; }
.legal .legal-meta {
  color: var(--faint);
  font-size: 0.86rem;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--bg-soft);
  margin-bottom: 30px;
}
html[lang="th"] .legal p, html[lang="th"] .legal li { line-height: 1.95; }

/* ---------- Trust / cert cards ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 18px; }
.trust-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.trust-card .trust-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-s);
  background: var(--amber-soft);
  color: var(--amber);
  display: grid; place-items: center;
  flex: none;
}
.trust-card h3 { font-size: 0.98rem; margin: 0; }
.trust-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Status page ---------- */
.status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border: 1px solid rgba(90, 216, 166, 0.35);
  border-radius: var(--radius);
  background: rgba(90, 216, 166, 0.07);
  margin-bottom: 32px;
}
.status-banner .status-text { font-weight: 500; font-size: 1.02rem; }
.status-banner .status-sub { color: var(--muted); font-size: 0.86rem; }
.status-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}
.status-row:first-of-type { border-top: 1px solid var(--line); }
.status-row .status-name { font-size: 0.96rem; }
.status-row .status-uptime { font-family: var(--mono); font-size: 0.88rem; color: var(--muted); }
.status-ok { color: var(--ok); font-size: 0.84rem; font-weight: 500; white-space: nowrap; }
.status-bars { display: flex; gap: 2px; }
.status-bars i {
  display: block;
  width: 5px; height: 22px;
  border-radius: 2px;
  background: var(--ok);
  opacity: 0.75;
}
.status-bars i.warn { background: var(--amber); }

/* ---------- Comparison table (vs. other providers) ---------- */
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare .ours { background: var(--amber-soft); }
.compare .ours::after {
  content: "";
}
td .check { color: var(--ok); font-weight: 600; }
td .cross { color: var(--faint); }

/* ---------- Use-case cards ---------- */
.usecase {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: clamp(22px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.usecase .usecase-tag {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--amber);
  border: 1px solid rgba(255, 184, 77, 0.35);
  border-radius: 999px;
  padding: 3px 11px;
  align-self: flex-start;
}
.usecase h3 { font-size: 1.1rem; margin: 0; }
.usecase p { color: var(--muted); margin: 0; font-size: 0.94rem; }
.usecase ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.92rem; display: grid; gap: 6px; }

/* ---------- Article / blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 20px; }
.post {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.25s, transform 0.25s;
}
.post:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.post .post-meta { color: var(--faint); font-size: 0.8rem; font-family: var(--mono); }
.post h3 { font-size: 1.02rem; margin: 0; }
.post p { color: var(--muted); font-size: 0.92rem; margin: 0; flex: 1; }

/* ---------- Changelog timeline ---------- */
.release { border-left: 2px solid var(--line-strong); padding: 0 0 30px 24px; position: relative; }
.release::before {
  content: "";
  position: absolute;
  left: -6px; top: 5px;
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--amber);
}
.release .release-date { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); }
.release h3 { margin: 6px 0 8px; font-size: 1.02rem; }
.release ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.93rem; display: grid; gap: 6px; }

/* ---------- Docs / legal responsive ---------- */
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-nav a { padding: 6px 12px; border: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .status-row { grid-template-columns: 1fr auto; }
  .status-bars { display: none; }
  .legal { max-width: none; }
}

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 220px at 12% 0%, var(--amber-soft), transparent 60%),
    radial-gradient(600px 220px at 95% 110%, var(--copper-soft), transparent 60%),
    var(--panel);
  padding: clamp(40px, 6vw, 72px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { color: var(--muted); margin: 0; max-width: 52ch; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(64px, 9vw, 110px);
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 36px;
  padding-block: clamp(48px, 6vw, 72px) 40px;
}
.footer-grid h4 {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--faint);
  margin: 0 0 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--amber); }
.footer-brand p { color: var(--muted); font-size: 0.92rem; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-size: 0.82rem;
}

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  padding-block: clamp(56px, 8vw, 96px) clamp(40px, 5vw, 64px);
  background:
    radial-gradient(900px 380px at 85% -10%, var(--amber-soft), transparent 62%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-hero .lede { margin-top: 18px; }

/* ---------- Utility ---------- */
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.text-copper { color: var(--copper); }
.text-amber { color: var(--amber); }

/* ---------- Responsive Breakpoints ---------- */
/* xxl: wide desktop 1400px+ */
@media (min-width: 1400px) {
  :root { --maxw: 1280px; --gutter: clamp(24px, 3vw, 40px); }
  .display { font-size: clamp(2.35rem, 5.4vw, 4.6rem); }
}

/* xl: desktop 1200–1399px */
@media (max-width: 1399px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* lg: laptop 992–1199px */
@media (max-width: 1199px) {
  .main-nav a { padding: 8px 10px; font-size: 0.9rem; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
}
/* lg desktop-laptop: 1020px and below — hide desktop nav, show hamburger */
@media (max-width: 1020px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .tier-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 66px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter) 22px;
    gap: 2px;
    z-index: 49;
  }
  .main-nav.open a { padding: 12px 10px; border-radius: var(--radius-s); }
  .nav-toggle { display: inline-flex; }
}

/* md: tablet 768–991px (iPad landscape, Surface Pro) */
@media (min-width: 768px) and (max-width: 991px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-half + .split-half { border-left: 0; border-top: 1px solid var(--line); }
  .statbar { grid-template-columns: 1fr 1fr; }
  .statbar .stat { border-top: 1px solid var(--line); }
  .statbar .stat:nth-child(-n+2) { border-top: 0; }
}

/* sm: phone 481–767px (large phone, small fold) */
@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; }
  .split-half + .split-half { border-left: 0; border-top: 1px solid var(--line); }
  .statbar { grid-template-columns: 1fr 1fr; border-inline: 0; }
  .statbar .stat { border: 0; border-bottom: 1px solid var(--line); padding: 18px 4px; }
  .statbar .stat:nth-child(3), .statbar .stat:nth-child(4) { border-bottom: 0; }
  .grid-3, .grid-2, .steps, .calc { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .calc-out { border-left: 0; border-top: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
  .header-actions .btn { display: none; }
  .display { font-size: clamp(2rem, 9vw, 3.5rem); }
  table.price { font-size: 0.88rem; }
  table.price th, table.price td { padding: 10px 12px; }
}

/* xs: small phone 360–480px */
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .display { font-size: clamp(1.8rem, 10vw, 2.8rem); }
  h2 { font-size: clamp(1.4rem, 5.5vw, 1.8rem); }
  .hero-ctas .btn { width: 100%; }
  .statbar { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  table.price { min-width: 540px; font-size: 0.84rem; }
  .btn { padding: 12px 20px; }
}

/* Header compaction: below 560px the full brand lockup no longer fits
   beside the language switch + controls, so drop the wordmark text and
   keep the logo mark alone. */
@media (max-width: 560px) {
  .header-inner { gap: 12px; }
  .brand > span { display: none; }
  .header-actions { gap: 8px; margin-inline-start: auto; }
  .main-nav { margin-inline: 0; }
}
@media (max-width: 400px) {
  .lang-switch button { padding: 4px 9px; }
  .header-actions { gap: 6px; }
}

/* xxs: tiny fold/cover display 320–359px */
@media (max-width: 359px) {
  :root { --gutter: 12px; }
  .display { font-size: clamp(1.55rem, 12vw, 2rem); }
  h2 { font-size: clamp(1.25rem, 6vw, 1.5rem); }
  .statbar { grid-template-columns: 1fr; }
  .statbar .stat { border-bottom: 1px solid var(--line); }
  .statbar .stat:last-child { border-bottom: 0; }
  .statbar .num { font-size: 1.3rem; }
  .btn { padding: 11px 16px; font-size: 0.92rem; }
}

/* landscape phone: keep line heights tight */
@media (max-height: 420px) and (orientation: landscape) {
  .display { font-size: clamp(1.6rem, 22vh, 2.4rem); }
  .section { padding-block: 40px; }
  .section-head { margin-bottom: 24px; }
  .page-hero { padding-block: 32px 24px; }
  .hero { padding-top: 32px; }
  .hero-ctas { margin-top: 20px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seam .pulse, .spotlight { display: none; }
  .ticker-track, .led, .caret, .tier.featured { animation: none !important; }
  .btn, a, .faq summary .chev { transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   MODERN LAYER — AI-era interactions & depth
   ============================================================ */

/* ---------- Glass ---------- */
.glass {
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Hero grid: copy + live demo side by side ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero .wrap { position: relative; z-index: 2; }
@media (min-width: 992px) { .hero-inner { max-width: 660px; } }
@media (max-width: 991px) { .hero-grid { grid-template-columns: 1fr; .hero-inner { max-width: 880px; } } }

html[data-theme="dark"] .hero .display {
  text-shadow: 0 0 80px rgba(255, 184, 77, 0.14);
}

/* ---------- Cursor spotlight ---------- */
.spotlight {
  position: absolute;
  top: 0; left: 0;
  width: 640px; height: 640px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(255, 184, 77, 0.10), transparent);
  transform: translate(-999px, -999px);
  transition: transform 0.12s linear;
}
html[data-theme="light"] .spotlight {
  background: radial-gradient(closest-side, rgba(232, 121, 27, 0.13), transparent);
}

/* ---------- Live streaming demo ---------- */
.stream-demo {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
}
.stream-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.76rem;
  overflow: hidden;
  white-space: nowrap;
}
.stream-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ok);
  font-weight: 500;
  letter-spacing: 0.04em;
  flex: none;
}
.stream-model { margin-inline-start: auto; color: var(--amber); flex: none; }
.led {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 9px var(--ok);
  animation: ledpulse 2.2s ease-in-out infinite;
  flex: none;
}
@keyframes ledpulse { 50% { opacity: 0.4; box-shadow: 0 0 2px var(--ok); } }
.stream-body {
  padding: 18px 20px 22px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  font-size: 0.82rem;
  line-height: 1.8;
}
html[lang="th"] .stream-body { line-height: 1.95; }
.stream-prompt { color: var(--amber); margin: 0; }
.stream-prompt::before { content: "› "; color: var(--faint); }
.stream-out { color: var(--text); margin: 0; white-space: pre-wrap; word-break: break-word; }
.caret {
  display: inline-block;
  width: 7px; height: 1.05em;
  background: var(--amber);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: caretblink 0.9s steps(1) infinite;
}
@keyframes caretblink { 50% { opacity: 0; } }
.stream-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.74rem;
  white-space: nowrap;
}

/* ---------- Status pill ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 0;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.76rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 55%, transparent);
}

/* ---------- Model price ticker ---------- */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  position: relative;
}
.ticker::before, .ticker::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg-soft), transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg-soft), transparent); }
.ticker-track {
  display: flex;
  width: max-content;
  animation: tick 42s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 26px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  border-right: 1px solid var(--line);
}
.ticker-item b { color: var(--text); font-weight: 500; }
.ticker-item .tk-price { color: var(--amber); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Live fleet panel ---------- */
.fleet { overflow: hidden; }
.fleet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.78rem;
}
.fleet-head .fleet-title { color: var(--text); font-weight: 500; }
.fleet-head .fleet-note { margin-inline-start: auto; }
.fleet-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
}
.fleet-body .fleet-node { min-width: 0; }
.fleet-node {
  background: var(--panel);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.fleet-node .node-id {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fleet-node .node-id .led { flex: 0 0 auto; }
.fleet-node .node-id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fleet-legend {
  margin: 0;
  padding: 15px 22px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.fleet-legend .mono { color: var(--muted); }
.fleet-node .node-name { font-size: 0.84rem; font-weight: 500; }
.node-bar { height: 5px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.node-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber), var(--copper));
  transition: width 1.1s cubic-bezier(0.3, 0.6, 0.2, 1);
}
.node-util { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

/* ---------- Animated counters / reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.3, 0.6, 0.2, 1),
              transform 0.7s cubic-bezier(0.3, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* 404 destination tiles — these had no rules at all before */
.grid { display: grid; gap: 20px; }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 22px;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--copper); }

/* ---------- Utility layer ----------
   These replace the inline style="" attributes the pages used to carry, so
   the Content-Security-Policy can drop 'unsafe-inline' from style-src. */
.row-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.m0 { margin: 0; }
.mb-28 { margin-bottom: 28px; }
.mb-22 { margin-bottom: 22px; }
.mb-12 { margin: 0 0 12px; }
.mt-22 { margin-top: 22px; }
.mt-28 { margin-top: 28px; }
.pb-0 { padding-bottom: 0; }
.d-block { display: block; }
.vam { vertical-align: middle; }
.vam-center { vertical-align: middle; text-align: center; }
.align-start { align-items: start; }
.align-stretch { align-items: stretch; }
.minw-0 { min-width: 0; }
.fs-115 { font-size: 1.15rem; }
.fs-130 { font-size: 1.3rem; }
.fs-140 { font-size: 1.4rem; }
.fs-150 { font-size: 1.5rem; }
.chip-copper { background: var(--copper-soft); color: var(--copper); }
.svc-amber { --svc: var(--amber); }
.muted-mono { color: var(--muted); font-family: var(--mono); }
.mono-line { margin: 0; font-family: var(--mono); font-size: 1.15rem; }
.grid-18 { display: grid; gap: 18px; }
.grid-20 { display: grid; gap: 20px; }
.stack-center-16 { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.stack-center-18 { display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.meta-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.86rem; margin: 0 0 22px; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list-tight { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 9px; }
.list-tight-8 { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; }
.list-tight-8-sm { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; font-size: 0.95rem; }
.list-tight-lead { margin: 0 0 22px; padding-left: 20px; color: var(--muted); display: grid; gap: 9px; }
.dot-copper { width: 7px; height: 7px; border-radius: 999px; background: var(--copper); box-shadow: 0 0 10px var(--copper); }
.dot-amber { width: 7px; height: 7px; border-radius: 999px; background: var(--amber); box-shadow: 0 0 10px var(--amber); }

/* ---------- Coming soon state ----------
   A product that exists but is not open yet: the table keeps its header
   so the reader knows what is coming, and carries one clear row. */
.soon-row td { padding: clamp(28px, 4vw, 44px) 20px !important; text-align: center; border-bottom: 0 !important; }
.soon-row strong, .soon-panel strong, .soon-block strong {
  display: block; color: var(--text); font-weight: 600; letter-spacing: -0.01em;
}
.soon-row strong { font-size: 1.05rem; }
.soon-note { display: block; margin-top: 7px; font-size: 0.86rem; color: var(--muted); }
.soon-panel, .soon-block {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  padding: clamp(30px, 4.4vw, 52px) clamp(20px, 3vw, 40px); text-align: center;
}
.soon-panel strong, .soon-block strong { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.soon-block .soon-note { font-size: 0.9rem; }

/* ---------- Featured tier: gradient border + breathing glow ---------- */
html[data-theme="dark"] .tier.featured,
.tier.featured {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(140deg, var(--amber), rgba(255, 184, 77, 0.12) 42%, rgba(255, 138, 92, 0.12) 58%, var(--copper)) border-box;
  animation: featured-glow 5s ease-in-out infinite;
}
@keyframes featured-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 184, 77, 0.10); }
  50% { box-shadow: 0 0 34px rgba(255, 184, 77, 0.24); }
}
html[data-theme="dark"] .seam .pulse:nth-child(3) { background: var(--copper); box-shadow: 0 0 12px 2px var(--copper); }

/* ---------- Header depth on scroll ---------- */
.site-header.scrolled {
  border-bottom-color: var(--line-strong);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}
html[data-theme="light"] .site-header.scrolled {
  box-shadow: 0 10px 30px rgba(232, 121, 27, 0.10);
}

/* ---------- Modern buttons & panels ---------- */
.btn-primary {
  background: linear-gradient(120deg, var(--amber), var(--amber-deep));
  box-shadow: 0 0 0 rgba(255, 184, 77, 0);
  transition: box-shadow 0.25s, transform 0.18s, background 0.2s;
}
.btn-primary:hover {
  background: linear-gradient(120deg, var(--amber), var(--amber-deep));
  box-shadow: 0 8px 28px rgba(255, 184, 77, 0.38);
  transform: translateY(-1px);
  color: var(--amber-ink);
}
.panel { transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s; }
.panel:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.code { transition: border-color 0.25s; }
.code:hover { border-color: var(--line-strong); }

/* ---------- Themed scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 6px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* ---------- Stream demo on small screens ---------- */
@media (max-width: 480px) {
  .stream-body { min-height: 190px; font-size: 0.78rem; }
  .stream-foot { flex-wrap: wrap; }
  .ticker-item { padding: 11px 18px; }
}

/* ---------- Skip link (keyboard users) ---------- */
.skip-link {
  position: absolute;
  top: -56px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
  font-size: 0.92rem;
  transition: top 0.15s;
}
.skip-link:focus-visible { top: 10px; color: var(--amber-ink); }

/* ---------- Summary focus ring ---------- */
.faq summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 4px;
}
