@charset "UTF-8";

/* ==========================================================================
   3A-Services OÜ — design system
   --------------------------------------------------------------------------
   Visual idea: a technical drawing sheet. Hairline rules, monospaced
   annotations, numbered items, and a title block that carries the company's
   registered identity — the compliance information is the signature device
   rather than a grey slab at the bottom of the page.

   Written by hand rather than generated by a utility framework: the whole
   stylesheet is 1 file served from this domain, which is what lets the privacy
   policy claim zero third-party requests and lets the Content-Security-Policy
   stay at default-src 'self' with no CDN exception.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts — self-hosted, latin + latin-ext subsets only
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/public-sans-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/public-sans-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/public-sans-var-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/public-sans-var-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  --paper:        #f4f2ec;
  --paper-tint:   #eeebe2;
  --surface:      #ffffff;
  --surface-2:    #faf8f3;
  --ink:          #14171c;
  --ink-2:        #3c434e;
  --ink-3:        #5f6874;
  --rule:         #d9d3c6;
  --rule-strong:  #b9b0a0;
  --accent:       #0a5b51;
  --accent-hover: #084a42;
  --accent-ink:   #ffffff;
  --accent-soft:  #e2eeeb;
  --accent-line:  #8ec0b8;
  --ochre:        #8f5205;
  --ochre-soft:   #f6ecdd;
  --ochre-line:   #d9ac6c;
  --focus:        #0a5b51;

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --font-body:    'Public Sans', ui-sans-serif, system-ui, 'Segoe UI', Arial, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, 'SFMono-Regular', 'Consolas', monospace;

  --shell:      74rem;
  --gutter:     clamp(1.15rem, 4vw, 3rem);
  --radius:     3px;
  --hair:       1px;

  --step--1: clamp(0.8rem, 0.77rem + 0.14vw, 0.875rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1:  clamp(1.15rem, 1.09rem + 0.3vw, 1.3rem);
  --step-2:  clamp(1.4rem, 1.28rem + 0.6vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.2vw, 2.4rem);
  --step-4:  clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper:        #0e1116;
    --paper-tint:   #12161c;
    --surface:      #161a21;
    --surface-2:    #1b212a;
    --ink:          #ecebe6;
    --ink-2:        #bcc3cc;
    --ink-3:        #949ca7;
    --rule:         #2b323c;
    --rule-strong:  #414a56;
    --accent:       #58c8b6;
    --accent-hover: #74d6c6;
    --accent-ink:   #052622;
    --accent-soft:  #12302c;
    --accent-line:  #2f6d63;
    --ochre:        #e0ac63;
    --ochre-soft:   #2a2014;
    --ochre-line:   #7a5b2c;
    --focus:        #58c8b6;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --paper:        #0e1116;
  --paper-tint:   #12161c;
  --surface:      #161a21;
  --surface-2:    #1b212a;
  --ink:          #ecebe6;
  --ink-2:        #bcc3cc;
  --ink-3:        #949ca7;
  --rule:         #2b323c;
  --rule-strong:  #414a56;
  --accent:       #58c8b6;
  --accent-hover: #74d6c6;
  --accent-ink:   #052622;
  --accent-soft:  #12302c;
  --accent-line:  #2f6d63;
  --ochre:        #e0ac63;
  --ochre-soft:   #2a2014;
  --ochre-line:   #7a5b2c;
  --focus:        #58c8b6;
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

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

/* The [hidden] attribute must actually hide.
   The user-agent rule is `[hidden] { display: none }` at the lowest possible
   specificity, so ANY class that sets `display` beats it. That is not a
   theoretical problem here: the appearance toggle is `.icon-btn` with
   `display: inline-grid` and ships with `hidden` set, to be revealed by
   site.js — and it stayed visible with JavaScript switched off, which is
   exactly the dead control the attribute exists to prevent. Found by loading
   the page in a browser profile with JavaScript disabled, not by reading the
   markup, where it looks correct. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  /* A long registry code or e-mail address must wrap rather than push the
     page sideways on a 360 px screen. `anywhere`, not `break-word`: the latter
     does not shrink the element's min-content contribution, so a grid track
     sized from min-content still blows out. */
  overflow-wrap: anywhere;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p, li { text-wrap: pretty; }
p { margin: 0 0 1.15em; max-width: 68ch; }

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

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

