/*
 * CoopStackOS — marketing site
 *
 * Built from this project's own material:
 *   type      Public Sans + IBM Plex Mono, self-hosted from packages/design-tokens
 *   surfaces  the CSOS surface ladder (#fafafa → #fff, 8px controls, 12px cards)
 *   product   live HTML interface fragments (data-ui), not screenshots of another product
 *   accent    the cooperative green carried from the company brand, used only for action and one phrase
 *
 * The reference point is the register of the v1 site — warm, plain-spoken, product-led —
 * not its layout, its copy or its assets.
 *
 * site/fonts/ holds byte-for-byte copies of codebase/frontend/packages/design-tokens/src/fonts/.
 * That package is the source of truth and the deploy job compares the two, because the Worker serves this
 * directory as its asset root and cannot reach outside it. Keep every URL here relative to site/.
 */

@font-face {
  font-family: "Public Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/public-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/public-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/public-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/public-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* CSOS surface ladder (packages/design-tokens/src/theme.css) */
  --paper: #fafafa;
  --card: #ffffff;
  --paper-2: #f4f4f3;
  --ink: #0a0a0a;
  --ink-2: #171717;
  --body: #3c3c3c;
  --muted: #4f4f4f;
  --faint: #6b6b6b;
  --line: #e5e5e5;
  --line-strong: #c7c7c7;

  /* one accent, for action and one phrase per section */
  --accent: #0b6b4a;
  --accent-deep: #08503a;
  --accent-soft: #e9f2ee;

  /* status meanings, used only inside interface fragments */
  --ok: #166534;
  --ok-soft: #e6f4ea;
  --warn: #92400e;
  --warn-soft: #fdf1dc;
  --info: #1d4ed8;
  --info-soft: #e6eefc;
  --danger: #b91c1c;
  --danger-soft: #fbe9e9;

  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-display: clamp(36px, 4.1vw, 58px);
  --fs-h2: clamp(27px, 3vw, 38px);
  --fs-h3: 21px;
  --fs-body: 17px;
  --fs-small: 16px;
  --fs-micro: 13px;

  --r-control: 8px;
  --r-card: 12px;
  --r-shell: 16px;

  --pad: 32px;
  --section: 116px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 140ms;
  --t-mid: 240ms;
}

@media (max-width: 960px) {
  :root {
    --pad: 22px;
    --section: 80px;
  }
}

