/* ============================================================================
   GPU Cloud Compare — Design System
   Dark-first, dual-theme, token-driven. Inspired by the visual language of
   Vercel / Linear / Stripe: precise type, restrained surfaces, purposeful motion.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
  /* surfaces */
  --bg:              #07080b;
  --bg-subtle:       #0a0c11;
  --surface:         #0e1117;
  --surface-2:       #131824;
  --surface-3:       #1a2030;
  --surface-hover:   #171d2b;
  --overlay:         rgba(4, 6, 10, .72);

  /* lines */
  --border:          #1c2230;
  --border-strong:   #2a3346;
  --border-accent:   rgba(76, 125, 255, .45);

  /* text */
  --text:            #eef2f9;
  --text-2:          #a3aec2;
  --text-3:          #6d7889;
  --text-invert:     #07080b;

  /* brand */
  --accent:          #4c7dff;
  --accent-hover:    #6a93ff;
  --accent-soft:     rgba(76, 125, 255, .12);
  --accent-2:        #8b5cf6;
  --accent-cyan:     #22d3ee;
  --grad-brand:      linear-gradient(135deg, #4c7dff 0%, #8b5cf6 100%);
  --grad-text:       linear-gradient(100deg, #9db9ff 0%, #c4b5fd 55%, #7dd3fc 100%);
  --grad-surface:    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0));

  /* semantic */
  --success:         #34d399;
  --success-soft:    rgba(52, 211, 153, .12);
  --warn:            #fbbf24;
  --warn-soft:       rgba(251, 191, 36, .12);
  --danger:          #f87171;
  --danger-soft:     rgba(248, 113, 113, .12);
  --info:            #60a5fa;

  /* elevation */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.35);
  --shadow-sm:  0 2px 6px -1px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.25);
  --shadow-md:  0 10px 24px -8px rgba(0,0,0,.55), 0 2px 6px -2px rgba(0,0,0,.35);
  --shadow-lg:  0 28px 56px -20px rgba(0,0,0,.7), 0 8px 20px -12px rgba(0,0,0,.5);
  --ring:       0 0 0 3px rgba(76, 125, 255, .28);
  --glow:       0 0 0 1px rgba(76,125,255,.3), 0 12px 34px -12px rgba(76,125,255,.6);

  /* geometry */
  --r-xs: 6px;  --r-sm: 9px;  --r-md: 13px;  --r-lg: 18px;  --r-xl: 26px;  --r-full: 999px;

  /* fluid type scale */
  --fs-2xs: 11px;
  --fs-xs:  12.5px;
  --fs-sm:  13.5px;
  --fs-base:15.5px;
  --fs-md:  17px;
  --fs-lg:  clamp(1.16rem, .35vw + 1.08rem, 1.32rem);
  --fs-xl:  clamp(1.4rem, .7vw + 1.24rem, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.6vw + 1.4rem, 2.4rem);
  --fs-3xl: clamp(2.1rem, 3.1vw + 1.42rem, 3.5rem);
  --fs-4xl: clamp(2.5rem, 5.2vw + 1.1rem, 4.5rem);

  /* spacing */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;  --s-5: 20px;
  --s-6: 24px;  --s-8: 32px;  --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --s-20: 80px; --s-24: 96px; --s-32: 128px;

  --container: 1240px;
  --container-wide: 1440px;
  --header-h: 64px;

  /* motion */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: 130ms;  --dur: 220ms;  --dur-slow: 420ms;

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Inter, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "DejaVu Sans Mono", monospace;
  --font-num: var(--font-mono);
}

[data-theme="light"] {
  --bg:              #ffffff;
  --bg-subtle:       #f7f8fc;
  --surface:         #ffffff;
  --surface-2:       #f5f7fb;
  --surface-3:       #eceff7;
  --surface-hover:   #f2f5fa;
  --overlay:         rgba(255,255,255,.75);

  --border:          #e3e8f1;
  --border-strong:   #cbd4e3;
  --border-accent:   rgba(37, 99, 235, .35);

  --text:            #0b0f18;
  --text-2:          #4d5a70;
  --text-3:          #78849a;
  --text-invert:     #ffffff;

  --accent:          #2563eb;
  --accent-hover:    #1d4ed8;
  --accent-soft:     rgba(37, 99, 235, .09);
  --accent-2:        #7c3aed;
  --accent-cyan:     #0891b2;
  --grad-brand:      linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-text:       linear-gradient(100deg, #1d4ed8 0%, #6d28d9 55%, #0e7490 100%);
  --grad-surface:    linear-gradient(180deg, rgba(15,23,42,.03), rgba(15,23,42,0));

  --success:         #059669;
  --success-soft:    rgba(5, 150, 105, .1);
  --warn:            #b45309;
  --warn-soft:       rgba(180, 83, 9, .1);
  --danger:          #dc2626;
  --danger-soft:     rgba(220, 38, 38, .09);

  --shadow-xs:  0 1px 2px rgba(16,24,40,.06);
  --shadow-sm:  0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --shadow-md:  0 8px 20px -6px rgba(16,24,40,.12), 0 2px 6px -2px rgba(16,24,40,.06);
  --shadow-lg:  0 24px 48px -16px rgba(16,24,40,.18), 0 8px 18px -12px rgba(16,24,40,.1);
  --ring:       0 0 0 3px rgba(37, 99, 235, .2);
  --glow:       0 0 0 1px rgba(37,99,235,.22), 0 10px 28px -12px rgba(37,99,235,.4);
}

/* ---------------------------------------------------------------- 2. Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.62;
  font-feature-settings: "cv11", "ss01";
  font-variant-ligatures: contextual;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent-hover); }
ul, ol { padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-8) 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) { outline: none; }

/* ---------------------------------------------------------------- 3. Typography */
h1, h2, h3, h4, h5 {
  font-weight: 640;
  line-height: 1.15;
  letter-spacing: -.022em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); letter-spacing: -.032em; }
