/* ==========================================================================
   TenancyPack — one stylesheet.
   Archetype: docket ledger with a proof rail.
   Light only. No gradients. No JS. England only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted, local paths only)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "IBM Plex Serif";
  src: url("/static/fonts/plex-serif-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Serif";
  src: url("/static/fonts/plex-serif-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/public-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/public-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/public-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces + ink */
  --paper: #F4EDDF;
  --card: #FDFBF5;
  --ink: #1D1B16;
  --muted: #6B6455;
  --hairline: #E4DCC8;

  /* Accent */
  --verdigris: #0F6B66;
  --verdigris-dark: #0A4B47;

  /* Semantic */
  --ok: #0F6B66;
  --warn: #A66A0F;
  --warn-ink: #7A4E0B;      /* darkened ochre so body-size text clears AA */
  --bad: #8C2F1B;

  /* Washes (accent over paper, kept warm) */
  --ok-wash: rgba(15, 107, 102, 0.07);
  --warn-wash: rgba(166, 106, 15, 0.10);
  --bad-wash: rgba(140, 47, 27, 0.08);

  /* Type */
  --font-display: "IBM Plex Serif", "Iowan Old Style", "Palatino Linotype",
    Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Helvetica Neue", Helvetica, Arial, system-ui,
    -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo,
    Consolas, "Liberation Mono", monospace;

  --fs-display: clamp(2rem, 1.35rem + 2.9vw, 3.25rem);
  --fs-h1: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --fs-h2: clamp(1.3rem, 1.12rem + 0.85vw, 1.7rem);
  --fs-h3: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.75rem;

  /* Space */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;

  /* Structure */
  --shell-marketing: 1100px;
  --shell-app: 760px;
  --radius: 3px;
  --rule: 2px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --touch: 2.75rem; /* 44px */
}

/* --------------------------------------------------------------------------
   3. Reset + base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.005em;
  margin: 0 0 var(--s3);
  color: var(--ink);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 var(--s4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--verdigris); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--verdigris-dark); }

ul, ol { margin: 0 0 var(--s4); padding-left: 1.25rem; }
li { margin-bottom: var(--s2); max-width: 68ch; }
li:last-child { margin-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: var(--s6) 0;
}

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

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

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

.skip {
  position: absolute;
  left: var(--s4);
  top: -4rem;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s3) var(--s4);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 140ms ease-out;
}
.skip:focus { top: var(--s3); color: var(--paper); }

/* --------------------------------------------------------------------------
   4. Shell
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--marketing { max-width: var(--shell-marketing); }
.shell--app { max-width: var(--shell-app); }

main { display: block; padding-block: var(--s6) var(--s8); }
main.is-marketing { padding-block: var(--s6) var(--s8); }

/* --------------------------------------------------------------------------
   5. Masthead + navs
   -------------------------------------------------------------------------- */
.masthead {
  background: var(--card);
  border-bottom: 1px solid var(--hairline);
}
.masthead__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s5);
  padding-block: var(--s3);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.wordmark:hover { color: var(--ink); }
.wordmark__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: var(--rule) solid var(--verdigris);
  border-radius: 50%;
  color: var(--verdigris);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  transform: rotate(-8deg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  font-size: var(--fs-small);
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: var(--s2) 0;
  border-bottom: var(--rule) solid transparent;
}
.nav a:hover { color: var(--verdigris-dark); border-bottom-color: var(--verdigris); }
.nav .nav__cta {
  border: var(--rule) solid var(--verdigris);
  border-radius: var(--radius);
  padding: var(--s2) var(--s3);
  color: var(--verdigris-dark);
}
.nav .nav__cta:hover { background: var(--ok-wash); border-bottom-color: var(--verdigris); }

.nav__signout { margin: 0; display: inline-flex; }
.nav__signout button {
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: var(--rule) solid transparent;
  padding: var(--s2) 0;
  cursor: pointer;
  min-height: var(--touch);
}
.nav__signout button:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--card);
  border-top: 1px solid var(--hairline);
  padding-block: var(--s6);
  font-size: var(--fs-small);
  color: var(--muted);
}
.footer p { max-width: 72ch; margin-bottom: var(--s3); }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s3);
}
.footer__links li { margin: 0; }
.footer__brand { color: var(--ink); font-weight: 700; }
.footer__disclaimer {
  border-left: var(--rule) solid var(--hairline);
  padding-left: var(--s3);
  font-style: normal;
}

