/* ==========================================================
   ReaperCloud — Scandinavian minimalist
   Warm paper background, charcoal ink, one muted accent.
   Hairline rules, generous whitespace, no shadows or gradients.
   ========================================================== */

:root {
  --paper:     #FAF9F6;
  --surface:   #FFFFFF;
  --ink:       #24241F;
  --ink-soft:  #6B6960;
  --ink-faint: #9A978D;
  --hairline:  #E6E3DB;
  --accent:    #6E7F72;   /* muted sage */
  --accent-dk: #55655A;
  --ok:        #5F7A66;
  --ok-bg:     #EDF1EE;
  --warn:      #B4703F;
  --warn-bg:   #F7EDE4;
  --bad:       #A24B45;
  --bad-bg:    #F5E5E4;
  --info-bg:   #EDEEEF;
  --radius:    4px;
  --measure:   940px;

  /* Colours for the dark hero, which stays dark in both colour schemes
     because it is a photograph, not a themed surface. These must NOT be
     redeclared in the dark-scheme block below — that was the bug: the light
     buttons over the hero took their text colour from --ink, --ink flips to
     near-white in dark mode, and the result was near-white text on a
     near-white button. Anything drawn over the hero uses these instead. */
  --over-dark:     #F4F2EC;   /* light fills and text on the hero */
  --over-dark-hi:  #FFFFFF;   /* their hover state */
  --on-light-fill: #24241F;   /* text sitting ON a light fill */

  /* Pills and flags set ~11px uppercase text on a tinted chip. At that size
     the ordinary --ok / --warn / --ink-faint inks fall to between 2.5:1 and
     4.1:1 against their own backgrounds, which is legible as a colour cue and
     not as words. These are the same hues pushed to 4.5:1, used only for chip
     text — the originals stay as they are for borders, rules and body copy,
     where they are already fine and are what gives the palette its softness. */
  --chip-ink:  #6F6C62;
  --chip-ok:   #5A7360;
  --chip-warn: #985F35;
  --chip-bad:  #A24B45;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono, pre { font-family: var(--mono); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--hairline);
  padding: 1.4rem 2rem;
  display: flex;
  /* Centre, not baseline. The nav holds a mix of links, a disclosure control
     and two pill buttons, whose boxes are all different heights; aligning the
     row on the first item's baseline left the Tools control sitting a few
     pixels low against Services and Contact. */
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.masthead-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* .nav-link and .menu-label must resolve to identical boxes or the row looks
   crooked. Both therefore state font-size, line-height and padding rather than
   inheriting any of them — a <label> and an <a> disagree about line-height by
   default, and the difference is exactly big enough to see. */
.nav-link {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding: 0.35rem 0;
}
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link.is-current { color: var(--ink); font-weight: 550; }

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.35rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--hairline);
}
.nav-btn {
  display: inline-block;
  padding: 0.42rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 550;
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav-btn:hover { text-decoration: none; }
.nav-btn-ghost {
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
}
.nav-btn-ghost:hover { color: var(--ink); border-color: var(--ink-faint); }
.nav-btn-solid {
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
}
.nav-btn-solid:hover { background: #000; border-color: #000; }

/* Over a dark hero the header inverts. */
.masthead-overlay .nav-link { color: rgba(244, 242, 236, 0.78); }
.masthead-overlay .nav-link:hover,
.masthead-overlay .nav-link.is-current { color: #FFF; }
.masthead-overlay .nav-auth { border-left-color: rgba(244, 242, 236, 0.25); }
.masthead-overlay .nav-btn-ghost {
  color: rgba(244, 242, 236, 0.85);
  border-color: rgba(244, 242, 236, 0.35);
}
.masthead-overlay .nav-btn-ghost:hover { color: #FFF; border-color: #FFF; }
.masthead-overlay .nav-btn-solid {
  color: var(--on-light-fill);
  background: var(--over-dark);
  border-color: var(--over-dark);
}
.masthead-overlay .nav-btn-solid:hover {
  color: var(--on-light-fill);
  background: var(--over-dark-hi);
  border-color: var(--over-dark-hi);
}

/* ---------- Tools dropdown ----------
   Opens on hover where hover exists, and on a tap or a keypress everywhere,
   via a hidden checkbox.

   The previous version relied on :hover plus :focus-within, and was unusable
   on an iPad: there is no hover on touch, and Safari does not give a <button>
   focus when you tap it, so neither selector ever fired and the menu simply
   could not be opened. A checkbox is the one thing a tap reliably toggles
   without JavaScript, which is the same reason the mobile burger uses one.

   The control is a <label>, so the checkbox stays the focusable element and
   Space still works for keyboard users. */
.menu { position: relative; }

.menu-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tools-open:checked ~ .menu-label { color: var(--ink); }
@media (hover: hover) {
  .menu:hover .menu-label { color: var(--ink); }
}

/* The checkbox is off-screen, so the focus ring has to be drawn on the label
   it controls or keyboard users lose their place entirely. */
.tools-open:focus-visible ~ .menu-label {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Tapping anywhere else closes the menu. Only present while it is open. */
.menu-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;          /* under the panel at 40, over everything else */
  cursor: default;
}
.tools-open:checked ~ .menu-scrim { display: block; }

.menu-caret {
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.15s ease;
}
.tools-open:checked ~ .menu-label .menu-caret { transform: rotate(180deg); }
@media (hover: hover) {
  .menu:hover .menu-caret { transform: rotate(180deg); }
}

.menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 40;
  min-width: 17rem;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(36, 36, 31, 0.07);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}
/* The checked state is the path that works everywhere — touch, mouse and
   keyboard alike. Hover below is a convenience on top of it, not the
   mechanism. */
.tools-open:checked ~ .menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (hover: hover) {
  .menu:hover .menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* A small bridge so the pointer can cross the gap without the menu closing. */
.menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 0.6rem;
}

.menu-panel a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.menu-panel a:hover,
.menu-panel a:focus-visible {
  background: var(--paper);
  text-decoration: none;
  outline: none;
}
.menu-panel a strong { display: block; font-size: 0.9rem; font-weight: 550; }
.menu-panel a span   { display: block; margin-top: 0.05rem; font-size: 0.78rem; color: var(--ink-faint); }
.menu-panel a.is-current { background: var(--paper); }
.menu-panel a.is-current strong { color: var(--accent-dk); }

main { flex: 1; width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 2rem; }

/* ---------- hero ---------- */
.hero { padding: 5rem 0 3.5rem; text-align: center; }
.hero-compact { padding: 3rem 0 2.25rem; }

h1 {
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.lede {
  margin: 0.9rem auto 0;
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.lookup {
  display: flex;
  gap: 0.6rem;
  max-width: 32rem;
  margin: 2.25rem auto 0;
}
.lookup input {
  flex: 1;
  padding: 0.8rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.lookup input::placeholder { color: var(--ink-faint); }
.lookup input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(110, 127, 114, 0.16);
}
.lookup button {
  padding: 0.8rem 1.5rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}
.lookup button:hover { background: #000; }

.examples { margin-top: 1.1rem; font-size: 0.88rem; color: var(--ink-faint); }
.examples a { color: var(--ink-soft); }

/* ---------- panels ---------- */
.panel { padding-bottom: 3.5rem; }

h3 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin: 2.5rem 0 0.9rem;
}
.section-note { font-size: 0.85rem; color: var(--ink-faint); margin: -0.4rem 0 0.9rem; }

/* ---------- status banner ---------- */
.banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--hairline);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--surface);
}
.banner h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.banner-sub { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.2rem; }
.banner-sub code { font-size: 0.85rem; color: var(--ink-soft); }
.banner .stamp { font-size: 0.76rem; color: var(--ink-faint); white-space: nowrap; }

.banner.ok   { border-left-color: var(--ok);   background: var(--ok-bg); }
.banner.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.banner.bad  { border-left-color: var(--bad);  background: var(--bad-bg); }
.banner.ok h2   { color: var(--ok); }
.banner.warn h2 { color: var(--warn); }
.banner.bad h2  { color: var(--bad); }

.inherit-note {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px dashed var(--hairline);
  border-radius: var(--radius);
}

/* ---------- summary cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  margin-top: 2rem;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.card { background: var(--surface); padding: 1.15rem 1.3rem; }
.card-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.card-value {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.01em;
}
.card-value.muted { color: var(--ink-faint); font-weight: 400; }

/* ---------- raw record ---------- */
.record {
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- findings ---------- */
.findings { list-style: none; display: flex; flex-direction: column; gap: 1px;
            background: var(--hairline); border: 1px solid var(--hairline);
            border-radius: var(--radius); overflow: hidden; }
.findings li {
  background: var(--surface);
  padding: 0.95rem 1.2rem 0.95rem 1.5rem;
  border-left: 3px solid transparent;
}
.findings li strong { display: block; font-size: 0.94rem; font-weight: 600; }
.findings li span   { display: block; margin-top: 0.2rem; font-size: 0.89rem; color: var(--ink-soft); }
.findings li.bad  { border-left-color: var(--bad); }
.findings li.warn { border-left-color: var(--warn); }
.findings li.ok   { border-left-color: var(--ok); }
.findings li.info { border-left-color: var(--ink-faint); }
.findings li.bad strong  { color: var(--bad); }
.findings li.warn strong { color: var(--warn); }
.findings li.ok strong   { color: var(--ok); }

/* ---------- tag table ---------- */
.tags {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.tags th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink-faint);
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--hairline);
}
.tags td { padding: 0.85rem 1rem; font-size: 0.9rem; vertical-align: top; }
.tags tbody tr + tr td { border-top: 1px solid var(--hairline); }
.tags tr.is-default td { color: var(--ink-faint); }
.tags .nowrap { white-space: nowrap; }
.tags .break { word-break: break-word; max-width: 15rem; }
.row-label { display: block; font-size: 0.9rem; font-weight: 600; }
.row-desc  { display: block; margin-top: 0.15rem; font-size: 0.85rem; color: var(--ink-soft); }

.tag-flag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.02rem 0.4rem;
  font-family: var(--font);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--chip-ink);
  background: var(--info-bg);
  border-radius: 999px;
}
.tag-flag.bad { color: var(--chip-bad); background: var(--bad-bg); }

