/* ToolPage — base stylesheet.
 *
 * Direction: clean, professional, slightly Windows-like. System font
 * stack, flat fills, restrained accent, strong hierarchy. No
 * framework — keep this file editable.
 */

/* ------- Reset ---------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body, h1, h2, h3, h4, p, ul, li, figure { margin: 0; padding: 0; }

ul { list-style: none; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

button { font: inherit; cursor: pointer; }

[hidden] { display: none !important; }

/* Shared inline spinner — used by any tool doing a short async op. */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--c-border-strong);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  vertical-align: -2px;
  margin-right: var(--space-2);
}
@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}

/* ------- Design tokens -------------------------------------------- */

:root {
  /* Colours — restrained, Fluent-ish */
  --c-bg:           #f5f5f7;
  --c-surface:      #ffffff;
  --c-surface-2:    #fafafa;
  --c-border:       #e1e1e5;
  --c-border-strong:#c7c7cc;
  --c-text:         #1a1a1f;
  --c-text-muted:   #5c5c66;
  --c-accent:       #0067c0;   /* Windows 11 Fluent accent */
  --c-accent-hover: #004b8f;
  --c-accent-soft:  #e6f0fa;
  --c-deep:         #8a2be2;   /* featured badge */

  /* Typography */
  --font-sans: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont,
               "Inter", "Helvetica Neue", Arial, sans-serif;
  --fs-base:   16px;
  --lh-base:   1.55;

  /* Layout */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   24px;
  --space-6:   32px;
  --space-7:   48px;
  --space-8:   64px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 2px 6px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 8px 20px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.06);

  --max-width: 1120px;
}

/* ------- Base ----------------------------------------------------- */

html { background: var(--c-bg); }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }

h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 1.875rem); }
h3 { font-size: 1.125rem; }

p { color: var(--c-text); }

a { color: var(--c-accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--c-accent-hover); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ------- Header --------------------------------------------------- */

.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  color: var(--c-text);
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; color: var(--c-accent); }

.site-logo__mark {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-deep));
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.site-logo__text { font-size: 1.0625rem; }

.site-nav {
  display: flex;
  gap: var(--space-5);
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--c-text-muted);
  padding: var(--space-2) 0;
}
.site-nav a:hover { color: var(--c-text); text-decoration: none; }

/* ------- Hero ----------------------------------------------------- */

.hero {
  padding: var(--space-8) 0 var(--space-7);
  text-align: center;
}

.hero__title {
  max-width: 16ch;
  margin: 0 auto var(--space-4);
}

.hero__lede {
  font-size: 1.125rem;
  color: var(--c-text-muted);
  max-width: 60ch;
  margin: 0 auto;
}

/* ------- Sections ------------------------------------------------- */

.section {
  padding: var(--space-7) 0;
}

.section__heading {
  margin-bottom: var(--space-2);
}
.section__intro {
  color: var(--c-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-5);
}

.section--featured {
  padding-top: 0;
}

/* Divider between homepage sections. A short centered rule in the
 * stronger border tone with an accent dot at the midpoint. Obvious
 * enough to signal "new section" but not edge-to-edge.
 * .section + .section targets every section that follows another,
 * so Featured keeps a clean transition out of the hero. */
.section + .section {
  position: relative;
  padding-top: var(--space-7);
}
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  max-width: 60%;
  height: 1px;
  background: var(--c-border-strong);
}
.section + .section::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--c-bg);
}

/* ------- Tool grid + cards --------------------------------------- */

.tool-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: var(--space-4);
}

.tool-grid--featured {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-border-strong);  /* category stripe fallback */
  border-radius: var(--radius-md);
  color: var(--c-text);
  text-decoration: none;
  transition: border-color 120ms, box-shadow 120ms, transform 120ms;
  min-height: 140px;
}

/* Category accent stripes on the top border. Colour choices sit in the
 * Fluent tonal range — muted enough to read as "section identity", not
 * a kids' dashboard. Deep tools (Featured) override below. */
