/* Kerfview. Birch ply, honeycomb bed, kerf lines. Calm and light. */
@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --paper: #fbf8f2;
  --birch: #f3e9d6;
  --birch-2: #e9d9bb;
  --birch-edge: #c9a876;
  --ink: #27211b;
  --ink-2: #5f564c;
  --ink-3: #8a7f72;
  --line: #e2d6c2;
  --line-2: #d4c4a9;
  --scorch: #7f3f1b;
  --scorch-2: #5f2c10;
  --laser: #e2492f;
  --bed: #d6dadd;
  --card: #fffdf9;
  --ok: #3f7a3a;
  --bad: #a8361f;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 10px 30px -18px rgba(70, 45, 20, .35), 0 2px 6px -2px rgba(70, 45, 20, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--body); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--scorch); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--scorch-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--laser); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: rgba(201, 168, 118, .18); padding: .08em .35em; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: #2a231c; color: #f3e9d6; padding: 16px 18px; border-radius: 12px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; overflow-wrap: normal; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 10px; }
.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* ---------------------------------------------------------------- header */
.site-top { background: var(--birch); border-bottom: 1px solid rgba(201, 168, 118, .35); }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 750 1.45rem/1 var(--display); letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 36px; height: 36px; flex: none; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; padding: 6px 12px; border-radius: 999px; }
.site-nav a:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }

/* The edge of a sheet of plywood: thin laminations, used between bands. */
.ply-edge { height: 12px; background:
  linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,.1)),
  repeating-linear-gradient(180deg, #e8d3ad 0 2px, #d3b17c 2px 3px, #edd9b6 3px 5px, #c9a36c 5px 6px); }

/* ---------------------------------------------------------------- hero / viewer */
.hero { position: relative; background:
  radial-gradient(1200px 500px at 85% -10%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 60%),
  repeating-linear-gradient(176deg, rgba(160, 112, 58, .045) 0 2px, rgba(0, 0, 0, 0) 2px 19px),
  var(--birch); padding-block: 40px 44px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; align-items: start; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 .82rem/1 var(--mono); letter-spacing: .02em; color: var(--scorch); margin: 6px 0 18px; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--laser); box-shadow: 0 0 0 4px rgba(226, 73, 47, .18); }
