/* The DMARC reader's one sheet. The first half is the Mast free-tool
   vocabulary copied from tissue-www's public/vs/vs.css (that sheet lives in
   www and isn't served here); the second half is the tool itself.

   Colour comes from /css/tokens.css, and every var() carries the light value
   as its fallback so the page still paints if that sheet doesn't arrive. Light
   only, like the rest of www: one ground, one panel, no radii, no shadows, no
   gradients, 1px rails, an italic second voice. */

:root {
  color-scheme: light;
  --bg: var(--tissue-bg, #ffffff);
  --panel: var(--tissue-panel, #f4f4f1);
  --ink: var(--tissue-ink, #222222);
  --ink2: var(--tissue-ink-2, #55625b);
  --ink3: var(--tissue-ink-3, #8a8a85);
  --line: var(--tissue-line, #e6e6e1);
  --line2: var(--tissue-line-2, #cfcfc9);
  --accent: var(--tissue-accent, #00875f);
  --on-accent: var(--tissue-on-accent, #ffffff);
  --rail: var(--tissue-rail, #8a7d6b);
  --danger: var(--tissue-danger, #c0392b);
  --amber: var(--tissue-amber, #b7791f);
  --mono: var(--tissue-font-mono, "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}

* { box-sizing: border-box }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.68;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 62rem; margin: 0 auto; padding-inline: 1.25rem }

a { color: inherit }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }

.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--on-accent); padding: .5rem .9rem; z-index: 10 }
.skip:focus { left: 0 }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* IBM Plex Mono ligates -- into an em dash, which turns a record into
   something that won't parse when it's copied. */
code { font-family: var(--mono); background: var(--panel); padding: .05rem .35rem; overflow-wrap: anywhere; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0 }
.tldr code, .ender code, .drop code, .policy code { background: var(--bg) }

tissue-header, tissue-footer { display: block; --tissue-hdr-max: 62rem }
tissue-header { padding-top: 1.75rem }
tissue-footer { margin-top: 3rem }

/* ── the head of the page ─────────────────────────────────────────────────── */

.crumb { margin: 2.4rem 0 0; font-size: .85rem; color: var(--ink3) }
.crumb a { color: var(--ink2); text-decoration: none }
.crumb a:hover { text-decoration: underline }

h1 {
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.2rem);
  line-height: 1.2; font-weight: 600; letter-spacing: -.02em;
  margin: .9rem 0 0; max-width: 16em; text-wrap: balance;
}
.deck { color: var(--ink2); margin: 1.1rem 0 0; max-width: 42em; font-size: 1.02em }

.tldr { background: var(--panel); padding: 1.15rem 1.35rem; margin: 1.8rem 0 0; max-width: 46em }
.tldr p { margin: 0 }

/* ── sections ─────────────────────────────────────────────────────────────── */

section { padding-block: 3rem }
section + section { border-top: 1px solid var(--line) }

h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .35rem; text-wrap: balance }
h3 { font-size: 1rem; font-weight: 600; margin: 2.4rem 0 0; overflow-wrap: anywhere }
.sub { color: var(--ink2); font-style: italic; margin: 0 0 1.5rem; max-width: 42em }
p { margin: 1.15rem 0; max-width: 42em }

dl { margin: 1.5rem 0 0; max-width: 44em }
dt { font-weight: 600; margin-top: 1.4rem }
dt:first-child { margin-top: 0 }
dd { margin: .35rem 0 0; color: var(--ink2) }

/* ── tables ───────────────────────────────────────────────────────────────── */

.scroller { overflow-x: auto; margin-top: 1rem; border-top: 1px solid var(--line2) }
table { border-collapse: collapse; width: 100%; font-size: .82rem }
th, td { text-align: left; vertical-align: top; padding: .62rem .8rem; border-bottom: 1px solid var(--line) }
thead th { font-weight: 400; font-style: italic; color: var(--ink2); border-bottom: 1px solid var(--line2); white-space: nowrap }
tbody th { font-weight: 400; color: var(--ink); white-space: nowrap; padding-left: 0 }
thead th:first-child { padding-left: 0 }
td { color: var(--ink2) }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 1px solid var(--line2) }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }

table.limits { min-width: 36rem }

/* ── the close ────────────────────────────────────────────────────────────── */

.ender { background: var(--panel); padding: 1.6rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; max-width: 46em }
.ender p { margin: 0 }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.25rem }
.aside { color: var(--ink2); font-style: italic; font-size: .92em }

.btn {
  background: var(--accent); color: var(--on-accent); text-decoration: none; font: inherit; font-weight: 600;
  padding: .55rem 1.2rem; display: inline-block; border: 1px solid var(--accent); border-radius: 0; cursor: pointer;
}
.btn:hover { background: #00714f; border-color: #00714f }
.btn.quiet { background: var(--bg); color: var(--ink); border-color: var(--line2); font-weight: 400 }
.btn.quiet:hover { border-color: var(--accent); color: var(--accent) }
.btn:disabled { opacity: .6; cursor: progress }
.textbtn { background: none; border: 0; padding: .2rem 0; font: inherit; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer }
.textbtn:hover { color: var(--ink) }

.vs { display: flex; flex-wrap: wrap; gap: .1rem 1.4rem; margin-top: 1.4rem; font-size: .9rem }
.vs a { color: var(--ink2); border-left: 1px solid var(--line); padding: .15rem .95rem; text-decoration: none }
.vs a:hover { color: var(--ink); text-decoration: underline }

.stores { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1.4rem 0 0 }
.badge { display: inline-block; line-height: 0; text-decoration: none }
.badge img { display: block; height: 40px; width: auto }
.stores .aside { flex-basis: 100% }

/* ── the drop zone ────────────────────────────────────────────────────────── */

/* One panel with a 1px rail. While a file hovers anywhere over the page the
   rail turns the gate green the system uses for "this is open now". */
.drop {
  background: var(--panel); border: 1px solid var(--line2);
  padding: 2rem 1.6rem 1.4rem; max-width: 46em;
}
.drop.over { border-color: var(--accent); background: var(--bg) }
.drop-lede { margin: 0; font-size: 1.15rem; font-weight: 600 }
.drop.over .drop-lede { color: var(--accent) }
.drop-actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.1rem }
.drop-note { margin: 1.1rem 0 0; color: var(--ink3); font-size: .85rem; font-style: italic }
/* The file input is hidden, so its label carries the focus ring. */
.drop-actions input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px }

.status { color: var(--ink2); margin: 1rem 0 0; min-height: 1.68em }
.problems { margin: .4rem 0 0; padding: 0 0 0 1rem; max-width: 46em; border-left: 1px solid var(--danger); list-style: none }
.problems li { color: var(--ink); font-size: .9rem; overflow-wrap: anywhere }
.problems li + li { margin-top: .4rem }

/* ── results ──────────────────────────────────────────────────────────────── */

/* The summary is a ledger, not a row of big numbers: label and value on one
   ruled line, two columns of them where there's room. */
.ledger {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); column-gap: 2rem;
  margin: 0; max-width: none; border-top: 1px solid var(--line2);
}
.ledger div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); min-width: 0 }
.ledger dt { margin: 0; font-weight: 400; font-style: italic; color: var(--ink2); white-space: nowrap }
.ledger dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0 }
.ledger .of, .reports .of { display: block; font-weight: 400; font-size: .8rem; color: var(--ink3) }

