/* netspeedinsider.com: deep navy and signal blue, an amber accent. System font stacks only (no font files,
   font-src 'none'); font-size-adjust keeps every fallback at the same x-height so a swap never reflows. */
:root {
  --ink: #14202c;
  --muted: #4a5866;
  --paper: #f6f8fb;
  --panel: #e8eef5;
  --line: #c9d4e0;
  --navy: #0f2a44;
  --navy-ink: #ffffff;
  --blue: #0b5cad;
  --amber: #8a4b00;
  --bad: #a1260d;
  --focus: #c76a00;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --num: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--text); font-size-adjust: 0.52; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); margin: 0.4em 0; }
h2 { font-size: 1.4rem; margin: 1.8em 0 0.5em; }
h3 { font-size: 1.12rem; margin: 0 0 0.35em; }
p, li { text-wrap: pretty; }
a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
abbr[title] { text-decoration: none; }

.ns-wrap { max-width: 66rem; margin-inline: auto; padding-inline: 1.25rem; }
.ns-skip { position: absolute; inset-inline-start: 1rem; inset-block-start: -3rem; background: var(--navy); color: var(--navy-ink); padding: 0.5rem 1rem; z-index: 1; }
.ns-skip:focus { inset-block-start: 0.5rem; }

.ns-header { background: var(--navy); color: var(--navy-ink); }
.ns-header-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-block: 0.85rem; }
.ns-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--navy-ink); text-decoration: none; font-weight: 700; font-size: 1.25rem; }
.ns-brand:hover { color: var(--navy-ink); }
.ns-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.ns-nav a { color: var(--navy-ink); text-decoration: none; padding-block: 0.6rem; border-block-end: 2px solid transparent; }
.ns-nav a:hover, .ns-nav a[aria-current="page"] { border-block-end-color: #ffb547; color: var(--navy-ink); }

.ns-main { padding-block: 1.25rem 3rem; }
.ns-hero { padding-block: 0.5rem 0.5rem; }
.ns-lede { font-size: 1.18rem; color: var(--muted); max-width: 40rem; }

/* The speed test (inc/tool-speed.html). */
.ns-tool { background: #fff; border: 1px solid var(--line); border-block-start: 6px solid var(--blue); border-radius: 0.75rem; padding: 0.5rem 1.5rem 1.25rem; margin-block: 1rem 2rem; }
.ns-tool h2 { margin-block-start: 0.6em; }
.ns-start { font: inherit; font-weight: 700; font-size: 1.15rem; min-height: 52px; padding: 0.7rem 1.8rem; border: 0; border-radius: 999px; background: var(--blue); color: #fff; cursor: pointer; }
.ns-start:hover:enabled:not([aria-disabled="true"]) { background: var(--navy); }
.ns-start:disabled, .ns-start[aria-disabled="true"] { background: #5d6d7e; cursor: progress; }
.ns-status { font-weight: 600; min-block-size: 1.6em; }
.ns-results { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); margin: 1rem 0; }
.ns-result { background: var(--panel); border-radius: 0.5rem; padding: 0.7rem 1rem; }
.ns-result dt { font-size: 0.95rem; color: var(--muted); }
.ns-result dd { margin: 0.2rem 0 0; font-size: 1.05rem; }
.ns-result [data-result] { font-family: var(--num); font-size: 1.7rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.ns-failed .ns-result [data-result] { color: var(--muted); }
.ns-tool:has(.ns-failed) .ns-status { color: var(--bad); }
.ns-note { font-size: 0.95rem; color: var(--muted); max-width: 46rem; }

.ns-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.ns-card { background: #fff; border: 1px solid var(--line); border-block-start: 5px solid var(--amber); border-radius: 0.5rem; padding: 1rem 1.2rem; }
.ns-card h3 a { color: var(--navy); text-decoration: none; }
.ns-card h3 a:hover { text-decoration: underline; }
.ns-card p { margin: 0.4em 0 0; }

.ns-prose { max-width: 44rem; }
.ns-prose li + li { margin-block-start: 0.35em; }
.ns-table { border-collapse: collapse; width: 100%; margin-block: 1rem; font-size: 0.97rem; }
.ns-table caption { text-align: start; font-weight: 700; padding-block-end: 0.4rem; }
.ns-table th, .ns-table td { border: 1px solid var(--line); padding: 0.5rem 0.6rem; text-align: start; vertical-align: top; }
.ns-table thead th { background: var(--panel); }
.ns-back { margin-block-start: 2.5rem; font-weight: 700; }

/* The contact form the core prints on /contact/ (pages_contact_form). */
.contact-form { display: grid; gap: 1rem; max-width: 34rem; margin-block: 1.5rem; }
.contact-field { display: grid; gap: 0.3rem; margin: 0; }
.contact-field label { font-weight: 700; }
.contact-form input, .contact-form textarea { font: inherit; font-size: max(1rem, 1em); padding: 0.6rem 0.7rem; border: 1px solid #5f6b78; border-radius: 0.35rem; background: #fff; color: var(--ink); width: 100%; }
.contact-form textarea { resize: vertical; min-height: 10rem; }
.contact-form input:user-invalid, .contact-form textarea:user-invalid { border-color: var(--bad); border-width: 2px; }
.contact-form button { font: inherit; font-weight: 700; min-height: 48px; padding: 0.6rem 1.4rem; border: 0; border-radius: 0.35rem; background: var(--blue); color: #fff; cursor: pointer; }
.contact-form button:hover { background: var(--navy); }

.config-error { background: #fff1ec; border: 2px solid var(--bad); padding: 1rem; border-radius: 0.4rem; }

.ns-footer { background: var(--panel); border-block-start: 1px solid var(--line); padding-block: 1.5rem; font-size: 0.95rem; }
.ns-footer p { margin: 0.4rem 0; }
.ns-footer-links a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
