/* ==========================================================================
   Woodcraft Bench — warm walnut / cream / brass design system
   Light theme only. No external font or icon dependencies.
   ========================================================================== */

:root {
  --cream-50: #FAF6F0;
  --cream-100: #F5EFE6;
  --cream-200: #EDE4D6;
  --cream-300: #E0D2BE;
  --cream-400: #D1BFA6;

  --walnut-900: #241A12;
  --walnut-850: #2E2118;
  --walnut-800: #3D2E22;
  --walnut-750: #4A3728;
  --walnut-700: #5C4633;
  --walnut-600: #7A5E45;
  --walnut-500: #A08466;
  --walnut-400: #C4AB8E;
  --walnut-300: #E0D2BE;
  --walnut-200: #EDE4D6;

  --brass-900: #6B4E08;
  --brass-750: #8A6610;
  --brass-500: #B8860B;
  --brass-400: #D4A02E;
  --brass-300: #E8C05C;
  --brass-200: #F5E0A8;
  --brass-100: #FBF2D6;

  --green-600: #4A6B4A;
  --green-400: #6B8F6B;
  --green-200: #A8C4A8;
  --green-100: #E0EDE0;

  --brick-700: #8A3A28;
  --brick-500: #A84A32;
  --brick-400: #C4614A;
  --brick-200: #FAE0D8;

  --blue-600: #4A6C8C;
  --blue-100: #EEF4F8;
  --blue-200: #A8C4D9;

  --ink: #2E2118;
  --ink-soft: #6B5A4A;
  --ink-faint: #9A8775;
  --on-dark: #FAF6F0;
  --on-dark-soft: #E0D2BE;

  --line: #E0D2BE;
  --line-strong: #D1BFA6;

  --radius-xs: 4px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(74, 55, 40, .06);
  --shadow-sm: 0 2px 5px rgba(74, 55, 40, .08);
  --shadow-md: 0 5px 14px rgba(74, 55, 40, .09);
  --shadow-lg: 0 14px 36px rgba(74, 55, 40, .11);
  --shadow-xl: 0 24px 60px rgba(74, 55, 40, .16);

  --t-color: .16s ease;
  --t-card: .28s ease;

  --font-title: "Bitter", "Rockwell", "Georgia", "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Consolas", "Menlo", "SFMono-Regular", monospace;

  --container: 1200px;
  --container-narrow: 820px;
  --container-wide: 1360px;
  --gutter: 22px;
  --header-h: 56px;

  --section: 60px;
  --section-sm: 38px;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--cream-50);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* faint wood-grain texture, 3% opacity */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    92deg,
    rgba(74, 55, 40, .035) 0px,
    rgba(74, 55, 40, .035) 1px,
    transparent 1px,
    transparent 7px
  );
}

body > * { position: relative; z-index: 1; }

img, svg, canvas { max-width: 100%; }
img { height: auto; border-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.18rem, 2vw, 1.4rem); }
h4 { font-size: 1.08rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--walnut-700); text-decoration: none; transition: color var(--t-color); }
a:hover { color: var(--brass-750); }

a.inline-link {
  color: var(--brass-750);
  text-decoration: underline;
  text-decoration-color: var(--brass-300);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a.inline-link:hover { text-decoration-color: var(--brass-500); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .45em; }

code, kbd, samp { font-family: var(--font-mono); font-size: .92em; }

:focus-visible {
  outline: 3px solid var(--brass-400);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--brass-200); color: var(--walnut-900); }

/* ------------------------------------------------------------- utilities */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); }
.container-wide { max-width: var(--container-wide); }

.section { padding: var(--section) 0; }
.section-sm { padding: var(--section-sm) 0; }
.section-tight { padding: 42px 0 var(--section); }
.section-alt { background: var(--cream-100); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 900;
  background: var(--walnut-750); color: var(--on-dark);
  padding: 10px 18px; border-radius: var(--radius-xs);
  font-weight: 700; font-size: .9rem; transition: top var(--t-color);
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

.eyebrow {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass-500);
  margin: 0 0 .5em;
}

.section-head { margin-bottom: 30px; max-width: 760px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }

.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 26px;
}
.section-head-row .section-head { margin-bottom: 0; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--cream-50);
  border-bottom: 1px solid var(--line-strong);
  height: var(--header-h);
  box-shadow: 0 1px 0 rgba(74, 55, 40, .04);
}

.site-header .container-wide { height: 100%; }

.header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
  position: relative;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  flex: 0 0 auto; text-decoration: none; color: inherit;
}
.brand:hover { color: inherit; }

.brand-mark {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 6px;
  background: var(--walnut-750);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(250, 246, 240, .12);
}
.brand-mark svg { width: 20px; height: 20px; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-title); font-weight: 700;
  font-size: 1.05rem; color: var(--walnut-850); letter-spacing: -.01em;
}
.brand-tag {
  font-size: .55rem; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--brass-500); margin-top: 3px;
}

.main-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { margin: 0; position: relative; }

.nav-link {
  display: flex; align-items: center; gap: 5px;
  font-size: .84rem; font-weight: 500; color: var(--walnut-700);
  padding: 6px 10px; border-radius: 6px;
  box-shadow: inset 0 -2px 0 transparent;
  transition: background var(--t-color), color var(--t-color), box-shadow var(--t-color);
  white-space: nowrap;
}
.nav-link:hover { background: rgba(122, 94, 69, .08); color: var(--walnut-850); }
.nav-link.is-current {
  color: var(--brass-750);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--brass-500);
}
.nav-link .caret { width: 9px; height: 9px; opacity: .65; flex: 0 0 9px; }