h2 { font-size: var(--fs-2xl); letter-spacing: -.026em; }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p  { text-wrap: pretty; color: var(--text-2); }
strong, b { font-weight: 620; color: var(--text); }
small { font-size: var(--fs-sm); }
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: .12em .4em;
  border-radius: var(--r-xs);
  color: var(--text);
  word-break: break-word;
}
kbd { font-size: .8em; padding: .15em .45em; box-shadow: var(--shadow-xs); }
mark { background: var(--accent-soft); color: var(--accent); padding: 0 .18em; border-radius: 4px; }
.num, .mono-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-3);
}
.lede { font-size: var(--fs-md); color: var(--text-2); line-height: 1.62; max-width: 68ch; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.xxs { font-size: var(--fs-2xs); }
.xs { font-size: var(--fs-xs); }
.sm { font-size: var(--fs-sm); }

/* ---------------------------------------------------------------- 4. Layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-5); }
.container-wide { max-width: var(--container-wide); }
.stack > * + * { margin-top: var(--s-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.section { padding-block: var(--s-16); }
.section-sm { padding-block: var(--s-10); }
.section-head { margin-bottom: var(--s-8); max-width: 74ch; }
.section-head h2 { margin-bottom: var(--s-3); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.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;
}
.skip-link {
  position: fixed; top: var(--s-3); left: var(--s-3); z-index: 200;
  transform: translateY(-160%);
  background: var(--accent); color: #fff; font-weight: 600; font-size: var(--fs-sm);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-sm);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); color: #fff; }

/* ---------------------------------------------------------------- 5. Buttons */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 0 var(--s-5); height: 42px;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.008em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-sm);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { color: var(--btn-fg); background: var(--surface-3); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-primary {
  --btn-fg: #fff;
  --btn-bd: transparent;
  background: var(--grad-brand);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.btn-primary:hover { background: var(--grad-brand); filter: brightness(1.12); box-shadow: var(--glow); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { --btn-fg: var(--text); --btn-bg: var(--surface-2); }
.btn-quiet { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn-quiet:hover { --btn-bg: var(--surface-2); --btn-fg: var(--text); }
.btn-success { --btn-fg: #04120c; --btn-bd: transparent; background: var(--success); }
.btn-success:hover { background: var(--success); filter: brightness(1.08); }
.btn-sm { height: 34px; padding: 0 var(--s-4); font-size: var(--fs-xs); border-radius: var(--r-xs); }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { height: 50px; padding: 0 28px; font-size: var(--fs-base); border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--r-sm); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------------- 6. Surfaces */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-xs);
}
.card-elevated { background: var(--surface-2); box-shadow: var(--shadow-md); }
.card-glow { box-shadow: var(--shadow-md); }
.card-glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(76,125,255,.1), transparent 40%);
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.card-glow:hover::before { opacity: 1; }
.card-pad-lg { padding: var(--s-8); }
.card-flush { padding: 0; overflow: hidden; }
.panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.panel-inset { background: var(--bg-subtle); box-shadow: inset 0 1px 0 rgba(255,255,255,.02); }

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

/* ---------------------------------------------------------------- 7. Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 var(--s-3);
  font-size: var(--fs-2xs); font-weight: 650; letter-spacing: .02em;
  border-radius: var(--r-full); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-accent { background: var(--accent-soft); border-color: var(--border-accent); color: var(--accent); }
.badge-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.badge-warn    { background: var(--warn-soft);    border-color: color-mix(in srgb, var(--warn) 40%, transparent);    color: var(--warn); }
.badge-danger  { background: var(--danger-soft);  border-color: color-mix(in srgb, var(--danger) 40%, transparent);  color: var(--danger); }
.badge-solid   { background: var(--accent); border-color: transparent; color: #fff; }
.badge-spot    { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.live-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: none; }
.live-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid var(--success); opacity: .6;
  animation: ping 2.4s var(--ease-in-out) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 70%,100% { transform: scale(1.5); opacity: 0; } }

/* ---------------------------------------------------------------- 8. Header */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.header-inner {
  display: flex; align-items: center; gap: var(--s-4);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: var(--s-3); flex: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; border-radius: var(--r-sm); }
.brand-name { font-size: var(--fs-base); font-weight: 660; letter-spacing: -.028em; }
.brand-tag { font-size: var(--fs-2xs); color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 520; color: var(--text-2);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: -1px; height: 2px;
  background: var(--grad-brand); border-radius: 2px;
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }

/* search trigger */
.search-trigger {
  display: inline-flex; align-items: center; gap: var(--s-3);
  height: 36px; padding: 0 var(--s-3);
  min-width: 200px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text-3); font-size: var(--fs-sm);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); background: var(--surface-3); }
