/* design: v2 */
/* 3dprinterwithlaserengraver.com, design v2: board A, "The assembly manual" (design/home-v2-A.png, James's pick,
   2 Dec 2026). A flat-pack assembly manual for makers: isometric line drawings (src/art/) in pale lilac on deep
   aubergine, numbered steps joined by dotted arrows, parts lists and a parts table, one filament orange for the
   callouts and the key figure. Noto Sans Display (heavy, a little narrow) for headings, PT Sans for reading; both OFL,
   self-hosted. The aubergine is darker than the board's #3b2a5c and the lilac a shade deeper than its #e6ddf5, because
   isitfdacleared.com and fridgebatterybackup.com already use those (packages/site-kit/tests/distinct-designs.test.ts).
   A printed manual doesn't invert, so the page keeps its colours in dark mode: every pair below is checked in
   tests/design.test.ts. */

@font-face { font-family: "Noto Sans Display"; src: url("/fonts/noto-sans-display.woff2") format("woff2"); font-weight: 400 900; font-stretch: 62.5% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url("/fonts/pt-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url("/fonts/pt-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --brand: #251c45;       /* deep aubergine: the header, hero, checker, page heads and footer */
  --brand-2: #31275a;     /* a raised panel on the aubergine */
  --bg: #ddd3ee;          /* lilac: the reading pages */
  --panel: #ece6f7;       /* light lilac: the steps, parts lists and tables */
  --card: #f7f4fc;
  --text: #231c2e;        /* near-black ink */
  --muted: #4a4060;
  --line: #a998cb;
  --rule: #231c2e;
  --link: #47288c;
  --on-brand: #ffffff;
  --on-brand-soft: #e6ddf5;
  --orange: #f5a34d;      /* filament orange: callouts, numbers and the one key figure (always with dark text, or on aubergine) */
  --on-orange: #231c2e;
  --good: #1d6b3a;
  --warn: #8a4b00;
  --bad: #9b1c1c;
  --display: "Noto Sans Display", "Arial Narrow", "Segoe UI", sans-serif;
  --body: "PT Sans", "Segoe UI", system-ui, sans-serif;
  --accent: #251c45;
  --on-accent: #ffffff;
  --radius: 3px;
  color-scheme: light;
}

/* ---------- type ---------- */
body { font-family: var(--body); font-size: 18px; line-height: 1.6; background: var(--bg); color: var(--text); }
h1, h2, h3, .step-title, legend, .wordmark { font-family: var(--display); font-stretch: 90%; letter-spacing: -0.01em; }
h1 { font-weight: 900; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; }
h2 { font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.15; margin: 1.6em 0 0.5em; }
h3 { font-weight: 800; font-size: 1.2rem; line-height: 1.2; }
a { color: var(--link); text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 700; }
.wrap { max-width: 1240px; padding: 0 clamp(16px, 3vw, 32px); }
.note, .tag { color: var(--muted); font-size: 0.88rem; font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- header and footer: the manual's cover band ---------- */
.site-header { background: var(--brand); border-bottom: 1px solid #4a3d7a; color: var(--on-brand); }
.header-row { padding-top: 12px; padding-bottom: 12px; }
.site-header .brand, .site-footer .brand { color: var(--on-brand); gap: 12px; }
.brand .logo-mark { height: 30px; width: auto; }
.wordmark { font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
.main-nav { gap: 4px 26px; font-size: 1rem; }
.main-nav a { color: var(--on-brand-soft); }
.main-nav a[aria-current="page"], .main-nav a:hover { color: var(--on-brand); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
.menu-btn { background: transparent; color: var(--on-brand); border: 1px solid var(--on-brand-soft); border-radius: var(--radius); font: 700 0.95rem var(--body); padding: 6px 12px; }
@media (max-width: 760px) { .has-menu.menu-open .main-nav a { color: var(--on-brand); } .wordmark { font-size: 1.12rem; } }

.site-footer { background: var(--brand); color: var(--on-brand-soft); border-top: 0; margin-top: 0; }
.site-footer a { color: var(--on-brand-soft); }
.footer-col h2 { color: var(--on-brand); font-family: var(--display); letter-spacing: 0.04em; }
.footer-brand p, .footer-legal p { color: var(--on-brand-soft); }
.footer-legal::before { background: #4a3d7a; }

/* ---------- home: the hero ---------- */
.page-home main { background: var(--brand); }
.hero { background: var(--brand); color: var(--on-brand); padding: clamp(24px, 4vw, 44px) 0 8px; text-align: center; }
.hero h1 { color: var(--on-brand); font-size: clamp(2.1rem, 5.2vw, 4rem); font-stretch: 87.5%; margin: 0 auto 0.25em; max-width: 22ch; }
@media (min-width: 1000px) { .hero h1 { max-width: none; } }
.hero-lede { color: var(--on-brand-soft); max-width: 64rem; margin: 0 auto; font-size: 1.12rem; }
.hero-pic { max-width: 1040px; margin: 8px auto 0; }
.hero-pic svg { width: 100%; height: auto; display: block; }
.hero-pic .hero-narrow, .hero-steps { display: none; }
@media (max-width: 640px) {
  .hero-pic .hero-wide { display: none; }
  .hero-pic .hero-narrow { display: block; }
  .hero-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; list-style: none; counter-reset: s; text-align: left; padding: 0; margin: 10px 0 0; font: 700 0.98rem var(--display); }
  .hero-steps li { counter-increment: s; display: flex; align-items: center; gap: 6px; }
  .hero-steps li::before { content: counter(s); flex: none; display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--orange); color: var(--on-orange); font-weight: 800; }
}

/* ---------- the checker: numbered steps joined by dotted arrows ---------- */
.checker { background: var(--brand); color: var(--on-brand); padding: 8px 0 36px; }
.tool { background: none; border: 0; padding: 0; margin: 0; }
.job.steps { display: grid; grid-template-columns: 0.85fr 0.9fr 1.3fr 1.2fr 1.35fr 0.75fr; gap: 24px; margin: 0 0 24px; align-items: stretch; }
.step { position: relative; background: var(--panel); color: var(--text); border: 0; border-radius: var(--radius); padding: 12px 14px 14px; margin: 0; min-width: 0; }
.step:not(:last-child)::after { content: ""; position: absolute; right: -24px; top: 50%; width: 22px; height: 10px; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 10'%3E%3Cpath d='M1 5h14' stroke='%23e6ddf5' stroke-width='2' stroke-dasharray='2 3' stroke-linecap='round'/%3E%3Cpath d='M15 1l5 4-5 4' fill='none' stroke='%23e6ddf5' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
fieldset.step { display: block; }
.step legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; }
.step legend + * { clear: left; }
.step legend, .step-title { font-weight: 700; font-size: 1rem; line-height: 1.25; margin: 0 0 8px; color: var(--text); }
.tool .step .step-title label { font: inherit; display: inline; margin: 0; white-space: normal; }
.n { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--orange); color: var(--on-orange); font-family: var(--display); font-weight: 800; font-size: 0.92em; margin-right: 4px; vertical-align: 0.05em; }
.tool .step label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 1rem; margin: 2px 12px 2px 0; white-space: nowrap; }
.tool .step input[type="radio"] { width: auto; margin: 0; accent-color: var(--brand); }
.tool .step select, .tool .step input[type="number"] { width: 100%; font: 1rem var(--body); padding: 7px 9px; margin: 0; border: 1.5px solid var(--text); border-radius: 2px; background: var(--card); color: var(--text); }
.tool .step input[type="number"] { flex: 1 1 0; width: auto; min-width: 0; padding: 7px 6px; }
.step-row { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; flex-wrap: nowrap; }
#t-row { flex-wrap: wrap; }
#t-row label[for="f-t"] { flex-basis: 100%; }
@media (max-width: 1100px) { #t-row label[for="f-t"] { flex-basis: auto; } }
.tool .step-row label { margin: 0; font-weight: 700; font-family: var(--display); }
.tool .step-row select { width: auto; flex: none; }
.step-go { display: grid; place-items: center; background: var(--card); padding: 0; }
.step-go button { width: 100%; height: 100%; min-height: 64px; font: 800 1.15rem var(--display); font-stretch: 90%; color: var(--text); background: none; border: 0; cursor: pointer; }
.step-go button:hover { background: #fff; }
@media (max-width: 1100px) {
  .job.steps { grid-template-columns: 1fr 1fr; gap: 14px 26px; }
  .step:nth-child(2n)::after { display: none; }
  .step:nth-child(2n + 1):not(:last-child)::after { display: block; }
}
@media (max-width: 560px) {
  .job.steps { grid-template-columns: 1fr; gap: 22px; }
  .step:not(:last-child)::after { display: block; right: auto; left: 50%; top: auto; bottom: -21px; transform: translateX(-50%) rotate(90deg); }
}

/* ---------- the answer: two parts lists and the difference between them ---------- */
.job-result { background: none; border: 0; padding: 0; }
.parts { display: grid; grid-template-columns: 1fr 0.8fr 1fr; gap: 0; align-items: stretch; }
.part { background: var(--panel); color: var(--text); padding: 14px 18px 16px; border-radius: var(--radius); }
.part h3 { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--rule); font-size: 1.35rem; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 48px 1fr auto; gap: 4px 10px; align-items: center; padding: 6px 0; }
.plist .thumb { width: 44px; height: 36px; object-fit: contain; }
.p-name { line-height: 1.3; }
.p-name a { color: var(--text); text-decoration: none; font-weight: 700; }
.p-name a:hover { text-decoration: underline; }
.p-name small { display: block; color: var(--muted); font-size: 0.86rem; }
.p-price { font-family: var(--display); font-weight: 800; font-size: 1.3rem; text-align: right; white-space: nowrap; }
.p-price a { color: var(--text); text-decoration: none; }
.p-price a:hover { text-decoration: underline; }
.p-price .tag { display: block; font-family: var(--body); font-size: 0.8rem; white-space: normal; }
.p-total { border-top: 1.5px solid var(--rule); }
.p-total .p-name { grid-column: 1 / 3; font-weight: 700; }
.p-does { margin: 8px 0 0; font-size: 0.98rem; }
.p-none { color: var(--muted); }
.part-diff { color: var(--on-brand); text-align: center; padding: 10px 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.part-diff .total { margin: 0 0 12px; color: var(--on-brand-soft); font-size: 1.02rem; }
.part-diff .figure { display: block; color: var(--on-brand); font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; margin-bottom: 6px; }
.part-diff .big { display: block; color: var(--orange); font-size: clamp(2.6rem, 4.4vw, 3.6rem); font-weight: 900; font-stretch: 87.5%; letter-spacing: -0.02em; }
.part-diff .share-row { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.part-diff .share-button { background: var(--panel); color: var(--text); }
.part-diff .share-plain, .part-diff .share-note { color: var(--on-brand-soft); font-size: 0.9rem; }
.share-button { font: 700 1rem var(--display); font-stretch: 90%; background: var(--brand); color: var(--on-brand); border: 0; border-radius: 2px; padding: 9px 18px; cursor: pointer; }
.share-button:hover { filter: brightness(1.15); }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.share-note { color: var(--good); }
.share-link { width: 100%; max-width: 32rem; padding: 6px; font: inherit; }
@media (max-width: 900px) {
  .parts { grid-template-columns: 1fr; gap: 0; }
  .part-diff { order: -1; padding: 6px 0 18px; }
  .part-two { margin-top: 14px; }
}

.every { margin-top: 18px; background: var(--panel); color: var(--text); border-radius: var(--radius); padding: 10px 18px; }
.every summary { cursor: pointer; font: 700 1.08rem var(--display); font-stretch: 90%; }
.every h3 { margin: 1em 0 0.4em; }
.job-result > .result > .small { color: var(--on-brand-soft); font-size: 0.9rem; margin: 14px 0 0; }

/* ---------- tables: a manual's parts table ---------- */
.table-wrap { overflow-x: auto; margin: 0.8rem 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; background: none; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 10px 7px 0; text-align: left; vertical-align: top; }
thead th { font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--text); border-bottom: 2px solid var(--rule); vertical-align: bottom; }
tbody th { font-weight: 700; }
th { background: none; }
.parts-table .m-name { display: flex; align-items: center; gap: 10px; }
.parts-table .thumb { flex: none; width: 36px; height: 30px; }
@media (max-width: 640px) { .parts-table tbody th { min-width: 12em; } .parts-table td { white-space: nowrap; } }
.parts-table tbody th a { color: var(--text); text-decoration: none; }
.parts-table tbody th a:hover { text-decoration: underline; }
.options .ok { color: var(--good); font-weight: 700; }
.options .warn { color: var(--warn); font-weight: 700; }
.options .no { color: var(--bad); font-weight: 700; }
.options .amount { white-space: nowrap; }
.options tr.doesnt { color: var(--muted); }

/* ---------- home: below the checker ---------- */
.below { background: var(--bg); padding: 26px 0 8px; }
.below-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; }
.below-grid h2 { margin-top: 0.2em; }
.below-facts { border-left: 2px solid var(--rule); padding-left: 26px; }
.below-facts p { margin: 0 0 0.8em; }
@media (max-width: 900px) { .below-grid { grid-template-columns: minmax(0, 1fr); } .below-facts { border-left: 0; padding-left: 0; border-top: 2px solid var(--rule); } }
.before { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 14px 18px; border-top: 2px solid var(--rule); margin-top: 14px; padding-top: 16px; padding-bottom: 26px; }
.before-pic { background: var(--brand); padding: 6px; border-radius: var(--radius); line-height: 0; }
.before-pic svg { width: 64px; height: auto; }
.before h2 { margin: 0; font-size: 1.6rem; white-space: nowrap; }
.before p { margin: 0; }
@media (max-width: 700px) { .before { grid-template-columns: auto 1fr; } .before p { grid-column: 1 / -1; } }

/* ---------- inner pages: an aubergine head with its spot drawing, then lilac reading pages ---------- */
.article-wrap { padding-top: 0; padding-bottom: 48px; }
.crumbs, .page-head { background: var(--brand); box-shadow: 0 0 0 100vmax var(--brand); clip-path: inset(0 -100vmax); }
.crumbs { margin: 0 0 -1px; padding: 14px 0 5px; border: 0; color: var(--on-brand-soft); }
.crumbs a { color: var(--on-brand-soft); }
.page-head { color: var(--on-brand); padding: 18px 0 26px; margin-bottom: 26px; }
.article-wrap > .page > .page-head:first-child { padding-top: 30px; }
.page-head h1 { color: var(--on-brand); font-stretch: 87.5%; }
.page-head .lede { color: var(--on-brand-soft); font-size: 1.15rem; }
.page-head .byline, .page-head .byline a { color: var(--on-brand-soft); margin-bottom: 0; }
.page-head-art { width: clamp(110px, 20vw, 210px); }
.page-body { max-width: 780px; }
.page-body h2 { padding-bottom: 6px; border-bottom: 2px solid var(--rule); }
.toc { background: var(--panel); border: 0; border-radius: var(--radius); }
.page-body .tool { margin: 1.2em 0; }
/* the checker on /job sits on an aubergine sheet of its own */
.page-job .page-body { max-width: none; }
.page-job .tool { background: var(--brand); padding: 20px; border-radius: var(--radius); }
.facts-table th { width: 34%; }
.sources { font-size: 0.95rem; }

/* ---------- the standard pages and the share row on light ---------- */
.page-body .share-row { margin-top: 1.6em; }