/* ---------- protocol section heading ---------- */
.protocol-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-bottom: 0.7rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.protocol {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.protocol-sub { font-size: 0.85rem; color: var(--ink-faint); }

/* ---------- SPF lookup budget ---------- */
.budget {
  height: 4px;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: var(--hairline);
  overflow: hidden;
}
.budget > i { display: block; height: 100%; background: var(--ok); }
.card-value.bad { color: var(--bad); }

.tag-flag.warn { color: var(--chip-warn); background: var(--warn-bg); }

/* ---------- SPF include tree ---------- */
.tree { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.tree li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--accent);
  border-radius: 0;
  padding: 0.7rem 0.95rem;
}
.tree-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tree-domain { font-size: 0.88rem; font-weight: 550; }
.tree-cost   { font-size: 0.76rem; color: var(--ink-faint); white-space: nowrap; }
.tree-record {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-soft);
  word-break: break-word;
}

/* ---------- BIMI page: secondary forms ---------- */
.or-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 32rem;
  margin: 1.75rem auto 1.25rem;
  color: var(--ink-faint);
  font-size: 0.8rem;
}
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.selector-form { margin-top: 0.75rem; align-items: center; }
.selector-label {
  margin: 0;
  align-self: center;
  font-size: 0.82rem;
  color: var(--ink-faint);
  white-space: nowrap;
}
.selector-form input { max-width: 10rem; }
.lookup button.ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
}
.lookup button.ghost:hover { background: var(--surface); color: var(--ink); }

