:root {
  --bg: #071018;
  --surface: #0d1922;
  --surface-2: #12232e;
  --line: #29404d;
  --text: #f5f7f8;
  --muted: #a5b3bb;
  --accent: #ff5364;
  --mint: #86f5cd;
  --amber: #ffd084;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 78% -8%, #203844 0, transparent 34%), var(--bg);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--mint); text-underline-offset: 3px; }
a:hover { color: #c2ffe8; }
button, input, select { font: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; color: #06110d; background: var(--mint); }
.skip-link:focus { top: 16px; }
.shell { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--line); background: #071018e8; backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { color: var(--text); text-decoration: none; font-weight: 900; letter-spacing: .14em; white-space: nowrap; }
.brand::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 10px; background: var(--accent); transform: rotate(45deg); }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: #cfdae0; text-decoration: none; font-size: .92rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 36px; align-items: end; padding: 70px 0 38px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 900; }
h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.055em; margin: 14px 0 22px; max-width: 860px; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; letter-spacing: -.03em; }
h3 { line-height: 1.25; }
.lede { color: #c0ccd2; font-size: 1.1rem; max-width: 760px; }
.hero-note { padding: 20px 0 4px 24px; border-left: 1px solid var(--line); color: var(--muted); }
.hero-note strong { display: block; color: #fff; font-size: 1.65rem; }
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 24px; background: var(--line); border: 1px solid var(--line); }
.trust-strip div { padding: 14px 18px; background: var(--surface); }
.trust-strip strong { display: block; font-size: .9rem; }
.trust-strip span { color: var(--muted); font-size: .78rem; }
.panel { background: linear-gradient(145deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); box-shadow: 0 18px 50px #0005; }
.setup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 22px; }
.field label { display: block; color: #c5d0d6; font-size: .82rem; margin-bottom: 7px; }
.field small { display: block; color: var(--muted); margin-top: 5px; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 12px; color: #fff; background: #07121a; border: 1px solid #3b505c; border-radius: 3px; }
.tool-panel { margin-top: 16px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.tab { min-height: 52px; padding: 12px; border: 0; color: #c1cbd0; background: #0b161e; font-weight: 800; cursor: pointer; }
.tab[aria-selected="true"] { color: #fff; background: var(--accent); }
.test { padding: 22px; }
.test-head, .result-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.test-title { font-size: 1.25rem; font-weight: 900; }
.test-title small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; }
.timer { color: var(--mint); font: 900 1.8rem/1 ui-monospace, monospace; }
.arena { position: relative; height: 380px; margin-top: 14px; overflow: hidden; border: 1px solid #3a515e; background: radial-gradient(circle at center, #19303d, #07121a 72%); user-select: none; touch-action: none; }
.arena::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 49.8%, #ffffff0a 50%, transparent 50.2%), linear-gradient(transparent 49.8%, #ffffff0a 50%, transparent 50.2%); }
.arena-message { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; padding: 24px; text-align: center; color: #c8d2d7; pointer-events: none; }
.arena-message strong { display: block; color: #fff; font-size: 1.35rem; }
.target { position: absolute; z-index: 8; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 9px #ff536425, 0 0 28px #ff536477; transform: translate(-50%, -50%); cursor: crosshair; }
.target::after { content: ""; position: absolute; inset: 15px; border: 2px solid #fff; border-radius: 50%; }
.crosshair { position: absolute; z-index: 7; width: 30px; height: 30px; display: none; transform: translate(-50%, -50%); pointer-events: none; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: var(--mint); }
.crosshair::before { left: 14px; width: 2px; height: 30px; }
.crosshair::after { top: 14px; width: 30px; height: 2px; }
.arena.running .crosshair { display: block; }
.turn-lane { position: absolute; left: 7%; right: 7%; top: 48%; height: 12px; background: #263d49; border-radius: 9px; }
.turn-fill { width: 0; height: 100%; background: linear-gradient(90deg, var(--accent), var(--mint)); border-radius: inherit; }
.gate { position: absolute; top: calc(48% - 38px); width: 62px; height: 88px; display: grid; place-content: center; border: 1px solid; font-weight: 900; }
.gate.start { left: 5%; color: var(--accent); }
.gate.end { right: 5%; color: var(--mint); }
.hidden { display: none !important; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat { padding: 12px; background: #07121a; border: 1px solid #263b47; }
.stat span { display: block; color: var(--muted); font-size: .75rem; }
.stat b { font-size: 1.25rem; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn { min-height: 46px; padding: 10px 17px; border: 0; color: #fff; background: var(--accent); font-weight: 900; cursor: pointer; }
.btn.secondary { background: #1a303c; }
.result { margin-top: 20px; padding: 24px; }
.result h2 { margin: 0; }
.result p { color: var(--muted); }
.score { color: var(--mint); font: 900 2.7rem/1 ui-monospace, monospace; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.card { padding: 18px; background: #07121a; border-top: 3px solid var(--accent); }
.card span, .card small { color: var(--muted); }
.card span { font-size: .76rem; }
.card b { display: block; margin: 7px 0; font: 900 1.8rem/1.2 ui-monospace, monospace; }
.advice { padding: 15px; border-left: 3px solid var(--mint); background: #86f5cd0c; }
.fine-print { color: var(--muted); font-size: .78rem; }
.content-section { padding: 72px 0 0; }
.section-intro { max-width: 760px; color: var(--muted); }
.steps, .guide-grid, .faq-grid { display: grid; gap: 14px; margin-top: 24px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.step, .guide-card, .faq-item, .content-card { padding: 22px; background: var(--surface); border: 1px solid var(--line); }
.step b { display: block; color: var(--accent); font-size: 1.5rem; }
.step p, .guide-card p, .faq-item p, .content-card p, .content-card li { color: var(--muted); }
.guide-grid { grid-template-columns: repeat(2, 1fr); }
.guide-card a { font-weight: 900; font-size: 1.1rem; }
.faq-grid { grid-template-columns: repeat(2, 1fr); }
.faq-item h3 { margin-top: 0; }
.byline { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 14px 0; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 1fr; gap: 46px; align-items: start; padding: 56px 0; }
.article-layout h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.article-body h2 { margin-top: 2.2em; }
.article-body h3 { margin-top: 1.8em; }
.article-body p, .article-body li { color: #c2cdd2; }
.article-body code { color: var(--mint); }
.article-aside { position: sticky; top: 96px; padding: 20px; background: var(--surface); border: 1px solid var(--line); }
.article-aside ul { padding-left: 18px; }
.callout { padding: 18px; margin: 24px 0; border-left: 3px solid var(--amber); background: #ffd0840c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px; text-align: left; border: 1px solid var(--line); }
th { background: var(--surface-2); }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.site-footer { margin-top: 76px; padding: 36px 0; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.footer-nav a { color: #c7d2d8; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; padding: 12px 16px; color: #07120e; background: #eafff7; transform: translateY(130px); transition: .2s; }
.toast.show { transform: none; }

@media (max-width: 820px) {
  .site-header { position: static; }
  .header-inner, .footer-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .site-nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .hero, .article-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 46px; }
  .hero-note, .article-aside { position: static; }
  .setup, .cards, .steps, .guide-grid, .faq-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .arena { height: 350px; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 22px, var(--max)); }
  .setup, .cards, .steps, .guide-grid, .faq-grid, .contact-grid, .stats { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: 1fr; }
  .test, .result { padding: 15px; }
  .arena { height: 310px; }
  .test-head, .result-head { align-items: flex-start; }
  .score { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
