/* Postbox Redirect Checker - matches the fleet (mx/bl/dmarc) chrome.
   #0A2540 / #1a1a2e / #00D4FF / #7C3AED - Syne + DM Sans + DM Mono. Chrome (topbar, nav,
   toolbar, footer) comes from nav.css + footer.css. This file = base + tool UI. */
:root {
  --navy: #0A2540; --dark: #1a1a2e; --cyan: #00D4FF; --purple: #7C3AED;
  --pass: #34d399; --warn: #fbbf24; --fail: #f87171; --info: #6fb7ff;
  --text: rgba(255,255,255,.85); --text-dim: rgba(255,255,255,.7);
  --card: rgba(255,255,255,.08); --card-hover: rgba(255,255,255,.12);
  --border: rgba(0,212,255,.2); --border-strong: rgba(0,212,255,.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: 900px; margin: 0 auto; padding: 0 20px 56px; position: relative; z-index: 1; }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
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: 34px 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,#fff,var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { max-width: 640px; margin: 14px auto 0; color: rgba(255,255,255,.6); font-size: 17px; }

/* ---------- glass card + tool form ---------- */
.card { background: var(--card); border: 1px solid var(--border-strong); border-radius: 16px; padding: 26px; margin-top: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.tool-row { display: flex; gap: 10px; }
.tool-row input {
  flex: 1; min-width: 0; padding: 14px 16px; font-size: 16px; font-family: 'DM Mono', monospace;
  background: rgba(255,255,255,.08); border: 2px solid var(--border-strong); border-radius: 12px; color: #fff;
}
.tool-row input::placeholder { color: rgba(255,255,255,.4); font-family: 'DM Sans', sans-serif; }
.tool-row input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0,212,255,.15); }
.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 24px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0,212,255,.3); transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 40px rgba(0,212,255,.5); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.tool-hint { color: var(--text-dim); font-size: 13px; margin: 12px 2px 0; }
.ts-widget { margin-top: 14px; min-height: 65px; }

/* ---------- result ---------- */
.result { margin-top: 22px; }
.res-msg { padding: 15px 18px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); color: var(--text); }
.res-msg.loading { color: var(--text-dim); }
.res-msg.err { color: #fca5a5; border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.res-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-radius: 12px 12px 0 0; background: rgba(0,212,255,.06); border: 1px solid var(--border-strong); border-bottom: 0; }
.res-head.err { background: rgba(248,113,113,.08); }
.res-summary strong { font-family: 'Syne', sans-serif; font-size: 20px; color: var(--cyan); }
.res-stop { color: var(--text-dim); font-size: 13px; }
.final { padding: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); border-top: 0; }
.final-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan); margin-bottom: 4px; }
.final-url { font-family: 'DM Mono', monospace; color: #fff; word-break: break-all; }
.final-meta { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.flags { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); border-top: 0; }
.flag { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.flag.bad { color: #fca5a5; border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.08); }
.flag.warn { color: #fde08a; border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.08); }
.flag.info { color: #a8d3ff; border-color: rgba(111,183,255,.5); background: rgba(111,183,255,.08); }
.hops-wrap { overflow-x: auto; border: 1px solid var(--border-strong); border-top: 0; border-radius: 0 0 12px 12px; }
table.hops { width: 100%; border-collapse: collapse; font-size: 13px; }
table.hops th { text-align: left; padding: 10px 12px; background: rgba(0,212,255,.06); color: var(--text-dim); font-weight: 500; white-space: nowrap; }
table.hops td { padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.08); vertical-align: top; }
table.hops td.u { font-family: 'DM Mono', monospace; max-width: 260px; word-break: break-all; }
.muted { color: rgba(255,255,255,.4); }
.st { font-family: 'DM Mono', monospace; font-weight: 500; padding: 1px 7px; border-radius: 6px; }
.st-3 { color: var(--info); background: rgba(111,183,255,.12); }
.st-2 { color: var(--pass); background: rgba(52,211,153,.12); }
.st-4, .st-5, .st-bad { color: var(--fail); background: rgba(248,113,113,.12); }
.tls.yes { color: var(--pass); font-size: 12px; }
.tls.no { color: var(--warn); font-size: 12px; }
.export { display: flex; gap: 10px; padding: 14px 0 0; }
.export button { background: rgba(255,255,255,.06); border: 1px solid var(--border-strong); color: #fff; padding: 9px 16px; border-radius: 10px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 14px; }
.export button:hover { border-color: var(--cyan); }

/* ---------- content ---------- */
.content { margin-top: 44px; }
.content h2 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 24px; color: #fff; margin: 40px 0 14px; }
.content p { color: var(--text-dim); margin-bottom: 14px; }
.content b, .content strong { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 14px; }
.mini { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.mini h3 { font-family: 'Syne', sans-serif; font-size: 16px; color: #fff; margin: 0 0 8px; }
.mini p { margin: 0; font-size: 14px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { color: var(--text-dim); margin: 0 0 12px; padding-left: 34px; position: relative; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,212,255,.15); color: var(--cyan); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.uses { list-style: none; padding: 0; }
.uses li { color: var(--text-dim); margin: 0 0 10px; padding-left: 22px; position: relative; }
.uses li::before { content: ""; position: absolute; left: 6px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.03); margin-bottom: 10px; padding: 2px 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: #fff; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--cyan); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 0 0 14px; }
.cross-cta { margin-top: 34px; padding: 20px 22px; background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.3); border-left: 3px solid var(--purple); border-radius: 12px; color: var(--text-dim); }

@media (max-width: 560px) { .tool-row { flex-direction: column; } }
