/* ===========================================================================
   HumanOfOneMCP — the public site.

   Tokens come from the mark itself (h1-mark.svg): warm paper, #1C1815 ink and
   the #EA5600 the figure is drawn in.
   The wordmark's spaced uppercase monospace is the display voice; IBM Plex Sans
   carries prose; mono also marks anything that behaves like data — a rating, a
   domain judgment, a derivation.

   Three theme states: explicit light, explicit dark, and the default where only
   prefers-color-scheme speaks.
   =========================================================================== */

:root {
  /* Straight off the mark: warm paper, near-black ink, and the orange the
     figure is drawn in. Nothing here is invented — #1C1815 and #EA5600 are the
     two colours in h1-mark.svg. */
  --ground: #FAF8F4;
  --surface: #FFFFFF;
  --sunk: #F3EFE8;
  --ink: #1C1815;
  --muted: #6E665E;
  --faint: #9A9088;
  --rule: #E4DCD0;
  --rule-strong: #D3C8B8;
  --signal: #EA5600;
  --signal-soft: #FBEADD;
  --warn: #B87500;
  --warn-soft: #FBF0DC;

  /* GRADE certainty. Held apart from the brand orange on purpose — the accent
     is for what the reader should *do*, and a rating is not a call to action. */
  --c-high: #2F9147;
  --c-moderate: #4F9E36;
  --c-low: #C79200;
  --c-verylow: #C43B2C;
  --c-none: #9A9088;

  /* The wordmark is spaced uppercase monospace, so the page speaks in it too.
     Sans is for prose only; the serif that was here belonged to another brand. */
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 3px;
  --wrap: 1060px;
  --prose: 68ch;
  --shadow: 0 1px 2px rgba(28,24,21,.05), 0 12px 32px rgba(28,24,21,.07);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #141110;
    --surface: #1D1917;
    --sunk: #241F1B;
    --ink: #F3EEE7;
    --muted: #A99F94;
    --faint: #786F65;
    --rule: #2C2621;
    --rule-strong: #3B332C;
    --signal: #F5731F;
    --signal-soft: #2A1B10;
    --warn: #DDA23A;
    --warn-soft: #2B2113;
    --c-high: #58B96B;
    --c-moderate: #62B24A;
    --c-low: #D6A93A;
    --c-verylow: #D9564A;
    --c-none: #786F65;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.38);
  }
}

:root[data-theme="dark"] {
  --ground: #141110;
  --surface: #1D1917;
  --sunk: #241F1B;
  --ink: #F3EEE7;
  --muted: #A99F94;
  --faint: #786F65;
  --rule: #2C2621;
  --rule-strong: #3B332C;
  --signal: #F5731F;
  --signal-soft: #2A1B10;
  --warn: #DDA23A;
  --warn-soft: #2B2113;
  --c-high: #58B96B;
  --c-moderate: #62B24A;
  --c-low: #D6A93A;
  --c-verylow: #D9564A;
  --c-none: #786F65;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.38);
}

/* --- base ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* An email address or a long URL is one unbreakable token. At 320px
     a contact address was 7px wider than the viewport and scrolled the
     whole page sideways — a layout bug caused entirely by a word. `break-word`
     only breaks a token that could not otherwise fit, so ordinary prose is
     untouched. */
  overflow-wrap: break-word;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.035em; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.3vw, 2.9rem); line-height: 1.08; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.22; }
h3 { font-size: 1.06rem; line-height: 1.35; margin-bottom: .4em; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--signal); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--prose); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 .9rem;
  font-weight: 500;
}
.lead { font-size: clamp(1.03rem, 1.7vw, 1.18rem); color: var(--muted); max-width: 62ch; line-height: 1.55; }
.fine { font-size: .86rem; line-height: 1.55; color: var(--muted); }
.muted { color: var(--muted); }
/* H[1] inside a sentence. The wordmark is mono, so the product name stays mono
   in prose too — it is a mark in the sentence, not a word of it. */