.hero h1 { font-size: clamp(2.4rem, 4.4vw, 3.7rem); font-weight: 760; letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 16px; }
.lede { font-size: 1.12rem; color: var(--ink-2); margin-bottom: 22px; }
.open-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.open-hint { color: var(--ink-3); font-size: .95rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 11px; border: 1.5px solid var(--scorch); background: var(--card); color: var(--scorch); font: 650 1rem/1.1 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { background: #fff; color: var(--scorch-2); border-color: var(--scorch-2); transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgba(95, 44, 16, .6); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(180deg, #8d4820, var(--scorch)); color: #fff8ee; border-color: var(--scorch-2); box-shadow: 0 -2px 0 rgba(0, 0, 0, .18) inset, 0 8px 18px -12px rgba(95, 44, 16, .8); }
.btn.primary:hover { background: linear-gradient(180deg, #9a5025, #874320); color: #fff; }
.btn.quiet { border-color: var(--line-2); color: var(--ink-2); }
.btn.quiet.locked .tag { background: var(--birch-2); }
.btn .tag { font: 500 .78rem/1 var(--mono); background: rgba(127, 63, 27, .1); color: var(--scorch); padding: 4px 6px; border-radius: 6px; }
.text-link, .text-btn { color: var(--scorch); font-weight: 600; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.error { background: #fff4ef; border: 1px solid #f0b8a6; border-left: 4px solid var(--laser); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; display: grid; gap: 2px; }
.error strong { color: var(--bad); }

.file-card { background: rgba(255, 253, 249, .78); border: 1px solid rgba(201, 168, 118, .45); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px 16px; backdrop-filter: blur(6px); }
.file-card-head { border-bottom: 1px dashed var(--line-2); padding-bottom: 12px; margin-bottom: 12px; }
.file-kicker, .card-kicker { font: 500 .76rem/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 0 0 6px; }
.file-name { font-size: 1.3rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.file-meta { margin: 0; color: var(--ink-3); font-size: .9rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 0 0 12px; }
.facts div { min-width: 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font-size: .8rem; color: var(--ink-3); margin-bottom: 2px; }
.facts dd { margin: 0; font: 500 .94rem/1.3 var(--mono); letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.facts dd small { display: block; font: 400 .78rem/1.3 var(--body); color: var(--ink-3); margin-top: 2px; }
.facts dd.notes { font: 400 .95rem/1.45 var(--body); white-space: pre-line; color: var(--ink-2); }
.warnings { margin: 0 0 12px; padding: 10px 12px 10px 30px; background: #fff8e8; border: 1px solid #ecd59a; border-radius: 10px; font-size: .9rem; color: #6b5212; }
.export-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tool-status { min-height: 1.4em; margin: 8px 0 0; font-size: .9rem; color: var(--ink-2); }

.stage-col { min-width: 0; }
.stage { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px rgba(110, 118, 125, .35), 0 24px 50px -28px rgba(40, 45, 50, .55), 0 2px 0 rgba(255, 255, 255, .6) inset; background: var(--bed); }
#stage { width: 100%; aspect-ratio: 4 / 3; touch-action: none; cursor: grab; }
#stage:active { cursor: grabbing; }
.stage-bar { position: absolute; inset: 0 0 auto 0; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 8px; background: rgba(251, 248, 241, .96); border-bottom: 1px solid rgba(90, 70, 50, .14); z-index: 1; }
.seg { display: inline-flex; background: rgba(201, 168, 118, .18); border-radius: 8px; padding: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 3px 10px; border-radius: 6px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(60, 40, 20, .18); }
.seg input:focus-visible + span { outline: 2px solid var(--laser); outline-offset: 1px; }
.seg.units { margin-left: auto; }
.mini-select select { font: 600 .84rem/1 var(--body); color: var(--ink-2); background: transparent; border: 1px solid rgba(201, 168, 118, .6); border-radius: 7px; padding: 4px 6px; height: 26px; }
.mini-select.dim select { opacity: .6; }
.stage-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.round { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(90, 70, 50, .25); background: rgba(255, 253, 249, .95); color: var(--ink); font: 600 1.25rem/1 var(--body); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px -6px rgba(40, 30, 20, .4); }
.round:hover { background: #fff; }
.round svg { width: 18px; height: 18px; }
.round[aria-pressed="true"] { background: var(--laser); color: #fff; border-color: var(--laser); }
.stage-dims { position: absolute; left: 34px; bottom: 14px; margin: 0; font: 500 .82rem/1 var(--mono); color: var(--ink); background: rgba(255, 253, 249, .92); padding: 7px 10px; border-radius: 8px; box-shadow: 0 2px 8px -4px rgba(40, 30, 20, .35); }
.stage-dims:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: 36px; padding: 5px 12px 5px 6px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: 500 .88rem/1.1 var(--body); cursor: pointer; }
.chip:hover { border-color: var(--birch-edge); }
.chip-sw { width: 22px; height: 22px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15) inset; flex: none; }
.chip-code { font: 500 .8rem/1 var(--mono); }
.chip-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; }
.chip[aria-pressed="false"] { background: transparent; border-style: dashed; color: var(--ink-3); }
.chip[aria-pressed="false"] .chip-sw { opacity: .3; }
.chip[aria-pressed="false"] .chip-name { text-decoration: line-through; }

#drop-veil { position: fixed; inset: 0; z-index: 20; background: rgba(243, 233, 214, .9); display: grid; place-items: center; }
#drop-veil div { border: 3px dashed var(--scorch); border-radius: 22px; padding: 44px 56px; font: 700 1.5rem/1.2 var(--display); color: var(--scorch); background: rgba(255, 253, 249, .8); }
#drop-veil[hidden] { display: none; }

/* ---------------------------------------------------------------- bands */
.band { padding-block: 56px; }
.band.alt { background: linear-gradient(180deg, #f6efe2, #f3ead9); border-block: 1px solid rgba(201, 168, 118, .3); }
.section-head { margin-bottom: 22px; }
.section-head h2 { display: flex; align-items: center; gap: 12px; }
.section-head h2::before { content: ''; width: 22px; height: 0; border-top: 2px dashed var(--laser); flex: none; }
.sub { color: var(--ink-2); margin: 0; }
.footnote { color: var(--ink-3); font-size: .88rem; margin-top: 12px; }
.assumed { color: var(--ink-3); font-style: italic; }

.table-scroll { position: relative; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
.layers th, .layers td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.layers thead th { font: 600 .8rem/1.2 var(--body); color: var(--ink-3); background: #faf5ec; text-transform: none; }
.layers td small { display: block; color: var(--ink-3); font-size: .78rem; }
.layers .num { text-align: right; font-family: var(--mono); font-size: .92rem; }
.layers thead .num { font-family: var(--body); }
.layers td.layer { min-width: 210px; }
.layers .lcell { display: flex; align-items: center; gap: 10px; }
.layers .lname { overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.layers .lname strong { font-family: var(--mono); font-weight: 500; margin-right: 4px; }
.layers .sw, .sw { display: inline-block; width: 18px; height: 18px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15) inset; flex: none; vertical-align: -3px; }
.layers td.show { width: 40px; }
.layers input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--scorch); }
.layers tr.off td:not(.show) { color: var(--ink-3); }
.layers tr.sub td { background: #fcf9f3; font-size: .92rem; }
.layers tfoot td { font-weight: 600; background: #faf5ec; border-bottom: 0; }
.layers .empty { text-align: center; color: var(--ink-3); padding: 28px; }
.badge { font: 500 .72rem/1 var(--mono); background: var(--birch); color: var(--ink-2); padding: 4px 6px; border-radius: 5px; }

.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); position: relative; }
.card h3 { font-size: 1.4rem; }
.card p:last-child { margin-bottom: 0; }
/* A laser-cut look: a small kerf notch in the corner of each card. */
.sheet-card::after { content: ''; position: absolute; top: 14px; right: 14px; width: 12px; height: 12px; border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--paper); }
.opts { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.opts legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.opts label, .check { display: inline-flex; align-items: center; gap: 7px; font-size: .95rem; }
.check { margin-bottom: 14px; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--scorch); width: 17px; height: 17px; }
.soon-note, .tool-note { color: var(--ink-3); font-size: .95rem; }

.pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pic { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pic-frame { background: repeating-conic-gradient(#efe7d9 0 25%, #f9f5ee 0 50%) 0 0 / 18px 18px; display: grid; place-items: center; padding: 16px; min-height: 200px; }
.pic-frame img { max-height: 240px; image-rendering: auto; box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .4); }
.pic figcaption { padding: 12px 14px 14px; display: grid; gap: 4px; font-size: .9rem; }
.pic figcaption strong { overflow-wrap: anywhere; }
.pic-meta, .pic-px { color: var(--ink-3); overflow-wrap: anywhere; }
.pic .text-btn { justify-self: start; margin-top: 4px; }

/* ---------------------------------------------------------------- job sheet */
.sheet-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.sheet-frame { background: repeating-linear-gradient(176deg, rgba(160, 112, 58, .05) 0 2px, rgba(0, 0, 0, 0) 2px 17px), var(--birch-2); border-radius: 18px; padding: 26px; }
.sheet-paper { position: relative; background: #fff; color: #1d1915; border-radius: 4px; box-shadow: 0 18px 40px -22px rgba(60, 40, 20, .55), 0 1px 2px rgba(0, 0, 0, .1); padding: 28px 30px; font-size: .9rem; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid #1d1915; padding-bottom: 10px; margin-bottom: 16px; }
.sheet-head h3 { margin: 0; font-size: 1.35rem; overflow-wrap: anywhere; }
.sheet-kicker { font: 500 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #7a6f63; margin: 0 0 6px; }
.sheet-date { font-family: var(--mono); font-size: .85rem; color: #5b5046; white-space: nowrap; }
.sheet-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-bottom: 16px; }
.sheet-pic { border: 1px solid #ddd3c4; border-radius: 6px; padding: 10px; display: grid; place-items: center; min-height: 160px; background: #fffdfa; }
.sheet-img { width: 100%; max-height: 260px; object-fit: contain; }
.sheet-facts { margin: 0; display: grid; gap: 8px; align-content: start; }
.sheet-facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; border-bottom: 1px dotted #cfc3b1; padding-bottom: 6px; }
.sheet-facts dt { color: #6d6256; font-size: .82rem; }
.sheet-facts dd { margin: 0; font-family: var(--mono); font-size: .86rem; }
.sheet-facts small { color: #7a6f63; font-family: var(--body); }
.sheet-facts input { width: 100%; border: 0; border-bottom: 1px solid #b9ab97; font: inherit; background: transparent; padding: 0 0 2px; }
.sheet-table { font-size: .82rem; }
.sheet-table th, .sheet-table td { padding: 6px 6px; border-bottom: 1px solid #e3dacd; text-align: left; vertical-align: top; }
.sheet-table th { font-weight: 600; color: #6d6256; border-bottom: 1.5px solid #1d1915; }
.sheet-table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.sheet-table th.num { font-family: var(--body); }
.sheet-table small { color: #7a6f63; }
.sheet-table tr.off td { color: #9a8f82; }
.sheet-table .tick { width: 26px; }
.sheet-table .box { display: inline-block; width: 14px; height: 14px; border: 1.5px solid #6d6256; border-radius: 3px; }
.sheet-notes { display: grid; gap: 4px; margin-top: 14px; font-weight: 600; font-size: .85rem; color: #6d6256; }
.sheet-notes textarea { font: 400 .9rem/1.4 var(--body); border: 1px solid #cfc3b1; border-radius: 4px; padding: 6px 8px; resize: vertical; }
.sheet-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e3dacd; font-size: .76rem; color: #6d6256; }
.sheet-foot p { margin: 0 0 4px; }
.sheet-empty { color: #7a6f63; }

/* ---------------------------------------------------------------- unlock */
.unlock { padding-block: 56px; background: linear-gradient(180deg, #eef3f2, #e5eceb); border-block: 1px solid #cfdcda; position: relative; }
.unlock-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: start; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 14px; height: 7px; border-left: 2.5px solid var(--scorch); border-bottom: 2.5px solid var(--scorch); transform: rotate(-45deg); }
/* The unlock box is a sheet of clear acrylic: a tinted pane with a bright edge. */
.unlock-box { background: linear-gradient(150deg, rgba(255, 255, 255, .85), rgba(232, 244, 245, .7)); border: 1px solid rgba(255, 255, 255, .95); outline: 1px solid rgba(120, 160, 165, .35); border-radius: 18px; padding: 24px 26px; box-shadow: 0 20px 40px -26px rgba(30, 70, 80, .45), inset 0 1px 0 #fff; }
.price-tag { font: 760 2.6rem/1 var(--display); margin: 0 0 12px; letter-spacing: -0.02em; }
.price-tag span { font: 500 1rem var(--body); color: var(--ink-3); letter-spacing: 0; }
.soon { display: inline-block; font: 500 .82rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 6px; }
.batch-results { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: .9rem; }
.batch-results .ok strong::before { content: '✓ '; color: var(--ok); }
.batch-results .bad strong::before { content: '✕ '; color: var(--bad); }

/* ---------------------------------------------------------------- explainers */
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.why-grid h3 { font-size: 1.12rem; }
.why-grid p { color: var(--ink-2); margin: 0; }
.guide-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guide-cards a { display: grid; gap: 6px; height: 100%; padding: 16px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease; }
.guide-cards a:hover { transform: translateY(-2px); border-color: var(--birch-edge); color: var(--ink-2); }
.guide-cards strong { font: 650 1.05rem/1.25 var(--display); color: var(--scorch); }
.guide-cards span { font-size: .9rem; line-height: 1.45; }

.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose .table-scroll { margin: 0 0 1em; }
.colour-table th, .colour-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.colour-table th { font-size: .82rem; color: var(--ink-3); background: #faf5ec; }
.source-note { font-size: .88rem; color: var(--ink-3); }
.aside { position: sticky; top: 20px; }
.aside h2 { font-size: 1.1rem; }
.aside .guide-cards { grid-template-columns: 1fr; }
.aside-note { margin-top: 12px; }

.page-head { background: var(--birch); padding-block: 48px 40px; }
.page-head h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 760; letter-spacing: -0.03em; }
.page-head p { color: var(--ink-2); font-size: 1.1rem; }

.ad-slot { margin-block: 24px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 10px; text-align: center; }

/* ---------------------------------------------------------------- footer */
.site-foot { background: #2b241d; color: #d9ccb8; margin-top: 0; }
.site-foot .ply-edge { height: 10px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1fr; gap: 32px; padding-block: 40px 44px; }
.site-foot .brand { color: #f6ecdc; margin-bottom: 14px; }
.site-foot p { font-size: .92rem; color: #cbbca6; }
.site-foot .disclaimer { color: #e8dcc8; }
.site-foot .foot-note { color: #a8998a; font-size: .85rem; }
.site-foot h2 { font: 600 .82rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #a8998a; margin: 8px 0 14px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-foot a { color: #f1e5d2; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .stage-col { order: 2; }
  .hero-intro { display: contents; }
  .hero-intro > .eyebrow, .hero-intro > h1, .hero-intro > .lede, .hero-intro > .open-row, .hero-intro > .error, .hero-intro > noscript, .hero-intro > input { order: 1; }
  .file-card { order: 3; }
  .hero-intro > h1, .hero-intro > .lede, .hero-intro > .open-row, .hero-intro > .eyebrow { margin-bottom: 0; }
  .export-grid, .why-grid { grid-template-columns: 1fr; }
  .article-grid, .sheet-grid, .unlock-grid { grid-template-columns: minmax(0, 1fr); }
  .sheet-paper { overflow-x: auto; }
  .aside { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .site-head { flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 12px; }
  .site-nav { gap: 2px; margin-left: -10px; }
  .site-nav a { padding: 6px 10px; }
  .hero { padding-block: 24px 28px; }
  .hero h1 { font-size: 2.3rem; }
  .lede { font-size: 1.02rem; }
  .stage-bar { gap: 6px; padding: 0 6px; }
  .seg span { padding: 3px 7px; font-size: .8rem; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band, .unlock { padding-block: 40px; }
  .sheet-frame { padding: 10px; }
  .sheet-paper { padding: 16px 14px; }
  .sheet-top { grid-template-columns: 1fr; }
  .sheet-table th:nth-child(7), .sheet-table td:nth-child(7), .sheet-table th:nth-child(8), .sheet-table td:nth-child(8) { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .chip-name { max-width: 12ch; }
  #stage { aspect-ratio: 5 / 4; }
  .stage-tools { flex-direction: column; right: 10px; bottom: 10px; }
  .stage-dims { left: 30px; bottom: 10px; font-size: .74rem; max-width: calc(100% - 90px); line-height: 1.3; }
  /* The layer table becomes one card per layer, so speed and power stay in view. */
  .table-scroll:has(.layers) { overflow: visible; }
  .layers, .layers tbody, .layers tfoot { display: block; }
  .layers thead { display: none; }
  .layers tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; }
  .layers td { display: block; padding: 0; border: 0; white-space: normal; text-align: left; }
  .layers .num { text-align: left; }
  .layers td.show { position: absolute; left: 14px; top: 13px; width: auto; }
  .layers td.layer, .layers td.foot-label { grid-column: 1 / -1; padding-left: 30px; min-width: 0; }
  .layers td[data-label]::before { content: attr(data-label); display: block; font: 500 .72rem/1.2 var(--body); color: var(--ink-3); margin-bottom: 2px; }
  .layers td[data-label]:empty { display: none; }
  .layers tfoot td { background: none; }
  .layers tfoot tr { background: #faf5ec; border-radius: 0 0 var(--radius) var(--radius); }
}

/* ---------------------------------------------------------------- printing the job sheet */
@media print {
  @page { size: A4; margin: 12mm; }
  body.printing-sheet { background: #fff; }
  body.printing-sheet > *:not(main), body.printing-sheet main > *:not(#sheet) { display: none !important; }
  body.printing-sheet #sheet { padding: 0; background: none; border: 0; }
  body.printing-sheet #sheet .section-head, body.printing-sheet .sheet-side { display: none; }
  body.printing-sheet .sheet-grid { display: block; }
  body.printing-sheet .sheet-frame { padding: 0; background: none; }
  body.printing-sheet .sheet-paper { box-shadow: none; padding: 0; font-size: 10pt; }
  body.printing-sheet .wrap { width: 100%; }
  body.printing-sheet .sw { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* LightBurn palette swatches, generated */
.sw-0{background:#000000}.sw-1{background:#0000FF}.sw-2{background:#FF0000}.sw-3{background:#00E000}.sw-4{background:#D0D000}.sw-5{background:#FF8000}.sw-6{background:#00E0E0}.sw-7{background:#FF00FF}.sw-8{background:#B4B4B4}.sw-9{background:#0000A0}.sw-10{background:#A00000}.sw-11{background:#00A000}.sw-12{background:#A0A000}.sw-13{background:#C08000}.sw-14{background:#00A0FF}.sw-15{background:#A000A0}.sw-16{background:#808080}.sw-17{background:#7D87B9}.sw-18{background:#BB7784}.sw-19{background:#4A6FE3}.sw-20{background:#D33F6A}.sw-21{background:#8CD78C}.sw-22{background:#F0B98D}.sw-23{background:#F6C4E1}.sw-24{background:#FA9ED4}.sw-25{background:#500A78}.sw-26{background:#B45A00}.sw-27{background:#004754}.sw-28{background:#86FA88}.sw-29{background:#FFDB66}.sw-30{background:#F36926}.sw-31{background:#0C96D9}
