/* BGYHub — design tokens and layout. Dark-first, developer-tool aesthetic. */
:root {
  --bg: #0a0e1a;
  --bg-2: #0d1322;
  --surface: #101828;
  --surface-2: #131c30;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #e6e9f0;
  --text-2: #b6bdcc;
  --muted: #8791a5;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1120px;
  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 10px 40px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
code, pre, kbd { font-family: var(--mono); }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.ic { width: 1em; height: 1em; flex: 0 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; display: inline-flex; }
.brand-a { color: #fff; }
.brand-b { color: var(--accent-2); }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 6px 10px; border-radius: 6px; font-size: 14px; color: var(--text-2);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.04); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--border);
  border-radius: 8px; width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle .ic { width: 20px; height: 20px; }
.nav-toggle .ic:last-child { display: none; }
.nav-toggle[aria-expanded="true"] .ic:first-child { display: none; }
.nav-toggle[aria-expanded="true"] .ic:last-child { display: block; }
.mobile-menu { border-top: 1px solid var(--border); background: var(--bg); }
.mobile-menu .container { display: flex; flex-direction: column; padding-top: 12px; padding-bottom: 20px; gap: 2px; }
.mobile-menu .nav-link { padding: 12px 10px; font-size: 16px; }
.mobile-actions { display: flex; flex-direction: column; gap: 14px; padding: 16px 10px 0; border-top: 1px solid var(--border); margin-top: 10px; }

