@font-face {
  font-family: 'Bitter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/bitter-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/karla-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/karla-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* CutList Hero: shop drawings. White paper, graphite #2E2A26, chalk-line blue #2563A8, birch ply #E8D2A6.
   One memorable element: the cut diagrams, drawn as birch plywood. */
:root {
  --bg: #FFFFFF; --surface: #F6F6F4; --ink: #2E2A26; --muted: #625C55; --line: #DEDBD6;
  --accent: #2563A8; --accent-ink: #FFFFFF; --birch: #E8D2A6; --edge: #C9AE7C;
  --font-display: 'Bitter', Georgia, serif; --font-body: 'Karla', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #1E1C1A; --surface: #282522; --ink: #EEE9E2; --muted: #B5ACA1; --line: #3A3631; --accent: #7FB0E8; --accent-ink: #1E1C1A; --birch: #CDB386; --edge: #A88E5E; }
}
body { background: var(--bg); color: var(--ink); }
header.site { background: var(--bg); border-bottom: 2px dashed var(--accent); }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.logo b { color: var(--accent); }
nav.top a[aria-current="page"] { color: var(--accent); }
h1, h2 { font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.05; }
h2 { font-size: 28px; margin-top: 44px; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 18px; }
.lede { color: var(--muted); max-width: 60ch; line-height: 1.65; }
a { color: var(--accent); }
.tool { background: var(--surface); border: 0; border-radius: 4px; padding: 22px; }
.tool select, .tool input { background: var(--bg); border: 1px solid var(--line); border-radius: 3px; color: var(--ink); }
button { background: var(--accent); border-radius: 3px; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.stat { background: transparent; padding: 0; }
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 32px; }
.stat.hero { background: transparent; color: var(--ink); }
.stat.hero .v { color: var(--accent); font-size: 44px; }
.stat.hero .k { color: var(--muted); opacity: 1; }
.out { border-top: 2px dashed var(--line); }
table.edit td { padding: 4px; }
table.edit input { min-height: 40px; padding: 6px 8px; font-family: inherit; }
table.edit input.qty { width: 64px; }
table.edit input.num { width: 96px; }
.btn-ghost.x { min-height: 36px; padding: 0 10px; }
label.check { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 15px; }
label.check input { width: auto; min-height: 0; accent-color: var(--accent); }
/* The sheets: birch plywood with pencil labels. */
svg.sheet { width: 100%; height: auto; display: block; margin: 8px 0 18px; }
svg.sheet .board { fill: var(--surface); stroke: var(--muted); stroke-width: .3; stroke-dasharray: 1.2 .8; }
svg.sheet .part { fill: var(--birch); stroke: var(--edge); stroke-width: .35; }
svg.sheet text { fill: #2E2A26; font-family: 'Karla', sans-serif; }
svg.sheet .lbl { font-weight: 600; }
.board-row { margin: 10px 0; }
.bar { display: flex; border: 1px dashed var(--muted); border-radius: 2px; overflow: hidden; background: var(--surface); min-height: 34px; }
.seg-cut { font-size: 12px; color: #2E2A26; padding: 8px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 2px solid var(--bg); background: var(--birch) !important; }
details { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
@media print {
  header.site, footer.site, nav, .ad-slot, .tool form, .parts, .lede, h2, details, .cards, button { display: none !important; }
  .tool { background: none; padding: 0; }
  svg.sheet { page-break-inside: avoid; }
}

h2.sub { font-family: var(--font-body); font-size: 18px; font-weight: 600; margin: 22px 0 6px; }

@media (max-width: 520px) {
  table.edit input.num { width: 64px; }
  table.edit input.qty { width: 44px; }
  table.edit td:first-child input { min-width: 92px; }
  table.edit td { padding: 3px 2px; }
}

/* Voice: a note pencilled along a dashed cut line. */
.hello { font-family: var(--font-display); font-style: italic; border-left: 2px dashed var(--accent); }

/* Cut list import & share */
.parts-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.import { margin: 8px 0 18px; border: 1px dashed var(--line); padding: 10px 14px; }
.import summary { cursor: pointer; font-weight: 600; }
.imp-text { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.imp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.imp-file { width: auto; border: 0; padding: 0; background: none; }