.search-trigger svg { width: 14px; height: 14px; }
.search-trigger kbd { margin-left: auto; }

/* language switcher */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2);
  font-size: var(--fs-xs); font-weight: 620; letter-spacing: .04em; color: var(--text-2);
  transition: all var(--dur-fast) var(--ease);
}
.lang-btn:hover { color: var(--text); border-color: var(--border-strong); }
.lang-btn svg { width: 12px; height: 12px; opacity: .6; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 100;
  min-width: 190px; padding: var(--s-2);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
  transition: all var(--dur) var(--ease);
}
.lang[data-open="true"] .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a, .lang-menu span {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-xs);
  font-size: var(--fs-sm); color: var(--text-2);
}
.lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu [aria-current="true"] { color: var(--accent); font-weight: 600; }

/* theme toggle */
.theme-toggle { position: relative; width: 38px; height: 38px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; }
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }

/* mobile drawer */
.mobile-nav {
  display: none; position: fixed; inset: var(--header-h) 0 0; z-index: 88;
  background: var(--bg); border-top: 1px solid var(--border);
  padding: var(--s-5); overflow-y: auto;
}
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav a {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4); border-radius: var(--r-md);
  color: var(--text); font-size: var(--fs-md); font-weight: 520;
  border: 1px solid transparent;
}
.mobile-nav a:hover { background: var(--surface-2); border-color: var(--border); }

/* ---------------------------------------------------------------- 9. Command palette */
.cmdk {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: start center; padding-top: 12vh;
  background: var(--overlay);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.cmdk[data-open="true"] { opacity: 1; visibility: visible; }
.cmdk-box {
  width: min(620px, 92vw); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: translateY(-10px) scale(.985); transition: transform var(--dur) var(--ease);
}
.cmdk[data-open="true"] .cmdk-box { transform: none; }
.cmdk-input-wrap { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.cmdk-input-wrap svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.cmdk-input { flex: 1; border: 0; background: none; outline: none; font-size: var(--fs-md); color: var(--text); }
.cmdk-input::placeholder { color: var(--text-3); }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: var(--s-2); }
.cmdk-group-label { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); padding: var(--s-3) var(--s-3) var(--s-1); }
.cmdk-item {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  padding: var(--s-3); border-radius: var(--r-sm);
  color: var(--text); font-size: var(--fs-sm); text-align: left;
}
.cmdk-item:hover, .cmdk-item[data-active="true"] { background: var(--surface-2); color: var(--text); }
.cmdk-item svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.cmdk-item .k-kind { margin-left: auto; font-size: var(--fs-2xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.cmdk-foot { display: flex; gap: var(--s-4); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); font-size: var(--fs-2xs); color: var(--text-3); }

/* ---------------------------------------------------------------- 10. Hero */
.hero { position: relative; padding-block: var(--s-20) var(--s-16); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 150%;
  background:
    radial-gradient(52% 42% at 18% 8%, rgba(76,125,255,.20), transparent 62%),
    radial-gradient(46% 38% at 82% 4%, rgba(139,92,246,.16), transparent 60%),
    radial-gradient(60% 40% at 50% 100%, rgba(34,211,238,.07), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 10%, transparent 72%);
}
.hero > * { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--s-16); align-items: center; }
.hero h1 { margin-bottom: var(--s-5); }
.hero .lede { font-size: var(--fs-lg); }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--border); }
.hero-stat-n { font-size: var(--fs-xl); font-weight: 680; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.hero-stat-l { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }

/* live price ticker card */
.ticker {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong); border-radius: var(--r-xl);
  padding: var(--s-2); box-shadow: var(--shadow-lg);
}
.ticker-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-4) var(--s-3); border-bottom: 1px solid var(--border); }
.ticker-title { font-size: var(--fs-sm); font-weight: 620; }
.ticker-body { padding: var(--s-2); }
.ticker-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease);
}
.ticker-row:hover { background: var(--surface-3); }
.ticker-gpu { font-size: var(--fs-sm); font-weight: 600; }
.ticker-prov { font-size: var(--fs-2xs); color: var(--text-3); }
.ticker-price { text-align: right; font-variant-numeric: tabular-nums; }
.ticker-price b { display: block; font-size: var(--fs-md); font-weight: 660; letter-spacing: -.02em; }
.ticker-price span { font-size: var(--fs-2xs); color: var(--text-3); }
.spark { width: 68px; height: 26px; flex: none; overflow: visible; }
.spark path { fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- 11. Logo strip */
.logo-strip { border-block: 1px solid var(--border); padding-block: var(--s-6); background: var(--bg-subtle); }
.logo-strip-inner { display: flex; align-items: center; gap: var(--s-8); flex-wrap: wrap; }
.logo-strip .eyebrow { flex: none; }
.logo-item {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-md); font-weight: 640; letter-spacing: -.02em;
  color: var(--text-3); transition: color var(--dur) var(--ease);
}
.logo-item:hover { color: var(--text); }
.logo-item svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- 12. Toolbar / filters */
.toolbar {
  display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center;
  padding: var(--s-3); margin-bottom: var(--s-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 20;
  box-shadow: var(--shadow-sm);
}
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.segmented button {
  padding: 5px var(--s-4); border-radius: var(--r-xs); font-size: var(--fs-xs); font-weight: 600;
  color: var(--text-2); transition: all var(--dur-fast) var(--ease); white-space: nowrap;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: var(--fs-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.input, .select, .textarea {
  height: 38px; padding: 0 var(--s-3);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-size: var(--fs-sm); width: 100%; min-width: 0;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  appearance: none;
}
.textarea { height: auto; padding: var(--s-3); resize: vertical; line-height: 1.6; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%236d7889' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--s-3) center; background-size: 12px;
  padding-right: var(--s-8);
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg { position: absolute; left: var(--s-3); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.input-wrap .input { padding-left: var(--s-8); }
.field-inline { flex-direction: row; align-items: center; gap: var(--s-2); }
.search-field { flex: 1 1 190px; min-width: 150px; }
.results-count { font-size: var(--fs-xs); color: var(--text-3); margin-left: auto; font-variant-numeric: tabular-nums; }

/* range slider */
.range { width: 100%; height: 30px; display: flex; align-items: center; }
.range input[type="range"] { width: 100%; -webkit-appearance: none; appearance: none; background: transparent; }
.range input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--surface-3); }
.range input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--surface-3); }
.range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); margin-top: -6px; box-shadow: var(--shadow-sm);
  cursor: grab; transition: transform var(--dur-fast) var(--ease);
}
.range input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface);
  cursor: grab;
}

