/* =====================================================================
   IPandNet.com – design system (vanilla CSS, mobile first, RTL ready)
   ===================================================================== */
:root {
  --navy-900: #071735;
  --navy-800: #0b2a5b;
  --navy-700: #163a73;
  --text: #0e1f3d;
  --text-soft: #4a5b78;
  --muted: #66758f;
  --primary: #1257d6;
  --primary-600: #0f4bbb;
  --primary-50: #ecf3ff;
  --cyan: #06b6d4;
  --cyan-50: #e6f9fc;
  --bg: #ffffff;
  --surface: #f5f8fc;
  --surface-2: #eef3fa;
  --border: #dfe6f1;
  --border-strong: #c9d4e5;
  --success: #0f8a5f;
  --success-50: #e7f7f0;
  --warn: #b26a00;
  --warn-50: #fff5e0;
  --danger: #c62f3c;
  --danger-50: #fdecee;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(14, 31, 61, .06);
  --shadow: 0 1px 2px rgba(14, 31, 61, .05), 0 8px 24px -12px rgba(14, 31, 61, .18);
  --grad: linear-gradient(120deg, #1257d6 0%, #06b6d4 100%);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-600); }
h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -.012em; margin: 0 0 .55em; color: var(--text); }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); font-weight: 750; }
h3, .h3 { font-size: 1.15rem; font-weight: 700; }
.h4, h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); padding: .1em .38em; border-radius: 5px; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; padding: 0 .4em; border-radius: 5px; background: #fff; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 18px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--navy-800); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid rgba(18, 87, 214, .45); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.lead { font-size: 1.1rem; color: var(--text-soft); max-width: 70ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .75rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; display: block; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.5) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo-text { font-weight: 800; font-size: 1.22rem; letter-spacing: -.02em; color: var(--navy-800); }
.logo-and { color: var(--cyan); font-weight: 700; margin: 0 1px; }
.logo-tld { color: var(--muted); font-weight: 600; font-size: .82em; }
.nav-toggle { margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border); background: #fff; border-radius: 10px; color: var(--text); cursor: pointer; }
.main-nav { display: none; position: absolute; inset-inline: 0; top: 66px; background: #fff; border-bottom: 1px solid var(--border); padding: 10px 18px 18px; box-shadow: var(--shadow); }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0 0 12px; padding: 0; }
.main-nav a { display: block; padding: 10px 6px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 8px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-50); }
.main-nav .nav-cta { display: inline-flex; color: #fff; }
.main-nav .nav-cta:hover { color: #fff; background: var(--primary-600); }
@media (min-width: 1260px) {
  .nav-toggle { display: none; }
  .main-nav { display: flex !important; position: static; padding: 0; border: 0; box-shadow: none; background: transparent; align-items: center; gap: 10px; margin-inline-start: auto; }
  .main-nav ul { display: flex; margin: 0; gap: 2px; }
  .main-nav a { padding: 8px 9px; font-size: .9rem; white-space: nowrap; }
}

/* ---------------------------------------------------------------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 11px; border: 1px solid transparent; font: inherit; font-weight: 650; font-size: .95rem; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(18, 87, 214, .7); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-secondary { background: var(--navy-800); color: #fff; }
.btn-secondary:hover { background: var(--navy-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 12px; font-size: .86rem; border-radius: 9px; }
.btn-lg { padding: 14px 22px; font-size: 1.02rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn.is-stop { background: var(--danger); box-shadow: none; }
.link-button { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.more-link { font-weight: 600; text-decoration: none; }

/* ---------------------------------------------------------------- Hero */
.hero { position: relative; padding: 36px 0 40px; background:
  radial-gradient(900px 380px at 85% -10%, rgba(6, 182, 212, .14), transparent 60%),
  radial-gradient(700px 360px at 0% 0%, rgba(18, 87, 214, .10), transparent 60%),
  linear-gradient(#fff, #f6f9fd); border-bottom: 1px solid var(--border); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(18, 87, 214, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 87, 214, .05) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 80%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 28px; align-items: center; }
.hero-points { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-soft); font-size: .92rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points svg { color: var(--success); }
@media (min-width: 980px) { .hero { padding: 56px 0 60px; } .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 44px; } }

/* ---------------------------------------------------------------- Cards & panels */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.ip-panel { padding: 22px; }
.ip-main { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--border); }
.ip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ip-big { font-family: var(--mono); font-weight: 700; font-size: clamp(1.25rem, .9rem + 2.4vw, 2.05rem); color: var(--navy-800); word-break: break-all; letter-spacing: -.01em; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.data-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 18px; margin: 0; }
.data-grid > div { padding: 8px 0; border-bottom: 1px solid var(--surface-2); min-width: 0; }
.data-grid dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.data-grid dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.skeleton { display: inline-block; color: transparent; background: linear-gradient(90deg, var(--surface-2), #f8fafd, var(--surface-2)); background-size: 200% 100%; animation: sk 1.3s infinite linear; border-radius: 6px; min-width: 80px; }
@keyframes sk { to { background-position: -200% 0; } }
.notice { border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid var(--border); background: var(--surface); }
.notice h2, .notice h3 { margin-top: 0; }
.notice-soft { display: flex; gap: 8px; align-items: flex-start; background: var(--cyan-50); border-color: #bdeef6; color: #0a4a5a; margin: 12px 0 0; }
.notice-soft svg { flex-shrink: 0; margin-top: 2px; }
.notice-info { background: var(--primary-50); border-color: #cddcff; }
.notice-warn { background: var(--warn-50); border-color: #f5d79a; }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: var(--success-50); border-color: #9fdcc2; color: #075c3e; }
.alert-error { background: var(--danger-50); border-color: #f2b5bb; color: #8f1e29; }
.alert-warn { background: var(--warn-50); border-color: #f5d79a; color: #6d4200; }

/* World map (IP panel & lookup results) */
.ip-map { margin: 14px 0 4px; }
.ip-map-canvas { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: linear-gradient(180deg, #f3f8ff, #eaf3fb); aspect-ratio: 1000 / 394; }
.ip-map-canvas > svg.world-map { display: block; width: 100%; height: 100%; }
.world-map path { fill: #d5e0ef; stroke: #fff; stroke-width: .35; vector-effect: non-scaling-stroke; transition: fill .2s; }
.world-map path:hover { fill: #c3d3e9; }
.world-map path.is-active { fill: var(--primary); }
.world-map .wm-area { fill: rgba(6, 182, 212, .22); stroke: var(--cyan); stroke-width: 1; vector-effect: non-scaling-stroke; }
.world-map .wm-pin { fill: var(--primary); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ip-map-canvas.is-leaflet { aspect-ratio: auto; height: 320px; background: #e8eef4; }
@media (max-width: 640px) { .ip-map-canvas.is-leaflet { height: 260px; } }
.ip-map-canvas.is-leaflet .leaflet-control-attribution { font-size: 10px; }
.ip-map-hint { font-size: .78rem; color: var(--muted); margin: 2px 0 0; }
.ip-map-caption { font-size: .82rem; color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; }

/* ---------------------------------------------------------------- Sections & grids */
.section { padding: 46px 0; }
.section-sm { padding: 26px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 22px; }
.section-head p { color: var(--text-soft); }
.grid-2, .grid-3 { display: grid; gap: 18px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.tool-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-bottom: 20px; }
.tool-card { display: flex; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-card:hover { border-color: #a9c3f5; box-shadow: var(--shadow); color: var(--text); transform: translateY(-1px); }
.tool-card strong { display: block; font-size: .98rem; margin-bottom: 2px; }
.tool-card-body > span:not(.badge) { display: block; font-size: .86rem; color: var(--text-soft); line-height: 1.45; margin-bottom: 6px; }
.tool-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--primary); background: linear-gradient(135deg, var(--primary-50), var(--cyan-50)); }
.related-list .tool-card { padding: 12px; margin-bottom: 8px; }
.related-list .tool-icon { width: 36px; height: 36px; }
.cat-title { display: flex; align-items: center; gap: 10px; }
.cat-title svg { color: var(--primary); }

.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; letter-spacing: .02em; border: 1px solid; vertical-align: middle; }
.badge-full { color: var(--success); background: var(--success-50); border-color: #a9e0c7; }
.badge-limited { color: #1a5bb8; background: var(--primary-50); border-color: #c4d7fb; }
.badge-external { color: #08758a; background: var(--cyan-50); border-color: #a7e6f1; }
.badge-backend, .badge-planned { color: var(--warn); background: var(--warn-50); border-color: #f1d395; }
.status-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

/* ---------------------------------------------------------------- Page heads, breadcrumbs */
.page-head { padding: 26px 0 22px; background: linear-gradient(180deg, #f6f9fd, #fff); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.page-head-row { display: flex; gap: 16px; align-items: flex-start; }
.page-icon { flex-shrink: 0; width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 10px 22px -12px rgba(18, 87, 214, .8); }
.tool-status { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
@media (max-width: 560px) { .page-icon { display: none; } }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 14px; font-size: .84rem; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 6px; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }

/* ---------------------------------------------------------------- Content layout */
.content-grid { display: grid; gap: 30px; margin-bottom: 40px; }
@media (min-width: 980px) { .content-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.prose { max-width: 760px; min-width: 0; }
.prose-wide { max-width: 860px; margin-bottom: 40px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose > .notice:first-child { margin-bottom: 1.2em; }
.check-list { list-style: none; padding-inline-start: 0 !important; }
.check-list li { position: relative; padding-inline-start: 26px; margin-bottom: .6em; }
.check-list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .55em; width: 12px; height: 7px; border-inline-start: 2.5px solid var(--cyan); border-bottom: 2.5px solid var(--cyan); transform: rotate(-45deg); }
[dir="rtl"] .check-list li::before { transform: rotate(45deg) scaleX(-1); }
.sidebar .side-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.link-list { list-style: none; padding: 0; margin: 0 0 12px; }
.link-list li { padding: 5px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.link-list a { text-decoration: none; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary); }
.faq details[open] summary::after { content: "–"; }
.faq-a { padding: 0 16px 6px; color: var(--text-soft); }
.learn-grid, .guide-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.learn-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.learn-card p { color: var(--text-soft); font-size: .95rem; }
.learn-card a { font-weight: 650; text-decoration: none; font-size: .92rem; }
.guide-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); background: #fff; margin-bottom: 30px; }
.guide-card:hover { border-color: #a9c3f5; box-shadow: var(--shadow); color: var(--text); }
.guide-card > span:last-child { color: var(--text-soft); font-size: .92rem; }
.sitemap-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 40px; }

/* ---------------------------------------------------------------- Forms */
.tool-form label, .form-stack label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(18, 87, 214, .14); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.input-row { display: flex; flex-wrap: wrap; gap: 10px; }
.input-row input { flex: 1 1 240px; }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr auto auto; align-items: end; } }
.field { margin-bottom: 12px; }
.form-grid .field { margin-bottom: 0; }
.field-error { color: var(--danger); font-size: .84rem; margin-top: 4px; }
.tool-form > .btn { margin-top: 12px; }
.tool-form input + label { margin-top: 12px; }
.form-stack { max-width: 680px; }
.hp-field { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-result { margin-top: 14px; }

/* ---------------------------------------------------------------- Results */
.result:empty { display: none; }
.result { margin-top: 4px; margin-bottom: 18px; }
.result-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.result-card h3 { margin-top: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; color: var(--muted); margin-bottom: 10px; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: start; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface); font-weight: 700; }
.table td.mono, .table .mono { word-break: break-all; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pill-pass { background: var(--success-50); color: var(--success); }
.pill-warn { background: var(--warn-50); color: var(--warn); }
.pill-fail { background: var(--danger-50); color: var(--danger); }
.pill-info, .pill-skip { background: var(--surface-2); color: var(--text-soft); }
.error-box { background: var(--danger-50); border: 1px solid #f2b5bb; color: #8f1e29; border-radius: var(--radius-sm); padding: 12px 14px; }
.loading-box { color: var(--muted); padding: 10px 0; display: flex; align-items: center; gap: 10px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 6px 14px; margin: 0; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: .8rem; background: var(--surface-2); border-radius: 6px; padding: 3px 7px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* ---------------------------------------------------------------- Speed test */
.speedtest { padding: 22px; }
.st-top { display: grid; gap: 20px; align-items: center; }
@media (min-width: 760px) { .st-top { grid-template-columns: 300px 1fr; } }
.st-gauge-wrap { position: relative; width: 100%; max-width: 300px; margin-inline: auto; }
.st-gauge { display: block; width: 100%; height: auto; }
.g-track, .g-fill { fill: none; stroke-width: 15; stroke-linecap: round; }
.g-track { stroke: var(--surface-2); }
.g-fill { stroke-dasharray: 0 100; transition: stroke-dasharray .25s ease-out; }
.st-readout { position: absolute; inset: auto 0 6% 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.st-value { font-size: 2.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--navy-800); }
.st-unit { font-size: .85rem; color: var(--muted); font-weight: 600; }
.st-phase { margin-top: 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); }
.st-controls { display: flex; flex-direction: column; gap: 12px; }
.st-start { align-self: flex-start; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 640px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy-800); line-height: 1.3; }
.stat-unit { font-size: .8rem; color: var(--muted); }
.stat-state { font-size: .72rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.stat.is-measured .stat-state { color: var(--success); }
.stat.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(18, 87, 214, .12); }
.st-summary { margin-top: 16px; padding: 14px 16px; background: var(--primary-50); border-radius: 12px; border: 1px solid #cddcff; }
.st-summary p:last-child { margin-bottom: 0; }
.st-history { margin-top: 16px; }
.st-history summary { cursor: pointer; font-weight: 650; }

/* Latency tests */
.latency-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.latency-head h2 { margin-bottom: 2px; }
.latency-chart { width: 100%; height: 160px; margin-top: 14px; background: var(--surface); border-radius: 10px; border: 1px solid var(--border); }
.proto-card .proto-status { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.proto-ip { word-break: break-all; color: var(--text-soft); min-height: 1.4em; }
.ok-text { color: var(--success); }
.warn-text { color: var(--warn); }
.fail-text { color: var(--danger); }

/* Health preview & report */
.health-preview { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 16px; }
.hp-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.hp-card h3 { font-size: .98rem; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hp-card h3 svg { color: var(--primary); }
.hp-val { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.report { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 24px; }
.report-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.score { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.score-track, .score-fill { fill: none; stroke-width: 11; }
.score-track { stroke: var(--surface-2); }
.score-fill { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .8s ease; }
.score-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-text strong { font-size: 2rem; line-height: 1; }
.score-text span { font-size: .78rem; color: var(--muted); }
.report-summary { font-size: 1.05rem; margin-bottom: 12px; }
.report-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.score-explain { background: var(--surface); border-radius: 12px; padding: 12px 16px; margin-top: 16px; }
.score-explain summary { cursor: pointer; font-weight: 700; }

/* ---------------------------------------------------------------- Ads */
.ad-slot { margin: 22px auto; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; }
.ad-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: repeating-linear-gradient(45deg, #fafbfd, #fafbfd 10px, #f4f7fb 10px, #f4f7fb 20px); min-height: 110px; }
.ad-note { font-size: .78rem; color: var(--muted); }
.ad-inline { margin: 28px 0; }

/* ---------------------------------------------------------------- Footer */
.site-footer { background: var(--navy-900); color: #b9c6dd; padding: 44px 0 20px; margin-top: 30px; }
.site-footer a { color: #dbe5f5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-about { grid-column: 1 / -1; max-width: 420px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .footer-about { grid-column: auto; } }
.site-footer h2 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; font-size: .93rem; }
.site-footer .link-button { color: #dbe5f5; text-decoration: none; font-size: .93rem; }
.logo-footer .logo-text { color: #fff; }
.logo-footer .logo-tld { color: #8ea0bf; }
.footer-tagline { color: #fff; font-weight: 600; margin: 8px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 30px; padding-top: 16px; font-size: .84rem; }
.footer-attr { color: #8ea0bf; font-size: .78rem; }

/* Cookie banner */
.cookie-banner { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 60; max-width: 560px; margin-inline: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 18px 40px -16px rgba(14, 31, 61, .45); padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.cookie-banner p { margin: 0; font-size: .86rem; color: var(--text-soft); }

/* ---------------------------------------------------------------- Print (health report / PDF) */
@media print {
  @page { margin: 14mm; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .site-header, .site-footer, .cookie-banner, .ad-slot, .breadcrumbs, .sidebar, .no-print, .health-start, .tool-status,
  .content-grid .prose > :not(.notice), .skip-link, .page-head .lead { display: none !important; }
  .content-grid { display: block; }
  .page-head { background: none; border: 0; padding: 0; margin: 0 0 8px; }
  .report { box-shadow: none; border: 0; padding: 0; }
  .score-explain { break-inside: avoid; }
  .table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pill, .score-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: #000; text-decoration: none; }
  body:not(.tool-connection-health) .card { box-shadow: none; }
}