.wordmark { font-family: var(--mono); font-weight: 600; color: var(--ink); }

/* --- masthead ------------------------------------------------------------ */
.masthead {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead .wrap { display: flex; align-items: center; gap: 1.25rem; height: 58px; }

.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); flex: none; }
/* The mark itself. The brackets take currentColor so they invert with the
   theme; the walking figure keeps the brand orange in both.

   26px, not 22: the figure is drawn at an 8-unit stroke on a 120-unit grid, so
   below about 24px that stroke falls under a pixel and the legs dissolve into
   a blob. The svg is also cropped to the drawn art rather than the full grid,
   which is where the rest of the legibility came from. */
.brand-mark { width: 26px; height: 26px; display: block; flex: none; color: var(--ink); }
.brand-mark .brackets { stroke: currentColor; }
/* The masthead mark walks. A raster cannot take currentColor the way the inline
   drawing does, so light and dark are two files, switched exactly the way the
   rest of the theme switches: the explicit toggle wins in both directions, and
   the system preference decides only where no choice has been made.

   Reduced motion gets the still mark instead. A logo looping forever in a
   sticky header, on every page, is precisely what that preference asks us not
   to do. The footer keeps the inline drawing either way — two perpetual loops
   on one page is one more than anybody asked for. */
.brand-mark-walk {
  background: url("/assets/h1-mark-walk-header.gif") center / contain no-repeat;
}
:root[data-theme="dark"] .brand-mark-walk {
  background-image: url("/assets/h1-mark-walk-header-dark.gif");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark-walk {
    background-image: url("/assets/h1-mark-walk-header-dark.gif");
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark-walk { background-image: url("/assets/h1-mark.svg"); }
  :root[data-theme="dark"] .brand-mark-walk {
    background-image: url("/assets/h1-mark-dark.svg");
  }
}
@media (prefers-reduced-motion: reduce) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark-walk {
    background-image: url("/assets/h1-mark-dark.svg");
  }
}

.brand-name { font-family: var(--mono); font-size: .74rem; letter-spacing: .17em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; padding: .45rem .6rem; border-radius: 3px;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--signal-soft); }

.theme-toggle {
  flex: none; width: 30px; height: 30px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--rule); background: transparent; color: var(--muted);
  border-radius: 3px; cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 14px; height: 14px; }
.icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
:root[data-theme="light"] .icon-sun { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }

@media (max-width: 700px) {
  .brand-name { display: none; }
  .masthead .wrap { padding: 0 .75rem; gap: .4rem; }

  /* Five nav items at 375px. Without nowrap they break mid-phrase — "THE / WIKI"
     over two lines — which reads as a broken layout rather than a tight one, and
     the extra height pushes the last item off the edge with no sign it is there.
     Nowrap plus a tighter scale fits all five; the scroll is a fallback, not the
     plan. */
  .nav { min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    padding: .4rem .32rem;
    font-size: .62rem;
    letter-spacing: .03em;
    white-space: nowrap;
  }
}

/* Below this even nowrap will not fit five items, so the masthead takes a second
   row and the nav gets the full width rather than being clipped. */
@media (max-width: 430px) {
  .masthead .wrap {
    height: auto;
    flex-wrap: wrap;
    padding: .5rem .75rem;
    row-gap: .1rem;
  }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    border-top: 1px solid var(--rule);
    padding-top: .35rem;
    margin-top: .35rem;
  }
  .nav a { padding: .35rem .2rem; font-size: .63rem; }
}

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--mono); font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  padding: .7rem 1.15rem; border-radius: var(--r); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: filter .14s ease, background-color .14s ease, border-color .14s ease;
}
.btn-primary { background: var(--signal); color: var(--ground); border-color: var(--signal); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--muted); background: var(--surface); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* --- sections ------------------------------------------------------------ */
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.section-surface { background: var(--surface); }
.section-head { margin-bottom: 2.4rem; }
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--rule); }