hr {
  border: 0;
  border-top: var(--hair) solid var(--rule);
  margin: 2.5rem 0;
}

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

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 4.5vw, 3.25rem); }
/* Two tight sections in a row are one region split for markup reasons, not two
   separate regions. Left alone they stack both paddings and open a gap wider
   than the break between genuinely different sections. */
.section--tight + .section--tight { padding-top: 0; }
.section--tinted { background: var(--paper-tint); }
.section + .section--tinted,
.section--tinted + .section { border-top: var(--hair) solid var(--rule); }

.stack > * + * { margin-top: 1.15rem; }
.stack-lg > * + * { margin-top: clamp(2rem, 4vw, 3rem); }

/* Every grid track is minmax(0, …). A bare `1fr` is minmax(auto, 1fr) and that
   `auto` floor is min-content, which is how one long unbroken string ends up
   widening a whole page on a phone. */
.grid { display: grid; gap: clamp(1.1rem, 2.5vw, 1.9rem); }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr)); }

.split {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.measure { max-width: 62ch; }

/* --------------------------------------------------------------------------
   5. Annotation type — the drawing-sheet vocabulary
   -------------------------------------------------------------------------- */

.tag {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.tag::before {
  content: '';
  width: 1.4rem;
  height: 1px;
  background: var(--rule-strong);
  flex: none;
}
.tag--plain::before { display: none; }
.tag--accent { color: var(--accent); }
.tag--accent::before { background: var(--accent-line); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.94em;
  letter-spacing: 0.01em;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

.note {
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 70ch;
}

.section-head { margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.section-head .tag { margin-bottom: 0.85rem; }
.section-head h2 { margin-bottom: 0.5rem; }

/* --------------------------------------------------------------------------
   6. Skip link, header, navigation
   -------------------------------------------------------------------------- */

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip:focus { top: 0.5rem; color: var(--accent-ink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: var(--hair) solid var(--rule);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--paper); }
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  min-width: 0;
}
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.18rem;
}

.nav { display: none; }
@media (min-width: 62rem) {
  .nav { display: flex; align-items: center; gap: 0.35rem; }
}
.nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--ink); background: var(--paper-tint); }
.nav a[aria-current='page'] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: var(--hair) solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { color: var(--ink); border-color: var(--rule-strong); }
.icon-btn svg { width: 1.05rem; height: 1.05rem; }

/* The mobile menu is a <details> element, so it opens and closes with no
   JavaScript at all — the navigation still works if the one script on the site
   fails to load, and it is keyboard-operable for free. */
.menu { position: relative; }
@media (min-width: 62rem) { .menu { display: none; } }
.menu > summary {
  list-style: none;
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: var(--hair) solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { width: 1.15rem; height: 1.15rem; }
.menu[open] > summary { border-color: var(--rule-strong); color: var(--ink); }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  width: min(17rem, calc(100vw - 2rem));
  background: var(--surface);
  border: var(--hair) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px -22px rgb(0 0 0 / 0.4);
  padding: 0.45rem;
  display: grid;
  gap: 0.1rem;
}
.menu-panel a {
  display: block;
  padding: 0.62rem 0.75rem;
  border-radius: 2px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}
.menu-panel a:hover { background: var(--paper-tint); color: var(--ink); }
.menu-panel a[aria-current='page'] { color: var(--accent); }
.menu-panel hr { margin: 0.4rem 0; }

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius);
  border: var(--hair) solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-3); color: var(--ink); }
.btn--block { width: 100%; }
.btn svg { width: 1rem; height: 1rem; flex: none; }

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

/* --------------------------------------------------------------------------
   8. Panels and cards
   -------------------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: var(--hair) solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.15rem, 3vw, 1.9rem);
}
.panel--flush { padding: 0; overflow: hidden; }
.panel--soft { background: var(--surface-2); }

/* Corner ticks: four short rules at the corners, the way a drawing sheet is
   registered. Drawn with a single background image, no extra elements. */
.ticked {
  position: relative;
  --tick: 12px;
}
.ticked::before,
.ticked::after {
  content: '';
  position: absolute;
  width: var(--tick);
  height: var(--tick);
  pointer-events: none;
}
.ticked::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}
.ticked::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.card {
  background: var(--surface);
  border: var(--hair) solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 2.6vw, 1.7rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}
