:root {
  --ink: #102034;
  --muted: #5b6b7f;
  --surface: #ffffff;
  --surface-soft: #f4f7fa;
  --line: #dbe3eb;
  --navy: #07192e;
  --navy-2: #0d2946;
  --blue: #1573e6;
  --blue-dark: #0d57b7;
  --cyan: #36c7d9;
  --green: #14865a;
  --green-bg: #eaf8f2;
  --amber: #a86200;
  --amber-bg: #fff5df;
  --red: #b73535;
  --red-bg: #fff0ef;
  --radius: 18px;
  --shadow: 0 16px 45px rgba(8, 30, 54, .10);
  --content: 1160px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--blue-dark); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--blue); }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(21, 115, 230, .35); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; padding: 10px 15px; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.container { width: min(var(--content), calc(100% - 36px)); margin-inline: auto; }
.narrow { width: min(790px, calc(100% - 36px)); margin-inline: auto; }
.section { padding: 76px 0; }
.section-sm { padding: 48px 0; }
.soft { background: var(--surface-soft); }
.eyebrow { margin: 0 0 10px; color: var(--blue-dark); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { color: var(--ink); line-height: 1.14; letter-spacing: -.025em; }
h1 { margin: 0 0 20px; font-size: clamp(2.25rem, 5.5vw, 4.65rem); }
h2 { margin: 0 0 18px; font-size: clamp(1.75rem, 3.4vw, 2.65rem); }
h3 { margin: 0 0 10px; font-size: 1.25rem; }
p { margin: 0 0 18px; }
.lead { max-width: 710px; color: #43566c; font-size: clamp(1.08rem, 2vw, 1.27rem); }
.small { font-size: .88rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 50; color: #fff; background: rgba(7, 25, 46, .96); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.1); }
.nav-wrap { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 850; font-size: 1.08rem; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: #d7e5f3; font-size: .93rem; font-weight: 650; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-cta { padding: 9px 15px; color: #061a2d !important; background: var(--cyan); border-radius: 999px; }
.menu-button { display: none; width: 42px; height: 42px; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; }

.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, #0a2b50 58%, #0b4464 100%); }
.hero::before { content: ""; position: absolute; inset: auto -120px -200px auto; width: 600px; height: 600px; border: 90px solid rgba(54,199,217,.10); border-radius: 50%; }
.hero-grid { position: relative; padding: 88px 0 96px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 60px; }
.hero h1 { color: #fff; }
.hero .lead { color: #d6e5f3; }
.hero .eyebrow { color: #74e4ef; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 28px; color: #c5d7e8; font-size: .88rem; }
.trust-row span::before { content: "✓"; margin-right: 7px; color: #6fe3c0; font-weight: 900; }
.hero-meter { padding: 26px; color: var(--ink); background: rgba(255,255,255,.98); border: 1px solid rgba(255,255,255,.4); border-radius: 24px; box-shadow: 0 25px 70px rgba(0,0,0,.25); }
.meter-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.meter-title { font-weight: 800; }
.live-pill { padding: 5px 9px; color: var(--green); background: var(--green-bg); border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.reading { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 28px; background: #eef4f9; border: 1px solid #dce7f0; border-radius: 16px; }
.reading strong { font-size: clamp(2.7rem, 7vw, 4.6rem); line-height: 1; letter-spacing: -.07em; }
.reading span { font-weight: 800; color: var(--muted); }
.signal-row { margin-top: 19px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.signal { padding: 12px 8px; background: #f7f9fb; border-radius: 12px; text-align: center; }
.signal-dot { display: block; width: 10px; height: 10px; margin: 0 auto 7px; border-radius: 50%; }
.signal b { display: block; font-size: .79rem; }
.signal small { color: var(--muted); font-size: .68rem; }
.green { background: var(--green); } .amber { background: #dc8a00; } .red { background: var(--red); }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 1px solid transparent; border-radius: 12px; font-weight: 800; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 10px 25px rgba(21,115,230,.25); }
.button-primary:hover { color: #fff; background: var(--blue-dark); }
.button-light { color: var(--navy); background: #fff; }
.button-light:hover { color: var(--blue-dark); }
.button-ghost { color: #fff; border-color: rgba(255,255,255,.32); }
.button-ghost:hover { color: #fff; border-color: #fff; }
.button-secondary { color: var(--blue-dark); background: #edf5ff; border-color: #cfe2fb; }
.button-secondary:hover { background: #e3effd; }
.button-danger { color: var(--red); background: var(--red-bg); border-color: #f2c7c3; }
.button-block { width: 100%; }

.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.card { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(8,30,54,.045); }
.card-icon { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 18px; color: var(--blue-dark); background: #eaf3ff; border-radius: 12px; font-weight: 900; }
.card p:last-child { margin-bottom: 0; }
.link-arrow { font-weight: 800; text-decoration: none; }
.link-arrow::after { content: " →"; }
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; counter-reset: steps; }
.step { position: relative; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); counter-increment: steps; }
.step::before { content: counter(steps); display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 18px; color: #fff; background: var(--blue); border-radius: 50%; font-weight: 900; }
.step h3 { font-size: 1.08rem; }
.step p { color: var(--muted); font-size: .92rem; }

.page-hero { padding: 65px 0 55px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.page-hero h1 { max-width: 880px; color: #fff; font-size: clamp(2.15rem, 5vw, 3.85rem); }
.page-hero .lead { color: #d7e4f0; }
.breadcrumbs { margin: 0 0 25px; color: #a9bed1; font-size: .84rem; }
.breadcrumbs a { color: #d7e6f4; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 46px; }
.article h2 { margin-top: 52px; }
.article h3 { margin-top: 32px; }
.article ul, .article ol { padding-left: 1.35rem; }
.article li { margin: 8px 0; }
.article table { width: 100%; margin: 25px 0; border-collapse: collapse; font-size: .94rem; }
.article th, .article td { padding: 13px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article th { background: #edf3f8; }
.sidebar { position: sticky; top: 94px; }
.sidebar .card + .card { margin-top: 18px; }
.sidebar-list { margin: 0; padding: 0; list-style: none; }
.sidebar-list li + li { border-top: 1px solid var(--line); }
.sidebar-list a { display: block; padding: 10px 0; font-weight: 700; text-decoration: none; }
.updated { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; color: #b9cadb; font-size: .84rem; }

.notice { margin: 24px 0; padding: 18px 20px; border: 1px solid; border-radius: 14px; }
.notice strong { display: block; margin-bottom: 4px; }
.notice-info { color: #174a79; background: #eef6ff; border-color: #c9def4; }
.notice-warning { color: #744a06; background: var(--amber-bg); border-color: #efd49d; }
.notice-danger { color: #7d2929; background: var(--red-bg); border-color: #efc2bf; }
.notice-success { color: #145f43; background: var(--green-bg); border-color: #bbe6d4; }

.tool-shell { margin-top: -34px; position: relative; z-index: 3; }
.tool-card { padding: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.tool-head { padding: 24px 28px; border-bottom: 1px solid var(--line); }
.tool-head-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.tool-head h2 { margin: 0; font-size: 1.35rem; }
.progress-track { height: 7px; overflow: hidden; background: #e5ebf1; border-radius: 99px; }
.progress-bar { width: 20%; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .3s ease; }
.tool-body { min-height: 440px; padding: 32px 30px; }
.tool-step[hidden] { display: none; }
.question { margin-bottom: 26px; }
.question > label, .question > legend { display: block; margin-bottom: 9px; color: var(--ink); font-weight: 800; }
.question fieldset { margin: 0; padding: 0; border: 0; }
.help { margin: 7px 0 0; color: var(--muted); font-size: .85rem; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 52px; }
.input-unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; pointer-events: none; }
input[type="number"], input[type="text"], input[type="email"], select, textarea { width: 100%; min-height: 49px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #bdcad7; border-radius: 10px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,115,230,.12); outline: none; }
.choice-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; min-height: 52px; align-items: center; padding: 12px 14px; color: #32485f; background: #fff; border: 1px solid #bdcad7; border-radius: 11px; font-weight: 700; transition: all .15s ease; }
.choice input:checked + span { color: var(--blue-dark); background: #edf5ff; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(21,115,230,.1); }
.choice input:focus-visible + span { outline: 3px solid rgba(21,115,230,.3); }
.tool-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.error-message { margin: 8px 0 0; color: var(--red); font-size: .85rem; font-weight: 700; }
.result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin: 22px 0; }
.result-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.result-card[data-status="good"] { background: var(--green-bg); border-color: #b9e2d1; }
.result-card[data-status="watch"] { background: var(--amber-bg); border-color: #ecd39f; }
.result-card[data-status="concern"] { background: var(--red-bg); border-color: #ebc3c0; }
.result-label { color: var(--muted); font-size: .75rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.result-value { display: block; margin: 5px 0 4px; font-size: 1.18rem; line-height: 1.25; }
.result-card p { margin: 0; font-size: .82rem; }
.result-summary { padding: 23px; background: #eef4f9; border-radius: 16px; }
.result-summary h3 { font-size: 1.35rem; }
.next-step { margin: 22px 0; padding: 22px; color: #fff; background: var(--navy); border-radius: 16px; }
.next-step h3 { color: #fff; }
.next-step p:last-child { margin-bottom: 0; }
.evidence-list { padding: 0; list-style: none; }
.evidence-list li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.evidence-list b { font-size: .85rem; }
.result-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.previous-test { margin: 0 0 18px; padding: 16px 19px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #174a79; background: #eef6ff; border: 1px solid #c9def4; border-radius: 14px; }
.previous-test p { margin: 0; }
.diagnostic-report { display: grid; gap: 22px; }
.report-header { padding-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 2px solid var(--navy); }
.report-header h3 { margin: 0; font-size: clamp(1.45rem,3vw,2rem); }
.report-date { min-width: 155px; text-align: right; }
.report-date span { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.report-date strong { font-size: .8rem; }
.report-section { break-inside: avoid; }
.report-section > h3 { margin-bottom: 12px; }
.report-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.report-table th, .report-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.report-table thead th { color: #334a61; background: #eef3f7; }
.report-table tbody th { width: 31%; color: #34495e; background: #f8fafb; }
.reason-list { margin: 0; padding-left: 1.35rem; }
.reason-list li { margin: 7px 0; }
.retest-panel { padding: 22px; border: 1px solid; border-radius: 16px; break-inside: avoid; }
.retest-panel[data-status="good"] { background: var(--green-bg); border-color: #b9e2d1; }
.retest-panel[data-status="watch"] { background: var(--amber-bg); border-color: #ecd39f; }
.retest-panel[data-status="concern"] { background: var(--red-bg); border-color: #ebc3c0; }
.retest-panel h3 { margin-bottom: 8px; }
.table-scroll { overflow-x: auto; }
.change-positive { color: var(--green); font-weight: 850; }
.change-negative { color: var(--red); font-weight: 850; }

.quick-tool { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 14px; }
.quick-output { margin-top: 18px; padding: 18px; background: var(--surface-soft); border-radius: 12px; }
.quick-output[hidden] { display: none; }
.chart-bars { display: grid; gap: 8px; margin: 25px 0; }
.chart-row { display: grid; grid-template-columns: 95px 1fr 90px; align-items: center; gap: 12px; font-size: .85rem; }
.bar-track { height: 12px; overflow: hidden; background: #e5ebf1; border-radius: 99px; }
.bar-fill { height: 100%; border-radius: inherit; }

.faq details { padding: 18px 0; border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 800; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--blue); font-size: 1.35rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; color: var(--muted); }
.cta-band { padding: 38px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #fff; background: linear-gradient(125deg, var(--navy), #123f68); border-radius: 22px; }
.cta-band h2 { margin: 0 0 8px; color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-band p { margin: 0; color: #c8dae9; }
.source-list { padding-left: 1.2rem; font-size: .92rem; }
.source-list li { margin: 9px 0; }
.byline { padding: 18px 20px; background: #f3f7fa; border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0; }
.byline p { margin: 0; }

.ad-slot { display: none; min-height: 120px; align-items: center; justify-content: center; margin: 35px auto; color: #8491a0; background: #f6f8fa; border: 1px dashed #cbd5df; border-radius: 12px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.ads-enabled .ad-slot { display: flex; }

.site-footer { padding: 55px 0 24px; color: #c2d1df; background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); gap: 38px; }
.footer-brand p { max-width: 330px; color: #9eb3c7; }
.footer-col h2 { margin: 0 0 14px; color: #fff; font-size: .9rem; letter-spacing: .04em; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin: 8px 0; }
.footer-col a { color: #b9ccdc; font-size: .88rem; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 20px; color: #839bb0; border-top: 1px solid rgba(255,255,255,.1); font-size: .78rem; }

@media (max-width: 900px) {
  .hero-grid, .content-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 42px; }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: repeat(2,1fr); }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 58px 0; }
  .menu-button { display: grid; place-items: center; }
  .nav-links { position: absolute; left: 18px; right: 18px; top: 60px; display: none; padding: 14px; align-items: stretch; flex-direction: column; gap: 2px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 11px; color: var(--ink); border-radius: 8px; }
  .nav-cta { text-align: center; }
  .hero-grid { padding: 64px 0 70px; }
  .hero-actions .button { width: 100%; }
  .feature-grid, .steps, .result-grid, .choice-grid { grid-template-columns: 1fr; }
  .signal-row { grid-template-columns: 1fr 1fr 1fr; }
  .tool-body { padding: 25px 20px; }
  .tool-head { padding: 20px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-grid .button { width: 100%; }
  .cta-band { align-items: stretch; flex-direction: column; padding: 27px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
  .evidence-list li { grid-template-columns: 1fr; gap: 3px; }
  .chart-row { grid-template-columns: 80px 1fr 70px; }
  .previous-test, .report-header { align-items: flex-start; flex-direction: column; }
  .report-date { min-width: 0; text-align: left; }
  .report-table { font-size: .78rem; }
  .report-table th, .report-table td { padding: 8px; }
}

@media (max-width: 450px) {
  .container, .narrow { width: min(100% - 24px, var(--content)); }
  .footer-grid { grid-template-columns: 1fr; }
  .signal-row { grid-template-columns: 1fr; }
  .signal { display: grid; grid-template-columns: 15px 1fr 1fr; align-items: center; text-align: left; gap: 8px; }
  .signal-dot { margin: 0; }
  .tool-actions { align-items: stretch; flex-direction: column-reverse; }
  .tool-actions .button { width: 100%; }
}

@media print {
  @page { margin: 14mm; }
  .site-header, .site-footer, .page-hero, .ad-slot, .tool-head, .tool-actions, .result-controls, .cta-band, .sidebar, main > .section:not(.tool-shell), .previous-test { display: none !important; }
  body { color: #000; background: #fff; font-size: 10pt; }
  .tool-shell { margin: 0; }
  .tool-card { border: 0; box-shadow: none; }
  .tool-body { padding: 0; }
  .diagnostic-report { display: block; }
  .diagnostic-report > * { margin-bottom: 16px; }
  .report-header { border-color: #000; }
  .report-table th, .report-table td { padding: 6px 8px; border-color: #999; }
  .result-grid { grid-template-columns: repeat(3,1fr); }
  .result-card, .result-summary, .next-step, .retest-panel, .notice { color: #000 !important; background: #fff !important; border: 1px solid #888 !important; }
  .next-step h3 { color: #000; }
  a { color: #000; text-decoration: none; }
}

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