/* --------------------------------------------------------------------------
   7. The stamp — signature motif
   -------------------------------------------------------------------------- */
.stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 4.25rem;
  height: 4.25rem;
  padding: 0.35rem;
  border: var(--rule) solid var(--ok);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(15, 107, 102, 0.3);
  color: var(--ok);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-8deg);
}
.stamp b { font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.04em; display: block; }
.stamp span { display: block; }

.stamp--sm { width: 3.4rem; height: 3.4rem; font-size: 0.4375rem; }
.stamp--sm b { font-size: 0.5625rem; }
.stamp--lg { width: 5.25rem; height: 5.25rem; font-size: 0.5625rem; }
.stamp--lg b { font-size: 0.8125rem; }

.stamp--warn {
  border-color: var(--warn);
  color: var(--warn-ink);
  box-shadow: inset 0 0 0 1px rgba(166, 106, 15, 0.3);
}
.stamp--bad {
  border-color: var(--bad);
  color: var(--bad);
  box-shadow: inset 0 0 0 1px rgba(140, 47, 27, 0.3);
}
.stamp--void {
  border-color: var(--hairline);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--hairline);
  border-style: dashed;
}

/* Chips share the stamp's mono voice, pill shape for inline use */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: var(--rule) solid currentColor;
  flex: 0 0 auto;
}
.chip--ok { color: var(--ok); border-color: rgba(15, 107, 102, 0.4); background: var(--ok-wash); }
.chip--warn { color: var(--warn-ink); border-color: rgba(166, 106, 15, 0.45); background: var(--warn-wash); }
.chip--bad { color: var(--bad); border-color: rgba(140, 47, 27, 0.4); background: var(--bad-wash); }
.chip--plain { color: var(--muted); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s2);
}

/* --------------------------------------------------------------------------
   8. Cards, panels, bands
   -------------------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--s5);
}
.card + .card { margin-top: var(--s4); }
.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  margin-bottom: var(--s4);
}
.card__head h2, .card__head h3 { margin: 0; }

.panel {
  border-left: var(--rule) solid var(--hairline);
  padding-left: var(--gutter);
}
.panel--accent { border-left-color: var(--verdigris); }

.aside {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: var(--rule) solid var(--verdigris);
  border-radius: var(--radius);
  padding: var(--s4) var(--s5);
  font-size: var(--fs-small);
}
.aside h3 { font-size: 1rem; }
.aside ol, .aside ul { margin-bottom: 0; }

.band {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--s5);
}

.disclaimer {
  font-size: var(--fs-small);
  color: var(--muted);
  border-left: var(--rule) solid var(--hairline);
  padding-left: var(--s3);
  margin: var(--s4) 0 0;
  max-width: 64ch;
}

.alert {
  border: 1px solid var(--hairline);
  border-left: var(--rule) solid var(--muted);
  border-radius: var(--radius);
  background: var(--card);
  padding: var(--s4);
  margin-bottom: var(--s5);
}
.alert h2, .alert h3 { margin-top: 0; font-size: 1rem; }
.alert p { font-size: var(--fs-small); }
.alert--ok { border-left-color: var(--ok); background: var(--ok-wash); }
.alert--warn { border-left-color: var(--warn); background: var(--warn-wash); }
.alert--bad { border-left-color: var(--bad); background: var(--bad-wash); }
.alert--bad h2, .alert--bad h3 { color: var(--bad); }
.alert ul { margin-bottom: 0; font-size: var(--fs-small); }

/* --------------------------------------------------------------------------
   9. Sections + rhythm (marketing)
   -------------------------------------------------------------------------- */
.section { margin-top: var(--s8); }
.section > h2 { margin-bottom: var(--s4); }
.section__lede { font-size: 1.0625rem; color: var(--muted); max-width: 62ch; }

