/* Wrong Numbers — soft neo-brutalism, muted.
   Brutalist bones: visible 2.5px borders, hard offset shadows, chunky blocks.
   Softened by muted stone/slate/sage rather than saturated acid — but squared
   off, cool-toned, and structural. No circles, no candy, no lozenges. */

:root {
  --paper:  #f5f2ec;
  --card:   #ffffff;
  --ink:    #23262b;
  --ink-2:  #5f6670;

  --stone:  #ded8cc;
  --slate:  #adc0d2;
  --sage:   #b4c5a9;
  --clay:   #d39c78;
  --steel:  #9aa5b1;

  --grid:   rgba(35, 38, 43, .07);

  --bd: 2.5px solid var(--ink);
  --r: 10px;
  --r-sm: 7px;
  --sh: 6px 6px 0 var(--ink);
  --sh-lg: 9px 9px 0 var(--ink);
  --sh-sm: 4px 4px 0 var(--ink);

  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body:    "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono:    "Space Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.22, .9, .25, 1);
  --gutter: clamp(1.1rem, 4vw, 3.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a1c20; --card: #24272c; --ink: #eceae5; --ink-2: #9aa1ab;
    --stone: #4a4740; --slate: #45586b; --sage: #4b5c45;
    --clay: #8d5f44; --steel: #545c66; --grid: rgba(236, 234, 229, .06);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1a1c20; --card: #24272c; --ink: #eceae5; --ink-2: #9aa1ab;
  --stone: #4a4740; --slate: #45586b; --sage: #4b5c45;
  --clay: #8d5f44; --steel: #545c66; --grid: rgba(236, 234, 229, .06);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .2vw, 1.09rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
code { font-family: var(--mono); font-size: .86em; background: var(--stone);
  color: var(--ink); padding: .1em .34em; border-radius: 4px; }

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 30; border-radius: var(--r-sm); }
.skip:focus { left: 1rem; top: 1rem; }
:where(a, button, summary):focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

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

.rise { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rise.in { opacity: 1; transform: none; }
.rise:nth-child(2) { transition-delay: .05s; }
.rise:nth-child(3) { transition-delay: .1s; }
.rise:nth-child(4) { transition-delay: .15s; }
.rise:nth-child(5) { transition-delay: .2s; }
.rise:nth-child(6) { transition-delay: .25s; }

/* ---------------- chrome ---------------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: .75rem var(--gutter);
  background: var(--paper);
  border-bottom: var(--bd);
}
.wordmark {
  font-family: var(--display); font-weight: 800; text-decoration: none;
  font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); letter-spacing: -.02em;
}
.wordmark::before {
  content: ""; display: inline-block; width: .62em; height: .62em;
  background: var(--clay); border: 2.5px solid var(--ink);
  border-radius: 2px; margin-right: .55rem;
}
.topbar nav { display: flex; align-items: center; gap: clamp(.5rem, 2vw, 1.3rem); }
.topbar nav a { font-family: var(--mono); font-size: .78rem; text-decoration: none;
  white-space: nowrap; color: var(--ink-2); }
.topbar nav a:hover { color: var(--ink); }
.cta-sm {
  background: var(--sage); color: var(--ink) !important;
  border: var(--bd); border-radius: var(--r-sm); padding: .38rem .95rem;
  box-shadow: var(--sh-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.cta-sm:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }
#theme {
  background: var(--stone); color: var(--ink); border: var(--bd);
  border-radius: var(--r-sm); width: 2.2rem; height: 2.2rem; cursor: pointer;
  font-size: .9rem; line-height: 1; box-shadow: var(--sh-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
#theme:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }

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

.hero {
  position: relative; border-bottom: var(--bd); background: var(--paper);
  /* Engineering grid paper. Structural, flat, and it never competes with type. */
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
}
.hero-in {
  position: relative; z-index: 1;
  padding: clamp(2.75rem, 7vw, 5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
  max-width: 72rem; margin-inline: auto;
}

.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .74rem;
  letter-spacing: .06em;
  background: var(--stone); color: var(--ink); padding: .4rem .85rem;
  border: var(--bd); border-radius: var(--r-sm); box-shadow: var(--sh-sm); margin: 0 0 1.5rem;
}

