/* Sealbill — sealbill.org
   Served under: default-src 'self'; style-src 'self'; script-src 'self'. No inline styles anywhere.
   Visual language: a crosshatch (the tint inside a security envelope) marks what is encrypted;
   everything readable sits on plain paper. */

@font-face {
  font-family: "Fira Sans Condensed";
  src: url("/fonts/fira-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("/fonts/fira-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("/fonts/fira-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Mono";
  src: url("/fonts/fira-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- tokens ---------------------------------------------------------------------------- */

:root {
  --paper: #f3f5f8;
  --surface: #ffffff;
  --ink: #15213a;
  --ink-2: #4a5670;
  --ink-3: #5b6680;
  --rule: #d6dce6;
  --rule-strong: #b4bdcd;
  --tint: #c3cde0;
  --wash: #e8edf5;
  --accent: #2747b8;
  --accent-hover: #1c3896;
  --on-accent: #ffffff;
  --switch-on: #2747b8;
  --stamp: #b3271d;
  --paid: #1d6b3f;
  --paid-wash: #e3f1e8;
  --offset: #cdd5e3;

  --font-display: "Fira Sans Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-text: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Fira Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: max(16px, 4vw);
  --max: 74rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1322;
    --surface: #141c2f;
    --ink: #e5e9f1;
    --ink-2: #a3aec3;
    --ink-3: #8b97ae;
    --rule: #222c45;
    --rule-strong: #34405f;
    --tint: #2c3858;
    --wash: #172038;
    --accent: #a9b9ff;
    --accent-hover: #cbd5ff;
    --on-accent: #0d1322;
    --switch-on: #4f68e0;
    --stamp: #ff8f82;
    --paid: #7fd6a0;
    --paid-wash: #143020;
    --offset: #070b15;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0d1322;
  --surface: #141c2f;
  --ink: #e5e9f1;
  --ink-2: #a3aec3;
  --ink-3: #8b97ae;
  --rule: #222c45;
  --rule-strong: #34405f;
  --tint: #2c3858;
  --wash: #172038;
  --accent: #a9b9ff;
  --accent-hover: #cbd5ff;
  --on-accent: #0d1322;
  --switch-on: #4f68e0;
  --stamp: #ff8f82;
  --paid: #7fd6a0;
  --paid-wash: #143020;
  --offset: #070b15;
  color-scheme: dark;
}

/* ---- base ------------------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.25rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  font-kerning: normal;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h2 {
  font: 800 clamp(2rem, 1.3rem + 2.4vw, 3.15rem)/1 var(--font-display);
  letter-spacing: -0.004em;
  text-wrap: balance;
}
h3 { font: 600 1.125rem/1.35 var(--font-text); }

code, kbd, samp, pre, .mono { font-family: var(--font-mono); }
code {
  font-size: 0.875em;
  background: var(--wash);
  padding: 0.08em 0.34em;
  border-radius: 3px;
  overflow-wrap: break-word;
}
pre {
  margin: 0;
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
  tab-size: 2;
}
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
pre .c { color: var(--ink-3); }

ul, ol { padding-left: 1.2rem; }
li + li { margin-top: 0.35em; }

strong { font-weight: 600; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0; color: var(--on-accent); }

/* The crosshatch: what a security envelope prints inside so the letter cannot be read through it. */
.hatch {
  background-color: var(--wash);
  background-image:
    repeating-linear-gradient(45deg, var(--tint) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, var(--tint) 0 1px, transparent 1px 6px);
}

/* ---- header ---------------------------------------------------------------------------- */

.site-header { border-bottom: 1px solid var(--rule); }
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2.25rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font: 800 1.55rem/1 var(--font-display);
  letter-spacing: 0.004em;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 32px; height: 32px; flex: none; }

.mark-bill { fill: var(--ink); }
.mark-fold { fill: none; stroke: var(--paper); stroke-width: 1.4; stroke-linejoin: round; }
.mark-lines { fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; }
.mark-seal { fill: var(--stamp); }
.mark-ring { fill: none; stroke: var(--paper); stroke-width: 1.1; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding-block: 0.4rem;
  display: inline-block;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }

.site-header__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.source-link:hover { background: var(--wash); color: var(--ink); }
.source-link svg { width: 16px; height: 16px; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { background: var(--wash); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .site-nav { order: 3; flex-basis: 100%; }
  .site-nav ul { gap: 0 1.15rem; }
}

/* ---- hero ------------------------------------------------------------------------------ */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 8vw, 6.5rem); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__title {
  font: 800 clamp(2.7rem, 0.9rem + 6.1vw, 5.4rem)/0.9 var(--font-display);
  letter-spacing: -0.012em;
  margin-bottom: 1.6rem;
}
.hero__title span { display: block; }
.hero__lede {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.button svg { width: 18px; height: 18px; flex: none; }
.button--quiet { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.button--quiet:hover { background: var(--wash); border-color: var(--rule-strong); color: var(--ink); }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .specimen { max-width: 36rem; }
}

/* ---- the specimen: one invoice as the database holds it --------------------------------- */

.specimen {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "sheet sheet"
    "switch label"
    "note note";
  gap: 1.1rem 0.8rem;
  align-items: center;
  isolation: isolate;
  padding: 0 14px 0 0;
}

.sheet {
  grid-area: sheet;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 1.15rem 1.25rem 0.85rem;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 var(--rule);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* The envelope the invoice came out of: a grid item behind the sheet, so moving the sheet never
   moves it, and the sheet's own background always covers it. */
.specimen::before {
  content: "";
  grid-area: sheet;
  align-self: stretch;
  position: relative;
  z-index: -1;
  margin: 22px -14px 0 22px;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background-color: var(--wash);
  background-image:
    repeating-linear-gradient(45deg, var(--tint) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, var(--tint) 0 1px, transparent 1px 6px);
}

.sheet__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 4.5rem;
  margin-bottom: 0.7rem;
}
.sheet__title { margin: 0; font: 800 1.45rem/1.1 var(--font-display); white-space: nowrap; }
.sheet__issuer { margin: 0.15rem 0 0; font-size: 0.8125rem; color: var(--ink-3); }

.status {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--paid-wash);
  color: var(--paid);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.sheet__fields { margin: 0; }
.field {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  padding-block: 0.5rem;
  border-top: 1px solid var(--rule);
}
.field dt { font-size: 0.8125rem; color: var(--ink-3); }
.field dd { margin: 0; min-width: 0; font-size: 0.9375rem; }
.field--line dd {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.field--line .swap { flex: 1 1 auto; }
.field--total { border-top-color: var(--rule-strong); }
.field--total dd { font-weight: 600; }

.amount { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.tx { font: 0.8125rem/1.5 var(--font-mono); color: var(--ink-2); }

.swap { display: grid; min-width: 0; }
.swap > span {
  grid-area: 1 / 1;
  min-width: 0;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.v-sealed {
  align-self: start;
  font: 0.78rem/1.55 var(--font-mono);
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.05rem 0.4rem;
  border-radius: 2px;
  background-color: var(--wash);
  background-image:
    repeating-linear-gradient(45deg, var(--tint) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, var(--tint) 0 1px, transparent 1px 5px);
}
.v-plain { opacity: 0; visibility: hidden; }

.stamp {
  position: absolute;
  top: -26px;
  right: -12px;
  width: 104px;
  height: 104px;
  color: var(--stamp);
  transform: rotate(-11deg);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
}
.stamp__edge { fill: none; stroke: currentColor; stroke-width: 3; }
.stamp__ring { fill: none; stroke: currentColor; stroke-width: 1.4; }
.stamp__small { fill: currentColor; font: 600 10.5px/1 var(--font-text); letter-spacing: 0.22em; }
.stamp__big { fill: currentColor; font: 800 22px/1 var(--font-display); letter-spacing: 0.05em; }

.specimen__switch {
  grid-area: switch;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--ink-3);
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.specimen__switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s ease;
}
.specimen__switch:checked { background: var(--switch-on); }
.specimen__switch:checked::after { transform: translateX(20px); }
.specimen__switch:focus-visible { outline-offset: 4px; border-radius: 999px; }

.specimen__label { grid-area: label; font-weight: 600; cursor: pointer; line-height: 1.3; }
.specimen__label small { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--ink-3); }

.specimen__note {
  grid-area: note;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 36rem;
}
.when-unsealed { display: none; }

/* Unsealed: the running app holds the key and reads the fields. */
.specimen__switch:checked ~ .sheet { transform: translateY(-6px); }
.specimen__switch:checked ~ .sheet .v-sealed { opacity: 0; visibility: hidden; }
.specimen__switch:checked ~ .sheet .v-plain { opacity: 1; visibility: visible; }
.specimen__switch:checked ~ .sheet .stamp { opacity: 0; transform: rotate(-3deg) scale(1.18); }
.specimen__switch:checked ~ .specimen__note .when-sealed { display: none; }
.specimen__switch:checked ~ .specimen__note .when-unsealed { display: inline; }
.specimen__switch:checked ~ .sheet .when-sealed { display: none; }
.specimen__switch:checked ~ .sheet .when-unsealed { display: inline; }

@media (max-width: 480px) {
  .sheet { padding-inline: 1rem; }
  .sheet__head { padding-right: 3.6rem; }
  .sheet__title { font-size: 1.3rem; }
  .actions .button { width: 100%; justify-content: center; text-align: center; }
  .stamp { width: 84px; height: 84px; top: -22px; right: -8px; }
  .field { grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0.6rem; }
}

/* ---- sections -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.25rem);
  border-top: 1px solid var(--rule);
}
.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
}
.section__head {
  align-self: start;
  position: sticky;
  top: 1.5rem;
}
.section__head p {
  margin-top: 1rem;
  color: var(--ink-2);
  max-width: 22rem;
}
.section__body { min-width: 0; }
.section__body > h3 { margin: 2.75rem 0 0.9rem; }
.section__body > h3:first-child { margin-top: 0; }
.section__body > p { max-width: 42rem; }
.section__body > p + .table-scroll,
.section__body > p + pre,
.section__body > p + .steps,
.section__body > p + .spec,
.section__body > p + .rails { margin-top: 1.5rem; }
.section__body > pre + p,
.section__body > .table-scroll + p:not(.note) { margin-top: 1.25rem; }

.lead {
  font-size: 1.125rem;
  line-height: 1.55;
  max-width: 42rem;
}

.more {
  margin-top: 2rem;
  font-weight: 600;
}

@media (max-width: 860px) {
  .section__grid { grid-template-columns: minmax(0, 1fr); }
  .section__head { position: static; }
  .section__head p { max-width: 40rem; }
}

/* ---- tables ---------------------------------------------------------------------------- */

.table-scroll { overflow-x: auto; }
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.ledger th,
.ledger td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.ledger th:last-child,
.ledger td:last-child { padding-right: 0; }
.ledger thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom-color: var(--rule-strong);
  padding-block: 0.5rem;
}
.ledger tbody th { font-weight: 600; white-space: nowrap; }
.ledger td { color: var(--ink-2); }
.ledger td.tokens { color: var(--ink); white-space: nowrap; }

.tok {
  display: inline-block;
  min-width: 3.1rem;
  padding: 0.22rem 0.4rem;
  margin: 0 0.25rem 0.25rem 0;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}
.tok--off { border-style: dashed; color: var(--ink-3); font-weight: 400; }
.tok small { font-weight: 400; color: var(--ink-3); }

.note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-3);
  max-width: 44rem;
}

@media (max-width: 640px) {
  .ledger--stack thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .ledger--stack,
  .ledger--stack tbody,
  .ledger--stack tr,
  .ledger--stack th,
  .ledger--stack td { display: block; }
  .ledger--stack tr { padding-block: 0.8rem; border-bottom: 1px solid var(--rule); }
  .ledger--stack tbody tr:first-child { border-top: 1px solid var(--rule-strong); }
  .ledger--stack th,
  .ledger--stack td { border: 0; padding: 0.1rem 0; white-space: normal; }
  .ledger--stack td.tokens { white-space: normal; padding-top: 0.35rem; }
  .ledger--stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    color: var(--ink-3);
    margin-top: 0.3rem;
  }
  .ledger--stack td.tokens::before { display: none; }
}

/* ---- rails, spec lists, steps ---------------------------------------------------------- */

.rails,
.spec {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  border-top: 1px solid var(--rule-strong);
}
.rails { margin-top: 2.75rem; }
.rails > li,
.spec > li {
  margin: 0;
  padding: 1.2rem 0 1.15rem;
  border-bottom: 1px solid var(--rule);
}
.rails h3,
.spec h3 { margin-bottom: 0.35rem; }
.rails p,
.spec p { margin: 0 0 0.5rem; color: var(--ink-2); font-size: 0.9375rem; }
.rails p:last-child,
.spec p:last-child { margin-bottom: 0; }

.src {
  font: 0.78rem/1.45 var(--font-mono);
  color: var(--ink-3);
  overflow-wrap: anywhere;
}
.src a { color: var(--ink-3); text-decoration-color: var(--rule-strong); }
.src a:hover { color: var(--accent); text-decoration-color: currentColor; }

@media (max-width: 640px) {
  .rails, .spec { grid-template-columns: minmax(0, 1fr); }
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}
.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0 1rem;
  margin: 0;
  padding-block: 1.1rem;
  border-top: 1px solid var(--rule);
}
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps > li::before {
  content: counter(step);
  font: 800 2.1rem/1 var(--font-display);
  color: var(--accent);
}
.steps h3 { margin-bottom: 0.3rem; }
.steps p { color: var(--ink-2); max-width: 40rem; }
.steps pre { margin-top: 0.75rem; }