.tool-card[data-category="Network Tools"]              { border-top-color: #ca8a04; }  /* amber */
.tool-card[data-category="Browser & Device Tools"]     { border-top-color: #0d9488; }  /* teal */
.tool-card[data-category="Developer & Utility Tools"]  { border-top-color: #6366f1; }  /* indigo */

.tool-card:hover,
.tool-card:focus-visible {
  text-decoration: none;
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: var(--c-text);
}

.tool-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--c-text);
}

.tool-card__desc {
  color: var(--c-text-muted);
  font-size: 0.9375rem;
  flex: 1;
}

.tool-card__cta {
  align-self: flex-start;
  color: var(--c-accent);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: var(--space-2);
}

.tool-card--deep {
  border-color: var(--c-accent-soft);
  border-top-color: var(--c-accent);    /* blue stripe overrides category */
  background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-accent-soft) 260%);
}

.tool-card--deep:hover {
  border-color: var(--c-accent);
  border-top-color: var(--c-accent);
}

.tool-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

/* ------- Why grid ------------------------------------------------- */

.why-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: var(--space-4);
}

.why-card {
  padding: var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}

.why-card__title {
  margin-bottom: var(--space-2);
}

.why-card__body {
  color: var(--c-text-muted);
  font-size: 0.9375rem;
}

/* ------- Footer --------------------------------------------------- */

.site-footer {
  margin-top: var(--space-8);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--c-text-muted);
  font-size: 0.875rem;
}

.site-footer__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.site-footer__copy { margin: 0; }
.site-footer__legal {
  margin: 0;
  font-size: 0.75rem;
  color: var(--c-text-muted);
  opacity: 0.85;
}

.site-footer__nav {
  display: flex;
  gap: var(--space-4);
}

.site-footer__nav a { color: var(--c-text-muted); }
.site-footer__nav a:hover { color: var(--c-text); text-decoration: none; }

/* ------- Tool page ----------------------------------------------- */

.tool {
  padding: var(--space-6) 0 var(--space-4);
}

.tool__header {
  margin-bottom: var(--space-5);
}

.tool__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  color: var(--c-text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-3);
}
.tool__breadcrumb a { color: var(--c-text-muted); }
.tool__breadcrumb a:hover { color: var(--c-accent); }

.tool__title { margin-bottom: var(--space-2); }
.tool__lede {
  color: var(--c-text-muted);
  font-size: 1.0625rem;
  max-width: 60ch;
}

.tool__ui {
  margin: var(--space-5) 0 var(--space-6);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.tool__about {
  margin: var(--space-6) 0;
  max-width: 70ch;
}
.tool__about h2 { margin-bottom: var(--space-3); }

/* Coming-soon placeholder (Phase 1 stub) ------------------------- */

.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--c-surface-2);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius-md);
}

.coming-soon__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

.coming-soon__body {
  color: var(--c-text-muted);
  margin: 0;
}

/* FAQ ------------------------------------------------------------ */

.faq {
  margin: var(--space-6) 0;
  max-width: 70ch;
}
.faq h2 { margin-bottom: var(--space-4); }

.faq__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.faq-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
}

.faq-item__q {
  cursor: pointer;
  padding: var(--space-4);
  font-weight: 500;
  list-style: none;
  position: relative;
}
.faq-item__q::-webkit-details-marker { display: none; }

.faq-item__q::after {
  content: "+";
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-muted);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1;
}
.faq-item[open] .faq-item__q::after { content: "−"; }

.faq-item__a {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--c-text-muted);
}

/* Related tools -------------------------------------------------- */

.related {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--c-border);
}

.related h2 { margin-bottom: var(--space-4); }

/* ------- Prose pages (privacy, about) ---------------------------- */

.prose {
  max-width: 70ch;
  padding: var(--space-6) 0;
}

.prose h1 { margin-bottom: var(--space-3); }
.prose h2 { margin-top: var(--space-6); margin-bottom: var(--space-3); }
.prose p,
.prose ul { margin-bottom: var(--space-3); color: var(--c-text); }
.prose ul { padding-left: 1.25rem; list-style: disc; }
.prose li { margin-bottom: var(--space-2); }
.prose strong { font-weight: 600; }

.prose__updated {
  color: var(--c-text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-5);
}

.prose__kv {
  grid-template-columns: max-content 1fr;
  margin: var(--space-2) 0 var(--space-5);
}