/* ---------------------------------------------------------------- 13. Data table */
.table-shell {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-xs);
}
/* 唯一的滚动容器。
   横向：容纳 min-width 960px 的窄桌面；纵向：封顶 —— 否则 29 行数据会把板块
   撑到 2300px 成为「一堵没有表头的长墙」。
   ⚠️ 正因为它自身成了滚动容器，吸顶表头必须以它为基准（top: 0），
   而不是以视口为基准（写成 calc(--header-h + …) 会永远吸不住）。
   后台的 .table-wrap 本来就是这么做的，这里与它对齐。 */
.table-scroll {
  overflow: auto;
  max-height: min(72vh, 760px);
  overscroll-behavior-x: contain;
}
.dtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); min-width: 960px; }
.dtable caption { text-align: left; padding: var(--s-4) var(--s-5) 0; font-size: var(--fs-xs); color: var(--text-3); }
.dtable thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--surface-2);
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-2xs); font-weight: 650; text-transform: uppercase; letter-spacing: .065em;
  color: var(--text-3); text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.dtable thead th:first-child { padding-left: var(--s-5); }
.dtable thead th:last-child { padding-right: var(--s-5); }
.dtable th.sortable { cursor: pointer; user-select: none; }
.dtable th.sortable:hover { color: var(--text); }
.dtable th .sort-ind { display: inline-flex; align-items: center; gap: 4px; }
.dtable th .sort-ind svg { width: 10px; height: 10px; opacity: .35; }
.dtable th[aria-sort] { color: var(--accent); }
.dtable th[aria-sort] .sort-ind svg { opacity: 1; }
.dtable tbody td, .dtable tbody th {
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border);
  vertical-align: middle; text-align: left; font-weight: 400;
}
.dtable tbody th { font-weight: 560; color: var(--text); }
.dtable tbody tr { transition: background var(--dur-fast) var(--ease); }
.dtable tbody tr:hover { background: var(--surface-hover); }
.dtable tbody tr:last-child td, .dtable tbody tr:last-child th { border-bottom: 0; }
.dtable td:first-child, .dtable tbody th:first-child { padding-left: var(--s-5); }
.dtable td:last-child { padding-right: var(--s-5); }
.dtable .c-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dtable .c-price b { font-size: var(--fs-base); font-weight: 660; letter-spacing: -.02em; }
.dtable .c-price.is-best b { color: var(--success); }
.dtable .c-cta { text-align: right; white-space: nowrap; }
.dtable tr.is-best { background: linear-gradient(90deg, var(--success-soft), transparent 55%); }
.dtable tr.is-best:hover { background: linear-gradient(90deg, var(--success-soft), var(--surface-hover) 55%); }
.dtable tbody tr[hidden] { display: none; }
.row-provider { display: flex; align-items: center; gap: var(--s-3); }
.provider-mark {
  width: 26px; height: 26px; flex: none; border-radius: var(--r-xs);
  display: grid; place-items: center;
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: -.02em;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text-2);
}
.provider-mark[data-slug="runpod"] { background: linear-gradient(135deg,#4c7dff,#6a93ff); color:#fff; border-color:transparent; }
.provider-mark[data-slug="vastai"] { background: linear-gradient(135deg,#f97316,#fb923c); color:#fff; border-color:transparent; }
.provider-mark[data-slug="lambda"] { background: linear-gradient(135deg,#8b5cf6,#a78bfa); color:#fff; border-color:transparent; }
.row-provider a { color: var(--text); font-weight: 560; }
.row-provider a:hover { color: var(--accent); }
.fav-btn { color: var(--text-3); display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-xs); }
.fav-btn:hover { color: var(--warn); background: var(--surface-3); }
.fav-btn svg { width: 14px; height: 14px; }
.fav-btn[aria-pressed="true"] { color: var(--warn); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.empty-row { padding: var(--s-16) var(--s-5); text-align: center; color: var(--text-3); }
.empty-state { text-align: center; padding: var(--s-12) var(--s-5); }
.empty-state svg { width: 34px; height: 34px; margin: 0 auto var(--s-4); color: var(--text-3); }

/* mobile card list (table alternative) */
.mcard-list { display: none; }

/* ── 窄屏：把同一份表格 DOM 重排为卡片（零重复渲染，DOM 更小） ────────── */
@media (max-width: 900px) {
  /* 卡片化后表格不再是一堵数据墙 → 取消内部纵向滚动，避免「页面里再套一层滚动条」 */
  .table-scroll { max-height: none; overflow: visible; }
  .dtable.stack { min-width: 0; display: block; }
  .dtable.stack thead { display: none; }
  .dtable.stack tbody { display: block; }
  .dtable.stack tr {
    display: block; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: var(--s-4); margin-bottom: var(--s-3);
  }
  .dtable.stack tr.is-best { border-color: color-mix(in srgb, var(--success) 45%, transparent); }
  .dtable.stack th, .dtable.stack td {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
    padding: 5px 0; border: 0; text-align: left;
  }
  .dtable.stack th:first-child, .dtable.stack td:first-child,
  .dtable.stack td:last-child { padding: 5px 0; }
  .dtable.stack th::before, .dtable.stack td::before {
    content: attr(data-label); font-size: var(--fs-2xs); text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-3); flex: none;
  }
  .dtable.stack th:first-child::before, .dtable.stack td:last-child::before { content: none; }
  .dtable.stack th:first-child {
    justify-content: flex-start; padding-bottom: var(--s-3); margin-bottom: var(--s-2);
    border-bottom: 1px solid var(--border); font-size: var(--fs-base);
  }
  .dtable.stack td.c-num, .dtable.stack td.c-price, .dtable.stack td.c-cta { text-align: right; }
  .dtable.stack td.c-price b { font-size: var(--fs-md); }
  .dtable.stack td.c-cta { padding-top: var(--s-3); margin-top: var(--s-2); border-top: 1px solid var(--border); }
  .dtable.stack td.c-cta .btn { width: 100%; }
  .dtable.stack tr.is-best { background: var(--surface); }
}
.mcard {
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); padding: var(--s-4); margin-bottom: var(--s-3);
}
.mcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.mcard-gpu { font-size: var(--fs-base); font-weight: 640; letter-spacing: -.02em; }
.mcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-bottom: var(--s-4); }
.mcard-kv { display: flex; flex-direction: column; gap: 2px; }
.mcard-kv dt { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.mcard-kv dd { margin: 0; font-size: var(--fs-sm); font-weight: 560; font-variant-numeric: tabular-nums; }

/* compare bar */
.compare-bar {
  position: fixed; left: 50%; bottom: var(--s-5); transform: translate(-50%, 160%);
  z-index: 95; display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-full);
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-slow) var(--ease);
}
.compare-bar[data-visible="true"] { transform: translate(-50%, 0); }
.compare-chips { display: flex; gap: var(--s-2); }
.compare-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px var(--s-3) 3px var(--s-2); border-radius: var(--r-full);
  background: var(--surface-3); font-size: var(--fs-xs); font-weight: 560;
}
.compare-chip button { color: var(--text-3); display: grid; place-items: center; }
.compare-chip button:hover { color: var(--danger); }

/* ---------------------------------------------------------------- 14. Cards / tiles */
.tile {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-5); color: var(--text); overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
a.tile:hover, .tile-link:hover {
  text-decoration: none; transform: translateY(-2px);
  border-color: var(--border-strong); box-shadow: var(--shadow-md); color: var(--text);
}
.tile-icon {
  width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: var(--s-4); flex: none;
}
.tile-icon svg { width: 19px; height: 19px; }
.tile-title { font-size: var(--fs-md); font-weight: 640; letter-spacing: -.02em; margin-bottom: var(--s-2); }
.tile-desc { font-size: var(--fs-sm); color: var(--text-2); margin: 0; flex: 1; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.arrow-link { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); font-weight: 600; }
.arrow-link svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
a:hover .arrow-link svg, .arrow-link:hover svg { transform: translateX(3px); }

.feature { display: flex; gap: var(--s-4); }
.feature-mark { width: 30px; height: 30px; flex: none; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--surface-2); color: var(--accent); border: 1px solid var(--border); }
.feature-mark svg { width: 15px; height: 15px; }
.feature-title { font-size: var(--fs-sm); font-weight: 620; margin-bottom: 3px; }
.feature-desc { font-size: var(--fs-sm); color: var(--text-2); margin: 0; }