/* The homepage hero headline is a full sentence rather than a short question,
   and it sits in one half of a split. At the page-wide h1 scale it ran to eight
   lines, so this steps the size down rather than cutting any of the copy. The
   emphasis is a real italic — the mono italic face is requested on that page. */
.hero-claim { font-size: clamp(1.55rem, 3vw, 2.05rem); }
/* A second lead line under the first: the same size, in ink rather than muted,
   so it reads as the claim the paragraph above it sets up. */
.lead-after { margin-top: .9rem; color: var(--ink); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split > * { min-width: 0; }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.grid > * { min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.35rem 1.4rem; }
.card p { font-size: .92rem; color: var(--muted); }
.card .n { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; color: var(--signal); display: block; margin-bottom: .5rem; }

/* --- the readout exhibit ------------------------------------------------- */
.readout {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  font-family: var(--mono); overflow: hidden;
}
.readout-bar {
  padding: .55rem .9rem; border-bottom: 1px solid var(--rule); background: var(--ground);
  font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; gap: 1rem;
}
.readout-body { padding: 1rem 1.1rem; font-size: .78rem; line-height: 1.75; }
.readout-q { color: var(--ink); font-size: .84rem; margin-bottom: .9rem; display: block; }
/* The value column WRAPS. nowrap here clipped the derivation line inside the
   hero exhibit, which reads as a broken panel rather than as scrollable
   content — and the derivation is the most important thing on the page. */
.readout-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .7rem; align-items: start; }

/* The line under the demo card. A kicker reading against the readout above it,
   not body copy — so it sits outside the card's border, quieter than a lead and
   centred on the card's width rather than the column's. */
.readout-kicker {
  font-family: var(--mono); font-size: .74rem; line-height: 1.6; color: var(--muted);
  margin: .9rem 0 0; text-align: center; max-width: 42ch; margin-inline: auto;
}
.readout-row > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.readout-k { color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-size: .66rem; padding-top: .18rem; }

/* --- certainty ----------------------------------------------------------- */
.cert {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .04em;
}
.cert::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex: none; }
.cert-high { color: var(--c-high); }
.cert-moderate { color: var(--c-moderate); }
.cert-low { color: var(--c-low); }
.cert-verylow { color: var(--c-verylow); }
.cert-none { color: var(--c-none); }
.cert-none::before { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }

.derivation { font-family: var(--mono); font-size: .7rem; color: var(--muted); letter-spacing: .01em; line-height: 1.7; display: block; }
.derivation .down { color: var(--c-verylow); }
.derivation .up { color: var(--c-moderate); }

/* --- tables -------------------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 34rem; }
th, td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; background: var(--ground); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td code { font-size: .82rem; }

/* --- code ---------------------------------------------------------------- */
code { font-family: var(--mono); font-size: .87em; background: var(--ground); border: 1px solid var(--rule); border-radius: 2px; padding: .05rem .3rem; }
pre {
  font-family: var(--mono); background: var(--ground); border: 1px solid var(--rule);
  border-radius: var(--r); padding: .9rem 1rem; overflow-x: auto; font-size: .78rem; line-height: 1.7; margin: 0 0 1rem;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.code-head {
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted); background: var(--surface); border: 1px solid var(--rule); border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0; padding: .5rem .8rem;
}
.code-head + pre { border-radius: 0 0 var(--r) var(--r); }
.copy {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .09em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--rule); color: var(--muted);
  border-radius: 2px; padding: .15rem .45rem; cursor: pointer;
  /* 24px minimum — it is a button on a code block, not a link in a sentence,
     so it gets no inline exemption. */
  min-height: 24px;
}
.copy:hover { color: var(--ink); }