@media (max-width: 600px) {
  :root {
    --pad: 18px;
    --section: 60px;
    --fs-h2: 26px;
    --fs-h3: 19px;
    --fs-small: 16px;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img,
svg {
  display: block;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.032em;
  line-height: 1.06;
  text-wrap: balance;
}

h1 {
  text-wrap: initial;
}

p {
  text-wrap: pretty;
}

code,
kbd,
samp {
  font-family: var(--mono);
  font-size: 0.88em;
  font-variant-numeric: tabular-nums;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 50%;
  top: -64px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--r-control) var(--r-control);
  font-weight: 600;
  font-size: var(--fs-small);
  text-decoration: none;
  transition: top var(--t-fast) ease;
}

.skip:focus-visible {
  top: 0;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

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

.tint {
  background: var(--paper-2);
}

/* ───────────── type ───────────── */
.label {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--faint);
}

.h2 {
  font-size: var(--fs-h2);
  margin-top: 14px;
  max-width: 22ch;
}

.lede {
  margin-top: 18px;
  max-width: 60ch;
  font-size: var(--fs-body);
  line-height: 1.62;
  color: var(--body);
}

.accent {
  color: var(--accent);
}

.note {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.55;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ───────────── controls ───────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--t-fast) ease,
    border-color var(--t-fast) ease,
    color var(--t-fast) ease,
    transform var(--t-fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--quiet {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

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

.btn--sm {
  min-height: 40px;
  padding: 9px 16px;
  font-size: var(--fs-micro);
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    background: #2b2b2b;
  }

  .btn--accent:hover {
    background: var(--accent-deep);
  }

  .btn--ghost:hover {
    border-color: var(--ink);
    background: #fff;
  }

  .btn--quiet:hover {
    background: #dfece6;
  }
}

.link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: border-color var(--t-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  .link:hover {
    border-color: var(--ink);
  }
}

/* ───────────── nav ───────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgb(250 250 250 / 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

/* CoopStackOS wordmark — copied from packages/ui/src/components/ui/wordmark.tsx
   (direction B "Stack"): three bars that step right and fade, "CoopStack" in the
   product sans, "OS" in the mono face. Every dimension is in em, so one font-size
   drives the whole lockup. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}

.wordmark-mark {
  display: inline-grid;
  gap: 0.07em;
  width: 0.9em;
  flex: none;
}

.wm-bar {
  display: block;
  height: 0.2em;
  border-radius: 0.07em;
  background: currentColor;
}

.wm-bar:nth-child(1) {
  margin-left: 0;
  opacity: 1;
}

.wm-bar:nth-child(2) {
  margin-left: 0.14em;
  opacity: 0.78;
}

.wm-bar:nth-child(3) {
  margin-left: 0.28em;
  opacity: 0.56;
}

.wordmark-text {
  display: inline-flex;
  align-items: baseline;
}

.wm-os {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.62em;
  letter-spacing: 0.02em;
  margin-left: 0.18em;
  color: var(--muted);
  align-self: baseline;
}

.wordmark--inverse {
  color: #fff;
}

.wordmark--inverse .wm-os {
  color: #8f8f8f;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    color: var(--ink);
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  background: #fff;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-menu a {
  display: block;
  padding: 15px var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 940px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-actions .btn {
    display: none;
  }

  .mobile-menu.is-open {
    display: block;
  }
}

/* ───────────── hero ───────────── */
.hero {
  padding: 76px 0 92px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-copy h1 {
  font-size: var(--fs-display);
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin-top: 20px;
}

.hero-sub {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 30px;
}

.hero-facts li {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.hero-facts b {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero-facts svg {
  color: var(--accent);
  margin-right: 2px;
}

/* the hero object: a real governance request, not a mockup */
.hero-object {
  position: relative;
}

.hero-object::before {
  content: "";
  position: absolute;
  inset: 34px -18px -22px 24px;
  background: var(--accent-soft);
  border-radius: 22px;
  z-index: 0;
}

.hero-object > * {
  position: relative;
  z-index: 1;
}

.hero-object-cap {
  margin-top: 18px;
  font-size: var(--fs-small);
  color: var(--muted);
  max-width: 52ch;
}

@media (max-width: 1040px) {
  .hero {
    padding: 52px 0 64px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .hero-sub {
    max-width: 54ch;
  }
}

/* ───────────── the rail (transaction anatomy) ───────────── */
.rail {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.rail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.rail-step {
  padding: 28px 26px 30px 0;
  border-right: 1px solid var(--line);
  margin-right: 26px;
}

.rail-step:last-child {
  border-right: 0;
  margin-right: 0;
}

.rail-step h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  margin-top: 10px;
}

.rail-step p {
  margin-top: 6px;
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.5;
}

.rail-step .chip {
  margin-top: 14px;
}

@media (max-width: 940px) {
  .rail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rail-step {
    border-right: 0;
    margin-right: 0;
    padding: 24px 20px 24px 0;
  }

  .rail-step:nth-child(odd) {
    border-right: 1px solid var(--line);
    margin-right: 20px;
  }

  .rail-step:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .rail-grid {
    grid-template-columns: 1fr;
  }

  .rail-step {
    border-right: 0;
    margin-right: 0;
  }

  .rail-step:nth-child(odd) {
    border-right: 0;
    margin-right: 0;
  }

  .rail-step:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }
}

/* ───────────── evidence / chain ───────────── */
.evidence-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}

.evidence-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 52px;
}

.evidence {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-height: 190px;
}

.evidence h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.evidence p {
  margin-top: 6px;
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.5;
}

.evidence-figure {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.evidence-figure span {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  color: var(--faint);
}

/* hash chain */
.chain {
  margin-top: 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px;
}

.chain-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 18px;
}

.chain-top h3 {
  font-size: 16px;
}

.chain-top p {
  font-size: var(--fs-small);
  color: var(--muted);
}

.chain-blocks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.chain-block {
  appearance: none;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: 13px;
  cursor: pointer;
  transition:
    border-color var(--t-fast) ease,
    background-color var(--t-fast) ease,
    transform var(--t-fast) var(--ease);
}

.chain-block:hover {
  border-color: var(--line-strong);
}

.chain-block .seq {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}

.chain-block .act {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-top: 5px;
  line-height: 1.35;
}

.chain-block .hashes {
  display: block;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  line-height: 1.6;
  word-break: break-all;
}

.chain-block[aria-pressed="true"] {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.chain-block[aria-pressed="true"] .seq,
.chain-block[aria-pressed="true"] .act,
.chain-block[aria-pressed="true"] .hashes {
  color: #7d3223;
}

.chain-block.is-broken {
  border-style: dashed;
  border-color: var(--danger);
}

.chain-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.chain-verdict p {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

.chain-verdict p.bad {
  color: var(--danger);
}

@media (max-width: 940px) {
  .evidence-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .evidence-cards {
    grid-template-columns: 1fr;
  }

  .chain-blocks {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .chain-blocks {
    grid-template-columns: 1fr;
  }
}

/* ───────────── surfaces / tabs ───────────── */
.surfaces {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.surface-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 26px;
}

.surface-tab {
  appearance: none;
  font-family: inherit;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  padding: 9px 14px;
  cursor: pointer;
  transition:
    background-color var(--t-fast) ease,
    border-color var(--t-fast) ease,
    color var(--t-fast) ease;
}

.surface-tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.surface-tab[aria-selected="true"] .surface-tab-count {
  color: #bdbdbd;
}

.surface-tab-count {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}

.surface-points {
  list-style: none;
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.surface-points li {
  display: flex;
  gap: 10px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--body);
}

.surface-points svg {
  flex: none;
  margin-top: 4px;
  color: var(--accent);
}

.surface-caption {
  margin-top: 22px;
  font-size: var(--fs-small);
  color: var(--muted);
  max-width: 52ch;
}

@media (max-width: 1000px) {
  .surfaces {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

/* ───────────── month-end run ───────────── */
.run {
  display: grid;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

.run-step {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.run-step h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.run-step .when {
  display: block;
  margin-top: 8px;
  font-size: var(--fs-micro);
  color: var(--faint);
}

.run-step p {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.6;
}

.run-step .row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 880px) {
  .run-step {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ───────────── governance ───────────── */
.gov-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 56px;
  margin-top: 44px;
}

.gov {
  padding: 24px 0 26px;
  border-top: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gov .k {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
}

.gov h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
}

.gov p {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .gov-grid {
    grid-template-columns: 1fr;
  }
}

/* ───────────── migration ───────────── */
.days {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 28px;
  margin-top: 44px;
}

.day {
  border-top: 2px solid var(--ink);
  padding: 20px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-height: 170px;
}

.day .d {
  font-size: var(--fs-micro);
  color: var(--accent);
}

.day h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  margin-top: 8px;
}

.day p {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.55;
  margin-top: 6px;
}

.day .out {
  font-size: var(--fs-micro);
  color: var(--faint);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .days {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .days {
    grid-template-columns: 1fr;
  }
}

/* ───────────── plans ───────────── */
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.plan--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #d4d4d4;
}

.plan h3 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.plan--dark h3 {
  color: #fff;
}

.plan .for {
  margin-top: 8px;
  font-size: var(--fs-small);
  color: var(--muted);
  max-width: 42ch;
}

.plan--dark .for {
  color: #b8b8b8;
}

.plan ul {
  list-style: none;
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.plan li {
  display: flex;
  gap: 10px;
  font-size: var(--fs-small);
  line-height: 1.45;
}

.plan li svg {
  flex: none;
  margin-top: 4px;
  color: var(--accent);
}

.plan--dark li svg {
  color: #6fd0a8;
}

.plan .price {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.plan--dark .price {
  color: #fff;
}

.plan .fine {
  font-size: var(--fs-micro);
  color: var(--faint);
  margin-top: 4px;
}

.plan--dark .fine {
  color: #8f8f8f;
}

@media (max-width: 840px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.sandbox-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--paper-2);
}

.sandbox-note p {
  flex: 1 1 320px;
  font-size: var(--fs-small);
  color: var(--muted);
  margin: 0;
}

.sandbox-note b {
  color: var(--ink);
  font-weight: 600;
}

/* ───────────── faq ───────────── */
.faq {
  margin-top: 40px;
  max-width: 840px;
  border-top: 1px solid var(--line);
}

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

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
}

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

.faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--t-mid) var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.faq details p {
  padding: 0 0 22px;
  max-width: 72ch;
  font-size: var(--fs-small);
  line-height: 1.65;
  color: var(--body);
}

/* ───────────── contact ───────────── */
.contact {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.contact-points {
  list-style: none;
  margin-top: 26px;
  display: grid;
  gap: 16px;
}

.contact-points li {
  display: flex;
  gap: 11px;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--body);
}

.contact-points svg {
  flex: none;
  margin-top: 4px;
  color: var(--accent);
}

.contact-direct {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--muted);
}

.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-shell);
  padding: 28px;
}

.form-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.f {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.f--wide {
  grid-column: 1 / -1;
}

.f label {
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--ink-2);
}

.f input,
.f select,
.f textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: var(--fs-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
}

.f input::placeholder,
.f textarea::placeholder {
  color: var(--faint);
}

.f textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 20px;
}

.form-foot p {
  flex: 1 1 240px;
  font-size: var(--fs-micro);
  color: var(--muted);
  margin: 0;
}

.form-msg {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-control);
  font-size: var(--fs-small);
  font-weight: 500;
}

.form-msg.show {
  display: block;
}

.form-msg.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.form-msg.bad {
  background: var(--danger-soft);
  color: #7d3223;
}

@media (max-width: 960px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

@media (max-width: 560px) {
  .form {
    padding: 20px;
  }

  .form-rows {
    grid-template-columns: 1fr;
  }
}

/* ───────────── footer ───────────── */
.footer {
  background: var(--ink);
  color: #d4d4d4;
  padding: 64px 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid #2a2a2a;
}

.footer-brand p {
  margin-top: 14px;
  font-size: var(--fs-small);
  color: #9a9a9a;
  max-width: 34ch;
  line-height: 1.6;
}

.footer h4 {
  font-size: var(--fs-micro);
  font-weight: 600;
  color: #8f8f8f;
  letter-spacing: 0;
}

.footer a,
.footer span.muted {
  display: block;
  margin-top: 10px;
  font-size: var(--fs-small);
  color: #e5e5e5;
  text-decoration: none;
}

.footer span.muted {
  color: #8f8f8f;
}

@media (hover: hover) and (pointer: fine) {
  .footer a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.footer-wordmark {
  margin-top: 34px;
  color: #fff;
}

.footer-wordmark .wordmark {
  font-size: clamp(34px, 7.6vw, 84px);
  color: #fff;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #2a2a2a;
  font-size: var(--fs-micro);
  color: #8f8f8f;
}

.footer-legal a {
  display: inline;
  margin: 0;
  color: #cfcfcf;
}

@media (max-width: 820px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═════════════════════════════════════════════════════════════
   Interface fragments (data-ui). These carry the product's own
   borders, radii, chips and numerals — the product on the page.
   ═════════════════════════════════════════════════════════════ */
[data-ui] {
  --ui-line: #e5e5e5;
  --ui-line-2: #d4d4d4;
  --ui-ink: #0a0a0a;
  --ui-body: #3c3c3c;
  --ui-muted: #6b6b6b;
  --ui-card: #ffffff;
  --ui-fill: #f4f4f3;
  font-family: var(--sans);
  color: var(--ui-body);
  -webkit-font-smoothing: antialiased;
}

[data-ui] * {
  letter-spacing: 0;
}

[data-ui].ui-card,
[data-ui] .ui-card {
  background: var(--ui-card);
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(10 10 10 / 0.04), 0 12px 32px -18px rgb(10 10 10 / 0.28);
}

[data-ui] .ui-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-fill);
}

[data-ui] .ui-bar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-ink);
}

[data-ui] .ui-bar-sub {
  font-family: var(--sans);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ui-muted);
}

[data-ui] .ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--ui-fill);
  color: var(--ui-body);
  border: 1px solid var(--ui-line);
}