.checks {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  max-width: 44rem;
}
.checks li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-2);
}
.checks li + li { margin-top: 0.55rem; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.48em;
  width: 0.7rem;
  height: 0.38rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.checks strong { color: var(--ink); }

.reqs { margin: 0; max-width: 44rem; }
.reqs > div {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding-block: 0.8rem;
  border-top: 1px solid var(--rule);
}
.reqs > div:last-child { border-bottom: 1px solid var(--rule); }
.reqs dt { font-weight: 600; }
.reqs dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) {
  .reqs > div { grid-template-columns: minmax(0, 1fr); }
}

/* A banner exactly as the app shows it on a carried-over invoice. */
.banner {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin: 1.5rem 0 0;
  padding: 0.95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--paid);
  border-radius: 3px;
  max-width: 44rem;
}
.banner p { margin: 0; }
.banner .status { flex: none; }

/* ---- document pages (security, migrate) ------------------------------------------------- */

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); }
.page-head h1 {
  font: 800 clamp(2.5rem, 1.2rem + 4.6vw, 4.6rem)/0.95 var(--font-display);
  letter-spacing: -0.01em;
  max-width: 18ch;
  text-wrap: balance;
}
.page-head .lead { margin-top: 1.4rem; color: var(--ink-2); }

.toc {
  margin-top: 2rem;
  max-width: 52rem;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3 13rem;
  column-gap: 2rem;
}
.toc li { margin: 0 0 0.35rem; break-inside: avoid; }
.toc a { font-size: 0.9375rem; }