.lang { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.lang .ic { width: 16px; height: 16px; }
.lang-opt { padding: 2px 4px; border-radius: 4px; color: var(--muted); }
.lang-opt:hover { color: #fff; }
.lang-opt.is-active { color: #fff; font-weight: 600; }
.lang-sep { opacity: 0.5; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2f74e8; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.03); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; border-top: 1px solid var(--border); }
.section-tight { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.eyebrow { color: var(--accent-2); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 12px; }
.h1 { font-size: clamp(38px, 6vw, 60px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.h2 { font-size: clamp(26px, 3.4vw, 34px); }
.h3 { font-size: 18px; }
.lead { color: var(--text-2); font-size: 17px; max-width: 60ch; margin: 12px 0 0; }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.link-more:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 360px at 18% 20%, rgba(59,130,246,0.14), transparent 60%),
    radial-gradient(500px 300px at 85% 70%, rgba(59,130,246,0.08), transparent 60%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-title .accent { color: var(--accent-2); }
.hero-sub { color: var(--text-2); font-size: 18px; max-width: 48ch; margin: 22px 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-points { display: flex; gap: 22px; flex-wrap: wrap; margin: 30px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .ic { color: var(--accent-2); width: 18px; height: 18px; }
.hero-caption { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Code window ---------- */
.codewin { background: #0b101d; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.codewin-bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.codewin-tab { background: none; border: 0; padding: 6px 10px; border-radius: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.codewin-tab[aria-selected="true"] { color: #fff; background: rgba(255,255,255,0.07); }
.codewin-bar .code-copy { margin-left: auto; }
.codewin pre { margin: 0; padding: 18px 18px 20px; overflow-x: auto; font-size: 13px; line-height: 1.65; color: #d7dce8; }
.codewin [role="tabpanel"][hidden] { display: none; }
.code { position: relative; background: #0b101d; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin: 14px 0 22px; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.65; color: #d7dce8; }
.code-copy {
  position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 6px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer;
}
.code-copy:hover { color: #fff; }
.code-copy.is-done { color: var(--success); }
.codewin-bar .code-copy { position: static; }
.tok-k { color: #93c5fd; } .tok-s { color: #86efac; } .tok-c { color: #6b7280; } .tok-u { color: #c4b5fd; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: border-color .15s, background .15s;
}
a.card:hover, .card.is-link:hover { border-color: var(--border-strong); background: var(--surface-2); color: inherit; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head .h3 { flex: 1; }
.card-icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-2); }
.card-icon .ic { width: 20px; height: 20px; }
.card p { color: var(--text-2); font-size: 15px; margin: 0; }
.card .link-more { margin-top: 18px; }
.pmark { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.pmark svg { width: 20px; height: 20px; }
.pmark-claude { color: #f5a97f; }
.pmark-openai { color: #e6e9f0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); color: var(--text-2); background: rgba(255,255,255,0.03); }
.pill-accent { color: var(--accent-2); border-color: rgba(96,165,250,0.35); background: var(--accent-soft); }
.pill-success { color: var(--success); border-color: rgba(52,211,153,0.35); background: var(--success-soft); }
.pill-warn { color: var(--warn); border-color: rgba(251,191,36,0.35); background: var(--warn-soft); }
.pill-danger { color: var(--danger); border-color: rgba(248,113,113,0.35); background: var(--danger-soft); }
.model-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.model-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; }
.model-list code { font-size: 12.5px; color: var(--muted); background: rgba(255,255,255,0.04); padding: 2px 7px; border-radius: 5px; }

/* Features */
.feature .card-icon { margin-bottom: 18px; }
.feature .h3 { margin-bottom: 8px; }
.feature { background: transparent; border-color: transparent; padding: 8px 0; }

/* Pricing preview */
.price-card { display: flex; flex-direction: column; gap: 14px; }
.price-lines { display: flex; flex-direction: column; gap: 6px; }
.price-line { display: flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--text-2); }
.price-line strong { color: #fff; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.price-line .contact { color: var(--accent-2); font-weight: 600; font-size: 15px; }
.price-card .blurb { color: var(--muted); font-size: 14px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.step .h3 { margin-bottom: 4px; }
.step p { color: var(--text-2); font-size: 15px; margin: 0; }

/* CTA */
.cta { border: 1px solid var(--border); border-radius: 16px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(180deg, rgba(59,130,246,0.08), rgba(59,130,246,0.02)); }
.cta .h2 { margin-bottom: 8px; }
.cta p { color: var(--text-2); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 44px 0; margin-top: 88px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; align-items: center; }
.footer-brand p { margin: 8px 0 0; font-size: 14px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.footer-copy { grid-column: 1 / -1; font-size: 13px; margin: 8px 0 0; }

/* ---------- Generic pages ---------- */
.page { padding: 64px 0 0; }
.page-head { margin-bottom: 40px; max-width: 70ch; }
.page-head .lead { margin-top: 10px; }
.prose { max-width: 76ch; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: 22px; margin: 40px 0 12px; }
.prose h3 { color: var(--text); font-size: 17px; margin: 28px 0 10px; }
.prose p, .prose li { font-size: 15.5px; }
.prose code:not(pre code) { font-size: 0.9em; background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 5px; color: #dbe3f5; }
.prose ol, .prose ul { padding-left: 22px; }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); color: var(--text-2); font-size: 14.5px; margin: 18px 0; }
.callout-warn { border-left-color: var(--warn); }
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.docs-side { position: sticky; top: 84px; }
.docs-side .h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; }
.docs-side a { display: block; padding: 6px 10px; border-radius: 6px; font-size: 14px; color: var(--text-2); }
.docs-side a:hover, .docs-side a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.05); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; background: rgba(255,255,255,0.02); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .contact { color: var(--accent-2); font-weight: 600; }
.pricing-notes { margin-top: 24px; color: var(--muted); font-size: 14px; max-width: 76ch; }
.pricing-notes li { margin-bottom: 6px; }

/* Forms */
.form { max-width: 560px; }
.field { margin-bottom: 20px; }
.field > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.field .hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.input, .textarea, .select {
  width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: 15px; font-family: inherit;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 120px; resize: vertical; }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 14.5px; cursor: pointer; }
.check:hover { border-color: var(--border-strong); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.check code { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.alert { border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14.5px; border: 1px solid var(--border); margin-bottom: 20px; display: flex; gap: 10px; align-items: flex-start; }
.alert .ic { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; }
.alert-info { background: var(--accent-soft); border-color: rgba(96,165,250,0.35); color: #dbeafe; }
.alert-success { background: var(--success-soft); border-color: rgba(52,211,153,0.35); color: #d1fae5; }
.alert-warn { background: var(--warn-soft); border-color: rgba(251,191,36,0.35); color: #fef3c7; }
.alert-danger { background: var(--danger-soft); border-color: rgba(248,113,113,0.35); color: #fee2e2; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Status */
.status-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; max-width: 720px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.status-row:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 10px; background: var(--muted); }
.dot-ok { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.dot-down { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }

/* ---------- Portal ---------- */
.portal-body { background: var(--bg); }
.portal-header { border-bottom: 1px solid var(--border); background: var(--bg-2); position: sticky; top: 0; z-index: 40; }
.portal-nav { display: flex; align-items: center; gap: 8px; height: 58px; }
.portal-nav .brand { margin-right: 20px; }
.portal-nav .nav-link { display: inline-flex; align-items: center; gap: 8px; }
.portal-nav .nav-link .ic { width: 16px; height: 16px; opacity: .8; }
.portal-main { padding: 36px 0 80px; }
.portal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.portal-head .h2 { font-size: 26px; }
.portal-head .lead { font-size: 15px; margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.stat-warn { border-color: rgba(251,191,36,0.4); }
.stat-danger { border-color: rgba(248,113,113,0.45); }
.meter { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; margin-top: 12px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter-warn > span { background: var(--warn); }
.meter-danger > span { background: var(--danger); }
.portal-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font-family: var(--mono); font-size: 13px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14.5px; margin-top: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.badge-credit { background: var(--success-soft); color: var(--success); }
.badge-refund { background: var(--accent-soft); color: var(--accent-2); }
.badge-adjustment { background: var(--warn-soft); color: var(--warn); }
.amt-pos { color: var(--success); }
.amt-neg { color: var(--danger); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14.5px; }
.amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 6px 0 18px; }
.amount { position: relative; }
.amount input { position: absolute; opacity: 0; inset: 0; }
.amount span { display: flex; align-items: center; justify-content: center; height: 52px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-weight: 600; cursor: pointer; }
.amount input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: #fff; box-shadow: 0 0 0 1px var(--accent) inset; }
.amount input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Utilities */
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 72px 0 64px; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-side { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .docs-side .h3 { width: 100%; }
  .portal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-right { display: none; }
  .nav-toggle { display: inline-flex; }
  .grid-3, .grid-2, .steps, .stats { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-head { flex-direction: column; align-items: flex-start; margin-bottom: 28px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .amounts { grid-template-columns: repeat(3, 1fr); }
  .portal-nav { gap: 2px; overflow-x: auto; }
  .portal-nav .nav-link span { display: none; }
  .portal-nav .nav-link .ic { width: 18px; height: 18px; }
  th, td { padding: 12px 14px; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .h1 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* ---------- Fixes: prevent grid children from expanding past the viewport ---------- */
.grid > *, .hero .container > *, .portal-grid > *, .docs-layout > *, .steps > *, .stats > * { min-width: 0; }
html[lang="zh-CN"] .h1 { font-size: clamp(32px, 4.8vw, 50px); letter-spacing: -0.01em; }
html[lang="zh-CN"] .hero-title { max-width: 14em; }
.check > span { flex: 1; }
.check input { margin: 0; }
.check code { white-space: nowrap; }