[data-ui] .ui-chip--ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: #cfe8d8;
}

[data-ui] .ui-chip--warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: #f0dfc0;
}

[data-ui] .ui-chip--info {
  background: var(--info-soft);
  color: var(--info);
  border-color: #cfdcfb;
}

[data-ui] .ui-chip--accent {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: #cfe4da;
}

[data-ui] .ui-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

[data-ui] .ui-btn {
  appearance: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-ui] .ui-btn:active {
  transform: translateY(1px);
}

[data-ui] .ui-btn--primary {
  background: var(--ui-ink);
  color: #fff;
}

[data-ui] .ui-btn--accent {
  background: var(--accent);
  color: #fff;
}

[data-ui] .ui-btn--quiet {
  background: #fff;
  color: var(--ui-ink);
  border-color: var(--ui-line-2);
}

[data-ui] .ui-btn[disabled] {
  background: var(--ui-fill);
  color: var(--ui-muted);
  border-color: var(--ui-line);
  cursor: default;
}

/* --- ledger strip --- */
[data-ui] .ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

[data-ui] .ui-table caption {
  text-align: left;
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--ui-muted);
  border-bottom: 1px solid var(--ui-line);
}

[data-ui] .ui-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ui-muted);
  padding: 9px 12px;
  border-bottom: 1px solid var(--ui-line);
  background: #fbfbfb;
  white-space: nowrap;
}