/* --- notice -------------------------------------------------------------- */
.notice {
  background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 34%, transparent);
  padding: .9rem 1.1rem; border-radius: var(--r); font-size: .88rem; color: var(--ink);
}
.notice-quiet { background: var(--signal-soft); border-color: color-mix(in srgb, var(--signal) 34%, transparent); }
.boundary {
  font-family: var(--mono); font-size: .72rem; line-height: 1.65; color: var(--muted);
  border: 1px dashed var(--rule); border-radius: var(--r); padding: .85rem 1rem;
}

/* --- lists --------------------------------------------------------------- */
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ticks li { position: relative; padding-left: 1.1rem; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .58em; width: .5rem; height: 1px; background: var(--signal); }

/* --- forms --------------------------------------------------------------- */
.form { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 30rem; }
.form input[type=email] {
  flex: 1 1 15rem; min-width: 0; font-family: var(--sans); font-size: .95rem;
  padding: .65rem .8rem; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
}
.form input[type=email]:focus { outline: 2px solid var(--signal); outline-offset: 1px; }
/* The support form carries a message as well as an address. Full-width on its
   own row, and vertical-only resize so a drag cannot widen it past the flex
   container and reintroduce the sideways scroll. */
.form textarea {
  flex: 1 1 100%; min-width: 0; font-family: var(--sans); font-size: .95rem;
  padding: .65rem .8rem; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); color: var(--ink); resize: vertical; min-height: 6.5rem;
}
.form textarea:focus { outline: 2px solid var(--signal); outline-offset: 1px; }
.form-msg { font-family: var(--mono); font-size: .72rem; margin: .55rem 0 0; width: 100%; min-height: 1rem; }
.form-msg[data-state=ok] { color: var(--signal); }
.form-msg[data-state=err] { color: var(--warn); }
.form-msg[data-state=busy] { color: var(--muted); }
.hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* --- pricing ------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; align-items: stretch; }
.plans > * { min-width: 0; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.5rem 1.4rem; }
.plan-featured { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.plan-contact { border-style: dashed; }
.plan-name { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); margin: 0 0 .8rem; font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: .25rem; margin-bottom: .2rem; }
.plan-amount { font-family: var(--display); font-size: 2.2rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.plan-per { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.plan-allow {
  font-family: var(--mono); font-size: .72rem; color: var(--ink); background: var(--ground);
  border: 1px solid var(--rule); border-radius: 3px; padding: .5rem .65rem; margin: 1rem 0 1.1rem;
}
.plan ul { margin: 0 0 1.4rem; }
/* Who a plan is for. It replaced five identical bullet lists repeated under
   every card — the same words under all of them told a reader nothing about
   which one to pick, which is the only question the cards exist to answer.
   The shared list now renders once, below the cards. */
.plan-for { margin: 0 0 1.4rem; line-height: 1.5; }
.plan .btn, .plan form { margin-top: auto; }

/* --- footer -------------------------------------------------------------- */
.footer { border-top: 1px solid var(--rule); background: var(--surface); padding: 2.5rem 0 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer h4 { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .7rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.footer a { font-size: .86rem; color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--signal); }
.footer-legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }

.skip { position: absolute; left: -9999px; background: var(--signal); color: var(--ground); padding: .6rem 1rem; z-index: 100; font-family: var(--mono); font-size: .8rem; }
.skip:focus { left: .5rem; top: .5rem; }


/* --- browser surfaces ------------------------------------------------------
   The parts nobody draws still belong to the palette: selection, the caret,
   scrollbars and tabular numerals all ship with defaults that match no design
   system. */
::selection { background: var(--signal-soft); color: var(--ink); }
:root { accent-color: var(--signal); caret-color: var(--signal); }
* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
table, .plan-amount, .readout-body, .derivation { font-variant-numeric: tabular-nums; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }


/* --- the wiki --------------------------------------------------------------
   Reading surfaces: a crumb trail deep pages need, and a derivation table whose
   reason column carries most of the value and so gets most of the width. */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .72rem; color: var(--muted); margin: 0 0 1.4rem;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--signal); text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--rule-strong); }