.card h3 { margin: 0; font-size: var(--step-1); }
.card p { margin: 0; }
.card__code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 500;
}
.card__foot {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: var(--hair) solid var(--rule);
  font-size: 0.92rem;
  font-weight: 600;
}
.card--link { text-decoration: none; color: inherit; transition: border-color 0.15s ease; }
.card--link:hover { border-color: var(--accent-line); color: inherit; }
.card--link:hover .card__foot { color: var(--accent-hover); }

/* --------------------------------------------------------------------------
   9. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(2.75rem, 7vw, 5.25rem);
  overflow: hidden;
  border-bottom: var(--hair) solid var(--rule);
}
/* Faint drafting grid. Two repeating gradients, no image request. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.4;
  mask-image: radial-gradient(120% 90% at 76% 12%, #000 0%, transparent 72%);
  pointer-events: none;
}
.hero > * { position: relative; }

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 64rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.hero h1 { margin-bottom: 0.7rem; }
.hero .lede { margin-bottom: 1.6rem; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
  padding: 0;
  list-style: none;
}
.hero-facts li {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  background: var(--surface);
  border: var(--hair) solid var(--rule);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
}

/* --------------------------------------------------------------------------
   10. Title block — the identity plate
   -------------------------------------------------------------------------- */

.plate {
  background: var(--surface);
  border: var(--hair) solid var(--rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.plate__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.7rem 1rem;
  border-bottom: var(--hair) solid var(--rule-strong);
  background: var(--surface-2);
}
.plate__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}
.plate__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.plate__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 34rem) {
  .plate__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.plate__cell {
  padding: 0.7rem 1rem 0.8rem;
  border-top: var(--hair) solid var(--rule);
  min-width: 0;
}
.plate__body > .plate__cell:first-child,
.plate__body > .plate__cell:nth-child(2) { border-top: 0; }
@media (max-width: 33.999rem) {
  .plate__body > .plate__cell:nth-child(2) { border-top: var(--hair) solid var(--rule); }
}
@media (min-width: 34rem) {
  .plate__cell:nth-child(odd) { border-right: var(--hair) solid var(--rule); }
}
.plate__cell--wide { grid-column: 1 / -1; border-right: 0 !important; }
.plate__key {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.22rem;
}
.plate__val {
  font-size: 0.95rem;
  line-height: 1.42;
  color: var(--ink);
  font-weight: 500;
}
.plate__val a { font-weight: 500; }
.plate__foot {
  padding: 0.65rem 1rem 0.8rem;
  border-top: var(--hair) solid var(--rule-strong);
  background: var(--surface-2);
  font-size: var(--step--1);
  color: var(--ink-3);
}
.plate__foot a { color: var(--accent); }

/* --------------------------------------------------------------------------
   11. Numbered lists, check lists, definition tables
   -------------------------------------------------------------------------- */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.steps > li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.4rem 0.9rem;
  align-items: start;
}
.steps__no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: var(--hair) solid var(--accent-line);
  border-radius: var(--radius);
  padding: 0.25rem 0;
  text-align: center;
  background: var(--accent-soft);
}
.steps h3 { margin: 0 0 0.2rem; font-size: var(--step-1); }
.steps p { margin: 0; }
.steps__body { grid-column: 2; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.ticks > li {
  position: relative;
  padding-left: 1.55rem;
  line-height: 1.55;
}
.ticks > li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 0.62rem;
  height: 0.62rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-60%) rotate(-45deg);
}
.ticks--bar > li::before {
  width: 0.7rem; height: 0;
  border-left: 0;
  border-bottom: 2px solid var(--rule-strong);
  transform: none;
  top: 0.75em;
}
.ticks--deny > li::before {
  content: '';
  width: 0.7rem;
  height: 0;
  border: 0;
  border-top: 2px solid var(--ochre);
  transform: none;
  top: 0.78em;
}

.defs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: var(--hair) solid var(--rule);
}
@media (min-width: 42rem) {
  .defs { grid-template-columns: minmax(9rem, 15rem) minmax(0, 1fr); }
}
.defs > dt {
  padding: 0.7rem 0 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  min-width: 0;
}
.defs > dd {
  margin: 0;
  padding: 0 0 0.75rem;
  border-bottom: var(--hair) solid var(--rule);
  min-width: 0;
}
@media (min-width: 42rem) {
  .defs > dt {
    padding: 0.85rem 1.25rem 0.85rem 0;
    border-bottom: var(--hair) solid var(--rule);
  }
  .defs > dd { padding: 0.85rem 0; }
}

