/* ============================================================
   LinkUAI Design System v3 — "Clean Blue"
   White · Blue-purple gradient · Light glassmorphism
   Inspired by xtoken.xin design language
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Surfaces */
  --ink:      #ffffff;
  --ink-2:    #f8fafc;
  --ink-3:    #f1f5f9;
  --ink-4:    #e2e8f0;

  /* Borders (light mode glass) */
  --glass:        rgba(15, 23, 42, 0.03);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-hi:     rgba(15, 23, 42, 0.04);

  /* Brand — Blue → Purple (saturated for light bg) */
  --blue:       #3b82f6;
  --blue-2:     #2563eb;
  --blue-dim:   rgba(59, 130, 246, 0.08);
  --blue-glow:  rgba(59, 130, 246, 0.20);
  --purple:     #8b5cf6;
  --purple-2:   #7c3aed;
  --purple-dim: rgba(139, 92, 246, 0.08);

  /* Gradient shorthands */
  --grad: linear-gradient(135deg, var(--blue), var(--purple));
  --grad-text: linear-gradient(90deg, var(--blue-2), var(--purple-2));

  /* Text */
  --text:  #0f172a;
  --muted: #64748b;

  /* Semantic */
  --green:     #16a34a;
  --green-dim: rgba(22, 163, 74, 0.08);
  --amber:     #d97706;
  --amber-dim: rgba(217, 119, 6, 0.08);
  --red:       #dc2626;

  /* Shadows */
  --shadow:      0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-sm:   0 1px 4px rgba(15, 23, 42, 0.05);
  --glow-blue:   0 4px 20px rgba(59, 130, 246, 0.22);
  --glow-purple: 0 4px 20px rgba(139, 92, 246, 0.20);

  /* Geometry */
  --radius:    20px;
  --radius-sm: 12px;

  /* Fonts */
  --font-display: "Sora", "HarmonyOS Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-sans:    "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

/* ── Animations ──────────────────────────────────────────── */

/* xtoken-style: blur + letter-spacing collapse + fade up */
@keyframes brand-fade-in {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(10px);
    letter-spacing: 0.14em;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

/* Sweep-shine for hero title */
@keyframes sweep-shine {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Standard rise */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Pulse glow */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* Spin */
@keyframes console-spin {
  to { transform: rotate(360deg); }
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Subtle noise grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: 0.012;
  mix-blend-mode: multiply;
}

/* UAT watermark */
body::after {
  content: "UAT";
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: var(--blue-2);
  background: rgba(59, 130, 246, 0.08);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
p { margin: 0; color: var(--muted); line-height: 1.7; }
code, pre, .mono { font-family: var(--font-mono); }

pre {
  margin: 0;
  overflow: auto;
  white-space: pre;
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  color: #93c5fd;
  background: rgba(0, 0, 0, 0.4);
  font-size: 13px;
  line-height: 1.75;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}

button, input, select { font: inherit; }

/* ── Skip link ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
}
.skip-link:focus { top: 16px; }

/* ── Layout shell ────────────────────────────────────────── */
.shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Navigation — sticky glass ───────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.90);
  border-bottom: 1px solid var(--glass-border);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.brand-lockup img {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.3),
    0 4px 16px rgba(59, 130, 246, 0.4),
    0 2px 8px rgba(139, 92, 246, 0.3);
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  padding: 7px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 150ms, background 150ms;
}
.nav-links a:hover { color: var(--text); background: var(--glass); }
.nav-links a[aria-current="page"] {
  color: var(--blue-2);
  background: var(--blue-dim);
}

.nav-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms;
  white-space: nowrap;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: var(--glow-blue);
}
.button-primary:hover {
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4), 0 4px 16px rgba(139, 92, 246, 0.25);
}

.button-soft {
  color: var(--text);
  border-color: var(--glass-border);
  background: var(--ink-2);
}
.button-soft:hover { background: var(--ink-3); border-color: rgba(15,23,42,0.14); }

.oauth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--glass-border); }

.button-dark, .button-ghost {
  color: var(--text);
  border-color: var(--glass-border);
  background: var(--ink-2);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 11px 20px;
  margin-top: 10px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.button:disabled, .mini-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Badge / Eyebrow ─────────────────────────────────────── */
.eyebrow, .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 999px;
  color: var(--blue-2);
  background: var(--blue-dim);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-size: 12px;
  font-weight: 600;
}