.doc-section h2 { font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.4rem); }
.doc-section .section__body > ul,
.doc-section .section__body > ol { max-width: 42rem; color: var(--ink-2); }
.doc-section .section__body > ul strong,
.doc-section .section__body > ol strong { color: var(--ink); }
.doc-section .section__body > * + p,
.doc-section .section__body > * + ul,
.doc-section .section__body > * + ol,
.doc-section .section__body > * + .src-list { margin-top: 1rem; }
.doc-section .section__body > pre { margin-top: 1rem; }
.doc-section .section__body > .table-scroll { margin-top: 1.25rem; }

.src-list {
  list-style: none;
  padding: 0.85rem 0 0;
  margin: 1.5rem 0 0;
  border-top: 1px dashed var(--rule-strong);
  font: 0.78rem/1.5 var(--font-mono);
  color: var(--ink-3);
  max-width: 42rem;
}
.src-list li + li { margin-top: 0.2rem; }
.src-list a { color: var(--ink-3); text-decoration-color: var(--rule-strong); overflow-wrap: anywhere; }
.src-list a:hover { color: var(--accent); }

/* ---- 404 ------------------------------------------------------------------------------- */

.lost { padding-block: clamp(3rem, 10vw, 7rem); }
.lost__code {
  font: 800 clamp(5rem, 3rem + 12vw, 11rem)/0.85 var(--font-display);
  letter-spacing: -0.02em;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-color: var(--tint);
  background-image:
    repeating-linear-gradient(45deg, var(--ink-3) 0 1.5px, transparent 1.5px 7px),
    repeating-linear-gradient(-45deg, var(--ink-3) 0 1.5px, transparent 1.5px 7px);
  margin: 0 0 1.5rem;
}
.lost h1 { font: 800 clamp(2rem, 1.4rem + 2.4vw, 3rem)/1 var(--font-display); margin-bottom: 1rem; }
.lost p { color: var(--ink-2); max-width: 36rem; }
.lost ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.lost li + li { margin-top: 0.4rem; }

