/* Krindel technical brief — paper layer (Website Phase A demo,
   docs/superpowers/specs/2026-07-04-paper-presentation-design.md).
   Composes on styles.css: reuses --paper/--surface/--ink/--muted/--rule/
   --accent, the mono/sans stacks, .kicker, .spec-rows/.spec-row,
   .table-scroll, .code-block, .steps. Adds only what a research-paper
   layout needs on top: numbered section rhythm, a two-column abstract,
   figure + mono caption, a results table skin, a pending-slot marker,
   and a print stylesheet. No new colors, no new fonts. */

/* ---------- paper masthead ---------- */
.paper-lede { color: var(--muted); max-width: 760px; font-size: 17px; margin-top: var(--sp-3); }
.paper-summary {
  margin-top: var(--sp-5); padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  max-width: 760px;
}
.paper-summary p { font-size: 15px; }
.paper-summary .fine { margin-top: var(--sp-2); }

/* ---------- two-column abstract (mobile-first: 1 col, 2 col @720px) ---------- */
.abstract-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--sp-6);
  margin-top: var(--sp-4);
}
@media (min-width: 720px) {
  .abstract-grid { grid-template-columns: 1fr 1fr; }
}
.abstract-grid > div { min-width: 0; }
.abstract-grid h3 { font-size: 15px; margin-bottom: var(--sp-2); font-weight: 650; }
.abstract-grid p { color: var(--muted); font-size: 15px; }
.abstract-grid p + p { margin-top: var(--sp-3); }
.abstract-grid strong { color: var(--ink); }

/* ---------- method: labelled sub-blocks ahead of each spec-rows group ---------- */
.method-block { margin: var(--sp-6) 0; }
.method-block:first-of-type { margin-top: var(--sp-5); }
.method-block h3 { font-size: 17px; margin-bottom: var(--sp-2); font-weight: 650; }
.method-block > p.fine { max-width: 760px; margin-bottom: var(--sp-3); }

/* ---------- figures ---------- */
figure.paper-figure {
  margin: var(--sp-5) 0 var(--sp-7);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: var(--sp-4);
}
.figure-scroll { overflow-x: auto; min-width: 0; }
.figure-scroll svg { display: block; width: 100%; height: auto; min-width: 480px; }
figure.paper-figure figcaption {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin-top: var(--sp-3); letter-spacing: 0.01em;
}
figure.paper-figure figcaption b { color: var(--ink); }

/* Figure primitives — colored via CSS so the inline SVGs theme with the
   rest of the page (no hard-coded hex inside the markup). */
.fig-box { fill: var(--surface); stroke: var(--rule); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fig-box-accent { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fig-label { font-family: var(--mono); fill: var(--ink); }
.fig-label-muted { font-family: var(--mono); fill: var(--muted); }
.fig-num-ring { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fig-num-text { font-family: var(--mono); fill: var(--ink); font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.fig-arrow { stroke: var(--accent); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.fig-arrow-thick { stroke: var(--accent); stroke-width: 4; fill: none; vector-effect: non-scaling-stroke; }
.fig-arrowhead { fill: var(--accent); }
.fig-hair { stroke: var(--rule); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.fig-strategy-text { font-family: var(--mono); fill: var(--muted); }
.fig-strategy-text b, .fig-strategy-strong { font-family: var(--mono); fill: var(--accent); }

/* ---------- results table ---------- */
.results-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; }
.results-table th, .results-table td {
  padding: 8px 10px; border-bottom: 1px dashed var(--rule);
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap;
}
.results-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.results-table thead tr:first-child th {
  border-bottom: 1px solid var(--rule); text-align: center;
}
.results-table td:first-child, .results-table th:first-child {
  text-align: left; color: var(--ink); font-weight: 600; white-space: normal;
}
.results-table td.pending {
  color: var(--muted); font-style: italic; text-align: center; white-space: normal;
}
.results-table tbody tr:last-child td { border-bottom: none; }

.results-note { max-width: 760px; margin-top: var(--sp-4); }
.results-note + .results-note { margin-top: var(--sp-2); }
.caveat-block {
  margin-top: var(--sp-5); padding: var(--sp-4);
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface); max-width: 760px;
}

/* ---------- limitations list ---------- */
.limits-list { margin: var(--sp-4) 0 var(--sp-6); max-width: 760px; display: grid; gap: var(--sp-4); min-width: 0; }
.limits-list > * { min-width: 0; }
.limits-list dt {
  font-family: var(--mono); font-size: 13px; font-weight: 650; color: var(--ink);
}
.limits-list dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* Utility: matches web/styles.css's .pad-4 rationale — CSP style-src
   'self' blocks inline style= attributes, so small spacing tweaks get a
   class instead. */
.mt-2 { margin-top: var(--sp-2); }
.mb-2 { margin-bottom: var(--sp-2); }

/* ---------- print export ---------- */
@media print {
  .site-header, .site-footer, .cta-row { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .wrap { max-width: none; padding: 0; }
  section.wrap { padding-top: 18pt; }
  figure.paper-figure, .paper-summary, .caveat-block { border-color: #000; break-inside: avoid; }
  .figure-scroll { overflow: visible; }
  .figure-scroll svg { min-width: 0; }
  .results-table { min-width: 0; }
  .table-scroll { overflow: visible; }
}
