/* Project site styles. Same visual language as balalaika.ai: light paper, near-black ink, Helvetica headings,
 * monospace for labels and metadata, hairline rules, no cards with shadows. */
:root {
  color-scheme: light;
  --paper: #fcfcfc; --ink: #141414; --muted: #676767; --line: #d9d9d9; --tint: #f3f3f1;
  --ok: #2a7d46; --bad: #b3261e; --warn: #8a5a00;
  --canvas: #141414;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
code, pre { font-family: var(--mono); font-size: .86em; }
code { background: var(--tint); padding: 1px 5px; border-radius: 3px; }
.wrap { width: min(1060px, calc(100% - 112px)); margin: 0 auto; }
.wrap.wide { width: min(1320px, calc(100% - 112px)); }
@media (max-width: 720px) { .wrap, .wrap.wide { width: calc(100% - 40px); } }

/* header */
header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 26px; padding: 22px 0 18px; }
header.top .brand { font-weight: 800; font-size: 22px; letter-spacing: -.055em; }
header.top a.nav { text-decoration: none; font: 12px/1 var(--mono); letter-spacing: -.01em; color: var(--muted); padding: 4px 0; border-bottom: 1px solid transparent; }
header.top a.nav:hover { color: var(--ink); }
header.top a.nav.on { color: var(--ink); border-bottom-color: var(--ink); }
header.top a.nav.home { margin-left: auto; }
header.top a.nav.home::after { content: " \2197"; }

/* type */
h1 { font-size: clamp(40px, 6.4vw, 78px); font-weight: 800; letter-spacing: -.065em; line-height: 1.02; margin: 56px 0 22px; }
h2 { font: 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 76px 0 20px; padding-top: 18px; border-top: 1px solid var(--line); }
h3 { font-size: 21px; font-weight: 600; letter-spacing: -.035em; line-height: 1.2; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
.lead { font: 14px/1.75 var(--mono); letter-spacing: -.02em; color: var(--muted); max-width: 52em; margin-bottom: 26px; }
.muted { color: var(--muted); }
.note { border-left: 2px solid var(--ink); background: transparent; padding: 4px 0 4px 16px; margin: 20px 0; font: 13px/1.7 var(--mono); letter-spacing: -.015em; color: var(--ink); }
.note b { font-weight: 600; }
dt { font-weight: 600; }
dd { margin: 0 0 12px; color: var(--muted); }

/* numbers */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 28px; margin: 34px 0 30px; border-top: 1px solid var(--line); }
.fact { padding: 20px 0 6px; }
.fact b { display: block; font-size: 44px; font-weight: 800; letter-spacing: -.06em; line-height: 1; }
.fact span { display: block; margin-top: 10px; font: 11px/1.5 var(--mono); color: var(--muted); letter-spacing: -.01em; }

/* tables */
.tablewrap { overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 14px; }
.badge { display: inline-block; font: 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.badge::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; vertical-align: 0; background: var(--muted); }
.badge.acc::before { background: var(--ok); }
.badge.rej::before { background: var(--bad); }

figure { margin: 18px 0; }
figure img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 3px; display: block; }
figure.hero { margin: 8px 0 30px; }
figure.hero img { width: 100%; height: auto; border: 0; }
figcaption { font: 12px/1.6 var(--mono); color: var(--muted); margin-top: 8px; letter-spacing: -.01em; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
footer { margin: 80px 0 36px; padding-top: 18px; border-top: 1px solid var(--line); font: 12px/1.6 var(--mono); color: var(--muted); }

/* session transcript */
.session { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0 10px; }
.step { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 0 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .n { font: 12px/1.7 var(--mono); color: var(--muted); }
.step .call { font: 13px/1.6 var(--mono); font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; }
.step pre { margin: 6px 0 0; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.step .ok { color: var(--ok); }
.step .bad { color: var(--bad); }
.step .dim { color: var(--muted); }
dl.how dt { margin-top: 18px; }