h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.3rem, 1.3rem + 5.2vw, 5rem);
  line-height: 1.02; letter-spacing: -.035em;
  margin: 0 0 1.5rem; max-width: 17ch; text-wrap: balance;
}
h1 mark {
  background: var(--clay); color: var(--ink);
  padding: 0 .1em; border-radius: 4px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

.lede {
  font-size: clamp(1rem, .96rem + .35vw, 1.18rem);
  max-width: 58ch; margin: 0 0 1rem; line-height: 1.55;
  background: var(--card); border: var(--bd); border-radius: var(--r);
  box-shadow: var(--sh); padding: 1.15rem 1.3rem;
}

.num {
  font-family: var(--mono); font-weight: 700;
  background: var(--stone); color: var(--ink);
  padding: .05em .35em; border: 2px solid var(--ink); border-radius: 4px; white-space: nowrap;
}
.num.bad { background: var(--clay); }

.actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.cta, .ghost {
  display: inline-block; font-family: var(--display); font-weight: 800;
  font-size: clamp(.92rem, .88rem + .25vw, 1.05rem); letter-spacing: -.01em;
  text-decoration: none; padding: .85rem 1.5rem;
  border: var(--bd); border-radius: var(--r-sm); box-shadow: var(--sh);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cta { background: var(--sage); color: var(--ink); }
.ghost { background: var(--card); color: var(--ink); }
.cta:hover, .ghost:hover { transform: translate(-3px,-3px); box-shadow: var(--sh-lg); }
.cta:active, .ghost:active { transform: translate(2px,2px); box-shadow: var(--sh-sm); }

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

section { border-bottom: var(--bd); }
.wrap { max-width: 72rem; margin-inline: auto; padding: clamp(2.75rem, 6vw, 4.5rem) var(--gutter); }

h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.9rem);
  line-height: 1.05; letter-spacing: -.03em; margin: 0 0 1.1rem; max-width: 22ch;
}
h3 {
  font-family: var(--mono); font-size: .76rem; font-weight: 700;
  letter-spacing: .08em; margin: 0 0 1.1rem;
  background: var(--stone); color: var(--ink); display: inline-block;
  padding: .34rem .7rem; border: var(--bd); border-radius: var(--r-sm);
}
.note { max-width: 58ch; margin: 0 0 2.3rem; color: var(--ink-2); }
.note strong { color: var(--ink); }
.note a { color: var(--ink); text-decoration: underline 2.5px var(--clay); text-underline-offset: 3px; }

/* ---------------- ledger ---------------- */

.ledger { list-style: none; margin: 0; padding: 0; counter-reset: row;
  display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.ledger li {
  counter-increment: row; position: relative;
  background: var(--card); border: var(--bd); border-radius: var(--r);
  box-shadow: var(--sh); padding: 1.4rem;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.ledger li:hover { transform: translate(-3px,-3px); box-shadow: var(--sh-lg); }
.ledger li::before {
  content: counter(row, decimal-leading-zero);
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
  display: inline-block; margin-bottom: .8rem;
  background: var(--slate); border: 2px solid var(--ink); border-radius: 4px;
  padding: .18rem .55rem;
}
.ledger li:nth-child(3n+2)::before { background: var(--sage); }
.ledger li:nth-child(3n+3)::before { background: var(--stone); }
.org { font-family: var(--display); font-weight: 800; font-size: 1.1rem;
  letter-spacing: -.02em; margin-bottom: .7rem; }
.tag {
  font-family: var(--mono); font-size: .64rem; font-weight: 400;
  background: var(--stone); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 4px; padding: .12em .5em;
  margin-left: .4rem; display: inline-block; vertical-align: middle; white-space: nowrap;
}
.defect { margin: 0 0 .85rem; font-size: .95rem; color: var(--ink-2); }
.effect { margin: 0; font-weight: 500; border-top: 2.5px dashed var(--ink); padding-top: .85rem; }

/* ---------------- audit ---------------- */

.cols { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.slab { background: var(--card); border: var(--bd); border-radius: var(--r);
  box-shadow: var(--sh); padding: 1.5rem; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { padding: .62rem 0 .62rem 1.7rem; border-bottom: 2px dashed var(--ink);
  position: relative; font-size: .95rem; color: var(--ink-2); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.05rem;
  width: .55rem; height: .55rem; background: var(--clay);
  border: 2px solid var(--ink); }

.price { background: var(--slate); border: var(--bd); border-radius: var(--r);
  box-shadow: var(--sh); padding: 1.4rem; margin-top: 1.4rem; }
.price-fig { display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3rem); line-height: 1; letter-spacing: -.035em; }
.price-note { font-family: var(--mono); font-size: .78rem; display: block; margin-top: .65rem; }

/* ---------------- record ---------------- */

.orgs { list-style: none; margin: 0 0 2rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .6rem; }
.orgs li {
  display: inline-flex; align-items: baseline; gap: .5rem;
  padding: .5rem .85rem; background: var(--card);
  border: var(--bd); border-radius: var(--r-sm); box-shadow: var(--sh-sm);
  font-family: var(--display); font-weight: 800; font-size: .87rem; letter-spacing: -.01em;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.orgs li:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }
.orgs li:nth-child(4n+1) { background: var(--stone); }
.orgs li:nth-child(4n+2) { background: var(--slate); }
.orgs li:nth-child(4n+3) { background: var(--sage); }
.orgs span { font-family: var(--mono); font-size: .68rem; font-weight: 400; opacity: .8; }

/* ---------------- faq ---------------- */

details { border: var(--bd); border-radius: var(--r); background: var(--card);
  box-shadow: var(--sh-sm); margin-bottom: .95rem; max-width: 62ch; overflow: hidden;
  transition: box-shadow .2s var(--ease); }
details:hover { box-shadow: var(--sh); }
summary { cursor: pointer; list-style: none; padding: 1rem 1.2rem;
  font-family: var(--display); font-weight: 800; font-size: .98rem;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); font-size: 1.3rem; line-height: 1;
  transition: transform .25s var(--ease); }
details[open] summary { background: var(--stone); border-bottom: var(--bd); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 1.1rem 1.2rem; margin: 0; font-size: .95rem; color: var(--ink-2); }
details p a { color: var(--ink); text-decoration: underline 2.5px var(--clay); text-underline-offset: 3px; }

/* ---------------- close ---------------- */

.close { background: var(--slate); }
.close h2 { max-width: 20ch; }
.close p { max-width: 55ch; margin: 0 0 1.8rem; }
.close .cta { background: var(--card); font-family: var(--mono); font-weight: 700; }

footer { padding: 1.7rem var(--gutter); display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: .7rem; font-family: var(--mono); font-size: .76rem;
  background: var(--paper); border-top: var(--bd); color: var(--ink-2); }
footer p { margin: 0; }
footer a { color: var(--ink); }

/* ---------------- article ---------------- */

.article { max-width: 46rem; }
.article h1 { font-size: clamp(1.85rem, 1.3rem + 2.6vw, 2.9rem); max-width: 22ch; }
.article h1 code { font-size: .7em; border: 2.5px solid var(--ink); border-radius: 5px; }
.article h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem); margin-top: 2.6rem; }
.article p { margin: 0 0 1.15rem; max-width: 60ch; }
.article ul, .article ol { padding-left: 1.3rem; max-width: 60ch; }
.article li { margin-bottom: .55rem; }
.meta { font-family: var(--mono); font-size: .74rem; background: var(--stone);
  color: var(--ink); display: inline-block; padding: .34rem .7rem;
  border: var(--bd); border-radius: var(--r-sm); margin: 0 0 1.3rem; }