.note { color: var(--ink2); font-size: .9rem; margin: .4rem 0 0 }

table.sources { min-width: 62rem }
table.reports { min-width: 44rem }
.sources th.ip { font-variant-numeric: tabular-nums }
td.dom, td.id { overflow-wrap: anywhere }
td.id { font-size: .78rem; color: var(--ink3) }
td .none { color: var(--ink3); font-style: italic }

/* The verdict is the second voice: italic, in the colour of what it says.
   The words carry the meaning, so the colour is only a second channel. */
td.verdict { font-style: italic; min-width: 15rem; max-width: 22rem }
td.verdict.ok { color: var(--accent) }
td.verdict.warn { color: var(--amber) }
td.verdict.bad { color: var(--danger); font-weight: 600 }
td.verdict.muted { color: var(--ink3) }

.policy { margin-top: 1rem; padding-left: 1rem; border-left: 1px solid var(--rail); max-width: 46em }
.policy p { margin: 0 }
.policy .pol-domain { font-weight: 600 }
.policy code { display: inline-block; margin-top: .3rem; background: var(--panel) }
.policy .pol-note { color: var(--ink2); margin-top: .4rem }

.actions { margin-top: 2.2rem }

@media (max-width: 34rem) {
  h1 { margin-top: .7rem }
  section { padding-block: 2.4rem }
  .tldr, .ender { padding: 1.1rem }
  .drop { padding: 1.4rem 1.1rem 1.1rem }
  .ledger { grid-template-columns: 1fr }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .btn.quiet, .drop { transition: background-color .15s, border-color .15s, color .15s }
}