/* provider card */
.provider-card-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.provider-logo { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); color: #fff; flex: none; }
.provider-logo[data-slug="runpod"] { background: linear-gradient(135deg,#4c7dff,#6a93ff); }
.provider-logo[data-slug="vastai"] { background: linear-gradient(135deg,#f97316,#fb923c); }
.provider-logo[data-slug="lambda"] { background: linear-gradient(135deg,#8b5cf6,#a78bfa); }

/* ---------------------------------------------------------------- 15. Chart */
.chart-shell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-3); }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-2); }
.chart-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chart-line-dashed { width: 14px; height: 0; border-top: 2px dashed currentColor; opacity: .6; }
svg.price-chart { width: 100%; height: auto; display: block; }
.chart-grid line { stroke: var(--border); stroke-width: 1; }
.chart-axis { fill: var(--text-3); font-size: 11px; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.chart-empty { fill: var(--text-3); font-size: 13px; font-family: var(--font-sans); }
.price-chart.trend { display: block; width: 100%; height: auto; }
.chart-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-line.dashed { stroke-dasharray: 4 4; }

/* price trend card —— 对齐 vast.ai 详情页的「Price Trend」观感 */
.trend-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-3); flex-wrap: wrap; }
.trend-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-4); }
.trend-legend li { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); color: var(--text-2); }
.trend-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.trend-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-3); }
.trend-dot[data-i="0"] { background: #4f9cf9; }
.trend-dot[data-i="1"] { background: #f2994a; }
.trend-dot[data-i="2"] { background: #27ae60; }
.trend-dot[data-i="3"] { background: #9b51e0; }
.trend-name { color: var(--text-2); }
.trend-name:hover { color: var(--accent); }
/* 国内惯例：涨=红、跌=绿（对租用方而言涨价是坏消息） */
.trend-chg.up { color: var(--danger); }
.trend-chg.down { color: var(--success); }
.segmented a {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border-radius: var(--r-xs); font-size: var(--fs-xs); font-weight: 580; color: var(--text-2);
}
.segmented a:hover { color: var(--text); }
.segmented a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.chart-label { fill: var(--text-2); font-size: 11.5px; font-family: var(--font-sans); font-weight: 600; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line.dashed { stroke-dasharray: 5 4; opacity: .6; }
.chart-empty { fill: var(--text-3); font-size: 13px; font-family: var(--font-sans); }
.chart-area { opacity: .12; }
.chart-bar { fill: var(--accent); }

/* ---------------------------------------------------------------- 16. Calculator */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s-8); align-items: start; }
.calc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-6); }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-4); }
.calc-fields .span-2 { grid-column: span 2; }
.calc-result-panel {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: var(--s-6);
  box-shadow: var(--shadow-md);
}
.calc-total { font-size: var(--fs-4xl); font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; margin: var(--s-3) 0 var(--s-2); }
.calc-sub { font-size: var(--fs-sm); color: var(--text-3); }
.calc-breakdown { margin-top: var(--s-5); border-top: 1px solid var(--border); }
.calc-line { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.calc-line:last-child { border-bottom: 0; }
.calc-line dt { color: var(--text-2); }
.calc-line dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-bar { height: 8px; border-radius: 4px; overflow: hidden; display: flex; margin-top: var(--s-4); background: var(--surface-3); }
.calc-bar span { display: block; height: 100%; transition: width var(--dur-slow) var(--ease); }
.calc-bar .seg-compute { background: var(--accent); }
.calc-bar .seg-storage { background: var(--accent-2); }
.calc-bar .seg-egress { background: var(--accent-cyan); }
.calc-note { font-size: var(--fs-xs); color: var(--text-3); margin-top: var(--s-4); }
.preset-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.preset-chip {
  padding: 5px var(--s-3); border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 560;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  transition: all var(--dur-fast) var(--ease);
}
.preset-chip:hover, .preset-chip[aria-pressed="true"] { border-color: var(--border-accent); color: var(--accent); background: var(--accent-soft); }
.slider-row { display: flex; align-items: center; gap: var(--s-3); }
.slider-val { min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 620; font-size: var(--fs-sm); }
.fit-list { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.fit-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.fit-item:hover { border-color: var(--border-strong); }

/* ---------------------------------------------------------------- 17. FAQ */
.faq { display: grid; gap: var(--s-3); }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; transition: border-color var(--dur) var(--ease); }
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  display: flex; align-items: center; gap: var(--s-4); cursor: pointer; list-style: none;
  padding: var(--s-4) var(--s-5); font-size: var(--fs-base); font-weight: 580; color: var(--text);
  transition: background var(--dur-fast) var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--surface-2); }