.risk-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 12px;
  font-weight: 600;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  font-size: 12px;
  font-weight: 600;
}

.model-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px auto 0;
}
.model-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100dvh - 62px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 0 100px;
  overflow: hidden;
}

/* Ambient radial glows — blue top-center, purple top-right */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59, 130, 246, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 85% 8%, rgba(139, 92, 246, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 10% 25%, rgba(59, 130, 246, 0.07) 0%, transparent 60%);
}

/* Dot grid */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(59, 130, 246, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, black 0%, transparent 100%);
}

.hero-inner, .page-hero {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

/* Hero H1 — sweep-shine gradient text + brand-fade-in */
.hero h1 {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 100px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  text-wrap: balance;

  /* Gradient text with sweep-shine — deeper for white bg */
  background: linear-gradient(90deg,
    #3b82f6 0%,
    #6d28d9 30%,
    #7c3aed 50%,
    #6d28d9 70%,
    #3b82f6 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  /* xtoken-style brand-fade-in */
  animation:
    brand-fade-in 900ms cubic-bezier(0.16, 1, 0.3, 1) both,
    sweep-shine 8s linear 900ms infinite;
}

.page-hero h1, .section-title {
  margin: 16px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: var(--text);
  text-wrap: balance;
}

.hero-lede, .page-hero p, .section-kicker {
  max-width: 600px;
  margin: 0 auto;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.75;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

/* API pod */
.api-pod {
  width: min(100%, 520px);
  margin: 30px auto 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px var(--glass-hi);
}
.api-pod span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  color: var(--blue-2);
  font-weight: 600;
  font-size: 13px;
}
.api-pod a {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--grad);
  font-size: 12px;
  font-weight: 700;
  transition: opacity 150ms;
}
.api-pod a:hover { opacity: 0.88; }

/* ── Brand strip ─────────────────────────────────────────── */
.brands-strip {
  margin: 44px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.brands-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.brands-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.brand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: default;
  transition: opacity 200ms;
}
.brand-item img,
.brand-item svg {
  width: 30px;
  height: 30px;
  filter: opacity(0.65);
  transition: filter 200ms, transform 200ms;
}
.brand-item:hover img,
.brand-item:hover svg {
  filter: opacity(1);
  transform: scale(1.15);
}

/* ── Sections ────────────────────────────────────────────── */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--glass-border);
}

.section-head {
  margin: 0 auto 36px;
  text-align: center;
}
.section-kicker { margin-top: 10px; }

/* ── Grids ───────────────────────────────────────────────── */
.cards-3, .cards-4,
.feature-grid, .price-grid,
.status-layout,
.dashboard-grid, .dashboard-metrics {
  display: grid;
  gap: 14px;
}
.cards-3, .feature-grid, .dashboard-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cards-4, .price-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ── Cards — glassmorphism ───────────────────────────────── */
.feature-card, .price-card,
.step-card, .copy-card,
.status-card, .dash-card,
.content-panel,
.console-card, .pricing-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.05),
    0 4px 16px rgba(15, 23, 42, 0.04);
  transition: border-color 220ms, box-shadow 220ms, transform 220ms;
}

.feature-card, .price-card,
.step-card, .status-card, .dash-card,
.console-card, .pricing-card {
  padding: 24px;
}

.feature-card:hover, .price-card:hover, .step-card:hover {
  border-color: rgba(59, 130, 246, 0.22);
  transform: translateY(-3px);
  box-shadow:
    0 4px 20px rgba(59, 130, 246, 0.10),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.feature-card h3, .price-card h3,
.step-card h3, .status-card h3 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.feature-card p, .price-card p,
.step-card p, .status-card p {
  font-size: 14px;
  line-height: 1.65;
}

.feature-card strong, .price-card strong {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue-2);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-dim);
  border: 1px solid rgba(96, 165, 250, 0.15);
  color: var(--blue-2);
}

/* Price card */
.price-card { position: relative; overflow: hidden; }
.price-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.4), transparent);
}