/* dropdown */
.nav-item-has-menu > .nav-link { cursor: pointer; }
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 300px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t-color), transform var(--t-color), visibility var(--t-color);
  z-index: 210;
}
.nav-item-has-menu:hover > .nav-menu,
.nav-item-has-menu:focus-within > .nav-menu,
.nav-item-has-menu.is-open > .nav-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-menu li { margin: 0; }
.nav-menu a {
  display: block; padding: 8px 12px; border-radius: 7px;
  font-size: .85rem; color: var(--walnut-700); font-weight: 500;
  transition: background var(--t-color), color var(--t-color);
}
.nav-menu a:hover { background: var(--brass-100); color: var(--brass-750); }
.nav-menu .dd-desc {
  display: block; font-size: .72rem; font-weight: 400;
  color: var(--ink-faint); margin-top: 2px; line-height: 1.35;
}
.nav-menu .dd-head {
  font-size: .66rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brass-500);
  padding: 10px 12px 4px;
}
.nav-menu .dd-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* global search */
.global-search { position: relative; flex: 0 0 auto; }
.gs-form { display: block; margin: 0; }
.gs-input {
  width: 200px; height: 34px;
  padding: 0 14px 0 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  font-family: var(--font-body); font-size: .82rem; color: var(--ink);
  transition: width var(--t-color), border-color var(--t-color), box-shadow var(--t-color);
}
.gs-input::placeholder { color: var(--ink-faint); }
.gs-input:focus {
  width: 260px; outline: none;
  border-color: var(--brass-500);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, .14);
}
.gs-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; pointer-events: none; color: var(--walnut-500);
}
.gs-results {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 380px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-xl);
  padding: 6px; max-height: 70vh; overflow-y: auto;
  display: none; z-index: 220;
}
.gs-results.is-open { display: block; }
.gs-group-head {
  font-size: .64rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brass-500);
  padding: 9px 11px 4px;
}
.gs-item {
  display: block; padding: 7px 11px; border-radius: 7px;
  font-size: .85rem; color: var(--walnut-700); font-weight: 500;
}
.gs-item:hover, .gs-item.is-active { background: var(--brass-100); color: var(--brass-750); }
.gs-item .gs-meta { display: block; font-size: .72rem; color: var(--ink-faint); font-weight: 400; margin-top: 1px; }
.gs-empty { padding: 16px 12px; font-size: .85rem; color: var(--ink-soft); }

.nav-toggle {
  display: none;
  width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
  color: var(--walnut-700);
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--walnut-800);
  color: var(--on-dark-soft);
  padding: 52px 0 0;
  margin-top: 0;
  border-top: 4px solid var(--brass-500);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(224, 210, 190, .18);
}
.footer-brand .brand-mark { background: var(--brass-500); }
.footer-brand .brand-name { color: var(--on-dark); }
.footer-brand p {
  font-size: .84rem; color: var(--on-dark-soft); margin: 14px 0 16px;
  max-width: 34ch; opacity: .85;
}
.footer-social { display: flex; gap: 9px; }
.footer-social span {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(250, 246, 240, .1);
  display: flex; align-items: center; justify-content: center;
  color: var(--brass-300);
}
.footer-social svg { width: 15px; height: 15px; }

.footer-col h4 {
  font-family: var(--font-body); font-size: .68rem; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--brass-300); margin: 0 0 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: .84rem; color: var(--on-dark-soft); }
.footer-col a:hover { color: var(--brass-300); }

.footer-sub { margin-top: 18px; }
.footer-sub form { display: flex; gap: 7px; }
.footer-sub input {
  flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 12px;
  border-radius: var(--radius-xs); border: 1px solid rgba(224, 210, 190, .3);
  background: rgba(250, 246, 240, .08); color: var(--on-dark);
  font-family: var(--font-body); font-size: .82rem;
}
.footer-sub input::placeholder { color: rgba(224, 210, 190, .6); }
.footer-sub input:focus { outline: none; border-color: var(--brass-300); }
.footer-sub button { flex: 0 0 auto; }
.footer-sub-note { font-size: .7rem; opacity: .6; margin-top: 8px; }

.footer-disclaimers {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(224, 210, 190, .18);
}
.footer-safety {
  border: 1px solid rgba(232, 192, 92, .38);
  background: rgba(251, 242, 214, .06);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; gap: 14px;
}
.footer-safety svg { width: 26px; height: 26px; flex: 0 0 26px; color: var(--brass-300); margin-top: 2px; }
.footer-safety h5 {
  font-family: var(--font-body); font-size: .72rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brass-300); margin: 0 0 7px;
}
.footer-safety p { font-size: .8rem; line-height: 1.6; color: var(--on-dark-soft); margin: 0; opacity: .88; }
.footer-legal { font-size: .8rem; line-height: 1.65; color: var(--on-dark-soft); opacity: .8; margin: 0; }
.footer-legal strong { color: var(--on-dark); display: block; margin-bottom: 6px; font-size: .78rem; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 18px 0 22px;
  font-size: .78rem; color: var(--on-dark-soft); opacity: .85;
}
.footer-bottom-links { display: flex; gap: 16px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-bottom-links li { margin: 0; }
.footer-bottom-links a { color: var(--on-dark-soft); font-size: .78rem; }
.footer-bottom-links a:hover { color: var(--brass-300); }
.badge-16 {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-pill);
  border: 1px solid rgba(232, 192, 92, .5); color: var(--brass-300);
  font-size: .7rem; font-weight: 800; letter-spacing: .08em;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: .93rem; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: background var(--t-color), color var(--t-color), border-color var(--t-color), transform var(--t-color), box-shadow var(--t-color);
  line-height: 1.25;
}
.btn svg { width: 15px; height: 15px; flex: 0 0 15px; }