.stack > * + * { margin-top: var(--s4); }
.stack-lg > * + * { margin-top: var(--s6); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
}
@media (min-width: 46rem) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: var(--s5); }
}

/* Numbered loop — genuine sequence, so numbering is earned */
.loop { list-style: none; padding: 0; margin: 0; counter-reset: loop; }
.loop > li {
  counter-increment: loop;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-top: 1px solid var(--hairline);
  max-width: none;
  margin: 0;
}
.loop > li:last-child { border-bottom: 1px solid var(--hairline); }
.loop > li::before {
  content: counter(loop, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--verdigris);
  padding-top: 0.15rem;
}
.loop h3 { margin-bottom: var(--s2); }
.loop p { font-size: var(--fs-small); color: var(--muted); margin: 0; }

/* Definition-style list for "what's in the vault" */
.spec { margin: 0; }
.spec > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s1);
  padding: var(--s4) 0;
  border-top: 1px solid var(--hairline);
}
.spec > div:last-child { border-bottom: 1px solid var(--hairline); }
.spec dt { font-weight: 700; }
.spec dd { margin: 0; color: var(--muted); font-size: var(--fs-small); max-width: 62ch; }
@media (min-width: 46rem) {
  .spec > div { grid-template-columns: 15rem 1fr; gap: var(--s5); }
}

/* --------------------------------------------------------------------------
   10. Hero + docket ledger + the one animation
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--s6) var(--s2); }
.hero__lead { display: grid; gap: var(--s5); }
.hero h1 {
  font-size: var(--fs-display);
  font-weight: 700;
  max-width: 18ch;
  margin-bottom: var(--s4);
}
.hero__sub { font-size: 1.0625rem; color: var(--muted); max-width: 54ch; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s5);
}

@media (min-width: 60rem) {
  .hero__lead {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    gap: var(--s7);
    align-items: start;
  }
}

/* The docket */
.docket {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--hairline), 0 12px 24px -20px rgba(29, 27, 22, 0.5);
  overflow: hidden;
}
.docket__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--hairline);
  box-shadow: inset 0 -3px 0 -2px var(--hairline);
  background: var(--paper);
}
.docket__title {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.docket__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.docket__foot {
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--hairline);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Ledger rows — the proof rail */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger > li {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr);
  gap: var(--s3);
  align-items: center;
  padding: var(--s4);
  border-top: 1px solid var(--hairline);
  margin: 0;
  max-width: none;
}
.ledger > li:first-child { border-top: 0; }
.ledger__rail { display: flex; justify-content: center; }
.ledger__what { font-weight: 600; font-size: var(--fs-small); margin: 0 0 0.1rem; max-width: none; }
.ledger__who { font-size: var(--fs-small); color: var(--muted); margin: 0 0 0.15rem; max-width: none; }
.ledger__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--muted);
  margin: 0;
  max-width: none;
  overflow-wrap: anywhere;
}
.ledger > li.is-fresh { background: var(--ok-wash); }