/* Step card */
.step-card small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-2);
  letter-spacing: 0.05em;
}

/* Status card */
.status-card small { color: var(--muted); font-size: 12px; }

/* Dash card */
.dash-card small { color: var(--muted); font-size: 13px; margin-bottom: 4px; display: block; }
.dash-card strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}

/* Reveal animation for non-hero elements */
.reveal {
  opacity: 0;
  animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.reveal:nth-child(1) { animation-delay: 0ms; }
.reveal:nth-child(2) { animation-delay: 100ms; }
.reveal:nth-child(3) { animation-delay: 200ms; }
.reveal:nth-child(4) { animation-delay: 300ms; }
.reveal:nth-child(5) { animation-delay: 400ms; }
.reveal:nth-child(6) { animation-delay: 500ms; }

/* ── Provider groups (models page) ──────────────────────── */
.provider-section {
  margin-bottom: 48px;
}
.provider-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--glass-border);
}
.provider-header img,
.provider-header svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.provider-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.channel-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--glass-border);
  transition: background 150ms;
}
.channel-row:last-child { border-bottom: 0; }
.channel-row:hover { background: var(--ink-2); border-radius: 8px; }
.channel-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}
.channel-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.channel-type {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}

/* ── Pricing / Model rows ────────────────────────────────── */
.pricing-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 80px;
}

.model-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.7fr 0.8fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass);
  backdrop-filter: blur(12px);
  transition: border-color 160ms, box-shadow 160ms;
}
.model-row:hover {
  border-color: rgba(96, 165, 250, 0.2);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}
.model-row strong {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 3px;
}
.model-row small { color: var(--muted); font-size: 12px; }

/* ── Dark band ───────────────────────────────────────────── */
.dark-band, .cta-band {
  position: relative;
  padding: 80px 0;
  border-top: 1px solid var(--glass-border);
  overflow: hidden;
}
.dark-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 70% at 10% 50%, rgba(59, 130, 246, 0.07), transparent),
    radial-gradient(ellipse 40% 60% at 90% 50%, rgba(139, 92, 246, 0.07), transparent);
}
.dark-band p, .cta-band p { color: var(--muted); }

.dark-grid {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

/* ── Code card ───────────────────────────────────────────── */
.code-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px var(--glass-hi),
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(96, 165, 250, 0.06);
  overflow: hidden;
}
.code-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}
.code-tabs span {
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms, background 150ms;
}
.code-tabs span:first-child {
  color: var(--blue-2);
  background: var(--blue-dim);
}
.code-card pre { border-radius: 0; border: 0; background: transparent; }

/* ── Page hero (inner pages) ─────────────────────────────── */
.page-hero {
  padding: 64px 0 40px;
  text-align: center;
}

/* ── Docs layout ─────────────────────────────────────────── */
.page-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px var(--glass-hi);
}
.toc a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  transition: color 150ms, background 150ms;
}
.toc a:hover { color: var(--text); background: var(--glass); }
.toc a.active { color: var(--blue-2); background: var(--blue-dim); }

.content-panel {
  margin: 0 0 80px;
  padding: clamp(24px, 4vw, 44px);
}
.content-panel h2 {
  margin: 36px 0 12px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.content-panel h2:first-child { margin-top: 0; }
.content-panel h3 { margin: 22px 0 8px; color: var(--text); }
.content-panel ul, .content-panel ol { color: var(--muted); line-height: 1.8; padding-left: 1.2em; }
.content-panel p + pre { margin-top: 10px; }
.content-panel pre { margin-bottom: 12px; }

/* ── Auth pages ──────────────────────────────────────────── */
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 6vw, 72px);
  background:
    radial-gradient(ellipse 60% 50% at 20% 15%, rgba(59, 130, 246, 0.14), transparent),
    radial-gradient(ellipse 40% 50% at 80% 80%, rgba(139, 92, 246, 0.1), transparent),
    var(--ink-2);
  border-right: 1px solid var(--glass-border);
}
.auth-side h1 {
  margin: 60px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.065em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-side p { color: var(--muted); line-height: 1.65; }
.auth-side .mono { color: var(--muted); font-size: 13px; }

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 60px);
  background: var(--ink);
}
.auth-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}
.auth-card > p { margin-bottom: 4px; }
.auth-card a { color: var(--blue-2); }
.auth-card a:hover { text-decoration: underline; }

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-dim);
}
.field input::placeholder { color: var(--muted); }
.field small { font-size: 12px; color: var(--muted); }