/* --------------------------------------------------------------------------
   12. Tables
   -------------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  border: var(--hair) solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
table.data {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.94rem;
}
table.data caption {
  text-align: left;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: var(--hair) solid var(--rule);
}
table.data th, table.data td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 1rem;
  border-bottom: var(--hair) solid var(--rule);
}
table.data thead th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  background: var(--surface-2);
}
table.data tbody tr:last-child th,
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody th { font-weight: 600; color: var(--ink); }

/* --------------------------------------------------------------------------
   13. Legal / long-form prose
   -------------------------------------------------------------------------- */

.prose { max-width: 44rem; }
.prose h2 {
  font-size: var(--step-2);
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: var(--hair) solid var(--rule);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: 1.9rem; }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: 0.5rem; }
.prose li > ul { margin-top: 0.5rem; }

.callout {
  border: var(--hair) solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 0.4rem;
}
.callout--warn { border-left-color: var(--ochre); background: var(--ochre-soft); }

.toc {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
}
/* Flex, not an inline label with a margin: a wrapped entry should carry on
   under its own title rather than under the reference code. */
.toc a { text-decoration: none; display: flex; gap: 0.6rem; align-items: baseline; }
.toc a:hover { text-decoration: underline; text-decoration-color: currentColor; }
.toc .mono { color: var(--ink-3); flex: none; }

/* --------------------------------------------------------------------------
   14. Forms
   -------------------------------------------------------------------------- */

.form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field > label {
  font-weight: 600;
  font-size: 0.93rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}
.field__req {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}
.field__hint { font-size: var(--step--1); color: var(--ink-3); }

input[type='text'],
input[type='email'],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: var(--hair) solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  min-width: 0;
}
textarea { min-height: 9.5rem; resize: vertical; line-height: 1.55; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1.05rem center, right 0.75rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
input[aria-invalid='true'], textarea[aria-invalid='true'], select[aria-invalid='true'] {
  border-color: var(--ochre);
}

.field__error {
  font-size: var(--step--1);
  color: var(--ochre);
  font-weight: 600;
}

/* The honeypot must be in the DOM and reachable by nothing a person uses.
   Off-screen rather than display:none — some bots skip hidden inputs. */
.trap {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.alert {
  border: var(--hair) solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: 1rem 1.15rem;
}
.alert--error { border-left-color: var(--ochre); background: var(--ochre-soft); }
.alert h2, .alert h3 { margin-top: 0; font-size: var(--step-1); }
.alert > :last-child { margin-bottom: 0; }
.alert ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: var(--hair) solid var(--rule);
  background: var(--paper-tint);
  padding-block: clamp(2.5rem, 5vw, 3.75rem) 1.75rem;
  margin-top: auto;
}
.footer-top {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 54rem) {
  .footer-top { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
}
.footer-col h2 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.85rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

.footer-legal {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: 1.4rem;
  border-top: var(--hair) solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--step--1);
  color: var(--ink-3);
}
.footer-legal p { margin: 0; max-width: none; }
.footer-build {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   16. Storage notice
   -------------------------------------------------------------------------- */

.notice-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--surface);
  border-top: var(--hair) solid var(--rule-strong);
  box-shadow: 0 -10px 30px -20px rgb(0 0 0 / 0.5);
  padding: 0.9rem 0;
}
.notice-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}
.notice-inner p { margin: 0; font-size: var(--step--1); max-width: 62ch; }
.notice-bar[hidden] { display: none; }

/* --------------------------------------------------------------------------
   17. Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  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;
}

.page-wrap { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

.crumbs {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  padding-block: 1rem 0;
}
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-current] { color: var(--ink-2); }

.diagram { width: 100%; height: auto; display: block; }
.diagram-frame {
  background: var(--surface);
  border: var(--hair) solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(0.9rem, 2.5vw, 1.4rem);
}
.diagram-frame figcaption {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: var(--hair) solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media print {
  .site-header, .notice-bar, .btn-row, .menu { display: none !important; }
  body { background: #fff; color: #000; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 0.85em; }
}