.faq-item summary h3 { display: inline; font-size: inherit; font-weight: inherit; margin: 0; letter-spacing: inherit; }
.faq-q { flex: 1; }
.faq-chev { width: 16px; height: 16px; color: var(--text-3); flex: none; transition: transform var(--dur) var(--ease); }
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-a { padding: 0 var(--s-5) var(--s-5); color: var(--text-2); font-size: var(--fs-sm); line-height: 1.7; }
.faq-a > * + * { margin-top: var(--s-3); }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- 18. Article */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: var(--fs-xl); margin-top: 2em; letter-spacing: -.024em; }
.prose h3 { font-size: var(--fs-lg); margin-top: 1.6em; }
.prose h2 + h3 { margin-top: .9em; }
.prose ul, .prose ol { padding-left: 1.35em; color: var(--text-2); }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--text-3); }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: var(--s-1) 0 var(--s-1) var(--s-5);
  color: var(--text-2); font-style: italic; margin-inline: 0;
}
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.prose th, .prose td { padding: var(--s-3); border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); font-weight: 620; }
.prose img { border-radius: var(--r-md); border: 1px solid var(--border); }
.article-header { padding-block: var(--s-12) var(--s-8); border-bottom: 1px solid var(--border); margin-bottom: var(--s-10); }
.article-meta { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; font-size: var(--fs-xs); color: var(--text-3); margin-top: var(--s-5); }
.article-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc-title { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: var(--s-3); }
.toc a { display: block; padding: 5px 0 5px var(--s-3); border-left: 2px solid var(--border); color: var(--text-2); font-size: var(--fs-sm); }
.toc a:hover { color: var(--text); border-left-color: var(--border-strong); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 560; }
.article-card { display: flex; flex-direction: column; gap: var(--s-3); }
.article-card h3 { font-size: var(--fs-md); margin: 0; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--accent); }
.article-card p { font-size: var(--fs-sm); margin: 0; }