.btn-primary { background: var(--brass-500); color: var(--walnut-900); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brass-400); color: var(--walnut-900); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-walnut { background: var(--walnut-750); color: var(--on-dark); }
.btn-walnut:hover { background: var(--walnut-700); color: var(--on-dark); transform: translateY(-1px); }

.btn-outline { background: #fff; color: var(--walnut-750); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--brass-500); color: var(--brass-750); background: var(--brass-100); }

.btn-ghost-light { background: rgba(250, 246, 240, .1); color: var(--cream-50); border-color: rgba(250, 246, 240, .34); }
.btn-ghost-light:hover { background: rgba(250, 246, 240, .2); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-card), transform var(--t-card), border-color var(--t-card);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--brass-300); }

a.card { color: inherit; }
a.card:hover { color: inherit; }

.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--cream-200); }
.card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform var(--t-card);
}
.card:hover .card-media img { transform: scale(1.04); }

.card-body { padding: 18px; display: flex; flex-direction: column; flex: 1 1 auto; }
.card-title {
  font-family: var(--font-title); font-size: 1.06rem; font-weight: 700;
  margin: 0 0 .4em; color: var(--ink);
}
.card-text { font-size: .88rem; color: var(--ink-soft); margin: 0 0 .9em; }
.card-foot {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: .78rem; color: var(--ink-soft);
}
.card-foot .arrow { color: var(--brass-500); font-weight: 700; }

.card-flag {
  position: absolute; top: 12px; left: 12px;
  background: var(--cream-50); color: var(--brass-750);
  padding: 4px 11px; border-radius: var(--radius-pill);
  font-size: .68rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; box-shadow: var(--shadow-xs);
}

/* category card */
.cat-card .card-body { padding: 20px 18px; }
.cat-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--walnut-750); color: var(--brass-300);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.cat-icon svg { width: 24px; height: 24px; }
.cat-card .card-title { margin-bottom: .3em; }
.cat-card .card-text { font-size: .84rem; }
.cat-count { font-family: var(--font-mono); font-size: .78rem; color: var(--brass-750); font-weight: 700; }

/* tool card */
.tool-card .card-media { aspect-ratio: 4 / 3; background: var(--brass-100); }
.tool-card .card-media img { object-fit: contain; padding: 12px; }
.tool-card .card-body { padding: 15px 16px; }
.tool-card .card-title { font-size: .98rem; margin-bottom: .3em; }
.tool-card .card-text { font-size: .8rem; }

/* blog card */
.blog-card .card-media { aspect-ratio: 16 / 9; }
.blog-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; color: var(--ink-faint);
  margin-bottom: 8px; letter-spacing: .02em;
}
.blog-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

/* -------------------------------------------------------------- grid utils */
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { display: grid; gap: var(--gutter); grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid-auto-sm { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ------------------------------------------------------------------ tags */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  background: var(--brass-100); color: var(--brass-900);
  border: 1px solid var(--brass-200);
  white-space: nowrap;
}
.tag-walnut { background: var(--walnut-200); color: var(--walnut-800); border-color: var(--walnut-300); }
.tag-green { background: var(--green-100); color: var(--green-600); border-color: var(--green-200); }
.tag-brick { background: var(--brick-200); color: var(--brick-700); border-color: var(--brick-400); }
.tag-outline { background: transparent; color: var(--walnut-600); border-color: var(--line-strong); }
.tag-blue { background: var(--blue-100); color: var(--blue-600); border-color: var(--blue-200); }

.chip {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: #fff;
  font-size: .8rem; font-weight: 600; color: var(--walnut-700);
  cursor: pointer; font-family: var(--font-body);
  transition: background var(--t-color), color var(--t-color), border-color var(--t-color);
  text-decoration: none;
}
.chip:hover { border-color: var(--brass-500); color: var(--brass-750); }
.chip.is-active { background: var(--walnut-750); color: var(--on-dark); border-color: var(--walnut-750); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

.dim-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 600;
  background: var(--cream-100); border: 1px solid var(--line);
  border-radius: var(--radius-xs); padding: 2px 8px; color: var(--walnut-700);
}

.stage-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: var(--radius-pill);
  background: var(--walnut-750); color: var(--brass-200);
  font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.stage-pill svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------- notices */
.notice {
  border-radius: var(--radius);
  padding: 14px 17px;
  font-size: .87rem;
  border: 1px solid var(--line);
  margin-bottom: 18px;
  display: flex; gap: 12px;
}
.notice svg { width: 19px; height: 19px; flex: 0 0 19px; margin-top: 2px; }
.notice-body { flex: 1 1 auto; }
.notice strong { display: block; margin-bottom: 3px; font-size: .88rem; }
.notice p { margin: 0; font-size: .85rem; line-height: 1.6; }

.notice-safety { background: var(--brass-100); border-color: var(--brass-300); color: var(--brass-900); }
.notice-info { background: var(--blue-100); border-color: var(--blue-200); color: #2E4557; }
.notice-warn { background: var(--brick-200); border-color: var(--brick-400); color: var(--brick-700); }
.notice-neutral { background: var(--cream-200); border-color: var(--line-strong); color: var(--ink-soft); }

.tip-box {
  background: var(--cream-100);
  border-left: 4px solid var(--brass-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 17px; margin-bottom: 18px; font-size: .87rem;
}
.tip-box strong { display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-750); margin-bottom: 5px; }
.tip-box p:last-child { margin-bottom: 0; }
.tip-box.warn { border-left-color: var(--brick-500); background: var(--brick-200); }
.tip-box.warn strong { color: var(--brick-700); }
.tip-box.note { border-left-color: var(--blue-600); background: var(--blue-100); }
.tip-box.note strong { color: var(--blue-600); }
.tip-box.ok { border-left-color: var(--green-600); background: var(--green-100); }
.tip-box.ok strong { color: var(--green-600); }

.legal-note {
  background: var(--cream-100);
  border-left: 4px solid var(--walnut-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 13px 16px; font-size: .84rem; color: var(--ink-soft);
  line-height: 1.6;
}
.legal-note strong { color: var(--ink); }

.empty-state {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 40px 24px; text-align: center;
  color: var(--ink-soft); font-size: .9rem;
  background: var(--cream-50);
}
.empty-state strong { display: block; font-family: var(--font-title); font-size: 1.05rem; color: var(--ink); margin-bottom: 6px; }

.safety-strip {
  background: var(--brick-200);
  border: 1px solid var(--brick-400);
  border-left: 5px solid var(--brick-500);
  border-radius: var(--radius);
  padding: 13px 17px;
  display: flex; align-items: center; gap: 14px;
  font-size: .87rem; color: var(--brick-700);
  margin-bottom: 22px;
}
.safety-strip svg { width: 22px; height: 22px; flex: 0 0 22px; }
.safety-strip strong { text-transform: uppercase; font-size: .74rem; letter-spacing: .1em; display: block; margin-bottom: 2px; }

/* -------------------------------------------------------------- page hero */
.page-hero {
  background: var(--walnut-800);
  color: var(--on-dark);
  padding: 34px 0 40px;
  border-bottom: 3px solid var(--brass-500);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: repeating-linear-gradient(93deg, rgba(250,246,240,.5) 0 1px, transparent 1px 9px);
}
.page-hero .container, .page-hero .container-wide, .page-hero .container-narrow { position: relative; z-index: 1; }
.page-hero h1 { color: var(--on-dark); margin-bottom: .45em; }
.page-hero .eyebrow { color: var(--brass-300); }
.page-hero p { color: var(--on-dark-soft); font-size: 1.02rem; max-width: 68ch; margin-bottom: 0; }
.page-hero .tag { background: rgba(251,242,214,.14); color: var(--brass-200); border-color: rgba(232,192,92,.4); }
.page-hero .tag-walnut { background: rgba(250,246,240,.12); color: var(--on-dark); border-color: rgba(250,246,240,.25); }

.breadcrumb {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: .78rem; margin-bottom: 14px; color: var(--on-dark-soft); opacity: .9;
  list-style: none; padding: 0;
}
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: 7px; }
.breadcrumb li::after { content: "/"; opacity: .45; }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--on-dark-soft); }
.breadcrumb a:hover { color: var(--brass-300); }
.breadcrumb [aria-current] { color: var(--brass-300); }

