:root {
  color-scheme: dark;
  --bg: #090913;
  --ink: #f8fbff;
  --muted: #aab4c5;
  --line: rgba(255, 255, 255, 0.14);
  --panel-start: #080a10;
  --panel-waiting: #ff3b5f;
  --panel-go: #00d084;
  --panel-scold: #ff8a00;
  --panel-result: #15172b;
  --gold: #ffe45f;
  --white: #ffffff;
  --surface: rgba(17, 18, 34, 0.82);
  --surface-strong: rgba(24, 25, 48, 0.94);
  --link: #79ecff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(0, 191, 255, 0.12), transparent 30%),
    linear-gradient(315deg, rgba(255, 107, 53, 0.1), transparent 34%),
    linear-gradient(90deg, rgba(125, 92, 255, 0.1), transparent 44%),
    repeating-linear-gradient(rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 34px),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(255, 255, 255, 0.035) 50%, transparent 51%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px);
  content: "";
  opacity: 0.5;
  pointer-events: none;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--white);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--white);
  color: #080a10;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 10px;
}

.brand {
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.site-header nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.site-header nav a,
footer nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-header nav a:hover,
footer nav a:hover {
  color: var(--white);
}

main {
  padding: 14px 0 64px;
}

.test-shell {
  position: relative;
  min-height: clamp(400px, 64vh, 680px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: var(--panel-start);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.test-area {
  --panel-color: var(--panel-start);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(400px, 64vh, 680px);
  padding: clamp(28px, 6vw, 72px);
  background: var(--panel-color);
  color: var(--white);
  text-align: center;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  user-select: none;
}

.test-area:has(.test-trigger:active) {
  transform: scale(0.995);
}

.test-area:has(.test-trigger:focus-visible) {
  outline: 3px solid rgba(255, 228, 95, 0.95);
  outline-offset: -8px;
}

.test-trigger {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.test-area[data-state="waiting"] {
  --panel-color: var(--panel-waiting);
}

.test-area[data-state="go"] {
  --panel-color: var(--panel-go);
}

.test-area[data-state="scold"] {
  --panel-color: var(--panel-scold);
}

.test-area[data-state="result"] {
  --panel-color: var(--panel-result);
}

.test-copy {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 920px;
  justify-items: center;
  gap: 18px;
  text-shadow: 0 2px 18px rgba(5, 8, 22, 0.24);
}

.test-title {
  margin: 0;
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.subtitle {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(19px, 2.35vw, 30px);
  line-height: 1.3;
}

.test-area[data-state="result"] .subtitle {
  max-width: 100%;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 650;
}

.subtitle.gold {
  color: var(--gold);
  animation: record-pop 420ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.result-meta {
  display: none;
  margin-top: -4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(14px, 1.18vw, 17px);
  font-weight: 600;
  text-shadow: none;
}

.test-area[data-state="result"] .result-meta {
  display: block;
}

.meter {
  display: none;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00df8f, #48e7ff, #ffe45f);
  transition: width 240ms ease;
}

.hero-note {
  max-width: 820px;
  margin: 22px auto;
  color: var(--muted);
  font-size: 17px;
  text-align: center;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.page-nav a {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.page-nav a:hover {
  border-color: rgba(121, 236, 255, 0.5);
  color: var(--white);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 28px;
}

.article-card,
.stats-panel,
.guide-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent), var(--surface);
  box-shadow: 0 18px 52px rgba(3, 8, 24, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.article-card {
  overflow: hidden;
}

.article-card section {
  padding: clamp(28px, 5vw, 54px);
}

.article-card section + section {
  border-top: 1px solid var(--line);
}

.article-card p,
.article-card li,
.guide-card p,
.guide-card li {
  color: rgba(222, 230, 241, 0.84);
}

.article-card p {
  margin: 0 0 18px;
}

.article-card p:last-child {
  margin-bottom: 0;
}

.article-card h1,
.article-card h2,
.guide-card h1,
.guide-card h2 {
  margin: 0 0 18px;
  color: var(--white);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.article-card h1,
.guide-card h1 {
  font-size: clamp(32px, 4.5vw, 54px);
}

.article-card h2,
.guide-card h2 {
  font-size: clamp(27px, 3.2vw, 38px);
}

.article-card h3,
.guide-card h3 {
  margin: 28px 0 8px;
  color: var(--white);
  font-size: 19px;
  line-height: 1.3;
}

.eyebrow {
  margin-bottom: 8px !important;
  color: var(--link) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding-left: 24px;
}

.guide-figure {
  margin: 30px 0 0;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101221;
}

.guide-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.range-table {
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.range-table [role="row"] {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) 1fr;
  gap: 18px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.025);
}

.range-table [role="row"] + [role="row"] {
  border-top: 1px solid var(--line);
}

.range-table strong {
  color: var(--white);
}

.range-table span {
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.faq-list summary {
  padding: 16px 18px;
  color: var(--white);
  cursor: pointer;
  font-weight: 750;
}

.faq-list details p {
  padding: 0 18px 18px;
}

.article-cta {
  padding: 30px clamp(28px, 5vw, 54px);
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(0, 208, 132, 0.1), rgba(72, 231, 255, 0.07));
}

.article-cta p {
  margin-bottom: 14px;
  color: var(--white);
  font-weight: 700;
}

.button-link {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--white);
  color: #080a10;
  font-weight: 800;
  text-decoration: none;
}

.button-link:hover {
  color: #080a10;
  transform: translateY(-1px);
}

.stats-panel {
  position: sticky;
  top: 18px;
  padding: 24px;
}

.stats-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.stat-row strong {
  color: var(--white);
}

.visual-meter {
  margin-top: 16px;
}

.visual-meter .track {
  display: block;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.visual-meter .fill {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3847ff, #00df8f, #ffe45f);
  transition: width 260ms ease;
}

.visual-meter p,
.panel-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-note {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.guide-main {
  max-width: 900px;
}

.guide-card {
  padding: clamp(30px, 6vw, 64px);
}

.guide-card section + section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.guide-card ul,
.guide-card ol {
  padding-left: 22px;
}

.guide-card li + li {
  margin-top: 10px;
}

.breadcrumbs {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

@keyframes record-pop {
  from {
    opacity: 0.5;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .stats-panel {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 680px) {
  .site-header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    gap: 8px 14px;
  }

  main,
  .site-header,
  footer {
    width: min(100% - 20px, 1180px);
  }

  .test-shell,
  .test-area {
    min-height: 520px;
  }

  .test-title {
    font-size: clamp(40px, 13vw, 70px);
  }

  .range-table [role="row"] {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .article-card section {
    padding: 28px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
