/* The site's shared look: tokens, type, the bar and the menu, the inner pages and the footer. The opening's own styles
   (the hall, the stones, the Ledger windows) stay in index.html; everything else lives here, once. Same look as the
   opening: paper white, ink lines, the serif for headlines, Inter for text, Geist Mono for labels; the layer colours
   only as small stones.
   The layout rules (docs/plans/landing-look-spec.md, section 8): spacing only from 4 8 12 16 24 32 48 64 96 px; type
   only at Geist Mono 12 px for labels and 13 px for data, Inter 13 / 15 / 17 / 19, Newsreader 24 (20 on a phone),
   the h2 from 28 to 40 and the h1 from 36 to 64. */
:root {
  --ink: #121211;
  --paper: #ffffff;
  --ground: #f1f0ec;
  --concrete: #dcd9d3;
  --stone-300: #d6d3d1;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --l-industry: #1d4f9c;
  --l-company: #f6c917;
  --l-project: #d7261e;
  --k-agent: #1b1c1e;
  --hivis: #f2d31b;
  --redline: oklch(0.568 0.192 34.6);
  --redline-soft: oklch(0.95 0.03 40);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  /* Headlines grow with the width; the h1 stays the largest at every width. */
  --h1: clamp(2.25rem, 5vw, 4rem);
  --h2: clamp(1.75rem, 3vw, 2.5rem);
  color-scheme: light;
}
* { box-sizing: border-box; }
html.m-locked { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; }
a { color: inherit; }
.body a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: 80rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Every label on the site: Geist Mono 12 px, uppercase. */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone-600); margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 24px; font: 500 15px var(--sans); border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn.outline { background: transparent; color: var(--ink); }
.btn.small { height: 36px; padding: 0 16px; }

/* ---- The bar and the menu ---- */
.topbar { position: sticky; top: 0; z-index: 30; }
.ribbon { background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.ribbon .wrap { padding-block: 4px; text-align: right; }
/* The bar holds one link, to the open taxonomy, on the right; its own padding makes it a 24 px tap target. */
.ribbon a { display: inline-block; padding-block: 4px; white-space: nowrap; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ribbon a:focus-visible { outline-color: var(--paper); }
header.site { position: relative; border-bottom: 1px solid var(--stone-300); background: var(--paper); }
header.site > .wrap { display: flex; align-items: center; gap: 32px; height: 56px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.035em; font-size: 19px; text-decoration: none; }
#menu.site-nav { flex: 1; display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 500; }
.m-top { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex: 1; }
.m-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.m-btn svg { transition: transform 200ms ease; opacity: 0.6; }
.m-item.open .m-btn { background: var(--ground); }
.m-item.open .m-btn svg { transform: rotate(180deg); }
.m-btn[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }
.m-right { display: flex; align-items: center; gap: 12px; }
/* A panel spans the bar's width, just under it; columns of links, each a name and one line. */
.m-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--ink);
  box-shadow: 0 24px 40px -24px rgba(18, 18, 17, 0.28); animation: m-in 180ms cubic-bezier(.2, .8, .2, 1); }
@keyframes m-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
header.site .m-panel .wrap.m-grid { display: flex; gap: 48px; height: auto; align-items: stretch; justify-content: flex-start; padding-block: 24px 32px; }
.m-col { display: flex; flex-direction: column; gap: 4px; min-width: 250px; }
.m-h { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone-600); }
.mi { display: block; padding: 8px 12px; margin-left: -12px; text-decoration: none; }
.mi:hover { background: var(--ground); }
.mi-t { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.mi-d { display: block; font-size: 13px; color: var(--stone-600); line-height: 1.4; }
.m-feature { margin-left: auto; width: 300px; display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--ground); border: 1px solid var(--ink); text-decoration: none; }
.mf-t { font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.mf-d { font-size: 15px; color: var(--stone-700); }
.mf-go { margin-top: auto; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.m-burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; background: none; color: var(--ink); cursor: pointer; }
.m-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: var(--sheet-top, 96px); overflow-y: auto; background: var(--paper); padding: 8px 16px 32px; border-top: 1px solid var(--ink); }
.m-sheet section { padding-block: 16px; border-bottom: 1px solid var(--stone-300); }
.m-sheet .btn { width: 100%; margin-top: 24px; }
@media (min-width: 901px) { .m-sheet { display: none !important; } }
@media (max-width: 900px) {
  header.site > .wrap { gap: 12px; }
  .m-top, .hide-sm { display: none; }
  #menu.site-nav { justify-content: flex-end; }
  .m-burger { display: inline-flex; }
  .btn.small { height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .m-panel { animation: none; } .m-btn svg { transition: none; } }

/* ---- Inner pages ---- */
.page-hero { padding-block: 96px 64px; border-bottom: 1px solid var(--ink); }
.page-hero h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; font-size: var(--h1); line-height: 1.03; margin: 16px 0 0; max-width: 18ch; text-wrap: balance; }
.page-hero .lead { margin: 24px 0 0; max-width: 38rem; font-size: 19px; line-height: 1.55; color: var(--stone-700); }
.sec { padding-block: 64px; border-bottom: 1px solid var(--stone-300); scroll-margin-top: 96px; }
.sec:last-of-type { border-bottom: 0; }
.sec h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; font-size: var(--h2); line-height: 1.08; margin: 0; text-wrap: balance; }
/* A section head or a module: the eyebrow on its own line across both columns, 12 px above the headline; the headline
   and the right column start on one line. The left column's wrapper steps aside (display: contents) so the eyebrow
   and the headline are grid items of their own. */
