/* Publications — index and article pages.
   Tokens mirror landing.html so the two read as one site. Light only, like the
   landing: these pages are public marketing surface, not the app. */

@font-face { font-family:'Inter'; src:url('/static/fonts/Inter-Regular.woff2') format('woff2'); font-weight:400; font-display:fallback; }
@font-face { font-family:'Inter'; src:url('/static/fonts/Inter-Medium.woff2') format('woff2'); font-weight:500; font-display:fallback; }
@font-face { font-family:'Inter'; src:url('/static/fonts/Inter-SemiBold.woff2') format('woff2'); font-weight:600; font-display:fallback; }
@font-face { font-family:'Inter'; src:url('/static/fonts/Inter-Bold.woff2') format('woff2'); font-weight:700; font-display:fallback; }

:root {
  --black:   #0C0C0C;
  --white:   #FFFFFF;
  --surface: #F7F6F3;
  --rule:    #D8D5CF;
  --muted:   #2E2A26;
  --navy:    #0D1B2E;
  --accent:  #60a5fa;
  --link:    #1F4E7A;
  --faint:   #6E6A64;
  --code-bg: #F1EFEA;
  --bad:     #9E3226;
  --good:    #1B6E46;
  --serif:   Georgia, 'Times New Roman', serif;
  --sans:    'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--black);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* ── chrome ─────────────────────────────────────────────────── */

.pub-nav {
  background: var(--navy);
  border-bottom: 1px solid var(--navy);
}
.pub-nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 12px;
}
.pub-nav a { color: var(--white); text-decoration: none; }
.pub-nav-logo { display: block; width: 20px; height: 22px; }
.pub-nav-brand { font-weight: 600; letter-spacing: -0.01em; font-size: 15px; }
.pub-nav-sep { color: rgba(255,255,255,.38); }
.pub-nav-here { color: rgba(255,255,255,.72); font-size: 14px; }
.pub-nav-spacer { flex: 1; }
.pub-nav-cta {
  font-size: 14px; border: 1px solid rgba(255,255,255,.28);
  padding: 6px 13px; border-radius: 2px;
}
.pub-nav-cta:hover { border-color: rgba(255,255,255,.6); }

.pub-foot {
  border-top: 1px solid var(--rule);
  margin-top: 72px; padding: 28px 24px 56px;
  font-size: 14px; color: var(--faint);
}
.pub-foot-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; gap: 20px; flex-wrap: wrap; align-items: baseline;
}
.pub-foot a { color: var(--faint); }
.pub-foot-spacer { flex: 1; }

/* ── index ──────────────────────────────────────────────────── */

.pub-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.pub-masthead { padding: 64px 0 36px; border-bottom: 1px solid var(--rule); }
.pub-masthead h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 5vw, 52px); line-height: 1.08;
  letter-spacing: -0.015em; margin: 0 0 14px;
}
.pub-masthead p { max-width: 62ch; margin: 0; color: var(--muted); font-size: 18px; }

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item { border-bottom: 1px solid var(--rule); }
.pub-item a {
  display: grid; grid-template-columns: 150px 1fr; gap: 28px;
  padding: 30px 0; text-decoration: none; color: inherit;
}
.pub-item a:hover .pub-item-title { text-decoration: underline; text-underline-offset: 3px; }
.pub-item-meta { font-size: 13px; color: var(--faint); }
.pub-item-tag {
  display: inline-block; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--navy);
  border: 1px solid var(--rule); border-radius: 2px;
  padding: 2px 7px; margin-bottom: 8px;
}
.pub-item-date { display: block; }
.pub-item-title {
  font-family: var(--serif); font-size: 24px; line-height: 1.25;
  margin: 0 0 8px; font-weight: 400; letter-spacing: -0.01em;
}
.pub-item-excerpt { margin: 0; color: var(--muted); max-width: 68ch; }

@media (max-width: 720px) {
  .pub-item a { grid-template-columns: 1fr; gap: 10px; }
}

/* ── article ────────────────────────────────────────────────── */

.pub-article { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.pub-article-head { padding: 56px 0 22px; border-bottom: 1px solid var(--rule); }
.pub-back {
  display: inline-block; font-size: 14px; color: var(--faint);
  text-decoration: none; margin-bottom: 22px;
}
.pub-back:hover { color: var(--black); }
.pub-article-head h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4.4vw, 44px); line-height: 1.12;
  letter-spacing: -0.015em; margin: 0 0 14px; max-width: 22ch;
}
.pub-article-meta { font-size: 13.5px; color: var(--faint); margin: 0; }

.pub-body { max-width: 70ch; padding: 30px 0 0; }
.pub-body p { margin: 0 0 17px; }
.pub-body h2 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.008em;
  margin: 42px 0 12px;
}
.pub-body h3 { font-size: 17px; font-weight: 600; margin: 26px 0 6px; }
.pub-body a { color: var(--link); text-underline-offset: 2px; }
.pub-body ul, .pub-body ol { margin: 0 0 17px; padding-left: 24px; }
.pub-body li { margin-bottom: 8px; }
.pub-body strong { font-weight: 600; }

.pub-body code {
  font-family: var(--mono); font-size: .86em;
  background: var(--code-bg); border: 1px solid var(--rule);
  border-radius: 2px; padding: 0 4px;
}
.pub-body pre {
  background: var(--code-bg); border: 1px solid var(--rule); border-radius: 3px;
  padding: 15px 17px; overflow-x: auto; margin: 20px 0;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
}
.pub-body pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.pub-body .cm  { color: var(--faint); }
.pub-body .bad { color: var(--bad); }

.pub-table-scroll {
  overflow-x: auto; border: 1px solid var(--rule);
  border-radius: 3px; background: var(--white); margin: 22px 0;
}
.pub-body table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
.pub-body th {
  font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); text-align: left; padding: 11px 15px;
  background: var(--surface); border-bottom: 1px solid var(--rule);
}
.pub-body th.n, .pub-body td.n { text-align: right; font-variant-numeric: tabular-nums; }
.pub-body td { padding: 10px 15px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.pub-body tbody tr:last-child td { border-bottom: 0; }
.pub-body tfoot td {
  font-weight: 600; background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 0;
}
.pub-body td.mono { font-family: var(--mono); font-size: 13px; white-space: nowrap; }

/* Wide tables may break out of the reading measure. */
.pub-wide { max-width: 980px; }