[data-ui] .ui-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--ui-line);
  vertical-align: baseline;
}

[data-ui] .ui-table tr:last-child td {
  border-bottom: 0;
}

[data-ui] .ui-table .num {
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ui-ink);
}

[data-ui] .ui-table .t {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ui-muted);
  white-space: nowrap;
}

[data-ui] .ui-table .strong {
  font-weight: 600;
  color: var(--ui-ink);
}

/* --- hero governance request --- */
[data-ui] .req-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ui-line);
}

[data-ui] .req-head h3 {
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ui-ink);
}

[data-ui] .req-head .ref {
  font-size: 12px;
  color: var(--ui-muted);
  margin-top: 4px;
}

[data-ui] .req-body {
  padding: 18px;
}

[data-ui] .req-amount {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

[data-ui] .req-sub {
  font-size: 13px;
  color: var(--ui-muted);
  margin-top: 6px;
}

[data-ui] .req-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ui-line);
}

[data-ui] .req-facts span {
  display: block;
  font-size: 11.5px;
  color: var(--ui-muted);
}

[data-ui] .req-facts b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-ink);
  margin-top: 2px;
}

[data-ui] .req-signers {
  padding: 0 18px 18px;
  display: grid;
  gap: 8px;
}

[data-ui] .signer {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease;
}

