:root {
  --paper: #f6f7f4;
  --surface: #ffffff;
  --ink: #18201c;
  --muted: #69736d;
  --line: #dfe4df;
  --accent: #157a55;
  --accent-dark: #0f6143;
  --accent-soft: #e2f1ea;
  --blue: #4576b5;
  --orange: #c36c36;
  --danger: #b63b3b;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(28, 48, 38, .08);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.skip-link { position: fixed; left: 16px; top: -60px; background: var(--ink); color: white; z-index: 20; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 16px; }

.site-header { max-width: 1180px; margin: 0 auto; min-height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: white; }
.brand-mark svg { width: 21px; }
nav { display: flex; gap: 32px; }
nav a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .18s; }
nav a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(21, 122, 85, .28); outline-offset: 3px; }

.hero { max-width: 820px; margin: 76px auto 54px; text-align: center; padding: 0 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { margin: 22px 0 18px; font-size: clamp(46px, 7vw, 78px); line-height: .98; letter-spacing: -.065em; font-weight: 650; }
.hero h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.hero > p { margin: 0 auto; max-width: 570px; color: var(--muted); font-size: 18px; }

.test-shell { max-width: 1080px; margin: 0 auto 130px; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: stretch; }
.test-card, .connection-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.test-card { padding: 30px 34px 26px; box-shadow: var(--shadow); }
.test-topline { display: flex; align-items: flex-start; justify-content: space-between; }
.section-label { margin: 0 0 5px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.test-topline h2, .connection-card h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.server-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; padding-top: 6px; }
.server-state span { width: 7px; height: 7px; border-radius: 50%; background: #9ba39f; }
.server-state.testing span { background: var(--orange); }
.server-state.done span { background: var(--accent); }

.gauge-wrap { width: min(100%, 420px); height: 255px; margin: 10px auto 0; position: relative; }
.gauge { width: 100%; overflow: visible; }
.gauge-track, .gauge-value { stroke-width: 13; }
.gauge-track { stroke: #edf0ed; }
.gauge-value { stroke: var(--accent); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .35s ease; }
.gauge-ticks text { stroke: none; fill: #a0a8a3; font-family: var(--font); font-size: 10px; text-anchor: middle; }
.gauge-reading { position: absolute; inset: 92px 0 auto; text-align: center; display: grid; justify-items: center; }
.gauge-reading strong { font-size: 54px; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-reading span { color: var(--muted); font-size: 13px; margin-top: 3px; }
.gauge-reading small { color: var(--accent); font-size: 12px; font-weight: 600; margin-top: 12px; }
.progress-track { height: 3px; background: #edf0ed; border-radius: 999px; overflow: hidden; margin: -4px 0 26px; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .25s ease; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.metrics article { display: flex; align-items: center; gap: 12px; padding: 17px; min-width: 0; }
.metrics article + article { border-left: 1px solid var(--line); }
.metric-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.metric-icon.up { background: #eef3fa; color: var(--blue); }
.metric-icon.ping { background: #f8eee8; color: var(--orange); }
.metric-icon svg { width: 18px; }
.metrics article > div:last-child { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 4px; }
.metrics span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.metrics strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.metrics small { color: var(--muted); font-size: 10px; }
.start-button { width: 100%; min-height: 52px; border: 0; border-radius: 10px; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; font-weight: 650; cursor: pointer; transition: background .18s, transform .18s; }
.start-button:hover { background: var(--accent-dark); }
.start-button:active { transform: translateY(1px); }
.start-button svg { width: 18px; }
.start-button.testing { background: var(--ink); }
.test-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.error-message { margin-top: 16px; padding: 12px 14px; border-radius: 9px; background: #fbecec; color: var(--danger); font-size: 13px; align-items: center; justify-content: space-between; gap: 12px; }
.error-message:not([hidden]) { display: flex; }
.error-message button { border: 0; color: var(--danger); background: transparent; font-weight: 700; cursor: pointer; text-decoration: underline; }

.connection-card { padding: 30px 24px; display: flex; flex-direction: column; }
.connection-card dl { margin: 27px 0 24px; }
.connection-card dl div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.connection-card dt { color: var(--muted); font-size: 11px; }
.connection-card dd { margin: 3px 0 0; font-size: 13px; font-weight: 650; word-break: break-word; }
.privacy-note { margin-top: auto; display: flex; gap: 10px; padding: 15px; background: var(--accent-soft); border-radius: 11px; color: var(--accent-dark); }
.privacy-note svg { flex: 0 0 auto; width: 19px; }
.privacy-note p { margin: 0; display: grid; }
.privacy-note strong { font-size: 12px; }
.privacy-note span { font-size: 10px; line-height: 1.45; margin-top: 2px; }

.explain-section { max-width: 1080px; margin: 0 auto 130px; padding: 0 24px; }
.section-heading { max-width: 580px; margin-bottom: 48px; }
.section-heading h2, .quality-copy h2 { margin: 0 0 15px; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.05em; line-height: 1.06; font-weight: 650; }
.section-heading > p:last-child, .quality-copy > p:last-child { color: var(--muted); margin: 0; }
.explain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.explain-grid article { border-top: 1px solid #cbd2cd; padding-top: 20px; }
.explain-grid article > span { color: var(--accent); font-size: 11px; font-weight: 700; }
.explain-grid h3 { margin: 30px 0 8px; font-size: 20px; }
.explain-grid p { margin: 0; color: var(--muted); font-size: 14px; }

.quality-section { background: var(--ink); color: white; padding: 86px max(24px, calc((100vw - 1032px) / 2)); display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: start; }
.quality-copy .section-label { color: #79c8a7; }
.quality-copy > p:last-child { color: #aeb8b2; }
.quality-list { border-top: 1px solid #45504a; }
.quality-list div { min-height: 76px; display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 16px; border-bottom: 1px solid #45504a; }
.quality-list strong { font-size: 18px; }
.quality-list span { color: #bdc5c0; font-size: 13px; }
.quality-list i { color: #79c8a7; font-size: 11px; font-style: normal; border: 1px solid #466d5b; border-radius: 999px; padding: 5px 9px; }

.faq-section { max-width: 850px; margin: 118px auto 130px; padding: 0 24px; }
.faq-section .section-heading { margin-bottom: 34px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 22px 34px 22px 0; font-weight: 650; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; color: var(--accent); font-size: 24px; font-weight: 400; position: absolute; right: 5px; top: 15px; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { max-width: 690px; margin: -2px 0 22px; color: var(--muted); font-size: 14px; }

footer { max-width: 1080px; min-height: 120px; margin: 0 auto; padding: 24px; display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 12px; }
.footer-brand { color: var(--ink); margin-right: auto; }
.footer-brand .brand-mark { width: 30px; height: 30px; }

@media (max-width: 820px) {
  nav { display: none; }
  .hero { margin-top: 56px; }
  .test-shell { grid-template-columns: 1fr; }
  .connection-card { min-height: 0; }
  .connection-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .privacy-note { margin-top: 4px; }
  .quality-section { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 560px) {
  .site-header { min-height: 70px; padding: 0 18px; }
  .hero { margin: 42px auto 36px; }
  .hero h1 { font-size: 46px; }
  .hero > p { font-size: 16px; }
  .test-shell { padding: 0 12px; margin-bottom: 92px; }
  .test-card { padding: 23px 18px 20px; }
  .gauge-wrap { height: 220px; }
  .gauge-reading { inset: 78px 0 auto; }
  .gauge-reading strong { font-size: 44px; }
  .metrics article { padding: 13px 7px; gap: 6px; justify-content: center; }
  .metric-icon { width: 30px; height: 30px; }
  .metrics strong { font-size: 19px; }
  .connection-card dl { grid-template-columns: 1fr 1fr; }
  .explain-section { margin-bottom: 90px; }
  .faq-section { margin: 82px auto 90px; }
  .explain-grid { grid-template-columns: 1fr; gap: 30px; }
  .explain-grid h3 { margin-top: 16px; }
  .quality-section { padding-top: 70px; padding-bottom: 70px; }
  .quality-list div { grid-template-columns: 105px 1fr; padding: 16px 0; }
  .quality-list i { grid-column: 2; justify-self: start; }
  footer { flex-wrap: wrap; }
  footer p:last-child { width: 100%; }
}

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