/* design: v2 */
/* desktopco2laser.com, design v2 B, "The bench, from above" (design/home-v2-B.png, James's pick on 2 Dec 2026). A
   bottle-green panel holds the tool beside a Blender render of a birch workbench seen from above (renders/,
   public/img/render/); the answer lies on the bench as a receipt. Below, wide bands alternate warm stone and bottle green,
   each with a small render beside its text. Barlow Condensed for headings, Fira Sans for text (both OFL, self-hosted).
   Light surfaces in dark mode too (color-scheme: light), so every pair is checked once, by tests/design.test.ts. */

@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("/fonts/fira-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("/fonts/fira-sans-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("/fonts/fira-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("/fonts/fira-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --brand: #13412b;        /* bottle green, the board's legend */
  --birch: #d4ad6b;
  --steel: #adaaa3;
  --orange: #f66b25;
  --ink: #20251f;
  --bg: #e8ded0;           /* the reading surface: a warm pale stone */
  --stone: #cdc9c0;        /* the stone bands */
  --card: #fbfaf6;         /* receipt and table paper */
  --text: #20251f;
  --muted: #474c45;
  --line: #bdb8ad;
  --link: #12513f;
  --on-brand: #ffffff;
  --on-brand-muted: #d3e2da;
  --on-brand-link: #f0cf92;
  --btn: #f66b25;
  --btn-hover: #ff8547;
  --btn-text: #20251f;
  --good: #1d6a3c;
  --warn: #8a4a00;
  --bad: #a3271c;
  --radius: 6px;
  color-scheme: light;
}

body { background: var(--bg); color: var(--text); font-family: "Fira Sans", system-ui, sans-serif; font-size: 17px; }
h1, h2, h3, .wordmark { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.1rem); line-height: 1.08; }
h3 { font-size: 1.4rem; line-height: 1.1; }
.wrap { max-width: 1240px; padding: 0 20px; }
a { color: var(--link); }

/* header: one green bar */
.site-header { background: var(--brand); border-bottom: 0; }
.site-header .brand, .site-header .main-nav a { color: var(--on-brand); }
.brand .mark { height: 22px; width: auto; color: var(--on-brand); }
.wordmark { font-size: 1.55rem; line-height: 1; }
.main-nav { font-size: 1rem; gap: 4px 30px; }
.main-nav a[aria-current="page"], .main-nav a:hover { color: var(--on-brand-link); }
.site-header .menu-btn { color: var(--on-brand); border-color: rgba(255, 255, 255, 0.55); }
.site-header.menu-open .main-nav a { border-top-color: rgba(255, 255, 255, 0.2); }

