/* ===== String Unblocker — marketing site styles ===== */
:root {
  --bg: #0a0d12;
  --bg-1: #0d1117;
  --bg-2: #11161e;
  --bg-3: #161d27;
  --border: #1e2632;
  --border-soft: #161d27;
  --border-hi: #2a3444;
  --text: #e7e9ee;
  --text-dim: #8b94a3;
  --text-mute: #5b6473;

  --accent: #3878ff;
  --accent-2: #5b95ff;
  --accent-deep: #2a52ff;
  --accent-glow: rgba(56, 120, 255, 0.35);
  --accent-soft: rgba(56, 120, 255, 0.12);

  --success: #28c267;
  --warn: #f0a020;
  --error: #ee5a5a;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --bg-rgb: 10, 13, 18;

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --container: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
body { font-feature-settings: "ss01", "cv11"; line-height: 1.5; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }

/* ---- layout ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; position: relative; }
.section.sm { padding: 56px 0; }
.section.lg { padding: 128px 0 96px; }
.section.section-tight-bottom { padding-bottom: 16px; }
.section.section-tight-bottom + .section { padding-top: 48px; }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin: 0 auto 40px 0; text-align: left; }

/* ---- type ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim);
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-2);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(40px, 5.4vw, 76px); font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-size: clamp(32px, 3.6vw, 52px); letter-spacing: -0.028em; }
h3 { font-size: 22px; letter-spacing: -0.015em; }
.lead { color: var(--text-dim); font-size: 19px; line-height: 1.5; max-width: 56ch; }
.lead.lg { font-size: 21px; }
.mono { font-family: var(--font-mono); }

.grad-text {
  background: linear-gradient(110deg, #fff 30%, #8db4ff 60%, var(--accent) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 13, 18, 0.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; gap: 24px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand-mark { width: 26px; height: 26px; flex: 0 0 26px; display: block; }
.brand-name { font-size: 15px; letter-spacing: -0.01em; }
.brand-name .product { color: var(--text-dim); font-weight: 500; }
.nav-links { display: flex; gap: 22px; margin-left: 24px; }
.nav-links a { color: var(--text-dim); font-size: 14px; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* Burger button — only visible on narrow widths */
.nav-burger {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-hi);
  background: var(--bg-2);
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 16px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav.is-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border-soft);
  background: rgba(10, 13, 18, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-drawer a {
  display: flex;
  align-items: center;
  padding: 14px 4px;
  color: var(--text-dim);
  font-size: 17px;
  border-bottom: 1px solid var(--border-soft);
}
.nav-drawer a:last-of-type { border-bottom: 0; }
.nav-drawer a:hover { color: var(--text); }
.nav-drawer .nav-drawer-divider {
  height: 0;
  border-top: 1px dashed var(--border);
  margin: 8px 0;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: var(--r-md);
  font-family: inherit; font-size: 14px; font-weight: 500;
  border: 1px solid var(--border-hi); background: var(--bg-2); color: var(--text);
  transition: all .15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--border-hi); background: var(--bg-3); transform: translateY(-1px); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-dim); }
.btn.ghost:hover { color: var(--text); background: var(--bg-2); border-color: var(--border); }
.btn.primary {
  background: linear-gradient(180deg, #4d88ff, var(--accent));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4) inset, 0 1px 0 rgba(255,255,255,0.2) inset, 0 6px 20px -8px var(--accent-glow);
}
.btn.primary:hover { box-shadow: 0 0 0 1px rgba(0,0,0,0.4) inset, 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 28px -6px var(--accent-glow); }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: var(--r-md); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(2px); }

/* ---- cards ---- */
.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.card.hover-lift { transition: transform .2s, border-color .2s; }
.card.hover-lift:hover { transform: translateY(-2px); border-color: var(--border-hi); }

/* ---- pills / chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--text-dim);
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.chip.success { color: #79e3a5; border-color: rgba(40, 194, 103, 0.25); background: rgba(40, 194, 103, 0.07); }
.chip.danger { color: #ffa0a0; border-color: rgba(238, 90, 90, 0.25); background: rgba(238, 90, 90, 0.07); }
.chip.warn { color: #ffcf7e; border-color: rgba(240, 160, 32, 0.25); background: rgba(240, 160, 32, 0.07); }
.chip.accent { color: var(--accent-2); border-color: rgba(56, 120, 255, 0.3); background: var(--accent-soft); }

/* ---- background dots / grid ---- */
.bg-dots {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.bg-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 50% 35% at 50% 0%, rgba(56,120,255,0.25), transparent 70%),
    radial-gradient(ellipse 30% 25% at 80% 20%, rgba(91,149,255,0.15), transparent 75%);
}

