/* FloorLayGuide — shared styles
   Palette taken from a job site: concrete screed, graphite pencil, chalk-line blue, tape-measure yellow, oak. */
/* Fonts are served from this site (no request to Google). Latin subset. */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-wdth.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: 'Source Serif 4'; font-style: normal; font-display: swap;
  font-weight: 200 900;
  src: url(../fonts/source-serif-4-latin-opsz.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;
}
:root {
  --screed: #E2E3DF;
  --screed-deep: #D3D5D0;
  --paper: #FFFFFF;
  --ink: #24272B;
  --muted: #5C6066;
  --line: #C4C7C1;
  --chalk: #2D5BDB;
  --chalk-deep: #1F44AE;
  --tape: #F4C430;
  --oak: #C8945A;
  --warn-bg: #FFF4D1;
  --ui: 'Archivo', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --read: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --r-sm: 4px;
  --r: 7px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--screed); color: var(--ink);
  font-family: var(--ui); font-size: 16px; line-height: 1.5;
  font-variation-settings: "wdth" 100;
  /* keep the footer at the bottom of the window on short pages */
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
img, svg { max-width: 100%; }
a { color: var(--chalk-deep); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip-link:focus { left: 1rem; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .875rem; color: var(--muted); margin: .4rem 0; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; gap: 1.5rem;
  padding: .8rem clamp(1rem, 3vw, 2rem); background: var(--ink); color: #fff;
}
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; font-variation-settings: "wdth" 112; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand-mark { width: 30px; height: 30px; fill: var(--oak); }
.brand-mark .cut { fill: var(--tape); }
.site-nav { display: flex; gap: .25rem; margin-left: auto; }
.site-nav a { color: #E9EAE6; text-decoration: none; padding: .45rem .75rem; border-radius: var(--r-sm); font-weight: 500; }
.site-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.site-nav a[aria-current="page"] { color: var(--tape); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid rgba(255,255,255,.5); color: #fff; font: inherit; font-weight: 600; padding: .35rem .8rem; border-radius: var(--r-sm); }

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; flex-direction: column; margin: 0; }
  .site-nav.is-open { display: flex; }
}

/* ---------- planner hero ---------- */
.hero { padding: clamp(1.6rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem) clamp(1.2rem, 2.5vw, 2rem); max-width: 1400px; margin: 0 auto; }
.hero h1 {
  margin: 0; font-size: clamp(2.3rem, 6.2vw, 5rem); line-height: .95; font-weight: 850;
  font-variation-settings: "wdth" 118; letter-spacing: -.025em; max-width: 14ch;
}
.hero-lede { max-width: 56ch; font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--muted); margin: 1rem 0 0; }

/* ---------- planner ---------- */
.planner { max-width: 1400px; margin: 0 auto clamp(1.5rem, 4vw, 3rem); padding: 0 clamp(0rem, 2vw, 2rem); }
.planner-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 410px;
  background: var(--paper); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r) var(--r); overflow: hidden;
}

/* The step bar is a tape measure. */
.stepper {
  list-style: none; margin: 0; padding: 0 .5rem 10px; display: flex;
  background-color: var(--tape);
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 60px),
    repeating-linear-gradient(90deg, rgba(36,39,43,.8) 0 1px, transparent 1px 12px);
  background-size: 100% 10px, 100% 5px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  border-radius: var(--r) var(--r) 0 0; border: 1px solid #C79F17; border-bottom: 0;
}
.stepper li { flex: 1; }
.stepper button {
  width: 100%; background: none; border: 0; padding: .8rem .5rem .55rem; font: inherit; color: var(--ink);
  font-weight: 600; display: flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer;
  font-variation-settings: "wdth" 105;
}
.step-n {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 2px solid var(--ink); font-weight: 800; font-size: .85rem;
}
.stepper button[aria-current="step"] { font-weight: 850; }
.stepper button[aria-current="step"] .step-n { background: var(--ink); color: var(--tape); }
.stepper button.done .step-n { background: rgba(36,39,43,.12); }
.stepper button:hover { background: rgba(255,255,255,.25); }