/* ---------------------------------------------------------------- hero 1 */
.hero {
  position: relative;
  background: var(--cream-100);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-track { position: relative; height: 460px; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility .7s ease;
  display: flex; align-items: center;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide-art {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .95;
}
.hero-slide-veil {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, #FAF6F0 0%, rgba(250,246,240,.9) 46%, rgba(74,55,40,.35) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 620px;
  padding: 40px 0;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--brass-200);
  color: var(--brass-750);
  padding: 6px 15px; border-radius: var(--radius-pill);
  font-size: .72rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
/* Only the first slide carries the page <h1>; the rest are <h2> but must look
   identical so the carousel stays visually consistent. */
.hero h1,
.hero .hero-h1 {
  font-size: clamp(1.95rem, 4.2vw, 2.9rem);
  margin-bottom: .4em;
  color: var(--walnut-850);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.hero-sub {
  font-size: 1.05rem; color: var(--walnut-700);
  margin-bottom: 24px; max-width: 52ch;
}
.hero-dots {
  position: absolute; bottom: 20px; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: center; gap: 9px;
}
.hero-dot {
  width: 30px; height: 5px; border-radius: 3px; border: 0; padding: 0;
  background: rgba(74, 55, 40, .25); cursor: pointer;
  transition: width var(--t-color), background var(--t-color);
}
.hero-dot.is-active { width: 46px; background: var(--brass-500); }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.9);
  color: var(--walnut-700); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background var(--t-color), color var(--t-color), border-color var(--t-color);
}
.hero-arrow:hover { background: var(--brass-500); color: var(--walnut-900); border-color: var(--brass-500); }
.hero-arrow svg { width: 16px; height: 16px; }
.hero-arrow.prev { left: max(14px, calc((100vw - var(--container)) / 2 - 52px)); }
.hero-arrow.next { right: max(14px, calc((100vw - var(--container)) / 2 - 52px)); }

/* ------------------------------------------------------------ trust strip */
.trust-strip { background: var(--walnut-750); color: var(--on-dark); padding: 26px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item svg { width: 24px; height: 24px; flex: 0 0 24px; color: var(--brass-300); margin-top: 2px; }
.trust-item strong { display: block; font-family: var(--font-title); font-size: .96rem; color: var(--on-dark); margin-bottom: 3px; }
.trust-item span { font-size: .8rem; color: var(--on-dark-soft); opacity: .82; line-height: 1.5; }

/* ---------------------------------------------------------------- steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); counter-reset: s; }
.steps li { margin: 0; counter-increment: s; }
.step-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); height: 100%;
  display: flex; flex-direction: column;
  transition: box-shadow var(--t-card), transform var(--t-card);
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.step-media { position: relative; aspect-ratio: 16 / 10; background: var(--cream-200); }
.step-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.step-num {
  position: absolute; top: 10px; left: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--walnut-750); color: var(--brass-200);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: .95rem; font-weight: 700;
}
.step-body { padding: 15px 17px 18px; flex: 1 1 auto; display: flex; flex-direction: column; }
.step-label { font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--brass-500); margin-bottom: 5px; }
.step-body h3 { font-size: 1.04rem; margin-bottom: .35em; }
.step-body p { font-size: .84rem; color: var(--ink-soft); margin: 0; }

/* -------------------------------------------------------------- cta band */
.cta-band {
  background: var(--walnut-750);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  color: var(--on-dark);
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
  border-bottom: 4px solid var(--brass-500);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; opacity: .1; pointer-events: none;
  background-image: repeating-linear-gradient(95deg, rgba(250,246,240,.6) 0 1px, transparent 1px 10px);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: var(--on-dark); margin-bottom: .35em; }
.cta-band p { color: var(--on-dark-soft); margin: 0; max-width: 54ch; }

/* --------------------------------------------------------- filter toolbar */
.filter-bar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; margin-bottom: 24px; box-shadow: var(--shadow-xs);
  display: flex; gap: 13px; flex-wrap: wrap; align-items: flex-end;
}
.filter-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.filter-field.grow { flex: 1 1 220px; }
.filter-field label {
  font-size: .68rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint);
}
.filter-field input, .filter-field select {
  height: 38px; padding: 0 11px; min-width: 150px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-xs);
  background: var(--cream-50); color: var(--ink);
  font-family: var(--font-body); font-size: .86rem;
  transition: border-color var(--t-color), box-shadow var(--t-color);
}
.filter-field input:focus, .filter-field select:focus {
  outline: none; border-color: var(--brass-500); background: #fff;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, .13);
}
.filter-count {
  margin-left: auto; font-size: .82rem; color: var(--ink-soft);
  font-family: var(--font-mono); padding-bottom: 9px;
}
.filter-count strong { color: var(--brass-750); }