/* buttons */
.setup button, .share-button { font: 700 1.25rem/1 "Barlow Condensed", sans-serif; letter-spacing: 0.01em; border: 0; border-radius: var(--radius); cursor: pointer; padding: 0.7rem 1.2rem; }
.setup button { background: var(--btn); color: var(--btn-text); width: 100%; }
.setup button:hover { background: var(--btn-hover); }
.share-button { background: var(--brand); color: var(--on-brand); }
.share-button:hover { background: #0d2f1f; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; }
.share-note { color: var(--good); }
.share-link { width: 100%; max-width: 32rem; padding: 0.35rem; }

/* the tool's form, on green wherever it appears */
.setup { color: var(--on-brand); }
.setup fieldset { border: 0; padding: 0; margin: 0 0 0.9rem; }
.setup legend, .setup p > label { font-weight: 700; display: block; margin-bottom: 0.3rem; }
.setup label { display: block; margin: 0.25rem 0; }
.setup .row label { display: inline-block; margin-right: 0.7rem; font-weight: 400; }
.setup p { margin: 0 0 0.8rem; }
.setup input, .setup select { font: inherit; }
.setup select, .setup input[type="number"] { padding: 0.4rem 0.5rem; border: 0; border-radius: 4px; background: #ffffff; color: var(--ink); }
.setup select { width: 100%; }
.setup input[type="number"] { width: 5.5rem; }
.setup input[type="radio"], .setup input[type="checkbox"] { accent-color: var(--orange); width: 1.05rem; height: 1.05rem; vertical-align: -0.15em; margin-right: 0.35rem; }

/* the answer as a receipt */
.receipt, .tool .setup-result { background: var(--card); color: var(--text); border-radius: 4px; box-shadow: 0 14px 30px rgba(20, 30, 20, 0.28), 0 2px 4px rgba(20, 30, 20, 0.18); padding: 1.2rem 1.3rem 1.1rem; }
.result .total { margin: 0 0 0.6rem; font-size: 1rem; line-height: 1.4; }
.result .figure { display: block; width: fit-content; font: 700 clamp(3rem, 5vw, 4.2rem)/0.95 "Barlow Condensed", sans-serif; letter-spacing: -0.01em; color: var(--ink); padding-bottom: 0.2rem; border-bottom: 5px solid var(--orange); margin-bottom: 0.5rem; }
.result .bundle { font-size: 0.98rem; }
.result .small, .result .other { color: var(--muted); font-size: 0.9rem; }
.result .tag { font-size: 0.75rem; color: var(--muted); font-weight: 400; white-space: nowrap; }
.result .lines { font-size: 0.88rem; margin: 0.5rem 0; }
.result .lines thead { display: none; }
.result .lines tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.8rem; border-bottom: 1px solid var(--line); padding: 0.35rem 0; }
.result .lines th, .result .lines td { border: 0; padding: 0; }
.result .lines th { font-weight: 700; }
.result .lines .amount { text-align: right; white-space: nowrap; font-weight: 700; }
.result .lines .src { grid-column: 1 / -1; font-size: 0.8rem; color: var(--muted); }
.result .lines .src a { color: var(--muted); }
.fit { border-top: 2px solid var(--ink); margin-top: 0.8rem; padding-top: 0.6rem; }
.fit h3 { margin: 0 0 0.2rem; }
.fit p { margin: 0.3rem 0; font-size: 0.95rem; }
.fit .ok { color: var(--good); }
.fit .warn { color: var(--warn); }
.fit .no { color: var(--bad); }
.receipt .share-row { margin: 0.9rem 0 0; }
.receipt .share-button { width: 100%; }
.receipt .share-plain { font-size: 0.85rem; }

/* home: the hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--brand); }
.hero-panel { color: var(--on-brand); padding: 26px 20px 30px; }
.hero-panel h1 { color: var(--on-brand); margin: 0 0 0.35em; }
.hero-panel .lede { color: var(--on-brand); font-size: 1.06rem; margin: 0 0 1.4rem; }
.hero-bench { position: relative; background: var(--birch); }
.hero-bench .bench-img { display: block; width: 100%; height: auto; }
.hero-bench .receipt { position: relative; margin: -60px 14px 26px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(360px, 31%) minmax(0, 1fr); }
  .hero-panel { padding: 30px 34px 34px max(24px, calc((100vw - 1240px) / 2 + 20px)); }
  .hero-bench { display: flex; justify-content: flex-end; align-items: flex-start; min-height: 600px; overflow: hidden; }
  .hero-bench .bench-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
  .hero-bench .receipt { width: min(410px, 44%); margin: 30px max(24px, calc((100vw - 1240px) / 2 + 20px)) 30px 0; }
}

/* home: the bands */
.band { padding: 44px 0; }
.band-stone { background: var(--stone); color: var(--text); }
.band-green { background: var(--brand); color: var(--on-brand); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 44px; align-items: start; }
.band-art { padding-top: 8px; }
.band-art img { display: block; width: min(100%, 300px); height: auto; margin: 0 auto; }
.band-text h2 { margin: 0 0 0.4em; }
.band-text p, .band-text li { max-width: 72ch; }
.band-green h2 { color: var(--on-brand); }
.band-green a { color: var(--on-brand-link); }
.band-green .note { color: var(--on-brand-muted); }
.band-green th, .band-green td { border-bottom-color: rgba(255, 255, 255, 0.22); background: transparent; }
.band-green thead th { color: var(--on-brand-muted); }
.facts { padding-left: 1.1em; }
.facts li { margin-bottom: 0.45rem; }
@media (min-width: 800px) { .band-grid { grid-template-columns: 280px minmax(0, 1fr); } }

/* tables */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.table-wrap table.machines { min-width: 640px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { border-bottom: 1px solid var(--line); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
th { background: transparent; }
thead th { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.page-body .table-wrap { background: var(--card); border-radius: 4px; padding: 0.2rem 0.6rem; }
.note { color: var(--muted); font-size: 0.85rem; }

/* inner pages: a green page head across the screen with the spot render, then the stone reading surface */
.page-head { position: relative; background: var(--brand); color: var(--on-brand); box-shadow: 0 0 0 100vmax var(--brand); clip-path: inset(0 -100vmax); padding: 18px 0 22px; margin-bottom: 30px; }
.page-head h1 { color: var(--on-brand); }
.page-head .lede { color: var(--on-brand); }
.page-head .byline, .page-head .byline a { color: var(--on-brand-muted); }
.page-head-art { width: clamp(120px, 26vw, 300px); }
.crumbs { margin-bottom: 0; padding-bottom: 12px; }
.article-wrap { padding-top: 14px; }
.page-body h2 { margin-top: 1.6em; }
.toc { background: var(--card); border-color: var(--line); }

/* the tool on /setup: the form on green, the answer as a receipt */
.tool { display: grid; gap: 1.25rem; margin: 1.5rem 0; }
.tool .setup { background: var(--brand); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
@media (min-width: 900px) { .tool { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.25fr); align-items: start; } .tool .share-row, .tool script { grid-column: 1 / -1; } }

/* footer: green again */
.site-footer { background: var(--brand); color: var(--on-brand-muted); border-top: 0; margin-top: 0; }
.site-footer a, .footer-brand .brand, .footer-col h2 { color: var(--on-brand); }
.footer-legal::before { border-top-color: rgba(255, 255, 255, 0.22); }
.page-home main + .site-footer, .page-home .site-footer { margin-top: 0; }
