/* Postbox Services APRF Monitor - dark brand theme, matching mx/bl/dmarc.
   #0A2540 / #1a1a2e / #00D4FF / #7C3AED - Syne + DM Sans + DM Mono (self-hosted). */

:root {
  --navy: #0A2540; --dark: #1a1a2e; --cyan: #00D4FF; --purple: #7C3AED;
  --pass: #34d399; --warn: #fbbf24; --fail: #f87171;
  --text: rgba(255, 255, 255, 0.85); --text-dim: rgba(255, 255, 255, 0.7);
  --card: rgba(255, 255, 255, 0.08); --card-hover: rgba(255, 255, 255, 0.12);
  --border: rgba(0, 212, 255, 0.2); --border-strong: rgba(0, 212, 255, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: linear-gradient(135deg, var(--navy) 0%, var(--dark) 100%) fixed;
  color: var(--text); min-height: 100vh; line-height: 1.6;
}
.grid-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px 40px; position: relative; z-index: 1; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 48px 0 8px; }
.hero-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cyan);
  border: 1px solid var(--border-strong); border-radius: 100px;
  padding: 5px 14px; margin-bottom: 22px; background: rgba(0,212,255,.06);
}
h1 {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(28px, 4vw, 42px); line-height: 1.12; color: #fff; letter-spacing: -.01em;
}
.grad-text {
  background: linear-gradient(90deg, #ffffff, var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { max-width: 620px; margin: 14px auto 0; color: rgba(255,255,255,.6); font-size: 17px; }

/* ---------- glass card ---------- */
.card {
  background: var(--card); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 32px; margin-top: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.card h2 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 22px; color: #fff; margin-bottom: 6px; }
.card p { color: var(--text-dim); }

/* ---------- signup form ---------- */
form label {
  display: block; margin: 0 0 18px; font-weight: 700; color: #fff; font-size: 14px;
}
form input[type=email], form input[type=text] {
  display: block; width: 100%; margin-top: 8px;
  background: rgba(255,255,255,.08); border: 2px solid var(--border-strong);
  border-radius: 12px; color: #fff; font-size: 16px; font-family: 'DM Mono', monospace;
  padding: 13px 16px; transition: border-color .2s, box-shadow .2s;
}
form input::placeholder { color: rgba(255,255,255,.4); font-family: 'DM Sans', sans-serif; }
form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0,212,255,.15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-primary {
  display: inline-block; background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff; border: none; border-radius: 12px; cursor: pointer;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px;
  padding: 14px 26px; box-shadow: 0 10px 30px rgba(0,212,255,.3);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(0,212,255,.5); }
/* Disabled = greyed, everywhere. The button is programmatically disabled on every
   post-click path (miss, malformed, rate-limited, success panels); this single rule
   makes all of them LOOK dead too, so no path needs its own inline greying. */
.btn-primary:disabled, .btn-primary[disabled] {
  opacity: .45; cursor: not-allowed;
  transform: none; box-shadow: none;
}
.btn-primary:disabled:hover { transform: none; box-shadow: none; }

/* ---------- result / DNS record ---------- */
#result { margin-top: 24px; }
#result h2 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 20px; color: #fff; margin-bottom: 8px; }
#result p { color: var(--text-dim); margin-bottom: 12px; }
.rec {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 18px;
  background: rgba(0,212,255,.06); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 16px 18px; margin: 14px 0;
}
.rec dt { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--cyan); align-self: center; }
.rec dd { margin: 0; }
code, .rec dd {
  font-family: 'DM Mono', monospace; font-size: 13px; color: #fff; word-break: break-all;
}
.callout {
  background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.3);
  border-radius: 12px; padding: 14px 16px; color: var(--text-dim); font-size: 14px;
}
.warn {
  background: rgba(251,191,36,.10); border: 1px solid rgba(251,191,36,.4);
  border-radius: 12px; padding: 14px 16px; color: #fde8b0; font-size: 14px; margin-bottom: 14px;
}
/* merge checkbox */
label.check {
  display: flex; align-items: flex-start; gap: 10px; font-weight: 400;
  color: var(--text-dim); font-size: 14px; margin: 4px 0 20px; cursor: pointer;
}
label.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cyan); flex-shrink: 0; }
label.check span { line-height: 1.5; }
.msg { font-size: 16px; color: #fff; }
.fine { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 16px; }

/* ---------- existing-record guidance + duplicate-records state ---------- */
.rec-line {
  font-family: 'DM Mono', monospace; font-size: 13px; color: #fff; line-height: 1.6;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 12px 14px; word-break: break-all; margin: 6px 0 10px;
}
.rec-line.ours { border-color: rgba(0, 212, 255, .5); }
.rec-line.merged { border-color: rgba(124, 58, 237, .55); }
.opt {
  border: 1px solid var(--border); border-left: 3px solid var(--cyan);
  border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: rgba(255, 255, 255, .03);
}
.opt.b { border-left-color: var(--purple); }
.opt h3 { font-family: 'Syne', sans-serif; font-size: 15px; color: #fff; margin: 0 0 4px; }
.opt .od { color: var(--text-dim); font-size: 14px; margin: 0 0 6px; }
.lbl-sm {
  display: block; font-family: 'DM Mono', monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 10px 0 2px;
}
.keep {
  display: inline-block; margin-top: 6px; font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 600; color: #c4b5fd; background: rgba(124, 58, 237, .12);
  border: 1px solid rgba(124, 58, 237, .4); border-radius: 6px; padding: 4px 8px;
}
.rule-note {
  font-size: 14px; color: var(--text-dim); margin: 16px 0 8px;
  padding-left: 14px; border-left: 2px solid var(--border-strong);
}
.checklink {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 16px;
  font-size: 14px; font-weight: 600; color: var(--cyan); text-decoration: none;
  border: 1px solid rgba(0, 212, 255, .35); border-radius: 9px; padding: 9px 13px;
}
.checklink:hover { background: rgba(0, 212, 255, .08); }

/* ---------- reassurance strip ---------- */
.assure { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin: 22px 0 0; }
.assure span { color: var(--text-dim); font-size: 13px; }
.assure b { color: var(--cyan); }

/* ---------- content sections (why DMARC, limits) ---------- */
.content { margin-top: 40px; }
.content h2 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 24px; color: #fff; margin-bottom: 10px; }
.content h3 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px; color: #fff; margin: 22px 0 10px; }
.content p { color: var(--text-dim); margin-bottom: 14px; }
.content b { color: #fff; font-weight: 700; }
.content .steps, .content .limits { list-style: none; margin: 12px 0; padding: 0; }
.content .steps li, .content .limits li {
  color: var(--text-dim); margin: 0 0 12px; padding-left: 30px; position: relative; line-height: 1.6;
}
.content .steps { counter-reset: step; }
.content .steps li { counter-increment: step; }
.content .steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,212,255,.15); color: var(--cyan);
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.content .limits li::before {
  content: ""; position: absolute; left: 8px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
}

/* ---------- APRF coverage beta banner ---------- */
.coverage {
  margin: 24px 0 0; padding: 16px 18px; font-size: 14px; line-height: 1.6;
  color: var(--text-dim);
  background: rgba(0, 212, 255, .06);
  border: 1px solid var(--border-strong); border-left: 3px solid var(--cyan);
  border-radius: 12px;
}
.coverage b { color: #fff; }

/* cross-link paragraph inside content sections */
.xlink-p { font-size: 15px; }
.xlink-p a { font-weight: 600; }

/* APRF toolbar card dot (purple, distinct from the six siblings) */
.tool-card.taprf .tdot { background: var(--purple); }

/* "You are here" card = the current tool, a full-width filled bar at the bottom.
   Subtle purple fill (not hollow), still clickable (href="/" reloads the page). */
.tool-card.there.taprf {
  background: linear-gradient(135deg, rgba(124, 58, 237, .22), rgba(124, 58, 237, .06));
  border-color: rgba(124, 58, 237, .6);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, .35), 0 6px 22px rgba(124, 58, 237, .16);
}
.tool-card.there.taprf .tname { color: #c4b5fd; }
.tool-card.there.taprf .there-badge { color: rgba(196, 181, 253, .8); }