.pagination { display: flex; gap: 7px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination button, .pagination a {
  min-width: 40px; height: 40px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--walnut-700);
  font-family: var(--font-mono); font-size: .85rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-color), color var(--t-color), border-color var(--t-color);
}
.pagination button:hover:not(:disabled), .pagination a:hover { border-color: var(--brass-500); color: var(--brass-750); }
.pagination .is-current { background: var(--walnut-750); border-color: var(--walnut-750); color: var(--on-dark); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ----------------------------------------------------------- tool detail */
.split-wide { display: grid; grid-template-columns: 380px 1fr; gap: 34px; align-items: start; }
.split-side { display: grid; grid-template-columns: 1fr 310px; gap: 38px; align-items: start; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }

.exhibit {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; position: sticky; top: calc(var(--header-h) + 18px);
}
.exhibit-main {
  background: var(--brass-100); aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  position: relative;
}
.exhibit-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.exhibit-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.exhibit-thumb {
  border: 1px solid var(--line); border-radius: 8px; background: var(--cream-50);
  padding: 8px 6px; text-align: center; cursor: pointer;
  font-size: .68rem; color: var(--ink-soft); font-weight: 600;
  transition: border-color var(--t-color), background var(--t-color), color var(--t-color);
}
.exhibit-thumb:hover, .exhibit-thumb.is-active { border-color: var(--brass-500); background: var(--brass-100); color: var(--brass-750); }
.exhibit-thumb span { display: block; margin-top: 4px; line-height: 1.3; }
.exhibit-canvas { width: 100%; display: block; border-radius: 6px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 44%; font-weight: 600; color: var(--ink-soft); font-size: .8rem; }
.spec-table td { font-family: var(--font-mono); font-size: .8rem; color: var(--walnut-750); font-weight: 600; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

.material-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.material-list li { margin: 0; }

.prose-block { font-size: .96rem; color: var(--ink-soft); }
.prose-block h2 { color: var(--ink); margin-top: 1.6em; }
.prose-block h2:first-child { margin-top: 0; }
.prose-block h3 { color: var(--ink); margin-top: 1.4em; }
.prose-block ul, .prose-block ol { color: var(--ink-soft); }
.prose-block strong { color: var(--ink); }

/* ---------------------------------------------------------- calculators */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.calc-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 17px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block; font-size: .78rem; font-weight: 700;
  color: var(--walnut-700); margin-bottom: 6px;
}
.field input, .field select {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-xs);
  background: var(--cream-50); color: var(--ink);
  font-family: var(--font-body); font-size: .92rem;
  transition: border-color var(--t-color), box-shadow var(--t-color), background var(--t-color);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--brass-500); background: #fff;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, .13);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field-hint { font-size: .74rem; color: var(--ink-faint); margin-top: 5px; }
.field-unit { position: relative; }
.field-unit .unit-tag {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: .74rem; font-family: var(--font-mono); color: var(--ink-faint); pointer-events: none;
}

.result-card {
  background: var(--walnut-750);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--on-dark);
  box-shadow: var(--shadow-lg);
  position: sticky; top: calc(var(--header-h) + 18px);
  overflow: hidden;
}
.result-card::after {
  content: ""; position: absolute; inset: 0; opacity: .09; pointer-events: none;
  background-image: repeating-linear-gradient(96deg, rgba(250,246,240,.55) 0 1px, transparent 1px 9px);
}
.result-card > * { position: relative; z-index: 1; }
.result-label {
  font-size: .68rem; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--brass-300); margin-bottom: 6px;
}
.result-hero {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  color: var(--brass-300); line-height: 1.05;
  letter-spacing: -.02em; margin-bottom: 4px;
}
.result-hero small { font-size: .38em; color: var(--on-dark-soft); font-weight: 600; margin-left: 5px; }
.result-note { font-size: .84rem; color: var(--on-dark-soft); opacity: .88; margin-bottom: 20px; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.result-cell {
  background: rgba(250, 246, 240, .08);
  border: 1px solid rgba(224, 210, 190, .2);
  border-radius: 9px; padding: 11px 13px;
}
.result-cell .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--on-dark-soft); opacity: .78; margin-bottom: 3px; }
.result-cell .v { font-family: var(--font-mono); font-size: 1.06rem; font-weight: 700; color: var(--on-dark); }
.result-cell .v small { font-size: .68em; opacity: .7; margin-left: 3px; font-weight: 500; }