[data-ui] .signer .av {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ui-fill);
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 700;
}

[data-ui] .signer .who {
  flex: 1;
  min-width: 0;
}

[data-ui] .signer b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-ink);
}

[data-ui] .signer small {
  display: block;
  font-size: 11.5px;
  color: var(--ui-muted);
}

[data-ui] .signer .st {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--warn);
  white-space: nowrap;
}

[data-ui] .signer[data-signed="true"] {
  border-color: #bfe3cf;
  background: #f3faf6;
}

[data-ui] .signer[data-signed="true"] .av {
  background: var(--ok);
  color: #fff;
}

[data-ui] .signer[data-signed="true"] .st {
  color: var(--ok);
}

[data-ui] .signer[data-refused="true"] {
  border-color: #e9bdb2;
  background: var(--danger-soft);
}

[data-ui] .signer[data-refused="true"] .st {
  color: var(--danger);
}

[data-ui] .req-note {
  margin: 0 18px 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ui-fill);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ui-muted);
}

[data-ui] .req-note.is-warn {
  background: var(--danger-soft);
  color: #7d3223;
}

[data-ui] .req-note.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

[data-ui] .req-posted {
  display: none;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--ui-line);
  background: #fbfbfb;
}

[data-ui] .req-posted.is-on {
  display: block;
}

[data-ui] .req-posted .posted-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ok);
  margin-bottom: 10px;
}

[data-ui] .req-posted .line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  padding: 5px 0;
}

[data-ui] .req-posted .line span:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--ui-ink);
}

[data-ui] .req-posted .seal {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ui-line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ui-muted);
}

/* --- passbook fragment --- */
[data-ui] .pb-balance {
  padding: 18px;
  border-bottom: 1px solid var(--ui-line);
}

[data-ui] .pb-balance span {
  display: block;
  font-size: 11.5px;
  color: var(--ui-muted);
}

[data-ui] .pb-balance b {
  display: block;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

[data-ui] .pb-split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

[data-ui] .pb-split div {
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfbfb;
}

[data-ui] .pb-split span {
  font-size: 10.5px;
  color: var(--ui-muted);
}

[data-ui] .pb-split b {
  display: block;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ui-ink);
  margin-top: 2px;
}