/* ---- hero ---- */
.hero { position: relative; padding: 80px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero-copy h1 { margin-top: 22px; }
.hero-copy .lead { margin-top: 22px; }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-trust { margin-top: 28px; display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- bypass diagram ---- */
.diagram-wrap {
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}
.diagram { position: relative; width: 100%; aspect-ratio: 1.05 / 1; }

/* numbered step badge on cards */
.step-badge {
  position: absolute;
  top: -10px; right: -10px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #5b95ff, var(--accent));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  box-shadow: 0 0 14px var(--accent-glow);
  z-index: 4;
  line-height: 1;
}
.step-badge.ok {
  background: linear-gradient(180deg, #4fd97f, var(--success));
  box-shadow: 0 0 14px rgba(40, 194, 103, 0.5);
  color: #fff;
}
.step-badge.danger {
  background: linear-gradient(180deg, #ff7a7a, var(--error));
  box-shadow: 0 0 14px rgba(238, 90, 90, 0.5);
}
/* Response badge sits top-left so it doesn't disappear behind the Unblocker */
.dg-response .step-badge { left: -10px; right: auto; }
.step-badge.center {
  top: -12px; right: auto; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 26px;
  font-size: 12px;
  border-width: 3px;
}
.dg-unblocker .step-badge.center { z-index: 5; }

/* step pills below diagram */
.diagram-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.step-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  transition: all .4s cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
}
.step-pill .num {
  font-weight: 700;
  color: var(--text-mute);
  transition: color .4s;
}
.step-pill.is-active {
  border-color: var(--accent);
  color: var(--text);
  background: linear-gradient(180deg, var(--accent-soft), transparent), var(--bg-2);
  box-shadow: 0 0 20px var(--accent-glow);
}
.step-pill.is-active .num { color: var(--accent-2); }
.step-arrow {
  font-family: var(--font-mono);
  color: var(--text-mute);
  font-size: 12px;
}

/* pause tip */
.diagram-pause-tip {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  z-index: 5;
}
.diagram-card {
  position: absolute;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: 0 20px 60px -30px rgba(0,0,0,0.8);
}
.diagram-card .head {
  display: flex; gap: 5px; align-items: center; padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  font-family: var(--font-mono); font-size: 10px; color: var(--text-mute); letter-spacing: 0.06em;
}
.diagram-card .head .tl { display: flex; gap: 4px; margin-right: 8px; }
.diagram-card .head .tl span { width: 7px; height: 7px; border-radius: 50%; background: #2a3444; }
.diagram-card .body { padding-top: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

/* App card top-left */
.dg-app { left: 0; top: 8%; width: 200px; }
.dg-app .req {
  margin-top: 6px; padding: 6px 8px; background: var(--bg-3); border-radius: 6px;
  font-size: 10px; color: var(--text);
}
.dg-app .req .k { color: var(--accent-2); }
.dg-app .req .s { color: #e6c47a; }

/* Wall right side */
.dg-wall {
  right: 0; top: 0; bottom: 0; width: 36%;
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(238,90,90,0.06), rgba(238,90,90,0.02)),
    repeating-linear-gradient(45deg, rgba(238,90,90,0.04) 0 6px, transparent 6px 12px);
  border: 1px solid rgba(238,90,90,0.25);
  padding: 18px 14px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.dg-wall .wall-label {
  font-family: var(--font-mono); font-size: 10px;
  color: #ff9a9a; letter-spacing: 0.12em; text-transform: uppercase;
}
.dg-wall .waf-stack { display: flex; flex-direction: column; gap: 8px; }
.waf-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(238,90,90,0.06);
  border: 1px solid rgba(238,90,90,0.18);
  font-family: var(--font-mono); font-size: 11px; color: #ffc0c0;
}
.waf-row .badge { font-size: 9px; padding: 2px 5px; border-radius: 3px; background: rgba(238,90,90,0.2); color: #ff9a9a; text-transform: uppercase; letter-spacing: 0.08em; }
.waf-row .x { color: var(--error); margin-left: auto; }

/* Unblocker — center node */
.dg-unblocker {
  position: absolute; left: 50%; top: 50%;
  width: 150px; height: 150px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5b95ff 0%, #2a52ff 60%, #1530a8 100%);
  border: 1px solid rgba(91,149,255,0.5);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 6px rgba(56,120,255,0.08),
    0 0 0 14px rgba(56,120,255,0.04),
    0 0 60px var(--accent-glow);
  z-index: 2;
}
.dg-unblocker::before {
  content: ""; position: absolute; inset: -22px; border-radius: 50%;
  border: 1px dashed rgba(91,149,255,0.4);
  animation: spin 24s linear infinite;
}
.dg-unblocker::after {
  content: ""; position: absolute; inset: -40px; border-radius: 50%;
  border: 1px dashed rgba(91,149,255,0.18);
  animation: spin 40s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dg-unblocker .ub-inner {
  text-align: center; color: #fff;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0.9;
}
.dg-unblocker .ub-inner .glyph {
  display: block; font-family: var(--font-sans); font-weight: 700; font-size: 22px;
  letter-spacing: -0.02em; margin-bottom: 4px;
  text-transform: none;
}

/* Response card bottom-left */
.dg-response { left: 0; bottom: 6%; width: 210px; }
.dg-response .resp-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 6px; border-radius: 4px;
  background: rgba(40, 194, 103, 0.06);
  border: 1px solid rgba(40, 194, 103, 0.16);
  font-size: 10px; color: var(--text);
  margin-top: 6px;
}
.dg-response .resp-line .ok { color: var(--success); font-weight: 600; }

/* Wires/paths SVG overlay */
.dg-wires { position: absolute; inset: 0; pointer-events: none; }

/* Packet animations */
.packet {
  fill: var(--accent-2);
  filter: drop-shadow(0 0 6px var(--accent));
}

/* ---- code terminal ---- */
.code-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  overflow: hidden;
  box-shadow: 0 24px 60px -36px rgba(0,0,0,0.9);
}
.code-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
}
.code-head .lights { display: flex; gap: 6px; }
.code-head .lights span { width: 10px; height: 10px; border-radius: 50%; }
.code-head .lights .r { background: #ff5f56; }
.code-head .lights .y { background: #ffbd2e; }
.code-head .lights .g { background: #27c93f; }
.code-head .tab {
  margin-left: 12px; padding: 0 10px; height: 24px;
  display: inline-flex; align-items: center; border-radius: 6px;
  background: var(--bg-3); color: var(--text); font-size: 11px;
}
.code-head .status { margin-left: auto; }
.code-body {
  padding: 18px 20px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
  color: var(--text);
  white-space: pre; overflow-x: auto;
}
.code-body .c-c { color: #5b6473; }
.code-body .c-k { color: #9fb8ff; }
.code-body .c-s { color: #b9e3a0; }
.code-body .c-f { color: #ffd28a; }
.code-body .c-p { color: var(--text); }
.code-body .c-n { color: #e8b5ff; }
.code-body .c-ok { color: var(--success); }
.code-body .c-err { color: var(--error); }
.code-body .c-dim { color: var(--text-mute); }
.cursor-blink::after {
  content: "▌"; color: var(--accent-2);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Lang tabs */
.lang-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.lang-tab {
  appearance: none; border: 0; background: transparent;
  padding: 10px 16px; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px;
  border-bottom: 2px solid transparent; transition: all .15s;
}
.lang-tab:hover { color: var(--text); }
.lang-tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---- stat grid ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  padding: 26px 22px; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.stat .stat-num {
  font-size: 56px; font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-family: var(--font-sans);
}
.stat .stat-num .sub { font-size: 28px; color: var(--text-dim); margin-left: 2px; }
.stat .stat-label { margin-top: 10px; color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.stat.win { background: linear-gradient(180deg, rgba(56,120,255,0.18), rgba(56,120,255,0.04)); border-color: rgba(56,120,255,0.35); }
.stat.win .stat-num { color: #fff; }
.stat.win .stat-num .sub { color: var(--accent-2); }
.stat.win .stat-label { color: var(--accent-2); }

/* ---- race chart ---- */
.race { display: grid; gap: 18px; }
.race-row { display: grid; grid-template-columns: 200px 1fr 80px; align-items: center; gap: 18px; }
.race-row .name { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.race-row .name .swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--text-mute); }
.race-row .name .us { font-weight: 600; }
.race-row .track { height: 14px; border-radius: 999px; background: var(--bg-3); position: relative; overflow: hidden; }
.race-row .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px;
  background: linear-gradient(90deg, #2c3e5b, #4a6889);
  transform-origin: left center;
  transition: width 1.6s cubic-bezier(.2,.7,.2,1);
}
.race-row.win .name .swatch { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.race-row.win .fill { background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); box-shadow: 0 0 18px var(--accent-glow); }
.race-row .pct { font-family: var(--font-mono); font-size: 13px; text-align: right; color: var(--text-dim); }
.race-row.win .pct { color: #fff; font-weight: 600; }

/* ---- heatmap ---- */
.heat {
  display: grid; grid-template-columns: 160px repeat(6, 1fr); gap: 4px;
  font-family: var(--font-mono);
}
.heat .hh { padding: 8px 4px; text-align: center; font-size: 11px; color: var(--text-dim); }
.heat .hh.us { color: var(--accent-2); font-weight: 600; }
.heat .hl { padding: 8px 0; font-size: 12px; color: var(--text-dim); }
.heat .cell {
  aspect-ratio: 2 / 1;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: rgba(255,255,255,0.85);
  cursor: pointer; transition: transform .12s;
  position: relative;
}
.heat .cell:hover { transform: scale(1.08); z-index: 3; outline: 1px solid rgba(255,255,255,0.4); }

/* ---- industry chart (grouped bars) ---- */
.industry-chart { display: grid; gap: 14px; }
.industry-row { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; }
.industry-row .ind-name { font-size: 13px; color: var(--text-dim); }
.industry-row .ind-bars { display: grid; gap: 4px; }
.ind-bar {
  position: relative; height: 8px; border-radius: 2px;
  background: var(--bg-3);
}
.ind-bar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--text-mute); }
.ind-bar.win .fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 8px var(--accent-glow); }
.ind-bar .lbl {
  position: absolute;
  right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px; color: var(--text-dim);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.85;
  text-shadow: 0 0 4px var(--bg-1), 0 0 4px var(--bg-1);
}
.ind-bar.win .lbl { color: #fff; font-weight: 600; opacity: 1; }

/* ---- picker (interactive) ---- */
.picker {
  display: grid; grid-template-columns: 280px 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-1);
}
.picker-list { background: var(--bg-2); border-right: 1px solid var(--border); padding: 8px; }
.picker-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  cursor: pointer; transition: background .12s;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  border: 1px solid transparent;
  min-width: 0;
}
.picker-item .pi-url {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.picker-item .pi-defense {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-mute);
}
.picker-item:hover {
  background: rgba(56, 120, 255, 0.08);
  color: var(--text);
  border-color: rgba(56, 120, 255, 0.25);
}
.picker-item:hover .pi-dot { background: var(--accent-2); }
.picker-item.active {
  background: var(--bg-3);
  border-color: var(--border-hi);
  color: var(--text);
}
.picker-item.active:hover {
  background: var(--bg-3);
  border-color: var(--border-hi);
}
.picker-item .pi-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-mute); flex: 0 0 6px; }
.picker-item.active .pi-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.picker-detail { padding: 20px 22px; }
.picker-detail .pd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.picker-detail .pd-url { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.picker-detail .pd-defense { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); margin-top: 4px; }
.picker-detail .pd-rows { display: grid; gap: 8px; }
.pd-row {
  display: grid; grid-template-columns: 160px 1fr 70px 60px; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  font-size: 13px;
}
.pd-row.win { background: rgba(56,120,255,0.06); border-color: rgba(56,120,255,0.25); }
.pd-row .pr-name { display: flex; align-items: center; gap: 8px; }
.pd-row .pr-name .swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--text-mute); }
.pd-row.win .pr-name .swatch { background: var(--accent); }
.pd-row .pr-bar { height: 6px; border-radius: 999px; background: var(--bg-3); position: relative; overflow: hidden; }
.pd-row .pr-bar .pf { position: absolute; inset: 0 auto 0 0; background: var(--text-mute); border-radius: 999px; transition: width .8s ease; }
.pd-row.win .pr-bar .pf { background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); }
.pd-row .pr-pct { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); text-align: right; }
.pd-row.win .pr-pct { color: #fff; font-weight: 600; }
.pd-row .pr-status { font-family: var(--font-mono); font-size: 11px; text-align: right; }
.pd-row .pr-status.ok { color: var(--success); }
.pd-row .pr-status.bad { color: var(--error); }

/* ---- features ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.feature .ico { width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--accent-2); margin-bottom: 18px; border: 1px solid rgba(56,120,255,0.3); }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-dim); margin: 0; }

/* ---- footer CTA ---- */
.cta {
  text-align: center; padding: 80px 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(56,120,255,0.18), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(36px, 4vw, 60px); margin-bottom: 14px; }
.cta .lead { margin: 0 auto; }

/* ---- footer ---- */
.footer { padding: 48px 0 64px; border-top: 1px solid var(--border-soft); margin-top: 96px; }
.footer-inner { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.footer-inner .links { display: flex; gap: 24px; margin-left: auto; }
.footer-inner .links a { color: var(--text-dim); font-size: 13px; }
.footer-inner .copy { color: var(--text-mute); font-size: 12px; font-family: var(--font-mono); }

/* methodology disclosure */
.method-disclose { margin-top: 18px; }
.method-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.method-toggle:hover {
  color: var(--text); border-color: var(--border-hi); background: var(--bg-2);
}
.method-toggle .method-arrow { transition: transform .25s; display: inline-block; font-size: 9px; }
.method-toggle.is-open .method-arrow { transform: rotate(90deg); }

.method-body {
  margin: 18px auto 0; max-width: 820px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  text-align: left;
  font-size: 14px; line-height: 1.6;
  color: var(--text-dim);
  animation: methodIn .25s cubic-bezier(.2,.7,.2,1);
}
.method-body p { margin: 0; }
.method-body strong { color: var(--text); font-weight: 600; }
.method-body em { color: var(--accent-2); font-style: normal; }
@keyframes methodIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.ba-slider {
  position: relative;
  height: 620px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-1);
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
  box-shadow: 0 30px 80px -36px rgba(0,0,0,0.9);
}
.ba-pane {
  position: absolute; inset: 0;
  padding: 18px 24px 88px;
  overflow: hidden;
  background: var(--bg-1);
}
.ba-pane.ba-after {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(56,120,255,0.08), transparent 60%),
    var(--bg-1);
}
.ba-pane.ba-before {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(238,90,90,0.06), transparent 60%),
    var(--bg-1);
}

.ba-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.ba-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid;
}
.ba-badge.accent { color: var(--accent-2); border-color: rgba(56,120,255,0.35); background: var(--accent-soft); }
.ba-badge.danger { color: #ffa0a0; border-color: rgba(238,90,90,0.3); background: rgba(238,90,90,0.07); }
.ba-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ba-filename { font-size: 11px; color: var(--text-mute); letter-spacing: 0.04em; }

.ba-code {
  margin: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre;
  overflow: visible;
}
.ba-line { display: block; min-height: 1.65em; }

/* color tokens — reuse existing palette */
.ba-code .c-c { color: #5b6473; font-style: italic; }
.ba-code .c-k { color: #9fb8ff; }
.ba-code .c-s { color: #b9e3a0; }
.ba-code .c-f { color: #ffd28a; }
.ba-code .c-n { color: #e8b5ff; }

/* Bottom stats bar */
.ba-foot {
  position: absolute; left: 24px; right: 24px; bottom: 18px;
  display: flex; gap: 28px; align-items: baseline;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  background: linear-gradient(0deg, var(--bg-1) 60%, transparent);
}
.ba-stat { display: flex; align-items: baseline; gap: 6px; }
.ba-stat .big { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.ba-stat .unit { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.ba-foot.danger .ba-stat .big { color: #ffc0c0; }
.ba-foot.danger { border-top-color: rgba(238,90,90,0.18); }

/* Fade-out behind the foot bar so code doesn't crash into it */
.ba-fade-bottom {
  position: absolute; left: 0; right: 0; bottom: 60px; height: 80px;
  background: linear-gradient(180deg, transparent, var(--bg-1));
  pointer-events: none;
}
.ba-after .ba-fade-bottom { display: none; }

/* Drag handle */
.ba-handle {
  position: absolute; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.6), rgba(255,255,255,0.4));
  pointer-events: none;
  z-index: 10;
  transform: translateX(-1px);
  transition: left .25s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 16px rgba(56,120,255,0.4);
}
.ba-slider.is-drag .ba-handle { transition: none; }
.ba-handle .ba-bar { display: none; }
.ba-knob {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  cursor: ew-resize;
  box-shadow:
    0 6px 24px rgba(0,0,0,0.4),
    0 0 0 4px rgba(56,120,255,0.18),
    0 0 0 8px rgba(56,120,255,0.06);
  transition: transform .15s ease;
}
.ba-knob:hover { transform: translate(-50%, -50%) scale(1.06); }
.ba-slider.is-drag .ba-knob { transform: translate(-50%, -50%) scale(1.1); }

.ba-hint {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-mute);
  pointer-events: none;
  opacity: 0;
  animation: baHintIn 0.6s ease forwards 0.8s;
}
@keyframes baHintIn { to { opacity: 0.85; } }
.ba-slider:hover .ba-hint, .ba-slider.is-drag .ba-hint { opacity: 0; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta .nav-signin { display: none; }
  .nav-cta .nav-key { display: none; }
  .nav-burger { display: flex; }
  .nav.is-open .nav-drawer { display: flex; }
}

@media (max-width: 960px) {
  .container { padding: 0 20px; }
  .hero-grid { grid-template-columns: 1fr; }
  .diagram-wrap { max-width: 460px; margin: 24px auto 0; }
  /* Scale the diagram itself proportionally on narrow screens.
     Cards use absolute pixel widths so a transform is the cleanest scale. */
  .diagram { width: 100%; max-width: 460px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .picker { grid-template-columns: 1fr; }
  .picker-list { border-right: 0; border-bottom: 1px solid var(--border); display: flex; overflow-x: auto; padding: 8px; }
  .picker-item { white-space: nowrap; }
  .race-row { grid-template-columns: 140px 1fr 60px; gap: 10px; }

  /* Industry chart — collapse to vertical block per industry, label above */
  .industry-row { grid-template-columns: 1fr; gap: 8px; }
  .industry-row .ind-name { font-size: 12px; color: var(--text); font-weight: 600; padding-bottom: 4px; }
  .ind-bar { height: 10px; }
  .ind-bar .lbl {
    right: 8px; left: auto; top: 50%; transform: translateY(-50%);
    font-size: 9px; padding-left: 4px;
  }

  /* Heatmap — let it scroll horizontally on small screens */
  .heat-scroll { overflow-x: auto; margin: 0 -8px; padding: 0 8px 8px; }
  .heat-scroll::-webkit-scrollbar { height: 6px; }
  .heat-scroll::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
  .heat { min-width: 540px; grid-template-columns: 100px repeat(6, minmax(60px, 1fr)); font-size: 10px; }
  .heat .hh { font-size: 10px; }

  .section { padding: 64px 0; }

  /* Hide tail-end stats text on tight stat strip */
  .stat .stat-num { font-size: 44px; }

  /* Before/after slider — let knob be a bit smaller, shrink code */
  .ba-slider { height: 540px; }
  .ba-code { font-size: 11px; }
  .ba-pane { padding: 16px 16px 80px; }
  .ba-foot { gap: 16px; }
  .ba-stat .big { font-size: 18px; }
}

@media (max-width: 640px) {
  /* Phone — scale the entire diagram down */
  .diagram-wrap { max-width: 340px; }
  .diagram { transform: scale(0.85); transform-origin: top center; height: calc(100% / 0.85); margin-bottom: -60px; }

  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .lead.lg { font-size: 17px; }
  .race-row { grid-template-columns: 110px 1fr 50px; font-size: 12px; }
  .race-row .name { font-size: 12px; }
  .stat-grid { gap: 8px; }
  .stat { padding: 18px 14px; }
  .stat .stat-num { font-size: 38px; }
  .pd-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .pd-row .pr-bar, .pd-row .pr-pct, .pd-row .pr-status { grid-column: span 2; }
  .pd-row .pr-bar { grid-column: 1 / -1; }
  .pd-row .pr-pct { grid-column: 1; }
  .pd-row .pr-status { grid-column: 2; text-align: right; }

  .ba-slider { height: 480px; }
  .ba-code { font-size: 10px; line-height: 1.55; }
  .ba-pane { padding: 14px 14px 76px; }
  .ba-foot { gap: 12px; padding-top: 10px; }
  .ba-stat .big { font-size: 16px; }
  .ba-stat .unit { font-size: 9px; }
  .ba-knob { width: 40px; height: 40px; }
}

/* ---- target domains (04 · reproduce it) ---- */
.domains-card { padding: 22px 22px 26px; }
.domains-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.domains-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 8px;
}
.domains-sub { color: var(--text-dim); font-size: 13px; line-height: 1.6; max-width: 560px; }
.domains-copy {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.domains-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 24px;
}
.domain-item {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 4px; border-bottom: 1px solid var(--border-soft);
}
.domain-idx {
  color: var(--text-mute); font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.1em; min-width: 22px;
}
.domain-name { color: var(--text); font-family: var(--font-mono); font-size: 13px; }

@media (max-width: 720px) {
  .domains-head { flex-direction: column; }
  .domains-grid { grid-template-columns: 1fr; }
}