.gauge { margin-bottom: 20px; }
.gauge-head { display: flex; justify-content: space-between; font-size: .78rem; color: var(--on-dark-soft); margin-bottom: 7px; }
.gauge-head strong { color: var(--brass-300); font-family: var(--font-mono); }
.gauge-track { height: 9px; border-radius: 5px; background: rgba(250, 246, 240, .14); overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--brass-500), var(--brass-300)); transition: width .3s ease; }

.result-formula {
  background: rgba(250, 246, 240, .07);
  border-left: 3px solid var(--brass-500);
  border-radius: 0 8px 8px 0;
  padding: 12px 14px; font-size: .8rem; color: var(--on-dark-soft); line-height: 1.6;
}
.result-formula strong { color: var(--brass-200); display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 5px; }

.ref-table { width: 100%; border-collapse: collapse; font-size: .84rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ref-table th { background: var(--cream-100); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); font-weight: 800; text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.ref-table td { padding: 9px 13px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .8rem; color: var(--walnut-750); }
.ref-table tr:last-child td { border-bottom: 0; }
.ref-table tbody tr:hover { background: var(--brass-100); }

/* ------------------------------------------------------------ 3d / craft */
.stage-3d {
  background: linear-gradient(160deg, #2E2118 0%, #4A3728 60%, #3D2E22 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--walnut-700);
  position: relative;
  overflow: hidden;
}
.stage-3d canvas { width: 100%; display: block; border-radius: 8px; cursor: grab; touch-action: none; }
.stage-3d canvas:active { cursor: grabbing; }
.stage-3d-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid rgba(224, 210, 190, .18);
}
.stage-3d-hint { font-size: .76rem; color: var(--on-dark-soft); opacity: .82; }
.stage-3d-ctrls { display: flex; gap: 8px; flex-wrap: wrap; }
.ctrl-btn {
  padding: 7px 13px; border-radius: 8px;
  border: 1px solid rgba(224, 210, 190, .28);
  background: rgba(250, 246, 240, .08);
  color: var(--on-dark-soft);
  font-family: var(--font-body); font-size: .78rem; font-weight: 600;
  cursor: pointer;
  transition: background var(--t-color), color var(--t-color), border-color var(--t-color);
}
.ctrl-btn:hover { background: rgba(250, 246, 240, .16); color: var(--on-dark); }
.ctrl-btn.is-active { background: var(--brass-500); color: var(--walnut-900); border-color: var(--brass-500); }

.craft-stage {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-md); background: var(--walnut-600);
}
.craft-stage canvas { width: 100%; display: block; touch-action: none; cursor: crosshair; }
.craft-overlay {
  position: absolute; top: 14px; left: 14px; right: 14px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; pointer-events: none;
}
.craft-badge {
  background: rgba(36, 26, 18, .78);
  border: 1px solid rgba(232, 192, 92, .4);
  color: var(--brass-200);
  padding: 7px 13px; border-radius: var(--radius-pill);
  font-size: .74rem; font-weight: 700; letter-spacing: .05em;
  backdrop-filter: blur(4px);
}
.craft-tools {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 14px 0 0; 
}
.craft-tool {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: #fff;
  color: var(--walnut-700); font-family: var(--font-body);
  font-size: .84rem; font-weight: 600; cursor: pointer;
  transition: background var(--t-color), color var(--t-color), border-color var(--t-color), box-shadow var(--t-color);
}
.craft-tool svg { width: 15px; height: 15px; }
.craft-tool:hover { border-color: var(--brass-500); color: var(--brass-750); }
.craft-tool.is-active { background: var(--walnut-750); color: var(--on-dark); border-color: var(--walnut-750); box-shadow: var(--shadow-sm); }

.slider-field { display: flex; flex-direction: column; gap: 6px; }
.slider-field .slider-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .78rem; font-weight: 700; color: var(--walnut-700);
}
.slider-field .slider-head output { font-family: var(--font-mono); color: var(--brass-750); font-size: .85rem; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 3px;
  background: var(--cream-300); outline: none; margin: 6px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--brass-500); cursor: pointer;
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-thumb {
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--brass-500); cursor: pointer; border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------- cut optimizer */
.opt-layout { display: grid; grid-template-columns: 350px 1fr; gap: 26px; align-items: start; }
.opt-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.opt-panel h3 { font-size: 1rem; margin-bottom: .7em; }