/* ───────────── motion ───────────── */
@media (prefers-reduced-motion: no-preference) {
  /* Movement only, never opacity: a section must never be invisible
     if a transition is throttled or interrupted. */
  .js [data-reveal] {
    transform: translateY(16px);
    transition: transform 640ms var(--ease);
    transition-delay: calc(var(--d, 0) * 60ms);
  }

  .js [data-reveal].is-in {
    transform: none;
  }

  .js .hero-copy > * {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 680ms var(--ease) forwards;
    animation-delay: calc(var(--i, 0) * 80ms + 60ms);
  }

  .js .hero-object {
    opacity: 0;
    transform: translateY(20px);
    animation: rise 820ms var(--ease) 160ms forwards;
  }

  .js [data-reveal] [data-ui] .ui-row {
    transform: translateX(-6px);
    transition: transform 420ms var(--ease);
    transition-delay: calc(var(--d, 0) * 60ms + 120ms);
  }

  .js [data-reveal].is-in [data-ui] .ui-row {
    transform: none;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rowin {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* compact passbook card shown beside the tabbed console */
.pb-mini {
  margin-top: 14px;
}

[data-ui] .pb-mini-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ui-line);
}

[data-ui] .pb-mini-head b {
  font-size: 14px;
  color: var(--ui-ink);
}

[data-ui] .pb-mini-head span {
  font-size: 12.5px;
  color: var(--ui-muted);
}

[data-ui] .pb-mini-rows {
  padding: 6px 16px 12px;
}

[data-ui] .pb-mini-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ui-line);
  font-size: 12.5px;
}

[data-ui] .pb-mini-row:last-child {
  border-bottom: 0;
}

[data-ui] .pb-mini-row .ln {
  color: var(--ui-body);
}

[data-ui] .pb-mini-row .am {
  font-variant-numeric: tabular-nums;
  color: var(--ui-ink);
  white-space: nowrap;
}

/* posting receipt in the month-end section */
.receipt-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .receipt-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

[data-ui] .rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ui-line);
}

[data-ui] .rc-head b {
  font-size: 13.5px;
  color: var(--ui-ink);
}

[data-ui] .rc-body {
  padding: 16px;
}

[data-ui] .rc-amount {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
}

[data-ui] .rc-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ui-line);
  font-size: 12.5px;
}

[data-ui] .rc-line:last-child {
  border-bottom: 0;
}

[data-ui] .rc-line span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ui-ink);
}

[data-ui] .rc-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--ui-line);
  background: #fbfbfb;
  font-size: 12px;
  color: var(--ui-muted);
}


/* ───────────── month-end band ───────────── */
.run-section {
  padding-bottom: var(--section);
}

.run-band {
  background: var(--ink);
  color: #d4d4d4;
  padding: 72px 0 76px;
}

.band-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: end;
}

.band-label {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 600;
  color: #8f8f8f;
}

.run-band h2 {
  color: #fff;
  font-size: var(--fs-h2);
  margin-top: 14px;
  max-width: 20ch;
}

.run-band p {
  margin-top: 16px;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: #b8b8b8;
  max-width: 46ch;
}

.band-figures {
  display: grid;
  gap: 0;
}

.band-figures div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #2a2a2a;
}

.band-figures div:first-child {
  border-top: 1px solid #2a2a2a;
}

.band-figures dt {
  font-size: var(--fs-small);
  color: #9a9a9a;
}

.band-figures dd {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.run-body {
  margin-top: 72px;
}

@media (max-width: 900px) {
  .band-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .run-band {
    padding: 48px 0 52px;
  }

  .run-body {
    margin-top: 40px;
  }
}


/* ───────────── small-screen fixes for the interface fragments ───────────── */
.surfaces > div {
  min-width: 0;
}

[data-ui].ui-card,
[data-ui] .ui-card {
  max-width: 100%;
}

@media (max-width: 620px) {
  [data-ui] .c-hide-sm {
    display: none;
  }

  [data-ui] .ui-table th,
  [data-ui] .ui-table td {
    padding: 8px 9px;
  }

  [data-ui] .req-head {
    flex-direction: column;
    align-items: flex-start;
  }

  [data-ui] .req-amount {
    font-size: 32px;
  }

  [data-ui] .req-facts {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}


/* honeypot: off-screen for people, readable to bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-msg a {
  color: inherit;
  font-weight: 600;
}