/* ---------- DNS page: service chips ---------- */
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chips li {
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  cursor: default;
}

.type-tag {
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--chip-ink);
  background: var(--info-bg);
  border-radius: 3px;
  vertical-align: 1px;
}

.cross-links {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- blacklist results ---------- */
.bl-group {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.bl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.bl-target { font-size: 0.95rem; font-weight: 550; }
.bl-source {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.bl-table { border: none; border-radius: 0; }
.bl-table th { border-bottom: 1px solid var(--hairline); }
.bl-clean {
  padding: 0.7rem 1.1rem;
  font-size: 0.83rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--hairline);
}
.bl-group .row-desc + .row-desc { margin-top: 0.2rem; }

/* ---------- validate page ---------- */
.mailto-card {
  max-width: 32rem;
  margin: 2.25rem auto 0;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  text-align: center;
}
.mailto-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.mailto-address {
  display: block;
  margin: 0.5rem 0 0.6rem;
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 550;
  color: var(--ink);
  letter-spacing: -0.01em;
  word-break: break-all;
}
.mailto-address:hover { color: var(--accent-dk); }
.mailto-hint { display: block; font-size: 0.85rem; color: var(--ink-soft); }

.prose {
  max-width: 42rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.prose em { color: var(--ink); font-style: normal; font-weight: 550; }

/* ---------- speed test ---------- */
.btn-primary {
  margin-top: 2rem;
  padding: 0.85rem 2.25rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 550;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-primary:disabled { opacity: 0.55; cursor: default; }

.st-stage {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.st-meter {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.st-bar-track {
  flex: 1;
  height: 4px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}
.st-bar-track > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s linear;
}
.st-live {
  min-width: 6.5rem;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

#st-results .card-value { font-variant-numeric: tabular-nums; }

/* ==========================================================
   Landing page
   ========================================================== */
.landing main { max-width: var(--measure); }

/* Masthead sits over the hero, so it needs light text there. */
.masthead-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  border-bottom: none;
  max-width: none;
}
.masthead-overlay .brand { color: #F4F2EC; }
.masthead-overlay .brand span { color: #9FB3A5; }
.masthead-overlay .menu-label { color: rgba(244, 242, 236, 0.78); }
.masthead-overlay .menu:hover .menu-label,
.masthead-overlay .tools-open:checked ~ .menu-label { color: var(--over-dark-hi); }

.landing-hero {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #1B2420;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;         /* clip the oversized video frame */
}

.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  z-index: 1;
  opacity: 1;
  transition: opacity 1.1s ease;
}

/* Aspect ratio of the source video. Change this one value if the clip is not
   16:9, otherwise the player letterboxes inside the frame. */
.landing-hero { --hero-video-aspect: 16 / 9; }

/* An iframe cannot use object-fit, so it has to be sized to cover manually.
   The reference must be the hero block, not the viewport — sizing in vh/vw
   leaves gaps whenever the hero is not exactly viewport-sized, which is the
   normal case here since the hero is 88vh and grows with its content.
   width/height auto plus both minimums at 100% makes the browser pick
   whichever dimension needs to grow, which is precisely "cover". */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  aspect-ratio: var(--hero-video-aspect);
  border: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  pointer-events: none;
}

/* Fallback for browsers without aspect-ratio: over-size generously so the
   frame always covers. Crops more than necessary, but never shows a gap. */
@supports not (aspect-ratio: 16 / 9) {
  .hero-video {
    width: 300%;
    height: 300%;
    min-width: 0;
    min-height: 0;
  }
}

.hero-media.is-playing .hero-poster { opacity: 0; }
.hero-media.is-playing .hero-video  { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to right, rgba(20, 26, 23, 0.88) 0%, rgba(20, 26, 23, 0.62) 48%, rgba(20, 26, 23, 0.38) 100%),
    linear-gradient(to top, rgba(20, 26, 23, 0.72) 0%, rgba(20, 26, 23, 0) 55%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  color: #F4F2EC;
}
.hero-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9FB3A5;
  margin-bottom: 1.1rem;
}
.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #FFF;
}
.hero-lede {
  max-width: 34rem;
  margin-top: 1.35rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(244, 242, 236, 0.82);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.hero-note {
  margin-top: 1.15rem;
  font-size: 0.82rem;
  color: rgba(244, 242, 236, 0.55);
}

.cta {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 550;
  border-radius: var(--radius);
  text-decoration: none;
}
.cta:hover { text-decoration: none; }
.cta-primary {
  color: var(--on-light-fill);
  background: var(--over-dark);
  border: 1px solid var(--over-dark);
}
.cta-primary:hover { background: var(--over-dark-hi); border-color: var(--over-dark-hi); }
.cta-ghost {
  color: var(--over-dark);
  background: transparent;
  border: 1px solid rgba(244, 242, 236, 0.42);
}
.cta-ghost:hover { border-color: #F4F2EC; background: rgba(244, 242, 236, 0.08); }

/* Inside a light panel the primary CTA needs to invert. */
.cta-band .cta-primary {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.cta-band .cta-primary:hover { background: #000; border-color: #000; }

.prose-lead { font-size: 1.02rem; color: var(--ink); margin-bottom: 1rem; }
.service-grid { margin-top: 2.25rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.tool-card {
  display: block;
  padding: 1.35rem 1.4rem;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.tool-card:hover { background: var(--paper); text-decoration: none; }
.tool-card strong { display: block; font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em; }
.tool-card span   { display: block; margin-top: 0.4rem; font-size: 0.87rem; color: var(--ink-soft); }

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem 2.25rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.cta-band-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.cta-band-text  { margin-top: 0.4rem; font-size: 0.92rem; color: var(--ink-soft); max-width: 34rem; }

@media (prefers-reduced-motion: reduce) {
  .hero-poster, .hero-video, .menu-panel, .menu-caret { transition: none; }
}

/* ==========================================================
   Services, contact and account pages
   ========================================================== */
.info-banner { border-left-color: var(--ink-faint); background: var(--info-bg); }
.info-banner h2 { color: var(--ink); font-size: 1rem; }

.service-list { display: flex; flex-direction: column; gap: 1px;
                background: var(--hairline); border: 1px solid var(--hairline);
                border-radius: var(--radius); overflow: hidden; }
.service-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 2rem;
  padding: 1.6rem 1.5rem;
  background: var(--surface);
}
.service-name    { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.service-tagline { margin-top: 0.3rem; font-size: 0.85rem; color: var(--accent-dk); }
.service-item-body p { font-size: 0.92rem; color: var(--ink-soft); }
.service-points {
  list-style: none;
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.service-points li {
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

.cta-band-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cta-outline {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--hairline);
}
.cta-outline:hover { border-color: var(--ink-faint); background: var(--paper); }

/* ---------- forms shared by contact and account ---------- */
.stacked-form { max-width: 30rem; }
.stacked-form .field { margin-bottom: 1rem; }
.stacked-form label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.stacked-form input[type=text],
.stacked-form input[type=email],
.stacked-form input[type=password],
.stacked-form select,
.stacked-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.stacked-form textarea { resize: vertical; }
.stacked-form input:disabled,
.stacked-form select:disabled,
.stacked-form textarea:disabled {
  background: var(--paper);
  color: var(--ink-faint);
  cursor: not-allowed;
}
.stacked-form .btn-primary { margin-top: 0.5rem; }
.field-hint { display: block; margin-top: 0.3rem; font-size: 0.78rem; color: var(--ink-faint); }
.form-note  { margin-top: 0.75rem; font-size: 0.82rem; color: var(--ink-faint); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.check-row input { margin-top: 0.2rem; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
}

/* ---------- account page ---------- */
.auth-switch {
  display: inline-flex;
  gap: 1px;
  margin-bottom: 1.75rem;
  padding: 2px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.auth-tab {
  padding: 0.45rem 1.4rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: var(--surface);
  border-radius: 3px;
}
.auth-tab:hover { text-decoration: none; color: var(--ink); }
.auth-tab.is-active { background: var(--ink); color: var(--paper); font-weight: 550; }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.75rem;
}
.auth-card {
  padding: 1.6rem 1.6rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.auth-card.is-primary { border-color: var(--accent); }
.auth-card .protocol-head { margin-top: 0; }
.auth-card .stacked-form { max-width: none; }

/* ---------- explainer ---------- */
.explainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem 2.5rem;
}
.explainer-grid h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.explainer-grid p  { font-size: 0.89rem; color: var(--ink-soft); }
.explainer-grid code { font-size: 0.85rem; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ---------- responsive ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #1B1B18;
    --surface:   #222220;
    --ink:       #ECEAE3;
    --ink-soft:  #A8A59C;
    --ink-faint: #7C7970;
    --hairline:  #34342F;
    --accent:    #8FA394;
    --accent-dk: #A3B5A8;
    --ok:        #8FAE96; --ok-bg:   #232B25;
    --warn:      #D3A276; --warn-bg: #2E261E;
    --bad:       #D08A85; --bad-bg:  #2E2221;
    --info-bg:   #2A2A27;

    /* On the dark chips the accent inks already clear 5.6:1, so only the
       neutral one needs lifting. */
    --chip-ink:  #939087;
    --chip-ok:   #8FAE96;
    --chip-warn: #D3A276;
    --chip-bad:  #D08A85;
  }
  .lookup button { color: var(--paper); background: var(--ink); border-color: var(--ink); }
  .lookup button:hover { background: #fff; }
}

/* ==========================================================
   RESPONSIVE
   ----------------------------------------------------------
   Ladder, widest first:
     1024px  narrow desktop — tighten gutters
      860px  tablet / phone — nav collapses to a drawer
      640px  phone          — single column throughout
      420px  small phone    — tightest spacing
   Plus capability queries for touch, which matter more than
   width: a tablet is wide but has no hover.
   ========================================================== */

/* ---------- burger and backdrop, both inert until the nav collapses ---------- */
.nav-scrim { display: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;              /* 44px is the minimum comfortable tap target */
  height: 44px;
  margin: -0.5rem -0.5rem -0.5rem 0;
  padding: 0 0.5rem;
  cursor: pointer;
  align-items: flex-end;
}
.nav-burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.masthead-overlay .nav-burger span { background: #F4F2EC; }

/* Focus ring for keyboard users, since the checkbox itself is off-screen. */
.nav-open:focus-visible ~ .nav-burger {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* Burger morphs into a close cross when open. */
.nav-open:checked ~ .nav-burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-open:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
.nav-open:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ==========================================================
   1024px — narrow desktop
   ========================================================== */
@media (max-width: 1024px) {
  main { padding-left: 1.5rem; padding-right: 1.5rem; }
  .masthead { padding-left: 1.5rem; padding-right: 1.5rem; }
  .masthead-overlay { padding-left: 1.5rem; padding-right: 1.5rem; }
  .hero-content { padding-left: 1.5rem; padding-right: 1.5rem; }
  .masthead-nav { gap: 1.1rem; }
}

/* ==========================================================
   860px — nav collapses to a drawer
   ========================================================== */
@media (max-width: 860px) {

  /* ---------- header collapses to brand + burger ---------- */
  .masthead {
    position: relative;
    z-index: 70;
    align-items: center;
    padding: 0.85rem 1.25rem;
  }
  .masthead-overlay { padding: 0.85rem 1.25rem; }

  .nav-burger { display: flex; position: relative; z-index: 90; }

  /* When the panel is open the burger sits above it, so its bars must be
     dark against the panel even on the landing page's light-on-dark header. */
  .nav-open:checked ~ .nav-burger span { background: var(--ink); }

  /* ---------- backdrop ---------- */
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(20, 26, 23, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s;
    cursor: pointer;
  }
  .nav-open:checked ~ .nav-scrim { opacity: 1; visibility: visible; }

  /* ---------- the panel itself ---------- */
  .masthead-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 85;

    display: flex;                    /* stays flex; movement is by transform */
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    width: min(84vw, 330px);
    height: 100vh;
    height: 100dvh;                   /* avoids the mobile toolbar gap */
    padding: 5rem 1.25rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    background: var(--surface);
    border-left: 1px solid var(--hairline);
    box-shadow: -12px 0 32px rgba(20, 26, 23, 0.12);

    transform: translateX(100%);
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
  }
  .nav-open:checked ~ .masthead-nav {
    transform: translateX(0);
    visibility: visible;
  }

  /* The panel is always a light surface, so the landing page's inverted
     header colours must not leak into it. */
  .masthead-overlay .masthead-nav { border-left-color: var(--hairline); }
  .masthead-overlay .masthead-nav .nav-link { color: var(--ink-soft); }
  .masthead-overlay .masthead-nav .nav-link.is-current { color: var(--ink); }
  .masthead-overlay .masthead-nav .menu-label { color: var(--ink-faint); }
  .masthead-overlay .masthead-nav .menu-panel a { color: var(--ink); }
  .masthead-overlay .masthead-nav .menu-panel a span { color: var(--ink-faint); }
  .masthead-overlay .nav-auth { border-left: none; }

  /* ---------- panel contents ---------- */
  .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.5rem 0.25rem;
    font-size: 1.05rem;
    color: var(--ink);
    border-bottom: 1px solid var(--hairline);
  }
  .nav-link.is-current { font-weight: 600; color: var(--accent-dk); }

  /* Tools becomes a labelled group rather than a dropdown: there is nowhere
     to float a panel inside a panel, and no hover to open it with. */
  .menu { position: static; }
  .menu::after { display: none; }
  .menu-label {
    width: 100%;
    justify-content: flex-start;
    min-height: 48px;
    padding: 0.5rem 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    cursor: default;
    border-bottom: 1px solid var(--hairline);
  }
  .menu-caret { display: none; }

  /* In the drawer the panel is always open, so the disclosure control becomes
     a plain section heading. The checkbox is still in the DOM, so the label
     has to stop toggling it — otherwise tapping the heading would drop a
     full-screen scrim over a menu that is already showing. */
  .menu-label { pointer-events: none; }
  .menu-scrim { display: none !important; }

  .menu-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    min-width: 0;
    padding: 0.35rem 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .menu-panel a {
    min-height: 48px;
    padding: 0.6rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .menu-panel a strong { font-size: 0.98rem; }
  .menu-panel a span   { font-size: 0.78rem; }

  .nav-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 1.25rem 0 0;
    padding-left: 0;
    border-left: none;
  }
  .nav-btn {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
  }
  .masthead-overlay .nav-btn-ghost { color: var(--ink-soft); border-color: var(--hairline); }
  .masthead-overlay .nav-btn-solid { color: var(--paper); background: var(--ink); border-color: var(--ink); }

  /* ---------- layouts that assume two columns ---------- */
  .grid-2,
  .contact-layout,
  .auth-layout,
  .service-item { grid-template-columns: 1fr; }
  .contact-layout { gap: 2.5rem; }
  .service-item   { gap: 1rem; }

  .explainer-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1.75rem; }
  .tool-grid      { grid-template-columns: 1fr; }
}

/* Stop the page behind the panel from scrolling while it is open.
   :has() is widely supported; where it is not, the page simply scrolls. */
@media (max-width: 860px) {
  body:has(.nav-open:checked) { overflow: hidden; }
}

/* No transitions for visitors who ask for reduced motion. */
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .masthead-nav, .nav-scrim { transition: none; }
}

/* ==========================================================
   640px — phone
   ========================================================== */
@media (max-width: 640px) {
  main { padding-left: 1.1rem; padding-right: 1.1rem; }

  h1 { font-size: 1.65rem; }
  h2 { font-size: 1rem; }
  .lede { font-size: 0.95rem; }

  .hero         { padding: 2.5rem 0 2rem; }
  .hero-compact { padding: 2rem 0 1.5rem; }
  .panel        { padding-bottom: 2.5rem; }

  /* Search forms stack; the button goes full width so it is easy to hit. */
  .lookup { flex-direction: column; gap: 0.5rem; margin-top: 1.5rem; }
  .lookup button { width: 100%; padding: 0.9rem 1rem; }
  .selector-form { flex-direction: row; flex-wrap: wrap; }
  .selector-form input { max-width: none; flex: 1; }

  /* Cards: two up rather than four, so values stay readable. */
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 0.9rem 1rem; }
  .card-value { font-size: 0.95rem; }

  /* ---- Tables become stacked rows ----
     Every table on the site is label/value pairs or short rows, so on a phone
     each cell becomes its own line. Without this they force the page sideways:
     a DKIM signature or an IPv6 reverse name is far wider than any phone. */
  .tags { display: block; border: none; background: transparent; }
  .tags thead { display: none; }
  .tags tbody { display: block; }
  .tags tr {
    display: block;
    margin-bottom: 0.6rem;
    padding: 0.75rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
  }
  .tags tbody tr + tr td { border-top: none; }
  .tags td {
    display: block;
    padding: 0.15rem 0;
    border: none;
  }
  .tags td.num { text-align: left; }

  /* Long values must wrap instead of scrolling the page. */
  .tags .nowrap,
  .bl-head .nowrap,
  .nowrap { white-space: normal; }
  .tags .break,
  .mono.break {
    max-width: none;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .bl-group { border-radius: var(--radius); }
  .bl-table tr { margin: 0; border-radius: 0; border-left: none; border-right: none; }
  .bl-clean { padding: 0.7rem 0.9rem; }

  .record { font-size: 0.78rem; padding: 0.9rem 1rem; }
  .findings li { padding: 0.85rem 1rem; }
  .findings li span { font-size: 0.86rem; }

  /* Landing */
  .landing-hero { min-height: 78vh; min-height: 78svh; }
  .hero-content { padding: 5.5rem 1.1rem 2.75rem; }
  .hero-title   { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .hero-lede    { font-size: 0.97rem; }
  .hero-actions { gap: 0.6rem; }
  .cta { flex: 1; text-align: center; padding: 0.85rem 1rem; }

  .cta-band { flex-direction: column; align-items: stretch; padding: 1.5rem 1.25rem; }
  .cta-band-actions { width: 100%; }
  .cta-band-actions .cta { flex: 1; }

  .service-item { padding: 1.25rem 1.1rem; }
  .service-points li { font-size: 0.75rem; }

  .auth-switch { display: flex; width: 100%; }
  .auth-tab { flex: 1; text-align: center; padding: 0.7rem 1rem; }
  .auth-card { padding: 1.25rem 1.1rem 1.1rem; }

  .st-meter { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .st-live  { text-align: left; min-width: 0; }

  .mailto-address { font-size: 1.05rem; }
  .foot { flex-direction: column; gap: 0.3rem; padding: 1.25rem; }
}

/* ==========================================================
   420px — small phone
   ========================================================== */
@media (max-width: 420px) {
  main { padding-left: 0.9rem; padding-right: 0.9rem; }
  .masthead, .masthead-overlay { padding-left: 0.9rem; padding-right: 0.9rem; }

  h1 { font-size: 1.5rem; }
  .brand { font-size: 1.05rem; }

  /* One card per row: two columns of ~150px truncate the longer values. */
  .cards { grid-template-columns: 1fr; }

  .hero-content { padding-left: 0.9rem; padding-right: 0.9rem; }
  .hero-actions { flex-direction: column; }
  .cta { width: 100%; }
  .nav-auth { flex-direction: column; }
  .nav-btn { width: 100%; }

  .record { font-size: 0.72rem; }
  .tags tr { padding: 0.65rem 0.75rem; }
}

/* ==========================================================
   Touch and input capability
   ========================================================== */

/* iOS Safari zooms the whole page when a focused input has a font-size below
   16px. Every text input therefore sits at exactly 16px on touch devices. */
@media (hover: none) and (pointer: coarse) {
  .lookup input,
  .stacked-form input[type=text],
  .stacked-form input[type=email],
  .stacked-form input[type=password],
  .stacked-form select,
  .stacked-form textarea {
    font-size: 16px;
  }

  /* Comfortable tap targets throughout. */
  .lookup button,
  .btn-primary,
  .nav-btn,
  .cta,
  .auth-tab { min-height: 44px; }

  .menu-panel a,
  .tool-card,
  .nav-link { min-height: 44px; }

  /* No hover states to inherit on touch — they stick after a tap otherwise. */
  .tool-card:hover,
  .menu-panel a:hover { background: var(--surface); }
}

/* ==========================================================
   Overflow safety net
   ----------------------------------------------------------
   This site displays DNS records, DKIM signatures, user agents and IPv6
   reverse names — unbroken strings hundreds of characters long. Any one of
   them escaping its container scrolls the whole page sideways, which is the
   single most common way a layout "looks broken" on a phone.
   ========================================================== */
html, body { max-width: 100%; overflow-x: hidden; }

pre, code, .mono, .record, .tree-record, .hero-lede, .prose, td, .findings li span {
  overflow-wrap: anywhere;
}
pre.record { white-space: pre-wrap; }

/* Grid and flex children default to min-width:auto, which lets long content
   push a track wider than its container. */
.cards, .tool-grid, .explainer-grid, .service-item,
.contact-layout, .auth-layout, .grid-2 { min-width: 0; }
.cards > *, .tool-grid > *, .explainer-grid > *, .service-item > *,
.contact-layout > *, .auth-layout > *, .grid-2 > * { min-width: 0; }

/* Print: drop the chrome, keep the findings. */
@media print {
  .masthead, .nav-burger, .foot, .lookup, .cta-band, .examples { display: none; }
  main { max-width: none; padding: 0; }
  .panel { padding-bottom: 1rem; }
  a { color: inherit; text-decoration: underline; }
}

/* ==========================================================
   Status pills
   ----------------------------------------------------------
   Used in every results table to carry a one-word verdict. These were being
   written by the pages before they were ever styled, so until now they
   rendered as bare text — visible, but with no colour to read at a glance.
   ========================================================== */
.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: var(--chip-ink);
  background: var(--info-bg);
  border-radius: 999px;
}
.pill.ok   { color: var(--chip-ok);   background: var(--ok-bg); }
.pill.warn { color: var(--chip-warn); background: var(--warn-bg); }
.pill.fail,
.pill.bad  { color: var(--chip-bad);  background: var(--bad-bg); }
.pill.info { color: var(--chip-ink);  background: var(--info-bg); }

.card-value.warn { color: var(--warn); }
.card-value.ok   { color: var(--ok); }

/* ==========================================================
   Disclosure blocks
   ----------------------------------------------------------
   "How do I find my headers", "less common tags", "paste it instead" — long
   help that most people do not need, folded away rather than cut, because the
   people who do need it need all of it.
   ========================================================== */
.how-to {
  margin: 1.1rem 0;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}
.how-to > summary {
  padding: 0.7rem 1rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.how-to > summary::-webkit-details-marker { display: none; }
.how-to > summary::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  flex: none;
  border-right: 1.5px solid var(--ink-faint);
  border-bottom: 1.5px solid var(--ink-faint);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.how-to[open] > summary::before { transform: rotate(45deg); }
.how-to > summary:hover { color: var(--ink); }
.how-to > *:not(summary) { margin: 0 1rem 1rem; }
.how-to > summary + * { margin-top: 0.2rem; }
.how-to h4 {
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0.9rem 1rem 0.25rem;
}
.how-to p, .how-to li { font-size: 0.86rem; color: var(--ink-soft); }
.how-to ol, .how-to ul { margin-left: 2.1rem; margin-right: 1rem; }

/* ==========================================================
   Paste and upload forms
   ========================================================== */
.headers-form,
.lookup-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 46rem;
  margin: 0 auto;
  text-align: left;
}
.headers-form textarea,
.lookup-stack textarea,
.how-to textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  resize: vertical;
}
.headers-form textarea:focus,
.lookup-stack textarea:focus,
.how-to textarea:focus { outline: none; border-color: var(--accent); }
.headers-form button,
.lookup-stack button {
  align-self: flex-start;
  padding: 0.7rem 1.6rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.headers-form button:hover,
.lookup-stack button:hover { background: #000; }

/* Two inputs and a button on one line — domain plus optional selector. */
.lookup-split input { min-width: 0; }
.lookup-split input:nth-of-type(2) { max-width: 12rem; }

.file-field {
  display: block;
  padding: 1.1rem;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.file-field:hover { border-color: var(--accent); }
.file-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 550;
  margin-bottom: 0.5rem;
}
.file-field input[type=file] { font-size: 0.85rem; max-width: 100%; }
.file-hint { display: block; margin-top: 0.5rem; font-size: 0.78rem; color: var(--ink-faint); }

/* ==========================================================
   Generator: tabs and question form
   ========================================================== */
.type-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-top: 1.6rem;
  padding: 1px;
  background: var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.type-tab {
  padding: 0.5rem 1.1rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-decoration: none;
  background: var(--surface);
}
.type-tab:hover { color: var(--ink); }
.type-tab.current { color: var(--paper); background: var(--ink); }

.build-form { max-width: 40rem; }
.build-form .field { margin-bottom: 1.1rem; }
.build-form label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.build-form input[type=text],
.build-form select,
.build-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.build-form textarea {
  font-family: var(--mono);
  font-size: 0.84rem;
  resize: vertical;
}
.build-form input:focus,
.build-form select:focus,
.build-form textarea:focus { outline: none; border-color: var(--accent); }
.build-form .field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}
.build-form .check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.build-form .check input { width: auto; margin: 0; }
.build-form button {
  padding: 0.7rem 1.6rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.build-form button:hover { background: #000; }

/* ==========================================================
   Unified report: per-tool score strip
   ========================================================== */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1px;
  margin: 1.5rem 0;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  min-width: 0;
}
.score-grid > * { min-width: 0; }
.score {
  display: block;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  border-left: 2px solid var(--hairline);
}
.score:hover { background: var(--paper); }
.score-name {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}
.score-value { display: block; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.score-note  { display: block; margin-top: 0.25rem; font-size: 0.8rem; color: var(--ink-soft); }
.score.ok   { border-left-color: var(--ok); }
.score.warn { border-left-color: var(--warn); }
.score.bad  { border-left-color: var(--bad); }
.score.skip { border-left-color: var(--hairline); }
.score.ok   .score-value { color: var(--ok); }
.score.warn .score-value { color: var(--warn); }
.score.bad  .score-value { color: var(--bad); }
.score.skip .score-value { color: var(--ink-faint); }

.grade {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.grade-letter {
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}
.grade-of { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- narrow screens ---------- */
@media (max-width: 720px) {
  .build-form .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lookup-split { flex-wrap: wrap; }
  .lookup-split input:nth-of-type(2) { max-width: none; }
  .headers-form button,
  .lookup-stack button { align-self: stretch; text-align: center; }
  .type-tabs { display: flex; width: 100%; }
  .type-tab { flex: 1 1 auto; text-align: center; }
  .grade-letter { font-size: 2.1rem; }
}

/* ==========================================================
   Grouped tools menu
   ----------------------------------------------------------
   Fourteen tools in one column is a scroll, not a menu. Three labelled
   groups across three columns keeps the whole set visible at once on
   desktop; on the mobile drawer they stack and the labels earn their place
   as section headings.
   ========================================================== */
.menu-panel-wide {
  display: grid;
  grid-template-columns: repeat(3, minmax(12.5rem, 1fr));
  gap: 0.25rem 1rem;
  min-width: 44rem;
  padding: 0.9rem 1rem 1rem;
}
.menu-group { display: flex; flex-direction: column; min-width: 0; }
.menu-group-name {
  padding: 0 0.55rem 0.4rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0.35rem;
}

/* The panel is right-aligned to the Tools button, so on a narrow desktop it
   can reach past the left edge of the viewport before the drawer takes over
   at 860px. Two columns buys back that space. */
@media (max-width: 1100px) {
  .menu-panel-wide {
    grid-template-columns: repeat(2, minmax(12rem, 1fr));
    min-width: 30rem;
  }
}

@media (max-width: 860px) {
  .menu-panel-wide {
    display: block;
    min-width: 0;
    padding: 0.35rem 0;
  }
  .menu-group + .menu-group { margin-top: 0.9rem; }
  .menu-group-name {
    padding: 0 0.5rem 0.35rem;
    font-size: 0.64rem;
  }
}

/* ==========================================================
   Classes the markup was already using
   ----------------------------------------------------------
   These were written into the pages before they were ever styled. Each one
   was rendering as an unstyled block — visible, so nothing looked obviously
   broken, which is exactly why they went unnoticed. A cross-check of every
   class used against every class defined turned them up.
   ========================================================== */

/* Second line of the footer — meant to read as a quiet aside, not as a peer
   of the brand line beside it. */
.foot-note { color: var(--ink-faint); opacity: 0.85; text-align: right; }

/* The "how this works" panel at the foot of each tool page. It follows the
   results, so it needs to read as background material rather than as more
   findings. */
.explainer {
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}
.explainer > h3 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}

/* Contact page: form on the left, the details beside it. */
.contact-form-col   { min-width: 0; }
.contact-detail-col { min-width: 0; font-size: 0.9rem; color: var(--ink-soft); }
.contact-detail-col h3 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 1.6rem 0 0.4rem;
}
.contact-detail-col h3:first-child { margin-top: 0; }
.contact-detail-col p + h3 { margin-top: 1.6rem; }

/* Services page: the heading block of each service row. */
.service-item-head { min-width: 0; }
.service-item-head h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}
.service-item-head p { font-size: 0.88rem; color: var(--ink-faint); }

@media (max-width: 720px) {
  .foot-note { text-align: left; }
}

/* ==========================================================
   Verification gate
   ----------------------------------------------------------
   A button that reads as a link. Used where the action must be a POST — sign
   out, cancel a pending code — because a GET that changes state can be fired
   by any image tag on any other site.
   ========================================================== */
.linkish {
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}
.linkish:hover { color: var(--ink); border-bottom-color: var(--ink-faint); }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The code entry field. Monospace and widely tracked so a transcribed code can
   be checked character by character against the email. */
#code {
  font-family: var(--mono);
  font-size: 1.15rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  max-width: 14rem;
}
