/* Zero Kerf — shared styles for app and content pages. Identity per plan §9. */

:root {
  --surface: #E9ECE6;
  --card: #FAFAF7;
  --ink: #1C241F;
  --ink-soft: #3A443D;
  --muted: #6B756E;
  --line: #CBD1C8;
  --accent: #1F4FB8;
  --accent-deep: #1A43A0;
  --tan: #D8B888;
  --tan-dark: #A8865A;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --kerf: repeating-linear-gradient(90deg, var(--tan-dark) 0 3px, var(--tan) 3px 10px);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--surface); scrollbar-gutter: stable; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { letter-spacing: -0.015em; line-height: 1.2; text-wrap: balance; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header-inner {
  max-width: 1240px; margin: 0 auto; padding: 12px 16px 0;
}
.header-row { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; }
.kerf-mark { width: 28px; height: 11px; border-radius: 2px; background: var(--kerf); flex: none; }
.wordmark { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.wordmark b { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; }
.icon-btn {
  min-width: 44px; min-height: 44px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; padding: 0 10px;
  color: var(--ink); font-weight: 600; font-size: 14px;
}
.icon-btn:hover { background: var(--surface); }
.site-nav { display: flex; }
.site-nav a {
  flex: 1; text-align: center; padding: 11px 14px 13px; font-weight: 600; font-size: 15px;
  color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent;
}
.site-nav a[aria-current="page"], .site-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
@media (min-width: 760px) {
  .site-header-inner { display: flex; align-items: center; padding: 0 24px; }
  .header-row { padding: 10px 0; flex: 1; }
  .site-nav { margin-left: 24px; }
  .site-nav a { flex: none; }
}

/* ---------- page shells ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 0 16px 64px; }
.page-narrow { max-width: 760px; margin: 0 auto; padding: 0 16px 64px; }
.section-title {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 12px;
  margin: 40px 0 16px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- planner layout ---------- */
.planner { display: block; }
@media (min-width: 1080px) {
  .planner { display: grid; grid-template-columns: 220px minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .planner-side { position: sticky; top: 16px; }
  .planner-summary { position: sticky; top: 16px; }
}
.planner-side { display: none; }
@media (min-width: 1080px) { .planner-side { display: block; padding-top: 24px; } }
.side-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 14px 0 6px; }
.side-item {
  display: flex; align-items: center; width: 100%; text-align: left; padding: 8px 12px;
  font-size: 14px; color: var(--ink); border-radius: 8px; text-decoration: none; gap: 8px;
}
.side-item:hover { background: var(--card); }
.side-item.active { color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); border-radius: 0 8px 8px 0; }
.side-item .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ---------- project head ---------- */
.project-head { display: flex; align-items: center; gap: 10px; padding: 20px 0 4px; flex-wrap: wrap; }
.project-name-btn {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 24px;
  letter-spacing: -0.02em; min-height: 44px; border-radius: 8px; padding: 0 6px; margin-left: -6px;
}
.project-name-btn:hover { background: var(--card); }
.project-name-btn svg { color: var(--muted); }
.project-head .sub { color: var(--muted); font-size: 13px; }
.project-head .actions { margin-left: auto; display: flex; gap: 6px; }

