/*
  Agnus Tech — site styles.
  Plain CSS, no build step, no web fonts, no scripts.
  Colors live in tokens on :root; the .theme-* classes re-point those tokens for
  blue (Klein) and dark (ink) bands, so components never hard-code colors.
*/

/* ---------- Tokens ---------- */

:root {
  /* Palette */
  --ink: #0d1321;
  --paper: #f2f4ef;
  --white: #ffffff;
  --klein: #002fa7;
  --klein-hover: #1a44c2;
  --amber: #ffc23d;

  /* Semantic tokens for the default (light) scheme */
  --bg: var(--paper);
  --surface: var(--white);
  --text: var(--ink);
  --muted: #4a5163;
  --line: #d5dad0;
  --line-strong: #6f788b;
  --link: var(--klein);
  --focus: var(--klein);
  --btn-bg: var(--klein);
  --btn-fg: var(--white);
  --btn-bg-hover: var(--klein-hover);
  --mark-bg: var(--klein);
  --mark-fg: var(--white);
  --note-bg: #fff4d6;
  --note-line: #e0a100;
  --tag-manual: #7a4d00;
  --ink-bg: var(--ink);

  /* Type */
  --font-display: "DIN Alternate", "Bahnschrift", "D-DIN", "DIN", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-label: "DIN Condensed", "Bahnschrift Condensed", "Bahnschrift", "DIN Alternate", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", "Liberation Mono", monospace;

  --step--1: 0.875rem;
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --step-4: clamp(2.5rem, 1.45rem + 4.4vw, 5.25rem);

  /* Layout */
  --wrap: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --section: clamp(4rem, 2.5rem + 6vw, 8rem);
  --radius: 12px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151f;
    --surface: #171e2b;
    --text: #e7eaf0;
    --muted: #a3abbc;
    --line: #283144;
    --line-strong: #6f788b;
    --link: #9db4ff;
    --focus: var(--amber);
    --btn-bg: #3d63e6;
    --btn-fg: var(--white);
    --btn-bg-hover: #2f55d6;
    --mark-bg: #3d63e6;
    --note-bg: #2a2410;
    --note-line: var(--amber);
    --tag-manual: #ffd27a;
    --ink-bg: #080b12;
    color-scheme: dark;
  }
}

/* Blue band: homepage hero and header. Fixed in both color schemes. */
.theme-klein {
  --text: var(--white);
  --muted: #ccd5ed;
  --line: rgba(255, 255, 255, 0.22);
  --link: var(--white);
  --focus: var(--amber);
  --btn-bg: var(--white);
  --btn-fg: var(--klein);
  --btn-bg-hover: #e6ebfa;
  --mark-bg: var(--white);
  --mark-fg: var(--klein);
  background: var(--klein);
  color: var(--text);
}

/* Dark band: product highlight and footer. Fixed in both color schemes. */
.theme-ink {
  --text: var(--white);
  --muted: #a9b1c2;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.4);
  --link: var(--white);
  --focus: var(--amber);
  --surface: #151c2c;
  --btn-bg: var(--amber);
  --btn-fg: var(--ink);
  --btn-bg-hover: #ffd272;
  --mark-bg: var(--white);
  --mark-fg: var(--ink);
  background: var(--ink-bg);
  color: var(--text);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Column layout keeps the footer at the bottom of short pages, such as the 404. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  top: -10rem;
  left: var(--gutter);
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-display);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

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

/* Grids start as one column that may shrink below its content's min-content width,
   so a wide table or long address scrolls or wraps inside its box instead of widening the page.
   Wider layouts override the column template in their own media queries further down. */
.hero__grid,
.split,
.company,
.aside-grid,
.band-head,
.cta-band,
.doc {
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  min-height: 4.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.mark-bg {
  fill: var(--mark-bg);
}

.mark-fg {
  fill: none;
  stroke: var(--mark-fg);
}

.mark-dot {
  fill: var(--amber);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.55rem 0.4rem;
  border-bottom: 2px solid transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  text-decoration: none;
}

.site-nav a:hover {
  border-bottom-color: currentColor;
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--amber);
}