/* The derivation and risk-of-bias tables: narrow judgment, wide reason.
   Desktop only — below 640px this floor is wider than the column has room for,
   and it was pushing the whole table past the viewport on a 320px screen. */
@media (min-width: 641px) {
  .table-scroll table th:last-child, .table-scroll table td:last-child { min-width: 22ch; }
}
.table-scroll table td .fine { margin-top: .2rem; }

.footer .boundary { max-width: 74ch; margin: 0 auto; text-align: center; }

/* A domain that cost nothing still belongs in the table — quieter, not absent. */
.table-scroll tr.passed td { color: var(--muted); }
.table-scroll tr.passed td:first-child { color: var(--ink); }


/* --- tables on a phone -----------------------------------------------------
   A five-column research table in a 325px window needs 650px and hides half of
   itself. Horizontal scrolling is a fine escape hatch for one wide row; it is
   not a way to read eighteen.

   So below 640px a `.stacks` table stops being a table and becomes one labelled
   block per row: the header is hidden and each cell carries its own label from
   `data-label`. The reason column — the part that actually matters here — gets
   full width instead of 40% of a sideways scroll.

   Opt-in rather than global: a two-column key/value table already reads fine
   stacked and gains nothing from the treatment. */
@media (max-width: 640px) {
  /* `min-width: 34rem` on the base table stops a wide table being squeezed into
     unreadable columns on a desktop. On a phone it forces a two-column
     label/value table — which fits perfectly well — into 219px of sideways
     scroll for no reason. Every table that is genuinely wide now stacks
     instead, so the floor has nothing left to protect. */
  table { min-width: 0; }

  .table-scroll.stacks {
    overflow-x: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .stacks table { min-width: 0; width: 100%; display: block; }
  .stacks thead {
    /* Visually hidden, not display:none — screen readers still announce the
       column names, and a stacked row without them is a list of bare values. */
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .stacks tbody, .stacks tr, .stacks td { display: block; width: 100%; }
  .stacks tr {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    padding: .85rem .9rem;
    margin-bottom: .6rem;
  }
  .stacks tr:last-child { margin-bottom: 0; }
  .stacks td { border: 0; padding: 0; }
  .stacks td + td { margin-top: .55rem; }
  .stacks td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: .6rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .1rem;
  }
  /* A cell with no label is a continuation of the one above it. */
  .stacks td:not([data-label])::before { content: none; }
  /* A row whose domain cost nothing is quieter, but on a phone the whole card
     greying out reads as disabled rather than as passed. */
  .stacks tr.passed td { color: var(--ink); }
  .stacks tr.passed td:nth-child(3) { color: var(--muted); }
}


/* --- tap targets -----------------------------------------------------------
   WCAG 2.2 (2.5.8) asks for 24x24 CSS px. Links sitting inline inside a
   sentence are explicitly exempt — breaking prose leading to hit a number would
   make the page worse — but a LIST of links is a navigation control and gets no
   exemption. The footer lists and the brand were 18-22px.

   Padding rather than height, so the text baseline does not move and nothing
   below shifts. */
.footer li a,
.crumbs a {
  display: inline-block;
  padding-block: .28rem;
  /* inline-block sizes to its content's PREFERRED width, which for
     a long address is the unbroken token — reintroducing the 6px
     sideways scroll that overflow-wrap had just fixed. Capping the box lets the
     break happen inside it. */
  max-width: 100%;
}
.brand { min-height: 30px; }
.nav a { min-height: 30px; display: inline-flex; align-items: center; }

@media (max-width: 430px) {
  /* The two-row masthead has the space to give these a proper target. */
  .nav a { min-height: 32px; }
}

/* The one nav item that is an action rather than a destination. A new visitor
   needs somewhere obvious to start; "Sign in" beside it stays a plain link so
   returning customers still find the word they are looking for. */
.nav a.nav-cta {
  background: var(--signal);
  color: var(--ground);
  border-radius: 999px;
  padding: .3rem .7rem;
  margin-left: .35rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav a.nav-cta:hover { background: var(--signal); filter: brightness(1.1); color: var(--ground); }
@media (max-width: 640px) { .nav a.nav-cta { padding: .28rem .55rem; margin-left: .2rem; } }

/* --- account / auth / billing cards ------------------------------------- */
/* Server-rendered card pages (sign-in, account, billing, checkout) share the
   marketing chrome and these components, so they read as one product. */
.account-card { max-width: 34rem; margin: 0 auto; }
.account-card h1 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin-bottom: .4em; }
.account-card form { display: flex; flex-direction: column; gap: .2rem; margin: 1.2rem 0; }
.account-card label { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: .7rem 0 .3rem; }
.account-card input[type=email],
.account-card input[type=password],
.account-card input[type=text] {
  font-family: var(--sans); font-size: 1rem; padding: .7rem .85rem;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: var(--ink);
}
.account-card input:focus { outline: 2px solid var(--signal); outline-offset: 1px; }
.account-card .btn { margin-top: 1rem; }
.account-card .hint { font-size: .8rem; color: var(--muted); margin: .35rem 0 0; }
.account-card .msg { background: var(--warn-soft); border-left: 2px solid var(--warn); padding: .8rem 1rem; border-radius: 0 var(--r) var(--r) 0; font-size: .92rem; color: var(--ink); margin: 0 0 1.2rem; }
.account-card dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; background: var(--sunk); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.1rem 1.2rem; margin: 0 0 1.4rem; }
.account-card dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); align-self: center; }
.account-card dd { margin: 0; font-size: .95rem; }
.account-card .token { font-family: var(--mono); font-size: .86rem; word-break: break-all; background: var(--signal-soft); border: 1px solid color-mix(in srgb, var(--signal) 40%, transparent); border-radius: var(--r); padding: .9rem 1rem; margin: 0 0 .6rem; user-select: all; }
.account-card .once { font-size: .82rem; color: var(--signal); font-weight: 600; margin: 0 0 1.25rem; }
.account-card .endpoint { font-family: var(--mono); font-size: .82rem; background: var(--sunk); border: 1px solid var(--rule); border-radius: var(--r); padding: .6rem .75rem; word-break: break-all; user-select: all; }
.account-card .step { border-top: 1px solid var(--rule); padding-top: 1.2rem; margin-top: 1.4rem; }