/* ---- footer ---------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 3rem 3.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 5fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
}
.site-footer .brand { font-size: 1.35rem; margin-bottom: 0.75rem; }
.site-footer .brand__mark { width: 28px; height: 28px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.4rem; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--accent); }
.site-footer h2 {
  font: 600 0.9375rem/1.4 var(--font-text);
  color: var(--ink);
  margin-bottom: 0.6rem;
}
@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- motion ---------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .specimen__switch:checked ~ .sheet { transform: none; }
}

@media print {
  .site-header__tools, .skip-link, .specimen__switch, .specimen__label { display: none; }
  .section__head { position: static; }
}

/* Document pages read as one long page: tighter rhythm than the home page. */
.doc-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
@media (max-width: 860px) {
  .doc-section .section__grid { row-gap: 1rem; }
}
.doc-section .section__body > ul:first-child,
.doc-section .section__body > ol:first-child { margin-top: 0; }
.src-list::before {
  content: "Where to check";
  display: block;
  margin-bottom: 0.35rem;
  font: 600 0.8125rem/1.4 var(--font-text);
  color: var(--ink-3);
}
.src-list--bare { border-top: 0; padding-top: 0; margin-top: 0; font-size: 0.875rem; }
.src-list--bare::before { content: none; }

/* ---- comparison (compare.html, and its link on the home page) --------------------------- */