.stage { position: relative; min-height: 560px; height: clamp(560px, calc(100vh - 64px), 860px); background: var(--screed-deep); display: flex; flex-direction: column; }
.canvas-wrap { position: relative; flex: 1; min-height: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.stage canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--chalk); }
.stage-bar { position: absolute; top: .75rem; right: .75rem; display: flex; gap: .5rem; }
.stage-hint {
  margin: 0; flex: none; min-height: 2.6rem; display: flex; align-items: center;
  background: var(--paper); border-top: 1px solid var(--line); padding: .5rem .9rem; font-size: .88rem; color: var(--ink);
}
.stage-hint.is-alert { background: var(--ink); color: #fff; }

.panel { border-left: 1px solid var(--line); height: clamp(560px, calc(100vh - 64px), 860px); min-height: 560px; display: flex; flex-direction: column; overflow: hidden; }
.panel-step { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.step-body { flex: 1; min-height: 0; overflow-y: auto; padding: .85rem 1.25rem .85rem; }
.panel h2 { margin: 0 0 .6rem; font-size: 1.3rem; font-weight: 800; font-variation-settings: "wdth" 110; letter-spacing: -.01em; }
.panel-intro { margin: 0 0 .8rem; color: var(--muted); }
.sub { margin: .85rem 0 .25rem; font-size: .95rem; font-weight: 750; }
.panel-actions { flex: none; display: flex; justify-content: space-between; gap: .6rem; padding: .6rem 1.25rem; border-top: 1px solid var(--line); background: var(--paper); }
.panel-actions .btn-primary:only-child { margin-left: auto; }

/* ---------- form controls ---------- */
.field { display: flex; flex-direction: column; gap: .25rem; flex: 1; min-width: 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.field-row { display: flex; gap: .75rem; margin-top: .6rem; }
.input-u { position: relative; display: flex; }
.input-u em { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: .85rem; pointer-events: none; }
input[type=number], select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); font-weight: 500;
  padding: .45rem 2.2rem .45rem .6rem; border: 1px solid #B3B7B0; border-radius: var(--r-sm); background: #fff;
  font-variant-numeric: tabular-nums;
}
select { padding-right: .65rem; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number]:focus, select:focus { outline: 2px solid var(--chalk); outline-offset: 0; border-color: var(--chalk); }

.btn {
  font: inherit; font-weight: 650; padding: .6rem 1rem; border-radius: var(--r-sm); cursor: pointer;
  background: #fff; color: var(--ink); border: 1.5px solid var(--ink);
}
.btn:hover { background: var(--screed); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--chalk-deep); border-color: var(--chalk-deep); }
.btn-quiet { border-color: transparent; background: none; padding-left: .2rem; padding-right: .2rem; text-decoration: underline; text-underline-offset: 3px; }
.btn-quiet:hover { background: none; color: var(--chalk-deep); }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.seg button { font: inherit; font-weight: 600; font-size: .9rem; padding: .4rem .8rem; border: 0; background: none; color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg-wide { display: flex; margin-bottom: .25rem; }
.seg-wide button { flex: 1; padding: .45rem .5rem; }

.wall-list { list-style: none; margin: .3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.wall-list li { display: grid; grid-template-columns: 1fr 7.5rem; gap: .75rem; }
.wall-list label { display: flex; align-items: center; gap: .5rem; }
.wall-name { width: 2.6rem; flex: none; font-weight: 750; font-size: .9rem; }
.corner-name { width: 1.6rem; flex: none; font-weight: 750; font-size: .9rem; color: var(--chalk-deep); }
.wall-ang input { padding-right: 1.6rem; }
.wall-ang input[readonly] { background: var(--screed); color: var(--muted); }
.wall-list li.is-hover .wall-name { color: var(--chalk); }
.readout { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .8rem 0 0; color: var(--muted); font-size: .9rem; }
.readout strong { color: var(--ink); font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.choice-list { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.choice { display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem; font-size: .92rem; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--oak); }
.choice input { accent-color: var(--ink); width: 1.05rem; height: 1.05rem; margin: 0; }
.choice-title { font-weight: 650; }
.note { font-size: .85rem; background: var(--screed); padding: .55rem .7rem; border-radius: var(--r-sm); margin: .8rem 0 0; }
details.advanced { margin-top: .7rem; }
details.advanced summary { cursor: pointer; font-weight: 650; font-size: .9rem; }

.pattern-grid { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.pattern-card { cursor: pointer; position: relative; }
.pattern-card input { position: absolute; opacity: 0; }
.pattern-body { display: block; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.pattern-icon { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 640; background: var(--screed); }
.pattern-grid .pattern-icon { height: 40px; aspect-ratio: auto; }
.pattern-name { display: block; font-size: .78rem; font-weight: 650; padding: .2rem .4rem; }
.pattern-card input:checked + .pattern-body { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.pattern-card input:checked + .pattern-body .pattern-name { background: var(--ink); color: #fff; }
.pattern-card input:focus-visible + .pattern-body { outline: 3px solid var(--chalk); outline-offset: 2px; }

.summary { margin-top: .8rem; }
.summary-lead { font-size: .85rem; color: var(--muted); margin: 0 0 .5rem; }
.stats { display: flex; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { flex: 1; padding: .4rem .55rem; border-left: 1px solid var(--line); min-width: 0; }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats dt { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats dd { margin: 0; font-size: 1.3rem; font-weight: 800; font-variation-settings: "wdth" 80; font-variant-numeric: tabular-nums; }
.warn { background: var(--warn-bg); border-left: 4px solid var(--tape); padding: .45rem .7rem; margin-top: .7rem; font-size: .82rem; }
.warn p { margin: .2rem 0; }
.warn-text { color: #8A2A12; font-weight: 600; }

/* ---------- lay view ---------- */
.tabs { display: flex; gap: .2rem; border-bottom: 1.5px solid var(--ink); margin: 0 0 .7rem; overflow-x: auto; }
.tabs button { font: inherit; font-size: .88rem; font-weight: 600; background: none; border: 0; padding: .55rem .6rem; cursor: pointer; color: var(--muted); white-space: nowrap; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.piece-meta { display: flex; justify-content: space-between; align-items: center; font-weight: 650; font-size: .9rem; }
.piece-meta .jump { display: flex; align-items: center; gap: .4rem; }
.piece-meta .jump input { width: 4.6rem; padding: .25rem .4rem; font-weight: 700; }
.progress { height: 4px; background: var(--screed); margin: .45rem 0 .7rem; border-radius: 2px; overflow: hidden; }
.progress div { height: 100%; background: var(--oak); width: 0; transition: width .2s ease; }
.piece-head {
  margin: 0; font-size: clamp(2rem, 3vw, 2.7rem); line-height: 1; font-weight: 850;
  font-variation-settings: "wdth" 72; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.piece-head.is-full { color: var(--muted); }
.piece-size { margin: .25rem 0 .6rem; color: var(--muted); font-weight: 600; font-size: .92rem; }
.piece-diagram { background: var(--screed); border-radius: var(--r-sm); padding: .6rem; }
.plank-svg { display: block; width: 100%; height: auto; max-height: 130px; }
.piece-source { font-weight: 700; margin: .7rem 0 0; font-size: .95rem; }
.piece-source.is-reused::before { content: "♻ "; color: var(--chalk); }
.piece-keep { margin: .35rem 0 0; font-size: .88rem; font-weight: 600; background: var(--warn-bg); border-left: 4px solid var(--oak); padding: .35rem .6rem; }
.piece-notes { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
.piece-notes li { margin: .2rem 0; }
.panel-actions.piece-nav { display: grid; grid-template-columns: 1fr 2fr; }
.piece-nav .btn { padding: .7rem; }

.table-wrap { overflow-x: auto; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.cut-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.cut-table th { position: sticky; top: 0; background: var(--ink); color: #fff; text-align: left; padding: .45rem .5rem; font-weight: 650; }
.cut-table td { padding: .4rem .5rem; border-bottom: 1px solid var(--screed); vertical-align: top; }
.cut-table tr { cursor: pointer; }
.cut-table tr:hover td { background: var(--screed); }
.cut-table tr.is-current td { background: var(--warn-bg); }

.shop { list-style: none; margin: 0; padding: 0; }
.shop li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.shop-line { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.shop-name { font-weight: 650; }
.shop-qty { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop .small { margin: .2rem 0 0; }
.tool-list { margin: .3rem 0 0; padding-left: 1.1rem; }
.tool-list li { margin: .2rem 0; }

.install-steps { margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: s; }
.install-steps li { counter-increment: s; position: relative; padding: 0 0 .9rem 2.4rem; }
.install-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--ink); color: var(--tape); display: grid; place-items: center; font-weight: 800; font-size: .85rem;
}
.install-steps h3 { margin: .1rem 0 .3rem; font-size: 1rem; }
.install-steps p { margin: .3rem 0; font-size: .92rem; }

@media (max-width: 960px) {
  .planner { padding: 0; }
  .planner-body { grid-template-columns: 1fr; border-radius: 0; border-left: 0; border-right: 0; overflow: visible; }
  .stepper { border-radius: 0; border-left: 0; border-right: 0; }
  .stage { height: 58vh; min-height: 360px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); height: auto; min-height: 0; overflow: visible; }
  .step-body { overflow: visible; }
  .panel-actions { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -6px 12px rgba(36,39,43,.08); }
  .stepper button { flex-direction: column; gap: .2rem; font-size: .85rem; padding-top: .6rem; }
}
@media (max-width: 420px) {
  .pattern-grid { grid-template-columns: 1fr 1fr; }
  .wall-list { grid-template-columns: 1fr; }
}

/* ---------- planner explainer ---------- */
.explain { background: var(--paper); border-top: 1px solid var(--line); }
.explain-inner { max-width: 1100px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem); }
.explain h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 850; font-variation-settings: "wdth" 112; letter-spacing: -.015em; margin: 0 0 1.2rem; }
.how { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: h; }
.how li { counter-increment: h; border-top: 3px solid var(--ink); padding-top: .8rem; }
.how li::before { content: counter(h); font-weight: 850; font-size: 2.4rem; line-height: 1; font-variation-settings: "wdth" 72; color: var(--oak); }
.how h3 { margin: .4rem 0 .3rem; font-size: 1.05rem; }
.how p { margin: 0; color: var(--muted); font-size: .95rem; }
.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 3rem; }
.explore h2 { font-size: 1.2rem; margin-bottom: .6rem; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a { display: block; padding: .5rem 0; text-decoration: none; color: var(--ink); font-weight: 550; }
.link-list a:hover { color: var(--chalk-deep); }
.faq details { border-bottom: 1px solid var(--line); padding: .8rem 0; max-width: 72ch; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--muted); margin: .5rem 0 0; }
@media (max-width: 800px) {
  .how { grid-template-columns: 1fr 1fr; }
  .explore { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- content pages ---------- */
.crumbs { max-width: 1100px; margin: 0 auto; padding: 1.2rem clamp(1rem, 3vw, 2rem) 0; font-size: .85rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.crumbs a { color: var(--muted); }

.doc { max-width: 1100px; margin: 0 auto; padding: 1rem clamp(1rem, 3vw, 2rem) 3rem; display: grid; grid-template-columns: minmax(0, 68ch) 1fr; gap: clamp(1.5rem, 4vw, 4rem); }
.doc-head { grid-column: 1 / -1; }
.doc-head h1 { margin: .6rem 0 .8rem; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1; font-weight: 850; font-variation-settings: "wdth" 115; letter-spacing: -.022em; max-width: 20ch; }
.lede { font-family: var(--read); font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; color: #3A3E44; max-width: 60ch; margin: 0; }
.article { font-family: var(--read); font-size: 1.1rem; line-height: 1.7; background: var(--paper); padding: clamp(1.2rem, 3vw, 2.4rem); border-radius: var(--r); border: 1px solid var(--line); }
.article > :first-child { margin-top: 0; }
.article h2 { font-family: var(--ui); font-size: 1.45rem; font-weight: 800; font-variation-settings: "wdth" 108; line-height: 1.2; margin: 2.2rem 0 .6rem; letter-spacing: -.01em; }
.article h3 { font-family: var(--ui); font-size: 1.1rem; font-weight: 750; margin: 1.6rem 0 .4rem; }
.article p, .article li { max-width: 68ch; }
.article li { margin: .35rem 0; }
.article ol.steps { padding-left: 1.4rem; }
.article ol.steps > li::marker { font-family: var(--ui); font-weight: 800; }
.article table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: .92rem; margin: 1rem 0; }
.article th, .article td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { background: var(--screed); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.article .callout { font-family: var(--ui); font-size: .95rem; background: var(--warn-bg); border-left: 4px solid var(--tape); padding: .8rem 1rem; margin: 1.4rem 0; }
.article .callout p { margin: 0; }
.figure { margin: 1.5rem 0; background: var(--screed); border-radius: var(--r-sm); padding: .8rem; }
.figure svg { display: block; width: 100%; height: auto; }

.doc-side { font-size: .95rem; }
.side-block { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 1.5rem; }
.plan-cta { background: var(--ink); color: #fff; padding: 1.2rem; border-radius: var(--r); }
.plan-cta h2 { margin: 0 0 .4rem; font-size: 1.15rem; font-weight: 800; color: var(--tape); }
.plan-cta p { margin: 0 0 1rem; color: #D7D9D4; }
.plan-cta .btn { background: var(--tape); border-color: var(--tape); color: var(--ink); text-decoration: none; display: inline-block; }
.plan-cta .btn:hover { background: #fff; border-color: #fff; }
.related h2 { font-size: 1rem; margin: 0 0 .4rem; }

.hub { max-width: 1100px; margin: 0 auto; padding: 1rem clamp(1rem, 3vw, 2rem) 3rem; }
.hub .doc-head h1 { margin: .6rem 0 .8rem; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1; font-weight: 850; font-variation-settings: "wdth" 115; letter-spacing: -.022em; }
.hub-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
.hub-list li { border-top: 1.5px solid var(--ink); padding: 1rem 0 1.4rem; }
.hub-list a { font-size: 1.3rem; font-weight: 800; font-variation-settings: "wdth" 106; text-decoration: none; color: var(--ink); }
.hub-list a:hover { color: var(--chalk-deep); text-decoration: underline; }
.hub-list p { font-family: var(--read); margin: .35rem 0 0; color: #3A3E44; font-size: 1.05rem; }
.hub-list .pattern-icon { max-width: 220px; border-radius: var(--r-sm); margin-bottom: .6rem; }

@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; }
  .side-block { position: static; }
  .hub-list { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #C9CCC6; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 2.5rem clamp(1rem, 3vw, 2rem); display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem 3rem; }
.footer-name { font-weight: 850; color: #fff; font-size: 1.2rem; margin: 0 0 .3rem; font-variation-settings: "wdth" 112; }
.footer-brand p { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-content: start; }
.footer-nav a { color: #fff; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; color: var(--tape); }
.footer-legal { grid-column: 1 / -1; font-size: .85rem; margin: 0; border-top: 1px solid #3A3E44; padding-top: 1rem; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- affiliate links ---------- */
a.amz { font-weight: 650; white-space: nowrap; }
a.amz::after { content: " ↗"; font-size: .8em; }
.aff-note { font-size: .78rem; color: var(--muted); margin: 0 0 .5rem; }
.article .aff-note { font-family: var(--ui); margin: 0 0 1.2rem; }
.article p.buy { font-family: var(--ui); font-size: .95rem; margin-top: -.4rem; }

/* ---------- ads (off until enabled) ---------- */
.ad-slot { display: none; }
body.ads-on .ad-slot { display: block; min-height: 90px; margin: 1.5rem auto; max-width: 970px; }

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .stepper, .panel-actions, .tabs, .piece-nav, .jump, .stage-bar, .stage-hint, .hero-lede, .explain, .ad-slot, [data-print], .skip-link { display: none !important; }
  body { background: #fff; }
  .hero { padding: 0 0 1rem; }
  .hero h1 { font-size: 24pt; }
  .planner-body { display: block; border: 0; }
  .stage { height: 120mm; min-height: 0; break-inside: avoid; }
  .panel { height: auto; max-height: none; overflow: visible; border: 0; padding: 0; }
  .step-body { overflow: visible; padding: 0; }
  .panel-step:not([data-step="4"]) { display: none !important; }
  .table-wrap { max-height: none; overflow: visible; border: 0; }
  .cut-table th { position: static; color: #000; background: #eee; }
  [role=tabpanel] { margin-top: 1.5rem; }
}

/* ---------- cookie notice ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--ink); color: #fff; padding: .9rem clamp(1rem, 3vw, 2rem); display: flex; gap: .8rem 1.5rem; align-items: center; justify-content: center; flex-wrap: wrap; box-shadow: 0 -2px 12px rgba(0,0,0,.25); }
.consent-text { margin: 0; max-width: 62ch; font-size: .92rem; line-height: 1.45; }
.consent-text a { color: var(--tape); }
.consent-actions { display: flex; gap: .6rem; }
.consent .btn { background: #fff; color: var(--ink); border-color: #fff; min-width: 6.5rem; }
.consent .btn:hover { background: var(--tape); border-color: var(--tape); color: var(--ink); }
.footer-link-btn { background: none; border: 0; padding: 0; font: inherit; color: #fff; cursor: pointer; }
.footer-link-btn:hover { text-decoration: underline; color: var(--tape); }
.noscript-note { background: var(--warn-bg); border-left: 4px solid var(--tape); padding: .8rem 1rem; margin: 1rem auto; max-width: 1100px; }
@media print { .consent { display: none !important; } }
