:root {
  --paper: #ecebf2;
  --sheet: #f7f6fb;
  --ink: #1f1d33;
  --muted: #5c5974;
  --line: #cfccdd;
  --veil: #5b4bdb;
  --veil-soft: #5b4bdb1f;
  --stop: #b3362e;
  --ok: #2f7a4f;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1830;
    --sheet: #221f3b;
    --ink: #e8e6f3;
    --muted: #a6a2c0;
    --line: #3a3657;
    --veil: #9d92ff;
    --veil-soft: #9d92ff26;
    --stop: #ff8a7e;
    --ok: #7dd3a0;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--veil); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--veil); }
:focus-visible { outline: 2px solid var(--veil); outline-offset: 3px; border-radius: 2px; }
code, pre { font-family: var(--mono); font-size: .875em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; margin: 0 0 1.25rem; }
h3 { font-size: 1.15rem; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; max-width: 38em; }

.top, main > section, .foot { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; }
.top nav { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: .95rem; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

/* hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 4rem; }
.hero h1 {
  font-size: clamp(2.8rem, 8.5vw, 6.4rem);
  line-height: .95;
  letter-spacing: -.045em;
  font-weight: 800;
  margin: 0 0 1.5rem;
  max-width: 11ch;
}
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.button {
  display: inline-block; padding: .75rem 1.25rem; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700;
}
.button:hover { background: var(--veil); color: #fff; }
.quiet { font-weight: 500; }

/* the wall: the one loud thing on the page */
.wall { margin: clamp(3rem, 7vw, 5rem) 0 0; }
.wall-head, .log li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 15rem) minmax(0, 1fr);
}
.wall-head { font-size: .85rem; color: var(--muted); padding-bottom: .5rem; }
.wall-head span { padding: 0 1rem; }
.wall-head .veil-label { color: var(--veil); font-weight: 700; text-align: center; }
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .85rem; }
.log li { border-bottom: 1px solid var(--line); }
.log span { padding: .85rem 1rem; min-width: 0; overflow-wrap: anywhere; }
.log .at {
  text-align: center;
  background:
    repeating-linear-gradient(90deg, var(--veil-soft) 0 2px, transparent 2px 6px),
    var(--veil-soft);
  border-inline: 2px solid var(--veil);
  font-family: var(--sans); font-size: .85rem; font-weight: 500;
}
.log b { font-weight: 500; color: var(--muted); margin-right: .4em; }
.log .pass .out { color: var(--veil); }
.log .stop .at { color: var(--stop); }
.log .stop .out { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--line) 8px 9px); opacity: .6; }
.log .kill { background: color-mix(in srgb, var(--stop) 10%, transparent); }
.log .kill .at { font-weight: 700; }
.log .kill .out { background: none; opacity: 1; color: var(--stop); font-family: var(--sans); }
.log .stop:last-child .req { color: var(--muted); }
.wall figcaption { color: var(--muted); font-size: .95rem; margin-top: 1rem; max-width: 46em; }

@media (prefers-reduced-motion: no-preference) {
  .log li { animation: arrive .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.35s + var(--i) * .45s); }
  .log li .out { animation: cross .45s ease-out both; animation-delay: calc(.6s + var(--i) * .45s); }
  @keyframes arrive { from { opacity: 0; transform: translateX(-1.5rem); } }
  @keyframes cross { from { opacity: 0; } }
}

@media (max-width: 44rem) {
  .wall-head { display: none; }
  .log li { grid-template-columns: 1fr; }
  .log span { padding: .4rem .75rem; }
  .log .req { padding-top: .8rem; }
  .log .at { text-align: left; border-inline: 0; border-left: 3px solid var(--veil); }
  .log .out:empty { display: none; }
  .log .out { padding-bottom: .8rem; }
}

/* sections */
main > section:not(.hero) { padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--line); }

.how-grid, .dkim-grid, .sites-grid { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); align-items: start; }
.diagram pre { margin: 0; padding: 1.5rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; line-height: 1.7; font-size: .8rem; }
.diagram em { font-style: normal; font-weight: 500; color: var(--veil); }

.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 2rem; margin: 3rem 0 0; }
.parts div { border-top: 3px solid var(--ink); padding-top: 1rem; }
.parts dt { font-weight: 700; font-size: 1.1rem; margin-bottom: .4rem; }
.parts dd { margin: 0; color: var(--muted); font-size: .98rem; }

.code {
  margin: 0 0 1.25rem; padding: 1.25rem 1.5rem; background: var(--ink); color: var(--paper);
  border-radius: 6px; overflow-x: auto; line-height: 1.7; font-size: .82rem; white-space: pre;
}
.dkim .code { white-space: pre-wrap; overflow-wrap: anywhere; }
.code .dim { opacity: .55; }
.code .ok { color: #9be3b7; }
@media (prefers-color-scheme: dark) { .code { background: #0f0e1d; color: var(--ink); border: 1px solid var(--line); } }

.try .code { max-width: 52rem; }
.sites-grid > div { min-width: 0; }

.status p { font-size: 1.15rem; max-width: 40em; }

/* footer */
.foot { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.foot p { margin: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; flex-wrap: wrap; }

@media (max-width: 30rem) {
  .top nav { gap: .5rem 1rem; font-size: .9rem; }
}