.sec-head, .module { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 12px 48px; align-items: start; }
.sec-head > div:first-child, .module > div:first-child { display: contents; }
.sec-head .eyebrow, .module .eyebrow { grid-column: 1 / -1; }
.sec .body { margin: 0; font-size: 17px; line-height: 1.6; color: var(--stone-700); max-width: 40rem; }
.sec .body + .body { margin-top: 16px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 32px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Five cards: three on the first row, two wider ones on the second, so the ink grid closes. */
.cards.five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cards.five > * { grid-column: span 2; }
.cards.five > :nth-child(n + 4) { grid-column: span 3; }
.card { padding: 24px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); scroll-margin-top: 96px; }
.card h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.card p { margin: 8px 0 0; font-size: 15px; color: var(--stone-700); }
.card ul { margin: 12px 0 0; padding-left: 16px; font-size: 15px; color: var(--stone-700); }
.card li + li { margin-top: 8px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--ink); }
.tag.dash { border-style: dashed; color: var(--stone-700); }
/* A stone: the layer's colour as a small square with an ink edge, so colour is never the only clue. */
.stone { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--ink); vertical-align: -2px; margin-right: 8px; }
.stone.industry { background: var(--l-industry); } .stone.company { background: var(--l-company); } .stone.project { background: var(--l-project); } .stone.agent { background: var(--k-agent); }
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 32px; font-size: 17px; }
.formula .op { font-family: var(--mono); color: var(--stone-600); }
.formula span:not(.op) { white-space: nowrap; }
/* The Product page's modules: one ruled list with a row per module, not a band each. */
.modules { margin-top: 32px; border-top: 1px solid var(--ink); }
.modules .module { padding-block: 32px; border-bottom: 1px solid var(--stone-300); scroll-margin-top: 96px; }
.modules .module:last-child { border-bottom: 0; padding-bottom: 0; }
.modules h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.module ul { margin: 0; padding: 0; list-style: none; max-width: 40rem; }
.module li { padding: 12px 0; border-top: 1px solid var(--stone-300); font-size: 17px; color: var(--stone-700); }
.module li:first-child { padding-top: 0; border-top: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
/* A ruled list of names and what they mean, on the same 4/8 columns as the heads. */
dl.terms { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 48px; margin: 32px 0 0; border-top: 1px solid var(--ink); }
dl.terms dt, dl.terms dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--stone-300); }
dl.terms dt { font-size: 17px; font-weight: 600; }
dl.terms dd { color: var(--stone-700); }
dl.terms dd p { margin: 0; max-width: 40rem; }
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 32px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.person { padding: 24px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.person .face { width: 88px; height: 88px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 36px; letter-spacing: -0.02em; }
.person h3 { margin: 16px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.person .role { margin: 4px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone-600); }
.person .bio { margin: 12px 0 0; font-size: 15px; color: var(--stone-700); }
.todo { border: 1px dashed var(--stone-600); padding: 4px 8px; font-size: 13px; color: var(--stone-600); }
.cta-band { background: var(--ground); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding-block: 64px; }
.cta-band h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; font-size: var(--h2); line-height: 1.08; margin: 0; max-width: 22ch; }

/* ---- Footer ---- */
footer.site { padding-block: 64px 48px; }
.f-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.f-brand p { margin: 12px 0 0; max-width: 18rem; font-size: 15px; color: var(--stone-700); }
footer.site ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
footer.site li { margin-top: 4px; }
/* 4 px of padding above and below makes each link a 24 px tap target. */
footer.site li a { display: inline-block; padding-block: 4px; text-decoration: none; color: var(--stone-700); }
footer.site li a:hover { color: var(--ink); text-decoration: underline; }
.f-note { margin: 48px 0 0; padding-top: 16px; border-top: 1px solid var(--stone-300); font-size: 13px; color: var(--stone-600); }

@media (max-width: 900px) {
  .page-hero { padding-block: 48px 32px; }
  .page-hero .lead { font-size: 17px; }
  .sec { padding-block: 48px; }
  .sec-head, .module { grid-template-columns: minmax(0, 1fr); }
  .sec-head > :last-child, .module > :last-child { margin-top: 4px; }
  .cards, .cards.two, .cards.five, .team { grid-template-columns: minmax(0, 1fr); }
  .cards.five > *, .cards.five > :nth-child(n + 4) { grid-column: auto; }
  dl.terms { grid-template-columns: minmax(0, 1fr); }
  dl.terms dt { border-bottom: 0; padding-bottom: 0; }
  .cta-band { padding-block: 48px; }
  footer.site { padding-block: 48px 32px; }
  .f-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-brand { grid-column: 1 / -1; }
}

/* ---- The analytics question (ADR 0079): shown only when analytics.js has a Measurement ID ---- */
.consent { position: fixed; z-index: 40; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); max-width: 30rem; margin-left: auto; padding: 16px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); font-size: 15px; }
.consent p { margin: 0 0 12px; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; }
.f-consent { font: inherit; color: inherit; background: none; border: 0; padding: 4px 0; text-decoration: underline; cursor: pointer; }