.message, .legal-note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.message.error { color: var(--red); }
.message.success { color: var(--green); }
.legal-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-shell { min-height: 100dvh; }
.dashboard-side { display: none; }
.dashboard-main {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 80px;
}
.dashboard-top {
  text-align: center;
  padding: 40px 0 36px;
}
.dashboard-top h1 {
  margin: 14px auto;
  max-width: 800px;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  color: var(--text);
}

/* ── Log rows ────────────────────────────────────────────── */
.dash-table { overflow: hidden; padding: 0; }
.log-row {
  display: grid;
  grid-template-columns: 0.7fr 1fr 0.7fr 0.5fr;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid var(--glass-border);
  font-size: 13px;
  color: var(--muted);
}
.log-row:first-child { border-top: 0; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.log-row strong { color: var(--text); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 13px;
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer nav a:hover { color: var(--text); }

/* ── Pay page ────────────────────────────────────────────── */
.auth-shell.pay-shell {
  max-width: 720px;
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  grid-template-columns: 1fr;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}
.pay-shell .auth-card {
  width: 100%;
  min-height: auto;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow:
    inset 0 1px var(--glass-hi),
    var(--shadow),
    0 0 0 1px rgba(59, 130, 246, 0.06);
  margin: 40px 0;
  background: var(--ink-2);
}
.pay-shell .auth-card h1 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.055em;
  color: var(--text);
}
.pay-panel { display: grid; gap: 18px; }
.pay-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin: 0;
}
.pay-meta div, .pay-result {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px;
  background: var(--glass);
}
.pay-meta dt { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.pay-meta dd { margin: 0; color: var(--text); font-size: 18px; font-weight: 700; }
.pay-result-title { margin: 0 0 8px; color: var(--text); font-weight: 700; }
.pay-help { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

select {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}
select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }

/* ── Internal pages (Upstream Lab) ──────────────────────── */
.internal-page::after { content: "INTERNAL"; background: #1e40af; color: white; }
.internal-lab { padding: 38px 0 88px; }

.internal-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 28px;
}
.internal-hero h1 {
  margin: 14px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1;
  letter-spacing: -0.07em;
  color: var(--text);
}

.internal-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--glass);
  font-size: 13px;
  font-weight: 600;
}
.internal-status.ok {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.25);
  background: var(--green-dim);
}

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.lab-panel {
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: clamp(18px, 2vw, 26px);
  background: var(--glass);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 1px var(--glass-hi);
}
.lab-panel + .lab-panel { margin-top: 16px; }
.lab-panel-head { margin-bottom: 18px; }
.lab-panel-head.row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.lab-panel h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.04em; color: var(--text); }
.lab-panel h3 { margin: 0 0 8px; font-size: 15px; color: var(--text); }

.lab-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lab-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
.lab-form input, .lab-form textarea {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--ink-2);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.lab-form input:focus, .lab-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-dim);
}
.lab-form input::placeholder, .lab-form textarea::placeholder { color: var(--muted); }
.lab-form textarea { resize: vertical; min-height: 90px; }
.span-2 { grid-column: 1 / -1; }