/* --- portal app shell --------------------------------------------------- */
.portal-body { display: flex; flex-direction: column; min-height: 100vh; }
.portal-main { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 1.5rem 1.5rem 2rem; display: flex; flex-direction: column; }
.portal-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .9rem; padding: .25rem 0 1rem; min-height: 16rem; }
.m { max-width: 88%; padding: .7rem .95rem; border-radius: var(--r); font-size: .95rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.m.user { align-self: flex-end; background: var(--signal); color: var(--ground); }
.m.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--rule); }
.m.err { align-self: flex-start; background: var(--warn-soft); border-left: 2px solid var(--warn); }
.m.thinking { align-self: flex-start; color: var(--muted); font-style: italic; }
.portal-tools { align-self: flex-start; font-family: var(--mono); font-size: .68rem; color: var(--faint); margin: -.4rem 0 0; padding-left: .2rem; }
.portal-composer { display: flex; gap: .6rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.portal-composer textarea { flex: 1; padding: .75rem .9rem; font: inherit; font-size: .95rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: var(--ink); resize: none; min-height: 2.9rem; max-height: 9rem; }
.portal-composer textarea:focus { outline: 2px solid var(--signal); outline-offset: 1px; }

/* --- your corpus -------------------------------------------------------- */
.corpus-topic { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 1rem 1.2rem; margin: 0 0 .8rem; transition: border-color .14s ease; }
.corpus-topic:hover { border-color: var(--signal); }
.corpus-topic h2 { font-size: 1.05rem; margin: 0 0 .3rem; }
.corpus-topic p { margin: 0; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.corpus-empty { background: var(--sunk); border: 1px dashed var(--rule-strong); border-radius: var(--r); padding: 1.6rem; color: var(--muted); }

/* Card-page helpers reused across account/billing/consent/research pages. */
.account-card .client { display: block; background: var(--sunk); border: 1px solid var(--rule); border-radius: var(--r); padding: .9rem 1.1rem; margin: 0 0 1.25rem; }
.account-card .client dt { margin-bottom: .1rem; }
.account-card .client dd { margin: 0 0 .7rem; word-break: break-all; }
.account-card .client dd:last-child { margin-bottom: 0; }
.account-card .foot { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--muted); }
.account-card .warn { color: var(--warn); }
.account-card .ghost { font-family: var(--mono); font-size: .82rem; font-weight: 600; padding: .6rem 1.1rem; border-radius: var(--r); border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.account-card .ghost:hover { border-color: var(--muted); background: var(--surface); }
.account-card .job { border-top: 1px solid var(--rule); padding: .85rem 0; }
.account-card .job-q { margin: 0 0 .2rem; color: var(--ink); font-size: .95rem; }
.account-card .job-meta { margin: 0; font-family: var(--mono); font-size: .72rem; color: var(--muted); }

/* --- product demo screenshots (hero + examples) ------------------------- */
.demo-figure { margin: 0; max-width: 100%; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.demo-figure img { display: block; width: 100%; max-width: 100%; height: auto; }
.demo-caption { font-family: var(--mono); font-size: .7rem; letter-spacing: .04em; color: var(--faint); margin: .7rem 0 0; text-align: center; }

/* --- the intercept -------------------------------------------------------
   The one question asked of somebody leaving /pricing or /connect. Built by
   site.js, so nothing here appears in any page's markup.

   IT IS AN ASIDE, NOT A MODAL. No overlay, no scroll lock, no trapped focus:
   a visitor who was already leaving must be able to keep leaving, and the
   quickest way to make somebody resent a question is to make them close it
   before they can read the page underneath. */
.ask {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: min(23rem, calc(100vw - 2.5rem));
  max-height: min(32rem, calc(100vh - 2.5rem)); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 1rem 1.1rem 1.1rem;
  animation: ask-in .22s ease-out;
}
@keyframes ask-in { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ask { animation: none; } }

.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.ask-tag {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--signal);
}
.ask-close {
  border: 0; background: transparent; color: var(--faint); cursor: pointer;
  font-size: 1.1rem; line-height: 1; padding: .1rem .3rem; border-radius: 2px;
}
.ask-close:hover { color: var(--ink); }

.ask-thread { display: flex; flex-direction: column; gap: .55rem; }
/* Ours. */
.ask-q { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--ink); }
/* Theirs — indented under the question it answers, and quieter, because on a
   second pass through the thread the questions are what you are scanning for. */
.ask-said {
  margin: 0; font-size: .86rem; line-height: 1.5; color: var(--muted);
  padding-left: .7rem; border-left: 2px solid var(--rule-strong);
}

.ask-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.ask-box {
  flex: 1 1 100%; min-width: 0; font-family: var(--sans); font-size: .92rem;
  padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--ground); color: var(--ink); resize: vertical; min-height: 4.5rem;
}
.ask-box:focus { outline: 2px solid var(--signal); outline-offset: 1px; }
.ask-box[disabled] { opacity: .6; }
.ask-send, .ask-done { font-size: .76rem; padding: .5rem .95rem; }
.ask-done { margin-top: .9rem; }
.ask-msg { margin: 0; }

/* On a phone it sits on the bottom edge and spans the width — a floating card
   inset from three sides wastes the only dimension there is. */
@media (max-width: 520px) {
  .ask {
    right: 0; left: 0; bottom: 0; width: auto;
    max-height: 70vh; border-radius: var(--r) var(--r) 0 0; border-bottom: 0;
  }
}