.part-list { list-style: none; margin: 0 0 14px; padding: 0; }
.part-row {
  display: grid; grid-template-columns: 1fr 62px 62px 46px 30px;
  gap: 6px; align-items: center; margin-bottom: 7px;
}
.part-row input {
  height: 36px; padding: 0 9px; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius-xs);
  background: var(--cream-50); font-family: var(--font-body);
  font-size: .82rem; color: var(--ink);
}
.part-row input:focus { outline: none; border-color: var(--brass-500); background: #fff; }
.part-row input[type="number"] { font-family: var(--font-mono); text-align: center; }
.part-del {
  width: 30px; height: 36px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: var(--cream-50);
  color: var(--brick-500); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0;
  transition: background var(--t-color);
}
.part-del:hover { background: var(--brick-200); }
.part-head {
  display: grid; grid-template-columns: 1fr 62px 62px 46px 30px;
  gap: 6px; font-size: .64rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px;
}
.part-head span { text-align: center; }
.part-head span:first-child { text-align: left; }

.opt-board-wrap {
  background: var(--cream-100); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; overflow: auto;
}
.opt-board-wrap svg { display: block; max-width: 100%; height: auto; }
.opt-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: .78rem; color: var(--ink-soft); }
.opt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.opt-swatch { width: 13px; height: 13px; border-radius: 3px; border: 1px solid rgba(74,55,40,.25); }

.cut-list { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.cut-list li {
  counter-increment: c;
  display: flex; align-items: baseline; gap: 11px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: .85rem; margin: 0;
}
.cut-list li::before {
  content: counter(c);
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  background: var(--cream-200); color: var(--brass-900);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 700;
}
.cut-list li:last-child { border-bottom: 0; }
.cut-list .cut-dim { margin-left: auto; font-family: var(--font-mono); font-size: .78rem; color: var(--brass-750); font-weight: 700; }

/* --------------------------------------------------------- wood database */
.db-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-xs); }
.db-table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 860px; }
.db-table thead th {
  background: var(--cream-100); border-bottom: 1px solid var(--line-strong);
  padding: 11px 13px; text-align: left; font-size: .7rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
.db-table th.sortable { cursor: pointer; user-select: none; }
.db-table th.sortable:hover { color: var(--brass-750); background: var(--brass-100); }
.db-table th .sort-arrow { font-size: .62rem; opacity: .45; margin-left: 3px; }
.db-table th.is-sorted .sort-arrow { opacity: 1; color: var(--brass-500); }
.db-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.db-table tbody tr.row-main { cursor: pointer; transition: background var(--t-color); }
.db-table tbody tr.row-main:hover { background: var(--brass-100); }
.db-table tbody tr.row-main.is-open { background: var(--brass-100); }
.db-name { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-weight: 700; font-size: .92rem; color: var(--ink); }
.db-swatch { width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(74,55,40,.28); flex: 0 0 22px; }
.db-num { font-family: var(--font-mono); font-size: .82rem; font-weight: 600; color: var(--walnut-750); }
.db-detail-row td { background: var(--cream-50); padding: 0; border-bottom: 1px solid var(--line); }
.db-detail { padding: 18px 20px 20px; }
.db-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 22px; margin-bottom: 14px; }
.db-detail-grid .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 800; }
.db-detail-grid .v { font-size: .88rem; color: var(--walnut-750); font-weight: 600; }
.db-bar { height: 7px; border-radius: 4px; background: var(--cream-300); overflow: hidden; max-width: 220px; }
.db-bar span { display: block; height: 100%; background: var(--brass-500); }

.compare-tray {
  position: sticky; bottom: 0; z-index: 40;
  background: var(--walnut-750); color: var(--on-dark);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 18px; margin-top: 20px;
  box-shadow: 0 -8px 24px rgba(74,55,40,.16);
  display: none;
}
.compare-tray.is-visible { display: block; }
.compare-tray-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.compare-tray-head strong { font-family: var(--font-title); font-size: .96rem; }
.compare-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.compare-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(250,246,240,.12); border: 1px solid rgba(224,210,190,.3);
  border-radius: var(--radius-pill); padding: 4px 8px 4px 12px;
  font-size: .78rem; color: var(--on-dark);
}
.compare-chip button { background: none; border: 0; color: var(--brass-300); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 3px; }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.compare-col { background: rgba(250,246,240,.07); border-radius: 9px; padding: 13px 15px; }
.compare-col h4 { font-size: .92rem; color: var(--on-dark); margin-bottom: .5em; font-family: var(--font-title); }
.compare-col dl { margin: 0; font-size: .79rem; }
.compare-col dt { color: var(--brass-300); font-size: .66rem; text-transform: uppercase; letter-spacing: .07em; margin-top: 8px; }
.compare-col dd { margin: 1px 0 0; color: var(--on-dark-soft); font-family: var(--font-mono); }

/* ---------------------------------------------------------------- blog */
.featured-post {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 34px;
}
.featured-post-media { background: var(--cream-200); min-height: 300px; position: relative; }
.featured-post-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.featured-post-body { padding: 30px 34px; display: flex; flex-direction: column; justify-content: center; }
.featured-post-body h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.featured-post-body p { color: var(--ink-soft); font-size: .93rem; }

.post-hero {
  background: var(--walnut-800); color: var(--on-dark);
  padding: 40px 0 36px; border-bottom: 3px solid var(--brass-500);
}
.post-hero h1 { color: var(--on-dark); font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.post-hero .eyebrow { color: var(--brass-300); }
.post-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: .8rem; color: var(--on-dark-soft); margin-top: 14px;
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--brass-300); opacity: .6; }
.post-meta strong { color: var(--brass-200); font-weight: 600; }

.article-body { font-size: 1.02rem; color: #3A2C20; }
.article-body h2 { margin-top: 1.9em; padding-top: .2em; }
.article-body h3 { margin-top: 1.5em; }
.article-body p { margin-bottom: 1.15em; }
.article-body ul, .article-body ol { margin-bottom: 1.3em; }
.article-body li { margin-bottom: .55em; }

.step-block {
  display: grid; grid-template-columns: 52px 1fr; gap: 16px;
  margin-bottom: 26px; align-items: start;
}
.step-block .sb-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--walnut-750); color: var(--brass-200);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 1.3rem; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.step-block h3 { margin: 0 0 .5em; font-size: 1.16rem; }