.lab-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--glass-border); border-radius: 16px; background: var(--glass); backdrop-filter: blur(12px); }
.lab-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 13px; }
.lab-table.compact { min-width: 680px; }
.lab-table th, .lab-table td { padding: 12px 14px; border-bottom: 1px solid var(--glass-border); text-align: left; vertical-align: middle; }
.lab-table th { color: var(--muted); background: rgba(255,255,255,0.02); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.lab-table td { color: var(--text); }
.lab-table tr:last-child td { border-bottom: 0; }
.lab-table td small { display: block; margin-top: 4px; color: var(--muted); }

.clamp { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-cell, .empty-state { color: var(--muted); }
.empty-state { border: 1px dashed var(--glass-border); border-radius: 14px; padding: 22px; text-align: center; background: var(--glass); }

.lab-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.mini-button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 13px;
  color: #fff;
  background: var(--grad);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 150ms;
}
.mini-button:hover { opacity: 0.85; }
.mini-button.ghost {
  color: var(--text);
  border-color: var(--glass-border);
  background: var(--glass);
}
.mini-button.ghost:hover { background: rgba(15,23,42,0.06); }

.lab-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--glass);
  font-size: 11px;
  font-weight: 700;
}
.lab-badge.tested, .lab-badge.completed, .lab-badge.passed { color: var(--green); background: var(--green-dim); }
.lab-badge.running, .lab-badge.candidate { color: var(--amber); background: var(--amber-dim); }
.lab-badge.failed { color: var(--red); background: rgba(239, 68, 68, 0.1); }
.lab-badge.promoted { color: var(--blue-2); background: var(--blue-dim); }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric-strip div { border: 1px solid var(--glass-border); border-radius: 14px; padding: 14px; background: var(--glass); backdrop-filter: blur(12px); }
.metric-strip small { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.metric-strip strong { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }

.detail-block { margin-bottom: 14px; border: 1px solid var(--glass-border); border-radius: 14px; padding: 14px; background: var(--glass); }

/* ── Console UI (Upstream Lab) ───────────────────────────── */
.console-lab-page {
  min-height: 100dvh;
  color: var(--text);
  background: var(--ink);
  font-family: var(--font-sans);
}
.console-lab-page::after { content: none; }

.console-layout { min-height: 100dvh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }

.console-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  background: var(--ink-2);
}

.console-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 68px;
  padding: 0 20px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--glass-border);
}
.console-brand img { width: 32px; height: 32px; border-radius: 10px; }

.console-menu {
  display: grid;
  gap: 3px;
  padding: 12px 10px;
  flex: 1;
  overflow-y: auto;
}
.console-menu p { margin: 16px 8px 6px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; line-height: 1; }
.console-menu a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 120ms, background 120ms;
}
.console-menu a:hover { color: var(--text); background: var(--glass); }
.console-menu a.active { color: var(--blue-2); background: var(--blue-dim); }
.console-menu-lab { gap: 4px; }
.console-menu-lab a { min-height: 40px; }

.console-sidebar-foot {
  margin: auto 12px 16px;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--glass);
  font-size: 12px;
}
.console-sidebar-foot strong { display: block; margin-top: 4px; color: var(--text); font-size: 14px; }

.console-main { min-width: 0; padding: 28px; }

.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.console-kicker { display: inline-flex; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.console-topbar h1 { margin: 0 0 6px; color: var(--text); font-family: var(--font-display); font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; }
.console-topbar p { color: var(--muted); font-size: 14px; }

.console-top-actions { display: flex; align-items: center; gap: 10px; }

.console-admin {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  font-size: 13px;
}

.console-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text);
  background: var(--glass);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.console-button:hover { background: rgba(15,23,42,0.06); }
.console-button.primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.console-button.primary:hover { background: var(--blue-2); }
.console-button:disabled, .console-row-actions button:disabled { opacity: 0.4; cursor: not-allowed; }

.console-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.console-stat, .console-card {
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px var(--glass-hi);
}
.console-stat { padding: 18px; }
.console-stat span, .console-detail-metrics span, .console-detail-note span { color: var(--muted); font-size: 13px; font-weight: 600; }
.console-stat strong { display: block; margin-top: 8px; color: var(--text); font-size: 26px; line-height: 1; letter-spacing: -0.03em; }
.console-stat small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }

.console-workbench, .console-grid.bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 16px;
  margin-bottom: 16px;
}
.console-grid.bottom { align-items: start; margin-top: 16px; }

.console-card { padding: 0; overflow: hidden; }
.console-card-head { padding: 16px 20px; border-bottom: 1px solid var(--glass-border); }
.console-card-head.split { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.console-card-head h2 { margin: 0 0 4px; color: var(--text); font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.console-card-head p { color: var(--muted); font-size: 13px; line-height: 1.5; }

.console-form { padding: 18px 20px 20px; }
.console-form.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.console-form label { display: grid; gap: 7px; }
.console-form label.wide, .console-form .wide { grid-column: 1 / -1; }
.console-form span { color: var(--muted); font-size: 13px; font-weight: 600; }
.console-form input, .console-form textarea, .console-form select {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--ink-2);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.console-form input:focus, .console-form textarea:focus, .console-form select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-dim);
}
.console-form input::placeholder, .console-form textarea::placeholder { color: var(--muted); }
.console-form textarea { min-height: 88px; resize: vertical; }