/* The single choreographed moment: the stamp presses down onto row 3 */
.stamp-press {
  animation: stamp-press 780ms cubic-bezier(0.2, 0.75, 0.3, 1) 550ms both;
  transform-origin: 50% 50%;
}
@keyframes stamp-press {
  0% { opacity: 0; transform: rotate(-24deg) scale(2.6); }
  60% { opacity: 1; transform: rotate(-8deg) scale(1.05); }
  78% { opacity: 1; transform: rotate(-8deg) scale(0.96); }
  100% { opacity: 1; transform: rotate(-8deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp-press {
    animation: none;
    opacity: 1;
    transform: rotate(-8deg) scale(1);
  }
  * { transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   11. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--touch);
  padding: 0.6rem 1.15rem;
  border: var(--rule) solid var(--verdigris);
  border-radius: var(--radius);
  background: var(--verdigris);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out,
    transform 100ms ease-out;
}
.btn:hover {
  background: var(--verdigris-dark);
  border-color: var(--verdigris-dark);
  color: #FFFFFF;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: var(--rule) solid var(--ink); outline-offset: 2px; }

.btn--ghost {
  background: transparent;
  color: var(--verdigris-dark);
  border-color: var(--verdigris);
}
.btn--ghost:hover { background: var(--ok-wash); color: var(--verdigris-dark); }

.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.btn--quiet:hover { background: var(--paper); color: var(--ink); border-color: var(--muted); }

.btn--sm { min-height: var(--touch); padding: 0.4rem 0.8rem; font-size: var(--fs-small); }
.btn--block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  background: var(--hairline);
  border-color: var(--hairline);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

.link-quiet { color: var(--muted); font-size: var(--fs-small); }
.link-quiet:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   12. Forms
   -------------------------------------------------------------------------- */
form { margin: 0; }

fieldset {
  border: 0;
  border-top: 1px solid var(--hairline);
  padding: var(--s5) 0 0;
  margin: var(--s6) 0 0;
}
fieldset:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
legend {
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s3);
}

.field { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.field > label { font-weight: 600; font-size: var(--fs-small); }
.field__help { font-size: var(--fs-small); color: var(--muted); margin: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--s4);
}
@media (min-width: 34rem) {
  .field-row--2 { grid-template-columns: 1fr 1fr; }
  .field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 140ms ease-out, box-shadow 140ms ease-out;
}
input[type="date"] { font-family: var(--font-mono); font-size: 0.9375rem; }
textarea { min-height: 6rem; resize: vertical; line-height: 1.55; }

input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--rule) solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 1.05rem center, right 0.75rem center;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

/* Checkbox / radio rows */
.check {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: var(--s3);
  align-items: start;
  padding: var(--s3) 0;
  min-height: var(--touch);
  margin: 0;
}
.check input[type="checkbox"],
.check input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  accent-color: var(--verdigris);
}
.check label { font-size: var(--fs-small); line-height: 1.5; }
.check .field__help { margin-top: var(--s1); }
.check input[disabled] + label { color: var(--muted); }

.check-list { border-top: 1px solid var(--hairline); }
.check-list .check { border-bottom: 1px solid var(--hairline); }

/* Radio cards — used for tenancy kind */
.radio-cards { display: grid; gap: var(--s3); }
.radio-card {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: var(--s3);
  align-items: start;
  border: 1px solid var(--hairline);
  border-left: var(--rule) solid var(--hairline);
  border-radius: var(--radius);
  background: var(--card);
  padding: var(--s4);
  cursor: pointer;
  transition: border-color 140ms ease-out, background-color 140ms ease-out;
}
.radio-card:hover { border-color: var(--muted); border-left-color: var(--verdigris); }
.radio-card input { margin-top: 0.2rem; }
.radio-card strong { display: block; font-size: var(--fs-body); margin-bottom: var(--s1); }
.radio-card span { display: block; font-size: var(--fs-small); color: var(--muted); }
.radio-card:has(input:checked) {
  border-color: var(--verdigris);
  border-left-color: var(--verdigris);
  background: var(--ok-wash);
}
.radio-card:has(input:focus-visible) { outline: var(--rule) solid var(--ink); outline-offset: 2px; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s5);
  padding-top: var(--s5);
  border-top: 1px solid var(--hairline);
}

.tenant-block {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--s4);
  margin-bottom: var(--s3);
  background: var(--card);
}
.tenant-block > .eyebrow { margin-bottom: var(--s3); }

/* --------------------------------------------------------------------------
   13. Tables
   -------------------------------------------------------------------------- */