.toc {
  background: var(--cream-100); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 26px;
}
.toc h4 { font-family: var(--font-body); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.15em; font-size: .88rem; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--walnut-700); }

.side-panel { position: sticky; top: calc(var(--header-h) + 18px); }
.side-block {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-xs);
}
.side-block h4 {
  font-family: var(--font-body); font-size: .7rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brass-500); margin: 0 0 12px;
}
.side-block ul { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.side-block li { margin-bottom: 10px; padding-left: 16px; position: relative; }
.side-block li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brass-500);
}
.side-block li:last-child { margin-bottom: 0; }
.side-block a { color: var(--walnut-700); }

.author-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--cream-100); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-top: 34px;
}
.author-avatar {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%;
  background: var(--walnut-750); color: var(--brass-300);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 1.2rem; font-weight: 700;
}
.author-box strong { display: block; font-family: var(--font-title); font-size: 1rem; margin-bottom: 3px; }
.author-box p { font-size: .85rem; color: var(--ink-soft); margin: 0; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.post-nav a {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: block;
  transition: border-color var(--t-color), box-shadow var(--t-color), transform var(--t-card);
}
.post-nav a:hover { border-color: var(--brass-300); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-nav .pn-label { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-500); margin-bottom: 5px; }
.post-nav .pn-title { font-family: var(--font-title); font-size: .95rem; color: var(--ink); font-weight: 700; }
.post-nav a:last-child { text-align: right; }

.read-progress {
  position: fixed; top: var(--header-h); left: 0; height: 3px; width: 0;
  background: var(--brass-500); z-index: 190; transition: width .1s linear;
}

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: #fff;
  color: var(--walnut-700); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); padding: 0;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-color), visibility var(--t-color), background var(--t-color);
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--brass-500); color: var(--walnut-900); border-color: var(--brass-500); }
.to-top svg { width: 17px; height: 17px; }

/* --------------------------------------------------------- content pages */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gutter); }
.info-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-xs);
}
.info-card svg { width: 24px; height: 24px; color: var(--brass-500); margin-bottom: 12px; }
.info-card h3 { font-size: 1rem; margin-bottom: .4em; }
.info-card p { font-size: .87rem; color: var(--ink-soft); margin: 0; }

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.form-note { font-size: .78rem; color: var(--ink-faint); }
.form-ok { color: var(--green-600); font-weight: 600; font-size: .86rem; }
.form-err { color: var(--brick-500); font-weight: 600; font-size: .86rem; }
textarea.field-input {
  width: 100%; min-height: 130px; padding: 11px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-xs);
  background: var(--cream-50); color: var(--ink);
  font-family: var(--font-body); font-size: .92rem; resize: vertical;
}
textarea.field-input:focus { outline: none; border-color: var(--brass-500); background: #fff; box-shadow: 0 0 0 3px rgba(184,134,11,.13); }

/* ------------------------------------------------------------ reveal anim */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split-wide { grid-template-columns: 320px 1fr; gap: 26px; }
  .opt-layout { grid-template-columns: 300px 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
  .footer-grid .footer-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1000px) {
  .gs-input { width: 150px; }
  .gs-input:focus { width: 200px; }
  .split-side { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex: 0 0 auto;
    display: none;
    background: var(--cream-50);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: var(--shadow-lg);
    padding: 10px 12px 16px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    justify-content: flex-start;
    z-index: 205;
  }
  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list > li:last-child { border-bottom: 0; }
  .nav-link { padding: 13px 8px; font-size: .95rem; border-radius: 0; }
  .nav-link .caret { margin-left: auto; transition: transform var(--t-color); }
  .nav-item-has-menu.is-open .nav-link .caret { transform: rotate(180deg); }
  .nav-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    pointer-events: none; display: none;
    box-shadow: none; border: 0; border-radius: 0;
    background: var(--cream-100); padding: 6px 8px 10px; min-width: 0;
  }
  .nav-item-has-menu.is-open > .nav-menu { display: block; pointer-events: auto; transform: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split-wide { grid-template-columns: 1fr; }
  .exhibit { position: static; }
  .calc-layout { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .opt-layout { grid-template-columns: 1fr; }
  .split-even { grid-template-columns: 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-media { min-height: 220px; position: relative; }
  .featured-post-media img { position: relative; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a:last-child { text-align: left; }
  .footer-disclaimers { grid-template-columns: 1fr; }
  .hero-track { height: 420px; }
  .hero-arrow { display: none; }
  .cta-band { padding: 30px 26px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --section: 42px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-track { height: 460px; }
  .hero-content { padding: 32px 0 60px; }
  .featured-post-body { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
  .part-row, .part-head { grid-template-columns: 1fr 52px 52px 42px 30px; }
  .db-table { min-width: 720px; }
  .gs-results { width: calc(100vw - 32px); right: -8px; }
  .gs-input { width: 130px; }
}

@media (max-width: 420px) {
  .part-row, .part-head { grid-template-columns: 1fr 46px 46px 38px 28px; }
  .btn { padding: 10px 15px; font-size: .88rem; }
}

/* --------------------------------------------------------------- a11y */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-slide { transition: none; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .hero-arrow, .hero-dots, .to-top, .nav-toggle, .craft-tools, .stage-3d-bar { display: none !important; }
  body { background: #fff; }
  body::before { display: none; }
  .card, .opt-panel, .calc-form { box-shadow: none; border-color: #ccc; }
  a { text-decoration: underline; }
}