.console-optional-fields { border: 1px solid var(--glass-border); border-radius: 12px; background: var(--glass); }
.console-optional-fields summary { cursor: pointer; padding: 12px 14px; color: var(--muted); font-size: 13px; font-weight: 600; }
.console-form-inline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 14px 14px; }

.console-input-affix {
  display: flex;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--ink-2);
}
.console-input-affix:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.console-input-affix input { border: 0; box-shadow: none !important; background: transparent; }
.console-input-affix em { padding-right: 12px; color: var(--muted); font-size: 13px; font-style: normal; white-space: nowrap; }

.console-muted-inline { color: var(--muted); }

.console-lab-notice {
  min-height: 44px;
  margin: 0 20px 20px;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--muted);
  background: var(--glass);
  font-size: 13px;
  line-height: 1.5;
}
.console-lab-notice.success { border-color: rgba(34, 197, 94, 0.25); color: var(--green); background: var(--green-dim); }
.console-lab-notice.error { border-color: rgba(239, 68, 68, 0.25); color: var(--red); background: rgba(239, 68, 68, 0.06); }

.console-table-wrap { overflow-x: auto; }
.console-table-wrap.compact { max-height: 560px; }
.console-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 13px; }
.console-table th, .console-table td { padding: 12px 16px; border-bottom: 1px solid var(--glass-border); text-align: left; vertical-align: middle; }
.console-table th { color: var(--muted); background: rgba(255,255,255,0.02); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.console-table td { color: var(--text); }
.console-table td strong { color: var(--text); font-weight: 600; }
.console-table td small { display: block; margin-top: 4px; color: var(--muted); }
.console-table tr:last-child td { border-bottom: 0; }

.console-muted-cell, .console-empty { padding: 26px; color: var(--muted); text-align: center; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.console-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.console-row-actions button {
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--text);
  background: var(--glass);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
}
.console-row-actions button:first-child { color: var(--blue-2); border-color: rgba(96, 165, 250, 0.2); background: var(--blue-dim); }
.console-row-actions button:hover { background: rgba(255,255,255,0.06); }

.console-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--glass);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.console-status.tested, .console-status.completed, .console-status.passed { color: var(--green); background: var(--green-dim); }
.console-status.running, .console-status.candidate { color: var(--amber); background: var(--amber-dim); }
.console-status.failed { color: var(--red); background: rgba(239, 68, 68, 0.1); }
.console-status.promoted { color: var(--blue-2); background: var(--blue-dim); }

.console-detail-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px 20px 0; }
.console-detail-metrics div { border: 1px solid var(--glass-border); border-radius: 12px; padding: 14px; background: var(--glass); }
.console-detail-metrics strong { display: block; margin-top: 8px; color: var(--text); font-size: 20px; font-weight: 700; }

.console-detail-note { margin: 14px 20px 18px; padding: 14px; border: 1px solid var(--glass-border); border-radius: 12px; background: var(--glass); }
.console-detail-note p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.console-detail-note.error { border-color: rgba(239, 68, 68, 0.25); background: rgba(239, 68, 68, 0.06); }
.console-detail-note.error span, .console-detail-note.error p { color: var(--red); }

.console-report-card, #lab-runs, #lab-candidates { margin-bottom: 16px; }

