/* Shared by every build-sheet page. A page's own <style> comes after this file and overrides it. */
:root {
  --paper: #f5f1ea; --card: #fffdf9; --ink: #1f1c18; --muted: #6f685e; --faint: #a39a8c; --line: #e3dcd0;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 0 28px 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font-size: 20px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.card .s { color: var(--faint); font-size: 12px; }
main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, 1fr); gap: 16px; padding: 0 28px 28px; }
@media (max-width: 1100px) { main { grid-template-columns: 1fr; } }
.viewer { position: sticky; top: 12px; align-self: start; background: #ece6dc; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
canvas { display: block; width: 100%; height: min(78vh, 820px); }
.controls { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; pointer-events: none; }
.controls > * { pointer-events: auto; }
.controls button { font: 12px/1 inherit; font-family: inherit; padding: 7px 10px; border-radius: 7px; border: 1px solid rgba(0,0,0,.12); background: rgba(255,253,249,.92); cursor: pointer; }
.controls button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.controls label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 10px; border-radius: 7px; background: rgba(255,253,249,.92); border: 1px solid rgba(0,0,0,.12); }
.legend { position: absolute; left: 12px; bottom: 12px; font-size: 12px; color: var(--muted); background: rgba(255,253,249,.9); padding: 6px 10px; border-radius: 7px; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 5px 8px; border-radius: 6px; transform: translate(12px, 12px); white-space: nowrap; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
section h2 { margin: 0 0 4px; font-size: 15px; }
section .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.part { cursor: pointer; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 7px; vertical-align: -1px; }
.note { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.group-row td { background: #faf6ef; font-weight: 650; font-size: 12px; }
.total td { font-weight: 700; border-bottom: 0; }
a { color: var(--accent); }
ol.steps { margin: 0; padding-left: 20px; }
ol.steps li { margin: 0 0 8px; }
ol.steps .h { color: var(--faint); font-size: 12px; margin-left: 6px; }
.flag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #f3e3d6; color: #8a3f1c; margin-left: 6px; }
.dims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; font-size: 12.5px; }