/* ---------- board list ---------- */
.species-head { display: flex; align-items: baseline; gap: 8px; padding: 18px 2px 6px; }
.species-head .name { font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
a.species-head-link:hover, .species-head a.name:hover { color: var(--accent); text-decoration: underline; }
.species-head .price-btn {
  font-family: var(--mono); font-size: 13px; color: var(--muted); min-height: 32px;
  border-radius: 6px; padding: 0 6px;
}
.species-head .price-btn:hover { background: var(--card); color: var(--accent); }
.species-head .date {
  margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.part-row {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 14px 12px;
}
.part-row:first-of-type, .species-group .part-row:first-of-type { border-top: 1px solid var(--line); }
.part-row:hover { background: #F2F2ED; }
.part-top { display: flex; align-items: baseline; gap: 8px; }
.part-name { font-weight: 600; font-size: 15px; }
.part-bf { margin-left: auto; font-family: var(--mono); font-size: 15px; font-weight: 600; white-space: nowrap; }
.part-bf small { font-weight: 400; color: var(--muted); font-size: 11px; }
.part-dims { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.piece { border-radius: 2px; margin-top: 8px; background: var(--kerf); transition: width 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), height 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { .piece { transition: none; } }
.add-part {
  display: block; width: 100%; text-align: left; padding: 13px 14px; color: var(--accent);
  font-weight: 600; font-size: 15px; background: var(--card); border-bottom: 1px solid var(--line);
  min-height: 48px;
}
.add-part:hover { background: var(--surface); }
.empty-hint { background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 24px; color: var(--muted); margin-top: 16px; }

/* ---------- adjustments + tally ---------- */
.adjust-row { display: flex; gap: 24px; padding: 16px 2px 8px; max-width: 420px; }
.field { flex: 1; }
.field label {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.field input, .field select {
  width: 100%; background: none; border: none; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 17px; padding: 6px 0; border-radius: 0; min-height: 40px;
}
.field select { font-family: var(--sans); }
.field input:focus, .field select:focus { border-bottom-color: var(--accent); outline: none; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; min-height: 1em; }

.tally { background: var(--ink); color: var(--card); border-radius: 12px; padding: 18px 18px 16px; margin: 12px 0; }
.tally-row { display: flex; align-items: baseline; font-family: var(--mono); font-size: 14px; padding: 3px 0; }
.tally-row .lbl { color: #9BA69E; font-family: var(--sans); font-size: 13px; }
.tally-row .val { margin-left: auto; }
.tally-total { display: flex; align-items: baseline; border-top: 1px solid var(--ink-soft); margin-top: 10px; padding-top: 12px; }
.tally-total .lbl { font-weight: 700; font-size: 17px; }
.tally-total .val { margin-left: auto; font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--tan); }
.species-block { border-bottom: 1px solid var(--line); padding: 10px 0; }
.species-block .r1 { display: flex; align-items: baseline; }
.species-block .r1 .n { font-weight: 600; font-size: 14px; }
.species-block .r1 .v { margin-left: auto; font-family: var(--mono); font-size: 13.5px; }
.species-block .r2 { display: flex; color: var(--muted); font-size: 12px; font-family: var(--mono); }

/* ---------- quiet cards (affiliate, tip) ---------- */
.quiet-card { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 12px 14px; margin: 0 0 10px; }
.quiet-card .eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.quiet-card a, .quiet-card button { font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; text-align: left; }
.quiet-card a:hover, .quiet-card button:hover { text-decoration: underline; color: var(--ink); }
.soda { display: block; margin: 8px auto 0; color: var(--muted); font-size: 13px; padding: 10px 16px; text-decoration: none; text-align: center; }
.soda:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; background: var(--accent);
  color: #fff; font-weight: 600; font-size: 15px; padding: 12px 20px; border-radius: 10px;
  min-height: 46px; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
  font-size: 14px; color: var(--accent); border: 1px solid var(--line); background: var(--card);
  border-radius: 9px; padding: 9px 16px; min-height: 44px; text-decoration: none;
}
.btn-quiet:hover { border-color: var(--accent); }
.btn-danger { color: #A03024; font-weight: 600; padding: 10px 14px; min-height: 44px; }

/* ---------- chips ---------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.chip {
  font-family: var(--mono); font-size: 13px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); min-height: 40px; display: inline-flex; align-items: center;
}
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- dialogs ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink);
  padding: 22px; width: min(420px, calc(100vw - 32px)); margin: auto;
}
dialog::backdrop { background: rgba(28, 36, 31, 0.45); }
dialog h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.dialog-fields { display: flex; flex-direction: column; gap: 14px; }
.dialog-fields .pair { display: flex; gap: 16px; }
.dialog-actions { display: flex; gap: 8px; margin-top: 20px; align-items: center; }
.dialog-actions .spacer { flex: 1; }
.switch-list { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.switch-list button {
  display: flex; align-items: center; gap: 8px; text-align: left; padding: 10px 12px;
  border-radius: 8px; font-size: 15px; min-height: 46px;
}
.switch-list button:hover { background: var(--surface); }
.switch-list .current { font-weight: 700; color: var(--accent); }
.switch-list .meta { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---------- tool pages ---------- */
.tool-head { display: flex; align-items: center; gap: 8px; padding: 18px 0 8px; }
.tool-head h1 { font-size: 24px; font-weight: 700; }
.tool-head .back { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 20px; margin-left: -10px; }
.tool-head .back:hover { background: var(--card); }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; max-width: 460px; }
.tool-result { background: var(--ink); color: var(--card); border-radius: 12px; padding: 16px 18px; display: flex; align-items: baseline; margin: 18px 0 14px; }
.tool-result .lbl { font-size: 14px; color: #9BA69E; }
.tool-result .val { margin-left: auto; font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--tan); }
.tool-result .val small { font-size: 13px; color: #9BA69E; font-weight: 400; }
.tool-list { border-top: 1px solid var(--line); margin-top: 8px; max-width: 560px; }
.tool-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 15px 14px; background: var(--card); border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink); min-height: 64px;
}
.tool-item:hover { background: #F2F2ED; color: var(--ink); }
.tool-item .t-name { font-weight: 600; font-size: 15px; display: block; }
.tool-item .t-desc { color: var(--muted); font-size: 13px; }
.tool-item .go { margin-left: auto; color: var(--muted); }
.badge-later { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.badge-beta { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 8px; }

/* ---------- prices page ---------- */
.price-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 12px 14px; background: var(--card); border-bottom: 1px solid var(--line); min-height: 62px;
}
.price-row:first-of-type { border-top: 1px solid var(--line); }
.price-row:hover { background: #F2F2ED; }
.price-row .p-name { font-weight: 600; font-size: 15px; display: block; }
.price-row .p-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.price-row .p-price { margin-left: auto; font-family: var(--mono); font-size: 15px; font-weight: 600; white-space: nowrap; }
.price-row .p-price small { color: var(--muted); font-weight: 400; font-size: 11px; }
.price-row .edited { color: var(--accent); }

/* ---------- contextual call-to-action under the page's answer ---------- */
.page-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 10px; }
.page-cta .sub { color: var(--muted); font-size: 14px; max-width: 34ch; }

/* ---------- content/SEO pages ---------- */
.content { max-width: 68ch; }
.content h1 { font-size: 30px; font-weight: 700; margin: 28px 0 10px; }
.content h2 { font-size: 21px; font-weight: 700; margin: 32px 0 8px; }
.content p, .content li { font-size: 16.5px; margin-bottom: 10px; }
.content ul, .content ol { padding-left: 22px; margin-bottom: 12px; }
.content .lede { font-size: 18px; color: var(--ink-soft); }
.formula {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: var(--mono); font-size: 15px; margin: 14px 0; overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; background: var(--card); }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.data-table th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface); }
.data-table td.num, .data-table th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); margin: 16px 0;
}
.crumbs { font-size: 13px; color: var(--muted); padding-top: 20px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.note { color: var(--muted); font-size: 14px; }
.pair { display: flex; gap: 16px; }
.page-intro { color: var(--muted); max-width: 56ch; }
.btn-block { width: 100%; }
.tool-head-baseline { align-items: baseline; gap: 14px; }
.unit-tag { margin-left: auto; color: var(--muted); font-size: 12px; }
.yours-mark { color: var(--accent); font-weight: 600; }
.field-search { max-width: 320px; margin: 12px 0 14px; }
.price-list { max-width: none; }

/* ---------- article layout: the shared shell for every content page ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article .content { max-width: none; }
.article .content > h1 { font-size: 33px; letter-spacing: -0.02em; margin: 20px 0 14px; }
.article .content > h1::after {
  content: ""; display: block; width: 56px; height: 9px; border-radius: 2px;
  margin-top: 16px; background: var(--kerf);
}
.article .content .lede { font-size: 19px; line-height: 1.55; }
.article .content h2 {
  font-size: 21px; margin: 42px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.article p { line-height: 1.62; }
.article .tool-card { margin: 18px 0; max-width: none; }
.article .tool-list { margin-top: 16px; }

/* article figures — photos crop to a capped height; diagrams letterbox instead */
.content figure { margin: 20px 0; }
.content figure img {
  display: block; width: 100%; height: auto; max-height: min(460px, 65vh);
  object-fit: cover; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card);
}
.content figure.fig-diagram img { padding: 14px; object-fit: contain; }
.content figcaption { color: var(--muted); font-size: 13px; margin-top: 7px; line-height: 1.5; }
.content figcaption a { color: var(--muted); }
.content figcaption a:hover { color: var(--accent); }
.fig-pair { display: grid; gap: 14px; }
@media (min-width: 620px) { .fig-pair { grid-template-columns: 1fr 1fr; align-items: start; } }
.fig-trio { display: grid; gap: 14px; margin: 20px 0; }
@media (min-width: 620px) { .fig-trio { grid-template-columns: 1fr 1fr 1fr; align-items: start; } }
.fig-trio figure { margin: 0; }
.fig-trio figcaption strong { color: var(--ink); font-size: 14.5px; display: block; }
.fig-placeholder {
  border: 1px dashed var(--line); border-radius: 10px; background: var(--card);
  padding: 26px 18px; text-align: center; color: var(--muted); font-size: 13.5px;
}
.fig-placeholder::before { content: "image coming"; display: block; font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }

/* external reference links as chips */
.refs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 6px; }
.refs li { margin: 0; }
.refs a {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  background: var(--card); text-decoration: none; color: var(--ink); font-size: 14px;
}
.refs a::after { content: "↗"; color: var(--muted); font-size: 12px; }
.refs a:hover { border-color: var(--accent); color: var(--accent); }
.refs a:hover::after { color: var(--accent); }

/* framed link lists on index pages */
.tool-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: none; }
.tool-list > :last-child { border-bottom: none; }

/* ---------- learn index: grouped article cards ---------- */
.learn-group { margin-top: 34px; }
.learn-group-title { font-size: 21px; margin: 0 0 4px; }
.learn-group-sub { color: var(--muted); font-size: 14px; margin: 0; }
.learn-list { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 620px) { .learn-list { grid-template-columns: 1fr 1fr; } }
.learn-item {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 16px 18px; text-decoration: none; color: var(--ink);
}
.learn-item:hover { background: #F2F2ED; color: var(--ink); }
.learn-item .l-name { font-weight: 600; font-size: 16px; }
.learn-item .l-name::after { content: " →"; color: var(--muted); }
.learn-item .l-desc { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* ---------- safety articles: callouts, disclaimer, inline diagrams ---------- */
.callout {
  border: 1px solid var(--line); border-left-width: 6px; border-radius: 10px;
  background: var(--card); padding: 14px 18px; margin: 22px 0;
}
.callout-label {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px;
}
.callout-body p { margin: 0; }
.callout-body p + p { margin-top: 8px; }
.callout-danger { border-left-color: #A8362E; }
.callout-danger .callout-label { color: #A8362E; }
.callout-caution { border-left-color: #96690A; }
.callout-caution .callout-label { color: #96690A; }
.callout-habit { border-left-color: var(--accent); }
.callout-habit .callout-label { color: var(--accent); }
.safety-note {
  color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--line);
  padding-bottom: 12px; margin-bottom: 4px;
}
.safety-disclaimer {
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  padding: 16px 18px; margin: 36px 0 10px; color: var(--ink-soft); font-size: 14.5px;
}
.safety-disclaimer .callout-label { color: var(--muted); }
.safety-disclaimer p { margin: 0; line-height: 1.55; }

/* inline SVG diagrams inherit the page's fonts and palette via these classes */
.fig-diagram svg { display: block; width: 100%; height: auto; }
.dg-line { stroke: var(--ink); fill: none; }
.dg-soft { stroke: var(--tan-dark); fill: none; }
.dg-grid { stroke: var(--line); fill: none; }
.dg-tan { fill: var(--tan); }
.dg-tan-dark { fill: var(--tan-dark); }
.dg-card { fill: var(--card); }
.dg-ink { fill: var(--ink); }
.dg-danger { fill: #A8362E; }
.dg-accent { fill: var(--accent); }
.dg-danger-line { stroke: #A8362E; fill: none; }
.dg-accent-line { stroke: var(--accent); fill: none; }
/* spin indicators on the router-safety feed diagram: the rotation arrows orbit
   their bit. Origins are that SVG's user units (transform-box: view-box). */
.dg-spin-handheld, .dg-spin-table { animation: dg-spin 2.4s linear infinite; transform-box: view-box; }
.dg-spin-handheld { transform-origin: 180px 130px; }
.dg-spin-table { transform-origin: 550px 110px; animation-direction: reverse; }
@keyframes dg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .dg-spin-handheld, .dg-spin-table { animation: none; }
}
.dg-text { fill: var(--ink); font-family: var(--mono); font-size: 12px; }
.dg-text-muted { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
.dg-text-strong { fill: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 600; }
.dg-text-danger { fill: #A8362E; font-family: var(--mono); font-size: 11px; }
.dg-mark { fill: var(--tan); stroke: var(--ink); stroke-width: 2; }
.dg-mark-dark { fill: var(--tan-dark); stroke: var(--ink); stroke-width: 2; }

/* ---------- marketing (homepage below the calculator) ---------- */
.marketing { border-top: 1px solid var(--line); margin-top: 48px; }
.mk-hero { padding: 40px 0 8px; max-width: 62ch; }
.mk-hero h2 { font-size: 30px; font-weight: 700; }
.mk-hero p { font-size: 18px; color: var(--ink-soft); margin-top: 10px; }
.mk-cols { display: grid; gap: 24px; margin: 24px 0; }
@media (min-width: 760px) { .mk-cols { grid-template-columns: repeat(3, 1fr); } }
.mk-col { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.mk-col h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.mk-col p { font-size: 14.5px; color: var(--ink-soft); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; padding: 0 16px; max-width: 68ch; }
.faq summary { font-weight: 600; padding: 14px 0; cursor: pointer; min-height: 44px; }
.faq details p { padding: 0 0 14px; color: var(--ink-soft); }

/* ---------- homepage app cards ----------
   Each app is a "board": kerf stripe across the top edge, a small dg-* vignette
   of what the app does. The unbuilt app is drawn in dashed layout lines. */
.app-cards { display: grid; gap: 16px; margin: 26px 0 6px; }
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px 20px 18px; overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.app-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--kerf); }
a.app-card:hover { border-color: var(--tan-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(28, 36, 31, 0.08); color: var(--ink); }
a.app-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-card-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.app-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-name .badge-beta, .app-name .badge-later { margin-left: 0; }
.app-desc { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.app-open { color: var(--accent); font-weight: 600; font-size: 15px; }
a.app-card:hover .app-open { color: var(--accent-deep); }
.app-vignette { display: block; width: 100%; height: auto; }
.app-card-wide .app-vignette { width: 250px; max-width: 100%; }
.app-card[aria-disabled="true"] .app-name, .app-card[aria-disabled="true"] .app-desc { color: var(--muted); }
.app-card[aria-disabled="true"]::before { opacity: 0.4; }
.dg-ghost { stroke: var(--muted); fill: none; }
@media (min-width: 640px) {
  .app-cards { grid-template-columns: 1fr 1fr; }
  .app-card-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 28px; padding: 26px 26px 22px; }
  .app-card-wide .app-card-body { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .app-card { transition: none; }
  a.app-card:hover { transform: none; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; background: var(--card); }
.site-footer-inner { max-width: 1240px; margin: 0 auto; padding: 28px 16px 40px; }
.footer-cols { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--accent); }
.footer-note { color: var(--muted); font-size: 13px; max-width: 44ch; }
.footer-note .kerf-mark { margin-bottom: 10px; }

/* ---------- print: the cut list ---------- */
@media print {
  .site-header, .site-footer, .marketing, .planner-side, .no-print, .add-part, .adjust-row .hint { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .planner { display: block; }
  .tally { border: 1px solid #000; background: #fff; color: #000; border-radius: 0; }
  .tally-row .lbl, .tally-total .val { color: #000; }
  .part-row, .quiet-card { border-color: #999; background: #fff; }
  .piece { display: none; }
  .quiet-card { display: none; }
}