.article pre { background: var(--card); border: var(--bd); border-radius: var(--r);
  box-shadow: var(--sh); padding: 1.1rem 1.2rem; overflow-x: auto;
  font-family: var(--mono); font-size: .82rem; line-height: 1.55; }
.article pre code { background: none; padding: 0; font-size: inherit; }
.callout { border: var(--bd); border-radius: var(--r); box-shadow: var(--sh);
  background: var(--stone); padding: 1.2rem 1.3rem; margin: 1.9rem 0; }
.callout p { margin: 0; max-width: none; }
.callout a { text-decoration: underline 2.5px var(--clay); text-underline-offset: 3px; }

@media (max-width: 640px) {
  :root { --sh: 4px 4px 0 var(--ink); --sh-lg: 6px 6px 0 var(--ink); --sh-sm: 3px 3px 0 var(--ink); }
  .topbar nav { width: 100%; justify-content: space-between; gap: .5rem; }
  .topbar nav a:not(.cta-sm) { display: none; }
  .hero { background-size: 32px 32px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .rise { opacity: 1; transform: none; }
}

/* ---------------- pricing tiers ---------------- */

.tier { display: flex; flex-direction: column; }
.tier-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  border-bottom: 2.5px dashed var(--ink); padding-bottom: .9rem; margin-bottom: .9rem;
}
.tier-name {
  font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .08em;
  background: var(--stone); color: var(--ink);
  padding: .34rem .7rem; border: var(--bd); border-radius: var(--r-sm);
}
.tier-fig {
  font-family: var(--display); font-weight: 800; letter-spacing: -.035em;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.7rem); line-height: 1;
}
.tier-for { margin: 0 0 1rem; color: var(--ink-2); font-size: .95rem; }
.tier .ticks li:last-child { border-top: 2.5px dashed var(--ink); border-bottom: 0;
  margin-top: .5rem; padding-top: .9rem; color: var(--ink); }

/* The higher tier reads as the heavier object without shouting. */
.tier-hi { background: var(--slate); box-shadow: var(--sh-lg); }
.tier-hi .tier-name { background: var(--card); }
.tier-hi .tier-for, .tier-hi .ticks li { color: var(--ink); }
.tier-hi .ticks li::before { background: var(--card); }