/* ---------------------------------------------------------------- 19. Breadcrumbs */
.breadcrumbs { padding-top: var(--s-5); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); list-style: none; font-size: var(--fs-xs); color: var(--text-3); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--s-2); }
.breadcrumbs li + li::before { content: "/"; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-3); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current] { color: var(--text-2); }

/* ---------------------------------------------------------------- 20. Notices / alerts */
.notice {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4) var(--s-5); border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: var(--fs-sm); color: var(--text-2);
}
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.notice-info { background: var(--accent-soft); border-color: var(--border-accent); color: var(--text-2); }
.notice-info svg { color: var(--accent); }
.notice-ok { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.notice-ok svg { color: var(--success); }
.notice-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.notice-warn svg { color: var(--warn); }
.notice-err { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.notice-err svg { color: var(--danger); }

/* ---------------------------------------------------------------- 21. Footer */
.site-footer { margin-top: var(--s-24); border-top: 1px solid var(--border); background: var(--bg-subtle); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: var(--s-10); padding-block: var(--s-16) var(--s-10); }
.footer-col h2 { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: var(--s-4); font-weight: 650; }
.footer-col ul { list-style: none; display: grid; gap: var(--s-3); }
.footer-col a { color: var(--text-2); font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--text); }
.footer-brand p { font-size: var(--fs-sm); color: var(--text-2); max-width: 42ch; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: var(--s-6) var(--s-8); display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-3); }
.footer-disclosure {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4) var(--s-5); margin-bottom: var(--s-8);
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--warn);
  border-radius: var(--r-md); font-size: var(--fs-xs); color: var(--text-2); line-height: 1.65;
}
.footer-disclosure svg { width: 15px; height: 15px; color: var(--warn); flex: none; margin-top: 2px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--text-3); }
.status-pill .dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }

/* ---------------------------------------------------------------- 22. Toast */
.toast-host { position: fixed; bottom: var(--s-6); right: var(--s-6); z-index: 150; display: grid; gap: var(--s-3); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm); color: var(--text); pointer-events: auto;
  animation: toast-in var(--dur) var(--ease);
}
.toast svg { width: 16px; height: 16px; color: var(--success); flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.toast[data-leaving="true"] { opacity: 0; transform: translateY(6px); transition: all var(--dur) var(--ease); }

/* ---------------------------------------------------------------- 23. Utilities */
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.flex-1 { flex: 1; min-width: 0; } .flex-none { flex: none; } .flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); } .gap-5 { gap: var(--s-5); } .gap-6 { gap: var(--s-6); } .gap-8 { gap: var(--s-8); }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--s-2); } .mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); } .mb-8 { margin-bottom: var(--s-8); }
.w-full { width: 100%; } .text-center { text-align: center; } .text-right { text-align: right; }
.nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.relative { position: relative; }
[hidden] { display: none !important; }

/* deferred rendering for below-the-fold blocks */
.defer-render { content-visibility: auto; contain-intrinsic-size: auto 640px; }

/* ---------------------------------------------------------------- 24. Responsive */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-12); }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-result-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
}
@media (max-width: 900px) {
  :root { --header-h: 58px; --fs-base: 15px; }
  .nav, .search-trigger, .brand-tag { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
  .section { padding-block: var(--s-12); }
  .dtable thead th { position: static; }
  .toolbar { position: static; }
  .article-header { padding-block: var(--s-8) var(--s-5); }
}
@media (max-width: 640px) {
  .container { padding-inline: var(--s-4); }
  .card, .calc-panel, .calc-result-panel { padding: var(--s-5); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .hero-stats { gap: var(--s-6); }
  .toast-host { left: var(--s-4); right: var(--s-4); bottom: var(--s-4); }
  .cmdk { padding-top: 6vh; }
  .compare-bar { left: var(--s-4); right: var(--s-4); transform: translateY(160%); border-radius: var(--r-lg); flex-wrap: wrap; }
  .compare-bar[data-visible="true"] { transform: none; }
}
@media (max-width: 420px) {
  .segmented { width: 100%; overflow-x: auto; }
  .mcard-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- 25. Motion / print */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .tile:hover, .btn:active { transform: none; }
}
@media print {
  .site-header, .site-footer, .toolbar, .compare-bar, .cmdk, .toast-host, .mobile-nav { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .table-shell { border-color: #ccc; box-shadow: none; }
}

/* ---------------------------------------------------------------- 26. Admin shell */
body.admin { background: var(--bg-subtle); }
.admin-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: var(--s-5) var(--s-3); display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .brand { padding: var(--s-3) var(--s-3) var(--s-5); }
.admin-nav-group { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: var(--s-4) var(--s-3) var(--s-2); }
.admin-side a.nav-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--text-2); font-weight: 500;
}
.admin-side a.nav-item:hover { background: var(--surface-2); color: var(--text); }
.admin-side a.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.admin-side a.nav-item svg { width: 15px; height: 15px; flex: none; }
.admin-side-foot { margin-top: auto; padding-top: var(--s-5); border-top: 1px solid var(--border); display: grid; gap: var(--s-2); }
.admin-main { padding: var(--s-8) var(--s-8) var(--s-16); min-width: 0; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-6); flex-wrap: wrap; }
.admin-head h1 { font-size: var(--fs-2xl); margin: 0; }
.admin-head p { margin: var(--s-2) 0 0; font-size: var(--fs-sm); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-8); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-5); }
.kpi-label { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.kpi-value { font-size: var(--fs-2xl); font-weight: 680; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: var(--s-2); }
.kpi-hint { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-6); margin-bottom: var(--s-6); }
.admin-card > h2 { font-size: var(--fs-lg); margin-bottom: var(--s-4); }
.admin-form { display: grid; gap: var(--s-5); }
.form-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-4); }
.atable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.atable th, .atable td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.atable thead th { background: var(--surface-2); font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.atable tbody tr:hover { background: var(--surface-2); }
.atable tbody tr:last-child td { border-bottom: 0; }
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-md); overflow: auto; max-height: 72vh; background: var(--surface); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 9px; border-radius: var(--r-full); font-size: var(--fs-2xs); font-weight: 620; text-transform: capitalize; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); }
.pill.published { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); background: var(--success-soft); }
.pill.pending_review { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.pill.rejected { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-soft); }
.pill.draft { color: var(--text-3); }
.tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.tabs a { padding: 6px var(--s-4); border: 1px solid var(--border); border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 560; color: var(--text-2); }
.tabs a:hover { border-color: var(--border-strong); color: var(--text); }
.tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.inline-form { display: inline; }
.form-row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.vrow { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.vrow:last-child { border-bottom: 0; }
.vrow dt { color: var(--text-2); }
.vrow dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.list-check { list-style: none; display: grid; gap: var(--s-3); }
.list-check li { display: flex; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-2); }
.list-check svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.list-check.ok svg { color: var(--success); }
.list-check.no svg { color: var(--danger); }
@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-side .brand { padding: var(--s-2) var(--s-3); }
  .admin-side-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; }
  .admin-nav-group { display: none; }
  .admin-main { padding: var(--s-5); }
}