.table-scroll {
  /* position:relative makes this the containing block for absolutely positioned
     descendants (e.g. .visually-hidden column labels) so they are clipped here
     instead of escaping to the page and widening the document. */
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.table-wide table { min-width: 52rem; }
caption {
  text-align: left;
  padding: var(--s3) var(--s4);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}
th, td {
  text-align: left;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
th {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td .mono { white-space: nowrap; }
td .stack-cell { display: grid; gap: var(--s1); }

/* --------------------------------------------------------------------------
   14. Lists of records (app)
   -------------------------------------------------------------------------- */
.records { list-style: none; margin: 0; padding: 0; }
.records > li {
  margin: 0;
  max-width: none;
  border-top: 1px solid var(--hairline);
}
.records > li:last-child { border-bottom: 1px solid var(--hairline); }
.record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  padding: var(--s4) 0;
  text-decoration: none;
  color: var(--ink);
}
a.record:hover { color: var(--verdigris-dark); }
a.record:hover .record__title { text-decoration: underline; }
.record__title { font-weight: 600; }
.record__meta { font-size: var(--fs-small); color: var(--muted); margin: 0; max-width: none; }

.empty {
  border: 1px dashed var(--hairline);
  border-radius: var(--radius);
  padding: var(--s5);
  text-align: left;
  color: var(--muted);
  font-size: var(--fs-small);
  background: var(--card);
}
.empty strong { display: block; color: var(--ink); font-size: var(--fs-body); margin-bottom: var(--s2); }

/* Proof rows inside the app */
.proof { list-style: none; margin: 0; padding: 0; }
.proof > li {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: var(--s3);
  align-items: start;
  padding: var(--s4) 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
  max-width: none;
}
.proof > li:last-child { border-bottom: 1px solid var(--hairline); }
.proof__rail { display: flex; justify-content: center; padding-top: 0.15rem; }
.proof__what { font-weight: 600; font-size: var(--fs-small); margin: 0 0 0.15rem; max-width: none; }
.proof__meta { font-size: var(--fs-small); color: var(--muted); margin: 0; max-width: none; }
.proof__hash {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--muted);
  margin: var(--s1) 0 0;
  max-width: none;
  overflow-wrap: anywhere;
}

.recipients { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0 0; padding: 0; list-style: none; }
.recipients li { margin: 0; max-width: none; }

/* --------------------------------------------------------------------------
   15. Pricing
   -------------------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
@media (min-width: 46rem) { .plans { grid-template-columns: 1fr 1fr; gap: var(--s5); } }

.plan {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: var(--rule) solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.plan--accent { border-left-color: var(--verdigris); }
.plan h3 { margin: 0; }
.plan__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  margin: 0;
}
.plan__price small {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--muted);
}
.plan ul { margin: 0; padding-left: 1.1rem; font-size: var(--fs-small); }
.plan .btn { margin-top: auto; }

.price-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s4);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--muted);
}
.price-teaser strong { font-family: var(--font-body); color: var(--ink); font-size: var(--fs-body); }

/* --------------------------------------------------------------------------
   16. App page header
   -------------------------------------------------------------------------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3) var(--s4);
  margin-bottom: var(--s6);
  padding-bottom: var(--s4);
  border-bottom: var(--rule) solid var(--hairline);
}
.page-head h1 { margin: 0; }
.page-head__meta { font-size: var(--fs-small); color: var(--muted); margin: var(--s2) 0 0; }
.page-head__aside { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s2);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

.subsection { margin-top: var(--s6); }
.subsection > h2 { font-size: 1.25rem; margin-bottom: var(--s3); }
.subsection > .field__help { margin-bottom: var(--s4); }

.meta-list { display: grid; gap: var(--s2); margin: 0 0 var(--s4); font-size: var(--fs-small); }
.meta-list > div { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); }
.meta-list dt { color: var(--muted); min-width: 9rem; }
.meta-list dd { margin: 0; font-weight: 600; }

.doc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-top: 1px solid var(--hairline);
}
.doc-row:last-of-type { border-bottom: 1px solid var(--hairline); }
.doc-row__text { flex: 1 1 16rem; }
.doc-row__text p { margin: var(--s1) 0 0; font-size: var(--fs-small); color: var(--muted); }
.doc-row__actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* --------------------------------------------------------------------------
   17. Narrow column — auth, errors, single-purpose forms
   -------------------------------------------------------------------------- */
.narrow { max-width: 32rem; }
.narrow p { max-width: none; }

.gate {
  margin-top: var(--s6);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: var(--rule) solid var(--warn);
  border-radius: var(--radius);
  padding: var(--s5);
}
.gate h2 { margin-top: 0; }
.gate p { font-size: var(--fs-small); }

.stamp-lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s4);
}
.stamp-lockup > div { flex: 1 1 14rem; }
.stamp-lockup p { margin: var(--s1) 0 0; font-size: var(--fs-small); color: var(--muted); }