/* The home page's link to the comparison, above the hero. */
.compare-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding: 0.85rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--ink);
  border-radius: 3px;
  color: var(--ink);
  text-decoration: none;
}
.compare-link:hover { border-color: var(--ink); color: var(--ink); }
.compare-link__mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
}
.compare-link__text strong { display: block; font-weight: 600; line-height: 1.35; }
.compare-link__text span { display: block; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.compare-link__go {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  white-space: nowrap;
}
.compare-link:hover .compare-link__go { color: var(--accent-hover); text-decoration-thickness: 2px; }
@media (max-width: 640px) {
  .compare-link { grid-template-columns: auto minmax(0, 1fr); }
  .compare-link__go { grid-column: 2; }
}
@media (max-width: 480px) {
  .compare-link { grid-template-columns: minmax(0, 1fr); }
  .compare-link__mark { display: none; }
  .compare-link__go { grid-column: 1; }
}

/* The matrix. Sealbill's column is the one in the security envelope: hatched head, ruled sides. */
.matrix-section { padding-block: 0 clamp(3rem, 7vw, 5rem); }
.matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.matrix__q { width: 19%; }
.matrix thead th {
  text-align: left;
  vertical-align: bottom;
  padding: 0.85rem 1rem 0.8rem;
  border-bottom: 2px solid var(--ink);
  font: 800 1.4rem/1.05 var(--font-display);
  color: var(--ink);
}
.matrix thead th small {
  display: block;
  margin-top: 0.35rem;
  font: 400 0.8125rem/1.35 var(--font-text);
  color: var(--ink-3);
}
.matrix thead th:first-child {
  padding-left: 0;
  font: 600 0.8125rem/1.4 var(--font-text);
  color: var(--ink-3);
}
.matrix tbody th {
  text-align: left;
  vertical-align: top;
  padding: 1rem 1rem 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
}
.matrix td {
  vertical-align: top;
  padding: 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}
.matrix td p { margin: 0.35rem 0 0; }
.matrix .is-us {
  background: var(--surface);
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  color: var(--ink);
}
.matrix thead .is-us {
  border-top: 2px solid var(--ink);
  background-color: var(--wash);
  background-image:
    repeating-linear-gradient(45deg, var(--tint) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, var(--tint) 0 1px, transparent 1px 6px);
}
/* The envelope's window: the name sits on clear paper inside the hatch. */
.matrix thead .is-us .window {
  display: inline-block;
  padding: 0.25rem 0.5rem 0.3rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
}
.matrix thead .is-us small { color: var(--ink-2); }
.matrix tbody tr:last-child .is-us { border-bottom: 2px solid var(--ink); }

/* Verdicts: a word, a colour and a shape, so none of them carries the meaning alone. */
.v {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.16rem 0.55rem 0.16rem 0.45rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.v::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  box-sizing: border-box;
}
.v--yes { background: var(--paid-wash); color: var(--paid); }
.v--yes::before { background: var(--paid); }
.v--part { background: var(--wash); color: var(--ink-2); }
.v--part::before {
  border: 2px solid var(--ink-3);
  background: linear-gradient(90deg, var(--ink-3) 50%, transparent 50%);
}
.v--no { background: color-mix(in srgb, var(--stamp) 12%, transparent); color: var(--stamp); }
.v--no::before { border: 2px solid var(--stamp); }

.matrix-note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-3);
  max-width: 52rem;
}

@media (max-width: 900px) {
  .matrix,
  .matrix tbody,
  .matrix tr,
  .matrix th,
  .matrix td { display: block; }
  .matrix colgroup { display: none; }
  .matrix thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .matrix tbody tr { padding-block: 1.4rem 0.4rem; border-top: 2px solid var(--ink); }
  .matrix tbody th {
    border: 0;
    padding: 0 0 0.8rem;
    font: 800 1.45rem/1.1 var(--font-display);
  }
  .matrix td {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0 1rem;
    border: 0;
    border-top: 1px solid var(--rule);
    padding: 0.75rem 0;
  }
  .matrix td::before {
    content: attr(data-label);
    grid-row: span 2;
    font-weight: 600;
    color: var(--ink);
  }
  .matrix td .v { justify-self: start; }
  .matrix td p { grid-column: 2; }
  .matrix .is-us,
  .matrix tbody tr:last-child .is-us {
    border: 0;
    border-left: 4px solid var(--ink);
    padding-left: 0.85rem;
  }
}
@media (max-width: 480px) {
  .matrix td { grid-template-columns: minmax(0, 1fr); }
  .matrix td::before { grid-row: auto; margin-bottom: 0.35rem; }
  .matrix td p { grid-column: 1; }
}