.console-report-verdict {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px;
  border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.console-report-verdict.good { color: var(--green); background: var(--green-dim); }
.console-report-verdict.warn { color: var(--amber); background: var(--amber-dim); }
.console-report-verdict.bad { color: var(--red); background: rgba(239, 68, 68, 0.1); }
.console-report-verdict.muted { color: var(--muted); background: var(--glass); }

.console-report-hero { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 14px; padding: 18px 20px 0; }
.console-report-hero .console-detail-metrics { padding: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.console-score-card { min-height: 128px; padding: 18px; border-radius: 14px; border: 1px solid var(--glass-border); background: var(--glass); backdrop-filter: blur(12px); }
.console-score-card.good { border-color: rgba(34, 197, 94, 0.25); background: var(--green-dim); }
.console-score-card.warn { border-color: rgba(245, 158, 11, 0.25); background: var(--amber-dim); }
.console-score-card.bad { border-color: rgba(239, 68, 68, 0.25); background: rgba(239, 68, 68, 0.06); }
.console-score-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.console-score-card strong { display: block; margin-top: 8px; color: var(--text); font-size: 40px; line-height: 1; letter-spacing: -0.05em; }
.console-score-card p { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.console-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px 20px 0; }
.console-report-grid .console-detail-note { margin: 0; }

.console-promotion-box { margin: 18px 20px; border: 1px solid var(--glass-border); border-radius: 14px; background: var(--glass); overflow: hidden; }
.console-promotion-box .console-card-head { background: rgba(255,255,255,0.02); }

.console-progress-panel { display: flex; align-items: center; gap: 14px; margin: 18px 20px 0; padding: 16px; border: 1px solid rgba(96, 165, 250, 0.2); border-radius: 14px; background: var(--blue-dim); }
.console-progress-copy { display: grid; gap: 4px; }
.console-progress-copy strong { color: var(--text); font-size: 15px; }
.console-progress-copy span { color: var(--muted); font-size: 13px; }

.console-progress-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 14px 20px 20px; padding: 0; list-style: none; }
.console-progress-steps li { display: grid; gap: 7px; padding: 11px; border: 1px solid var(--glass-border); border-radius: 12px; color: var(--muted); background: var(--glass); }
.console-progress-steps li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,0.05); font-size: 11px; font-weight: 700; }
.console-progress-steps li strong { color: inherit; font-size: 11px; }
.console-progress-steps li.active { border-color: rgba(96, 165, 250, 0.3); color: var(--blue-2); background: var(--blue-dim); }
.console-progress-steps li.active span { color: #fff; background: var(--blue); }
.console-progress-steps li.done { border-color: rgba(34, 197, 94, 0.25); color: var(--green); background: var(--green-dim); }
.console-progress-steps li.done span { color: #fff; background: var(--green); }

.console-lab-spinner { width: 32px; height: 32px; border: 3px solid var(--glass-border); border-top-color: var(--blue); border-radius: 999px; animation: console-spin 800ms linear infinite; }

.console-lab-gate { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 12px; padding: 28px; text-align: center; }
.console-lab-gate img { width: 44px; height: 44px; border-radius: 12px; }
.console-lab-gate h1 { margin: 0; color: var(--text); font-family: var(--font-display); font-size: 26px; letter-spacing: -0.03em; }
.console-lab-gate p { max-width: 460px; color: var(--muted); font-size: 14px; }
.console-lab-gate-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .dark-grid, .page-grid { grid-template-columns: 1fr; }
  .cards-3, .feature-grid, .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-4, .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .toc { position: relative; top: auto; }
  .internal-hero, .lab-panel-head.row { display: grid; align-items: start; }
  .lab-grid, .metric-strip { grid-template-columns: 1fr; }
  .lab-form { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1160px); }
  .hero { min-height: auto; padding: 56px 0 72px; }
  .site-nav { flex-wrap: wrap; }
  .cards-3, .feature-grid, .dashboard-metrics,
  .cards-4, .price-grid { grid-template-columns: 1fr; }
  .site-footer { display: grid; }
  .log-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
  .console-layout { grid-template-columns: 1fr; }
  .console-sidebar { position: relative; height: auto; }
  .console-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console-menu p, .console-sidebar-foot { display: none; }
  .console-stat-grid, .console-workbench, .console-grid.bottom,
  .console-report-hero, .console-report-grid { grid-template-columns: 1fr; }
  .console-report-hero .console-detail-metrics,
  .console-progress-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .console-main { padding: 16px; }
  .console-topbar, .console-card-head.split, .console-top-actions { display: grid; align-items: start; }
  .console-form.two-col, .console-detail-metrics,
  .console-report-hero .console-detail-metrics,
  .console-progress-steps, .console-menu { grid-template-columns: 1fr; }
}