/* ---------- Shared pieces ---------- */

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.label::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--amber);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.7rem 1.2rem 0.6rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.btn--solid {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.btn--solid:hover {
  background: var(--btn-bg-hover);
}

.btn--line {
  border-color: var(--line-strong);
  color: var(--text);
}

.theme-klein .btn--line {
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--line:hover {
  border-color: var(--text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem 0.25rem;
  border-radius: 6px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section {
  padding-block: var(--section);
}

.section--flush-top {
  padding-top: 0;
}

.section-head {
  display: grid;
  gap: 1rem;
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.section-head h2 {
  font-size: var(--step-3);
}

.section-head p:not(.label) {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

.prose p + p {
  margin-top: 1em;
}

.prose p {
  max-width: 62ch;
}

.lede {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
}

.arrow-link svg {
  width: 1rem;
  height: 1rem;
}

/* ---------- Home: hero and ledger ---------- */

.hero {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(4rem, 2.5rem + 5vw, 7rem);
}

.hero__title {
  max-width: 15ch;
  margin-top: 1.25rem;
  font-size: var(--step-4);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

/* From tablet width the headline sits on two lines at its natural phrase break,
   sized so the longer line ("Every message a store sends", ~11.6em) fits the column. */
@media (min-width: 48rem) {
  .hero__title {
    max-width: none;
    font-size: min(6rem, calc((100vw - 2 * var(--gutter)) / 12));
  }

  .hero__title .line {
    display: block;
  }
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  margin-top: clamp(2rem, 1rem + 3vw, 3.5rem);
  padding-top: clamp(2rem, 1rem + 3vw, 3rem);
  border-top: 1px solid var(--line);
}

.hero__copy {
  display: grid;
  gap: 2rem;
  align-content: start;
}

.hero__lede {
  max-width: 34rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.ledger {
  display: grid;
  gap: 1rem;
}

.ledger__head,
.ledger__caption {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.ledger__head {
  display: none;
}

.ledger__rows {
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.ledger__row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.ledger__time {
  padding-top: 0.55rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.ledger__why {
  grid-column: 2;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.ledger__why b {
  color: var(--text);
  font-weight: 600;
}

.ledger__why .ok {
  color: var(--amber);
}

.bubble {
  max-width: 31ch;
  padding: 0.6rem 0.85rem;
  border-radius: 16px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.bubble--store {
  border-top-left-radius: 4px;
  background: var(--white);
  color: var(--ink);
}

.bubble--customer {
  justify-self: end;
  border-top-right-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

@media (min-width: 36rem) {
  .ledger__head {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr) 13.5rem;
    gap: 1rem;
  }

  .ledger__head span:first-child {
    grid-column: 2;
  }

  .ledger__row {
    grid-template-columns: 3.5rem minmax(0, 1fr) 13.5rem;
    gap: 1rem;
  }

  .ledger__why {
    grid-column: 3;
    padding-top: 0.45rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ledger__row {
    animation: ledger-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .ledger__row:nth-child(1) { animation-delay: 0.2s; }
  .ledger__row:nth-child(2) { animation-delay: 0.55s; }
  .ledger__row:nth-child(3) { animation-delay: 0.9s; }
  .ledger__row:nth-child(4) { animation-delay: 1.25s; }

  @keyframes ledger-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

/* ---------- Home: sections ---------- */

.split {
  display: grid;
  gap: 2rem clamp(2rem, 1rem + 4vw, 5rem);
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.split__title {
  font-size: clamp(2rem, 1.5rem + 1.9vw, 3rem);
}

.principles {
  display: grid;
  gap: 2rem;
  margin-top: clamp(3rem, 2rem + 3vw, 4.5rem);
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.principles li {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding-top: 1.25rem;
  border-top: 2px solid var(--text);
}

.principles h3 {
  font-size: var(--step-1);
}

.principles p {
  color: var(--muted);
}

/* Capability grid (used on dark bands) */

.caps {
  display: grid;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

@media (min-width: 40rem) {
  .caps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
  }
}

@media (min-width: 64rem) {
  .caps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Eight items: two columns, then four, so rows always fill. */
@media (min-width: 64rem) {
  .caps--eight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 80rem) {
  .caps--eight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.caps li {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-block: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--line);
}

.caps h3 {
  font-size: var(--step-1);
}

.caps p {
  color: var(--muted);
}

.caps .note {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.band-head {
  display: grid;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.band-head h2 {
  font-size: var(--step-3);
}

.band-head .lede {
  max-width: 36rem;
}

@media (min-width: 56rem) {
  .band-head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: start;
  }

  .band-head .label {
    grid-column: 1 / -1;
  }
}

.band-foot {
  margin-top: 2.5rem;
}

/* Spec sheet: definition list with label / value rows */

.spec {
  border-top: 2px solid var(--text);
}

.spec__row {
  display: grid;
  gap: 0.35rem 2rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.spec dt {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.2;
}

.spec dd {
  max-width: 60ch;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .spec__row {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }
}

/* Company registry and contact */

.company {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

@media (min-width: 56rem) {
  .company {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: start;
  }
}

.registry {
  margin-top: 2rem;
  border-top: 2px solid var(--text);
}

.registry div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 2fr) minmax(0, 5fr);
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.registry dt {
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-transform: uppercase;
}

.registry dd {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contact-card {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(13, 19, 33, 0.35);
}

.contact-card h2,
.contact-card h3 {
  font-size: var(--step-2);
}

.contact-card p {
  color: var(--muted);
}

/* The address may only break before the @ (a <wbr> marks the spot). */
.email-link {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 0.95rem + 0.7vw, 1.5rem);
  line-height: 1.25;
  overflow-wrap: break-word;
}

.email-link--hero {
  font-size: clamp(1.5rem, 1rem + 3vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ---------- Inner pages ---------- */

.page-hero {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.page-hero__inner {
  display: grid;
  gap: 1.25rem;
  max-width: 50rem;
}

.page-hero h1 {
  font-size: var(--step-4);
  line-height: 1;
  letter-spacing: -0.025em;
}

.page-hero .lede {
  max-width: 44rem;
}

.page-hero .actions {
  margin-top: 0.75rem;
}

.meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Zaply: journey (a real sequence, so it is an ordered list) */

.journey {
  display: grid;
  padding: 0;
  counter-reset: step;
  list-style: none;
}

.journey li {
  position: relative;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 0 0 2rem 3.25rem;
  counter-increment: step;
}

.journey li::before {
  content: counter(step);
  position: absolute;
  top: -0.1rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 2px solid var(--text);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
}

.journey li::after {
  content: "";
  position: absolute;
  top: 2.2rem;
  bottom: 0.2rem;
  left: 1.02rem;
  width: 2px;
  background: var(--line);
}

.journey li:last-child::after {
  display: none;
}

.journey h3 {
  font-size: var(--step-1);
  line-height: 1.2;
}

.journey p {
  color: var(--muted);
}

.journey .event {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}

@media (min-width: 64rem) {
  .journey {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .journey li {
    padding: 3.25rem 0 0;
  }

  .journey li::before {
    top: 0;
  }

  .journey li::after {
    top: 1.02rem;
    bottom: auto;
    left: 2.6rem;
    right: -1.1rem;
    width: auto;
    height: 2px;
  }
}

@media (min-width: 64rem) {
  .journey--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Numbered setup steps */

.steps {
  display: grid;
  gap: 0;
  padding: 0;
  counter-reset: setup;
  list-style: none;
  border-top: 2px solid var(--text);
}

.steps li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
  counter-increment: setup;
}

.steps li::before {
  content: counter(setup, decimal-leading-zero);
  grid-row: 1 / span 2;
  padding-top: 0.2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.steps h3 {
  font-size: var(--step-1);
  line-height: 1.25;
}

.steps p {
  color: var(--muted);
}

/* Two-column layout for a heading beside content */

.aside-grid {
  display: grid;
  gap: 2rem clamp(2rem, 1rem + 4vw, 5rem);
}

@media (min-width: 56rem) {
  .aside-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }
}

.aside-grid h2 {
  font-size: var(--step-3);
}

.aside-grid > .registry {
  margin-top: 0;
}

.aside-grid .aside-note {
  margin-top: 1rem;
  color: var(--muted);
}

/* Status line under a page title */

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
}

.status-line__text {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

/* Plain list with ruled rows */

.plain-list {
  padding: 0;
  border-top: 2px solid var(--text);
  list-style: none;
}

.plain-list li {
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.plain-list strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
}

/* FAQ */

.faq {
  border-top: 2px solid var(--text);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.25;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  width: 1.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  text-align: center;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .answer {
  max-width: 62ch;
  padding-bottom: 1.5rem;
  color: var(--muted);
}

.faq .answer p + p {
  margin-top: 0.8em;
}

/* Closing call to action band */

.cta-band {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: end;
}

.cta-band h2 {
  max-width: 20ch;
  font-size: var(--step-3);
}

@media (min-width: 56rem) {
  .cta-band {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* Contact page topics */

.topics {
  display: grid;
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.topics li {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.topics h3 {
  font-size: var(--step-1);
  line-height: 1.2;
}

.topics p {
  color: var(--muted);
}

/* ---------- Legal documents ---------- */

.doc {
  display: grid;
  gap: 2.5rem clamp(2rem, 1rem + 4vw, 5rem);
}

@media (min-width: 60rem) {
  .doc {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
}

.toc {
  font-family: var(--font-display);
}

.toc h2 {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  gap: 0.15rem;
  padding: 0;
  border-left: 2px solid var(--line);
  list-style: none;
}

.toc a {
  display: block;
  padding: 0.3rem 0 0.3rem 0.9rem;
  color: var(--text);
  font-size: 0.96875rem;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  color: var(--link);
  text-decoration: underline;
}

.doc__body {
  max-width: 44rem;
}

.doc__body > section + section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.doc__body h2 {
  margin-bottom: 1rem;
  font-size: var(--step-2);
  line-height: 1.15;
  scroll-margin-top: 1.5rem;
}

.doc__body h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: var(--step-1);
  line-height: 1.25;
}

.doc__body p + p,
.doc__body p + ul,
.doc__body ul + p,
.doc__body p + ol,
.doc__body ol + p,
.doc__body ul + ul,
.doc__body .table-scroll + p {
  margin-top: 1em;
}

/* Prose lists only: lists with their own class (e.g. .process) keep their component styles. */
.doc__body ul:not([class]),
.doc__body ol:not([class]) {
  display: grid;
  gap: 0.5em;
  padding-left: 1.25em;
}

.doc__body li::marker {
  color: var(--muted);
}

.doc__body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.draft-note {
  display: grid;
  gap: 0.4rem;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--note-line);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--note-bg);
  color: var(--text);
  font-size: 1rem;
}

.draft-note strong {
  font-family: var(--font-display);
  font-weight: 700;
}

.fact-table {
  width: 100%;
  margin-top: 1.25rem;
  border-collapse: collapse;
  font-size: 1rem;
}

.fact-table caption {
  padding-bottom: 0.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-align: left;
}

.fact-table th,
.fact-table td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.fact-table thead th {
  border-bottom: 2px solid var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
}

.fact-table tbody th {
  font-family: var(--font-display);
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}

.fact-table th .tag {
  display: flex;
  width: fit-content;
  margin-top: 0.45rem;
}

/* Data deletion: audience chooser and process tags */

.chooser {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .chooser {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chooser a {
  display: grid;
  gap: 0.35rem;
  height: 100%;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.chooser a:hover {
  border-color: var(--link);
}

.chooser strong {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.2;
}

.chooser span {
  color: var(--muted);
  font-size: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem 0.2rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  vertical-align: 0.15em;
}

.tag--auto {
  color: var(--link);
}

.tag--partial {
  border-style: dashed;
  color: var(--link);
}

.tag--manual {
  color: var(--tag-manual);
}

.tag--you {
  color: var(--muted);
}

.process {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

.process > li {
  display: grid;
  gap: 0.6rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.process h3 {
  margin: 0;
  font-size: var(--step-1);
}

.process p {
  color: var(--muted);
}

.process p + p {
  margin-top: 0.2rem;
}

.process .tag {
  justify-self: start;
}

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

.notfound {
  display: grid;
  gap: 1.5rem;
  max-width: 44rem;
  padding-block: clamp(4rem, 3rem + 6vw, 9rem);
}

.notfound h1 {
  font-size: var(--step-4);
  line-height: 1;
}

.notfound .meta {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2.5rem;
}

.site-footer--compact {
  padding-block: 1.75rem;
}

.site-footer--compact .site-footer__legal {
  padding-top: 0;
}

.site-footer__top {
  display: grid;
  gap: 2rem 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .site-footer__top {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

.site-footer__tagline {
  max-width: 30rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 1rem;
}

.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 0.25rem 2.5rem;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.site-footer__legal {
  display: grid;
  gap: 0.75rem;
  padding-top: 1.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.site-footer__legal p {
  max-width: 70ch;
}

/* ---------- Print (legal pages are often printed or saved as PDF) ---------- */

@media print {
  .site-header .site-nav,
  .skip-link,
  .site-footer .footer-nav,
  .toc {
    display: none;
  }

  .theme-ink,
  .theme-klein {
    background: none;
    color: #000;
  }

  body {
    background: none;
    color: #000;
    font-size: 11pt;
  }

  .doc {
    display: block;
  }

  a {
    color: #000;
  }
}

/* ---------- Utilities ---------- */

.stack > * + * {
  margin-top: var(--stack-space, 1rem);
}

.stack > .registry {
  margin-top: 2rem;
}