.prose__signoff {
  margin-top: var(--space-5);
  color: var(--c-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose hr {
  margin: var(--space-6) 0 var(--space-4);
  border: 0;
  border-top: 1px solid var(--c-border);
}

/* ------- Form primitives (shared across tools) ------------------ */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1 1 220px;
  min-width: 0;
}

.field__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: 0.01em;
}

.field--narrow { flex: 0 0 140px; }
.field--full   { flex: 1 1 100%; }

.input {
  width: 100%;
  padding: var(--space-3) var(--space-3);
  font: inherit;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 120ms, box-shadow 120ms;
}
.input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.format-fieldset {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  gap: var(--space-4);
  align-items: center;
}
.format-fieldset .field__label {
  padding: 0 var(--space-2);
}

.radio, .checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9375rem;
  cursor: pointer;
}
.radio input, .checkbox input {
  margin: 0;
  accent-color: var(--c-accent);
}

.actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font: inherit;
  font-weight: 500;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn:hover { background: var(--c-surface-2); border-color: var(--c-text-muted); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn--primary {
  color: #fff;
  background: var(--c-accent);
  border-color: var(--c-accent);
}
.btn--primary:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
}

.btn--small {
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
}

/* ------- UUID generator ------------------------------------------ */

.uuidgen__output {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--c-border);
}

.uuidgen__output-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.uuidgen__output-count {
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

.uuidgen__output-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.uuidgen__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 480px;
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface-2);
}
.uuidgen__list:empty { display: none; }

.uuidgen__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--c-border);
}
.uuidgen__item:last-child { border-bottom: none; }

.uuidgen__value {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.9375rem;
  color: var(--c-text);
  word-break: break-all;
}

.uuidgen__copy {
  padding: 2px var(--space-2);
  font-size: 0.75rem;
  color: var(--c-accent);
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}
.uuidgen__copy:hover {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
}

.uuidgen__hint {
  color: var(--c-text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.uuidgen__error {
  margin-top: var(--space-3);
  padding: var(--space-3);
  color: #a01d2d;
  background: #fde8ea;
  border: 1px solid #f5c2c8;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

/* ----- Extras: validator & namespace calc ------- */

.uuidgen-extras {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}
.uuidgen-extras summary {
  cursor: pointer;
  font-weight: 500;
  padding: var(--space-2) 0;
}
.uuidgen-extras[open] summary {
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--c-border);
}

.uuidgen-validator__result { margin-top: var(--space-4); }

.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  margin: 0;
}
.kv dt { color: var(--c-text-muted); font-size: 0.875rem; }
.kv dd { margin: 0; font-size: 0.9375rem; }
.kv code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.875rem;
  color: var(--c-text);
  word-break: break-all;
}

/* ------- Screen resolution checker ------------------------------ */

.srcheck__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--space-5);
}

.srcheck__card {
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}

.srcheck__card-title {
  margin: 0 0 var(--space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.srcheck__big {
  margin: 0 0 var(--space-2);
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--c-text);
}

.srcheck__sub {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 0.8125rem;
}

.srcheck__kv {
  margin-bottom: var(--space-5);
}

.srcheck__kv dd {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.9375rem;
}

.srcheck__hint {
  margin-top: var(--space-4);
  color: var(--c-text-muted);
  font-size: 0.875rem;
}

/* ------- What browser am I using --------------------------------- */

.ualook__headline {
  padding: var(--space-4) var(--space-5);
  background: var(--c-accent-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

.ualook__big {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--c-text);
}

.ualook__sub {
  margin: var(--space-1) 0 0;
  color: var(--c-text-muted);
  font-size: 0.9375rem;
}

.ualook__kv { margin-bottom: var(--space-5); }

.ualook__raw {
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}
.ualook__raw-title {
  margin: 0 0 var(--space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.ualook__ua {
  display: block;
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.8125rem;
  color: var(--c-text);
  word-break: break-all;
}

/* ------- Password strength checker ------------------------------ */

.pwcheck__privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent-soft);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-size: 0.875rem;
  margin-bottom: var(--space-5);
}
.pwcheck__lock {
  flex-shrink: 0;
  font-size: 1rem;
}

.pwcheck__field { display: block; margin-bottom: var(--space-5); }

.pwcheck__input-wrap {
  position: relative;
  display: flex;
}
.pwcheck__input {
  flex: 1;
  padding-right: 70px;  /* room for toggle */
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 1rem;
  letter-spacing: 0.03em;
}
.pwcheck__toggle {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.pwcheck__toggle:hover { color: var(--c-text); border-color: var(--c-border-strong); }

.pwcheck__result {
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

.pwcheck__summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.pwcheck__label {
  font-size: 1.125rem;
  font-weight: 600;
}
.pwcheck__label[data-tier="very-weak"] { color: #b91c1c; }
.pwcheck__label[data-tier="weak"]      { color: #c2410c; }
.pwcheck__label[data-tier="fair"]      { color: #b45309; }
.pwcheck__label[data-tier="strong"]    { color: #15803d; }
.pwcheck__label[data-tier="very-strong"] { color: #166534; }

.pwcheck__crack {
  color: var(--c-text-muted);
  font-size: 0.8125rem;
}

.pwcheck__meter {
  height: 8px;
  background: var(--c-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.pwcheck__meter-fill {
  height: 100%;
  width: 0%;
  background: #b91c1c;
  transition: width 160ms, background 160ms;
  border-radius: 999px;
}
.pwcheck__meter-fill[data-score^="2"],
.pwcheck__meter-fill[data-score^="3"] { background: #c2410c; }
.pwcheck__meter-fill[data-score^="4"],
.pwcheck__meter-fill[data-score^="5"] { background: #b45309; }
.pwcheck__meter-fill[data-score^="6"],
.pwcheck__meter-fill[data-score^="7"] { background: #15803d; }
.pwcheck__meter-fill[data-score^="8"],
.pwcheck__meter-fill[data-score^="9"],
.pwcheck__meter-fill[data-score="100"] { background: #166534; }

.pwcheck__kv { margin-bottom: var(--space-3); }

.pwcheck__findings {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  list-style: none;
}
.pwcheck__finding {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  border: 1px solid transparent;
}
.pwcheck__finding--danger { color: #7f1d1d; background: #fee2e2; border-color: #fecaca; }
.pwcheck__finding--warn   { color: #78350f; background: #fef3c7; border-color: #fde68a; }
.pwcheck__finding--ok     { color: #14532d; background: #dcfce7; border-color: #bbf7d0; }

.pwcheck__tips {
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}
.pwcheck__tips-title {
  margin: 0 0 var(--space-3);
  font-size: 1rem;
}
.pwcheck__tips ul {
  padding-left: 1.25rem;
  list-style: disc;
  margin-bottom: var(--space-3);
}
.pwcheck__tips li { margin-bottom: var(--space-2); }
.pwcheck__disclaimer {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--c-text-muted);
}

/* ------- Text diff checker -------------------------------------- */

.textdiff__inputs {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: var(--space-4);
}

.textdiff__textarea {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.875rem;
  line-height: 1.45;
  min-height: 180px;
  resize: vertical;
}

.textdiff__options { gap: var(--space-4); }

.textdiff__result {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}

.textdiff__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.textdiff__chip {
  padding: 2px var(--space-3);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  color: var(--c-text-muted);
}
.textdiff__chip--add { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.textdiff__chip--del { color: #7f1d1d; background: #fee2e2; border-color: #fecaca; }

.textdiff__output {
  margin: 0;
  padding: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  max-height: 520px;
  overflow: auto;
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.textdiff__line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 0 var(--space-3);
}
.textdiff__line--add { background: #dcfce7; }
.textdiff__line--del { background: #fee2e2; }
.textdiff__prefix {
  flex: 0 0 1em;
  color: var(--c-text-muted);
  user-select: none;
}
.textdiff__text { flex: 1; min-width: 0; }

.textdiff__w { padding: 0 1px; }
.textdiff__w--add { background: #dcfce7; color: #166534; border-radius: 2px; }
.textdiff__w--del { background: #fee2e2; color: #7f1d1d; text-decoration: line-through; border-radius: 2px; }

.textdiff__hint {
  margin-top: var(--space-3);
  color: var(--c-text-muted);
  font-size: 0.875rem;
}

/* ------- JSON formatter ----------------------------------------- */

.jsonfmt__mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--c-border);
}
.jsonfmt__tab {
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  background: transparent;
  color: var(--c-text-muted);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.jsonfmt__tab:hover { color: var(--c-text); background: var(--c-surface-2); }
.jsonfmt__tab[aria-selected="true"] {
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border-color: var(--c-accent-soft);
}
.jsonfmt__soon {
  padding: 2px var(--space-2);
  font-size: 0.75rem;
  color: var(--c-text-muted);
  background: var(--c-surface-2);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius-sm);
}

.jsonfmt__panes {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: var(--space-4);
}

.jsonfmt__pane {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.jsonfmt__pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.jsonfmt__pane-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.jsonfmt__pane-head--b { margin-top: var(--space-3); }
.jsonfmt__size {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}

.jsonfmt__textarea {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 220px;
}

.jsonfmt__output {
  min-height: 220px;
  padding: var(--space-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  max-height: 520px;
  overflow: auto;
}
.jsonfmt__output:empty { display: none; }

.jsonfmt__pre {
  margin: 0;
  white-space: pre;
  word-break: normal;
}

.jsonfmt__hint {
  color: var(--c-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.jsonfmt__error {
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: ui-monospace, "Consolas", "Menlo", monospace;
}

.jsonfmt__controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.jsonfmt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.jsonfmt__options { margin-bottom: 0; gap: var(--space-4); align-items: center; }

/* Tree ---------------------------------------------------------- */

.jfree { font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace; font-size: 0.875rem; }
.jfree__line { padding: 1px 0; }
.jfree__children { padding-left: var(--space-4); border-left: 1px dashed var(--c-border); margin-left: 6px; }
.jfree__toggle {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.jfree__toggle:hover { color: var(--c-accent); }
.jfree__chev { display: inline-block; width: 1em; color: var(--c-text-muted); }
.jfree__bracket { color: var(--c-text-muted); font-weight: 600; }
.jfree__count { color: var(--c-text-muted); }
.jfree__key { color: var(--c-text-muted); }
.jfree__val--string  { color: #047857; }
.jfree__val--number  { color: #0f766e; }
.jfree__val--boolean { color: #8b5cf6; font-weight: 500; }
.jfree__val--null    { color: var(--c-text-muted); font-style: italic; }

/* Diff ---------------------------------------------------------- */

.jsonfmt__diff-ok {
  margin: 0;
  padding: var(--space-3);
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
}
.jsonfmt__difflist { display: flex; flex-direction: column; gap: var(--space-2); padding: 0; margin: 0; }
.jsonfmt__diffrow {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
}
.jsonfmt__diffrow--add    { border-color: #bbf7d0; background: #f0fdf4; }
.jsonfmt__diffrow--remove { border-color: #fecaca; background: #fef2f2; }
.jsonfmt__diffrow--replace{ border-color: #fde68a; background: #fffbeb; }

.jsonfmt__diffbadge {
  display: inline-block;
  padding: 1px var(--space-2);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius-sm);
  margin-right: var(--space-2);
}
.jsonfmt__diffrow--add    .jsonfmt__diffbadge { color: #14532d; background: #bbf7d0; }
.jsonfmt__diffrow--remove .jsonfmt__diffbadge { color: #7f1d1d; background: #fecaca; }
.jsonfmt__diffrow--replace .jsonfmt__diffbadge { color: #78350f; background: #fde68a; }

.jsonfmt__diffpath {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.8125rem;
  color: var(--c-text);
}
.jsonfmt__diffvals {
  margin-top: var(--space-2);
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  white-space: pre;
}

/* ------- QR code generator -------------------------------------- */

.qrgen__form { margin-bottom: var(--space-5); }
.qrgen__input {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.9375rem;
  resize: vertical;
  min-height: 72px;
}
.qrgen__opts .field { min-width: 140px; }
.qrgen__opts input[type="color"] {
  padding: 4px;
  height: 40px;
  cursor: pointer;
}

.qrgen__output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.qrgen__canvas {
  display: inline-flex;
  padding: var(--space-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.qrgen__canvas:empty { display: none; }
.qrgen__canvas svg { display: block; max-width: 100%; height: auto; }

.qrgen__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}

.qrgen__error {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.qrgen__hint {
  color: var(--c-text-muted);
  font-size: 0.875rem;
  text-align: center;
  margin: 0;
}

/* ------- Microphone / Camera status block ---------------------- */

.mictest__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 0.875rem;
  margin-bottom: var(--space-4);
}
.mictest__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c-border-strong);
}
.mictest__status[data-state="active"] .mictest__dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
.mictest__status[data-state="starting"] .mictest__dot { background: #f59e0b; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.mictest__device { color: var(--c-text-muted); font-size: 0.8125rem; }

.mictest__meter-wrap {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.mictest__meter-label, .mictest__meter-peak {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}
.mictest__meter {
  height: 10px;
  background: var(--c-border);
  border-radius: 999px;
  overflow: hidden;
}
.mictest__meter-fill {
  height: 100%;
  width: 0%;
  background: #22c55e;
  transition: width 60ms linear, background-color 120ms;
}
.mictest__meter-fill[data-level="low"] { background: #22c55e; }
.mictest__meter-fill[data-level="mid"] { background: #eab308; }
.mictest__meter-fill[data-level="hot"] { background: #ef4444; }

.mictest__hint, .mictest__error {
  font-size: 0.9375rem;
  margin-bottom: var(--space-3);
}
.mictest__error {
  padding: var(--space-3);
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
}

/* ------- Camera test-specific ---------------------------------- */

.camtest__preview {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin: 0 auto var(--space-4);
  background: #0f172a;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}
.camtest__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}
.camtest__video:not([data-active]) { display: none; }
.camtest__placeholder[hidden] { display: none; }

.camtest__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--c-text-muted);
  font-size: 0.875rem;
}

/* ------- What is my IP ------------------------------------------ */

.ipcheck__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (max-width: 640px) {
  .ipcheck__grid { grid-template-columns: 1fr; }
}

.ipcheck__card {
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(180deg, var(--c-accent-soft) 0%, var(--c-surface) 140%);
  border: 1px solid var(--c-accent-soft);
  border-radius: var(--radius-md);
  text-align: center;
  transition: background-color 160ms, border-color 160ms;
}
.ipcheck__card[data-state="none"] {
  background: var(--c-surface-2);
  border-color: var(--c-border);
}
.ipcheck__label {
  margin: 0 0 var(--space-2);
  color: var(--c-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ipcheck__value {
  margin: 0 0 var(--space-3);
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--c-text);
  word-break: break-all;
  line-height: 1.3;
}
.ipcheck__card[data-state="none"] .ipcheck__value {
  color: var(--c-text-muted);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
}
.ipcheck__copy {
  min-width: 72px;
}
.ipcheck__hint {
  color: var(--c-text-muted);
  font-size: 0.875rem;
  margin: var(--space-3) 0 0;
}
.ipcheck__error {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: #fffbeb;
  color: #78350f;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.ipcheck__error code {
  padding: 1px 4px;
  font-size: 0.8125rem;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
}

/* ------- Browser diagnostic ------------------------------------- */

.diag__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  position: sticky;
  top: 0;
  z-index: 1;
}

.diag__section {
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}

.diag__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--c-border);
  padding-bottom: var(--space-2);
}
.diag__header h3 {
  font-size: 1rem;
  margin: 0;
}
.diag__note {
  color: var(--c-text-muted);
  font-size: 0.75rem;
  font-weight: 400;
  margin-left: var(--space-2);
}

.diag__summary {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}

.diag__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-2) var(--space-4);
  padding: 0;
  margin: 0;
  list-style: none;
}
.diag__item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
}
.diag__icon {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.diag__icon--ok   { background: #22c55e; }
.diag__icon--warn { background: #eab308; }
.diag__icon--no   { background: #cbd5e1; }
.diag__icon--neutral { background: var(--c-border-strong); }
.diag__name { color: var(--c-text); }
.diag__status { color: var(--c-text-muted); font-size: 0.8125rem; }

.diag__sub {
  margin: var(--space-3) 0 var(--space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.diag__note-block {
  color: var(--c-text-muted);
  font-size: 0.875rem;
  margin: 0 0 var(--space-3);
}

/* ------- Connection quality ------------------------------------- */

.connq__result {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.connq__big {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.connq__number {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.connq__unit {
  font-size: 1rem;
  color: var(--c-text-muted);
}

.connq__bar {
  height: 10px;
  background: var(--c-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-3);
}
.connq__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--c-accent);
  transition: width 300ms, background 120ms;
  border-radius: 999px;
}
.connq__bar-fill[data-level="fast"]     { background: #22c55e; }
.connq__bar-fill[data-level="mid"]      { background: #eab308; }
.connq__bar-fill[data-level="slow"]     { background: #f97316; }
.connq__bar-fill[data-level="verySlow"] { background: #dc2626; }

.connq__stats {
  font-size: 0.875rem;
  margin: 0;
}

.connq__browser {
  padding: var(--space-3) var(--space-4);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.connq__browser summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: var(--space-1) 0;
}
.connq__browser[open] summary {
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--c-border);
  padding-bottom: var(--space-2);
}
.connq__browser-note {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin: 0 0 var(--space-3);
}

/* ------- Ping / latency check ----------------------------------- */

.pingcheck__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
  padding: var(--space-3);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  font-size: 0.875rem;
}

.pingcheck__results {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.pingcheck__results:empty { display: none; }

.pingcheck__card {
  padding: var(--space-3) var(--space-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}

.pingcheck__card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.pingcheck__namewrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pingcheck__target {
  font-weight: 600;
  color: var(--c-text);
}

.pingcheck__verdict {
  display: inline-block;
  padding: 1px var(--space-2);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  color: var(--c-text-muted);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
}
.pingcheck__verdict--fast     { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.pingcheck__verdict--mid      { color: #713f12; background: #fef9c3; border-color: #fde68a; }
.pingcheck__verdict--slow     { color: #7c2d12; background: #ffedd5; border-color: #fed7aa; }
.pingcheck__verdict--verySlow { color: #7f1d1d; background: #fee2e2; border-color: #fecaca; }
.pingcheck__verdict--timeout  { color: #fff;    background: #dc2626; border-color: #b91c1c; }

.pingcheck__stats {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}

.pingcheck__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 44px;
}
.pingcheck__bar {
  flex: 1 1 0;
  min-height: 4px;
  background: var(--c-border-strong);
  border-radius: 2px;
  transition: height 120ms;
}
.pingcheck__bar--empty    { background: var(--c-border); }
.pingcheck__bar--fast     { background: #22c55e; }
.pingcheck__bar--mid      { background: #eab308; }
.pingcheck__bar--slow     { background: #f97316; }
.pingcheck__bar--verySlow { background: #dc2626; }
.pingcheck__bar--timeout  { background: #991b1b; }

/* Legend shown once results start coming in. */
.pingcheck__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--c-text-muted);
}
.pingcheck__legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.pingcheck__chip {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.pingcheck__chip--fast     { background: #22c55e; }
.pingcheck__chip--mid      { background: #eab308; }
.pingcheck__chip--slow     { background: #f97316; }
.pingcheck__chip--verySlow { background: #dc2626; }
.pingcheck__chip--timeout  { background: #991b1b; }

.pingcheck__note {
  color: var(--c-text-muted);
  font-size: 0.8125rem;
  margin: 0;
}
.pingcheck__note code {
  font-size: 0.8125rem;
  padding: 1px 4px;
  background: var(--c-surface-2);
  border-radius: 3px;
}

/* ------- DNS lookup --------------------------------------------- */

.dnslookup__form { margin-bottom: var(--space-4); }

.dnslookup__meta {
  padding: var(--space-2) var(--space-3);
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent-soft);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-size: 0.8125rem;
  margin-bottom: var(--space-3);
}

.dnslookup__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-3);
  font-size: 0.9375rem;
}
.dnslookup__th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
}
.dnslookup__td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
  word-break: break-all;
}
.dnslookup__table tbody tr:last-child .dnslookup__td { border-bottom: none; }
.dnslookup__td code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 0.875rem;
}
.dnslookup__td--num { color: var(--c-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.dnslookup__hint {
  color: var(--c-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.dnslookup__error {
  padding: var(--space-3);
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin: var(--space-3) 0 0;
}

/* ------- Responsive ---------------------------------------------- */

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .site-nav { gap: var(--space-3); }
  .hero { padding-top: var(--space-6); padding-bottom: var(--space-5); }
  .section { padding: var(--space-5) 0; }
}
