/* =====================================================================
   Millwork Job Tool website: one shared style file for every page.

   The look borrows from two places:
   - richardmccrary.com: the charcoal ground, CAD yellow, the fonts
     (Barlow Condensed, IBM Plex Sans, IBM Plex Mono), the logo and the
     drawings (white heavy lines, yellow thin lines).
   - The tool itself: the stage labels (BID / SETUP / REVIEW) over the
     tab names and the coloured cabinet-type chips.

   To change a colour, change it once in the list below.
   ===================================================================== */

:root {
  /* Ground and text (same values as richardmccrary.com) */
  --bg: #15181c;          /* page */
  --panel: #1b1f24;       /* alternate bands, cards */
  --panel-2: #22272e;     /* table headers, form fields */
  --line: #2e343b;        /* dividers */
  --line-ctrl: #7d8794;   /* borders that must be seen: fields, frames (4.5:1) */
  --ink: #f1efe8;         /* main text (15:1) */
  --muted: #9aa3ad;       /* secondary text (7:1) */
  --muted-2: #b8bfc7;     /* captions (9.6:1) */
  --yellow: #e9c94b;      /* CAD yellow: links, labels, main button (11:1) */
  --on-yellow: #17140a;   /* text on the yellow button (11:1) */

  /* From the tool: cabinet types and progress marks */
  --c-base: #f08c3a;
  --c-upper: #4dabf7;
  --c-tall: #51cf66;
  --c-ctop: #9775fa;
  --c-counter: #3bc9db;
  --c-custom: #e599f7;
  --prog-done: #3fb26d;
  --prog-part: #e08a2e;
  --prog-empty: #6b7386;

  /* Fonts (loaded from Google Fonts in each page's <head>) */
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", Consolas, ui-monospace, monospace;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(1rem, 0.9rem + 0.25vw, 1.15rem);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.04;
  margin: 0 0 var(--s2, 1rem);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 1.6rem + 3vw, 4.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2.1rem, 1.5rem + 2vw, 3.4rem); }
h3 { font-size: clamp(1.5rem, 1.25rem + 0.7vw, 1.9rem); }
p, ul, ol, dl, table, figure { margin: 0 0 1.4rem; }
p, li, dd { max-width: 66ch; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 600; }

a { color: var(--yellow); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.skip {
  position: absolute; left: -999rem; top: 0;
  background: var(--yellow); color: var(--on-yellow);
  padding: 0.6rem 1rem; font-weight: 600; z-index: 30;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Small mono label, used the way the tool labels its stages */
.label {
  display: block;
  font: 500 0.78rem/1.4 var(--f-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.9rem;
}

/* ---------- Layout ---------- */
.sheet { min-height: 100vh; display: flex; flex-direction: column; }
.sheet > main { flex: 1; }   /* pushes the footer to the bottom on short pages */
.wrap { max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px); }
.wrap-wide { max-width: 1560px; }

.band { padding-block: clamp(3.5rem, 6vw, 6rem); border-top: 1px solid var(--line); }
.band-panel { background: var(--panel); }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem 1.6rem; padding-block: 0.8rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  margin-right: auto; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font: 500 1.55rem/1 var(--f-display);
}
.brand img { width: 44px; height: auto; }   /* RM Design logo */
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem;
  font: 500 0.8rem var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.site-nav a {
  color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--yellow); }
/* Narrow screens: keep the bar to one row, with only the logo and the demo button.
   960px is just above the width where the full bar starts wrapping onto two rows. */
@media (max-width: 959px) {
  .site-head .wrap { flex-wrap: nowrap; }
  .brand span, .site-nav a:not(.btn) { display: none; }
}

/* ---------- Buttons (richardmccrary.com style) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.7rem 1.3rem;
  font: 500 0.82rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  background: var(--yellow); color: var(--on-yellow);
  border: 1px solid var(--yellow); border-radius: 0;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); }
.site-nav a.btn { color: var(--on-yellow); min-height: 40px; border-bottom: 1px solid var(--yellow); }
.site-nav a.btn:hover { color: var(--bg); }
.site-nav a.btn[aria-current="page"] { border-bottom-color: var(--yellow); }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.6rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3.5rem, 6vw, 6rem); }
.hero .wrap { display: grid; gap: 2.5rem; }
.hero .lede, .lede { font-size: 1.12em; color: var(--muted-2); max-width: 58ch; }
.aside {
  background: var(--panel); border: 1px solid var(--line);
  padding: 0.9rem 1.1rem; margin-bottom: 1.6rem; max-width: 60ch;
  color: var(--muted-2);
}
.aside strong { color: var(--ink); }
.facts {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem;
  font: 400 0.82rem/1.5 var(--f-mono); color: var(--muted);
}
.facts li { margin: 0; max-width: none; }
.facts li::before { content: "✓"; color: var(--prog-done); margin-right: 0.45rem; }
/* Two screenshots stacked: the wall in the tool, then the same wall in Microvellum */
.hero-shots { display: grid; gap: 1.8rem; min-width: 0; }
@media (min-width: 1150px) {
  .hero .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 4rem; }
}

/* ---------- Screenshots ---------- */
.shot { margin-bottom: 0; min-width: 0; }
.shot img { width: 100%; border: 1px solid var(--line); }
.shot a { display: block; }   /* each screenshot links to its full-size file */
figcaption {
  margin-top: 0.7rem; max-width: 72ch;
  font: 400 0.82rem/1.55 var(--f-mono); letter-spacing: 0.02em; color: var(--muted-2);
}
/* Tab name before a caption, styled like the tool's tab bar */
figcaption b {
  font-weight: 500; color: var(--yellow); margin-right: 0.6rem; white-space: nowrap;
}

/* ---------- Section headings ---------- */
.view-title { margin-bottom: 2.4rem; }
.view-title h2 { margin: 0; }
.view-title p { margin: 0.8rem 0 0; color: var(--muted); }

/* ---------- Stage names, as in the tool's tab bar ---------- */
.stage-tag { display: block; }
.stage-tag .label { margin-bottom: 0.3rem; }
.stage-tag .tabs {
  display: block; font: 400 0.8rem/1.6 var(--f-mono); color: var(--muted);
}

/* ---------- Cabinet-type chips, as in the tool ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.chips li {
  margin: 0; display: inline-flex; align-items: center; gap: 0.4rem;
  font: 400 0.8rem var(--f-mono); color: var(--muted-2);
}
.chips li::before { content: ""; width: 0.65rem; height: 0.65rem; background: var(--c, var(--muted)); }
.chip-base { --c: var(--c-base); }
.chip-upper { --c: var(--c-upper); }
.chip-tall { --c: var(--c-tall); }
.chip-ctop { --c: var(--c-ctop); }
.chip-counter { --c: var(--c-counter); }
.chip-custom { --c: var(--c-custom); }

/* ---------- In / out table ---------- */
.io { width: 100%; border-collapse: collapse; border: 1px solid var(--line); max-width: 78rem; }
.io th, .io td { text-align: left; vertical-align: top; padding: 1.1rem 1.2rem; border: 1px solid var(--line); }
.io thead th {
  background: var(--panel-2);
  font: 500 0.78rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2);
}
.io tbody th { width: 13rem; font-weight: 400; }
.io ul { margin: 0; }
@media (max-width: 800px) {
  .io, .io tbody, .io tr, .io th, .io td { display: block; width: auto; }
  .io thead { position: absolute; left: -999rem; }
  .io tr { border-bottom: 1px solid var(--line-ctrl); }
  .io th, .io td { border: 0; padding: 0.8rem 1rem; }
  .io td::before {
    content: attr(data-label); display: block; margin-bottom: 0.3rem;
    font: 500 0.75rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  }
}


/* ---------- Questions ---------- */
/* The whole list folds away behind the "Common questions" heading */
.faq-all > summary {
  display: flex; align-items: center; gap: 0.9rem; cursor: pointer; list-style: none;
  min-height: 48px;
}
.faq-all > summary::-webkit-details-marker { display: none; }
.faq-all > summary::before {
  content: ""; flex: none; width: 0; height: 0;
  border-left: 1.2rem solid var(--yellow); border-block: 0.75rem solid transparent;
  transition: transform 0.15s;
}
.faq-all[open] > summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .faq-all > summary::before { transition: none; } }
.faq-all > summary h2 { margin: 0; }
.faq-all > summary:hover h2 { color: var(--yellow); }
.faq-all[open] > summary { margin-bottom: 2.4rem; }
.faq { max-width: 62rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1rem 0.2rem; min-height: 48px;
  font: 500 1.4rem/1.25 var(--f-display);
}
.faq summary:hover { color: var(--yellow); }
.faq summary::marker { color: var(--yellow); }
.faq details > *:not(summary) { margin-left: 1.3rem; color: var(--muted-2); }
.faq details[open] { padding-bottom: 0.4rem; }

/* ---------- How it works: the tab block ---------- */
/* No script. Each tab is a <label> for a hidden radio button. The radios sit before the bar
   and the panels, so ":checked ~" can light up the right tab and show the right panel. */
/* The whole block is framed like the tool's window: its top bar, Back / Next, then the panel.
   The tool's own dark-theme values (from the tool's theme.css) apply only inside the window. */
.tool-tabs {
  --t-bar: #0e1117;        /* bar background */
  --t-hover: #181c25;      /* tab under the mouse */
  --t-text: #e2e6ee;       /* bar text */
  --t-open: #ffffff;       /* open tab text */
  --t-closed: #aeb5c2;     /* closed tab text */
  --t-muted: #949cb0;      /* stage names, counts, "All changes saved" */
  --t-line: #343a46;       /* lines between stages, window border */
  --t-accent: #5b8cff;     /* open tab underline */
  --t-link: #8fb4ff;       /* links and accents inside the window */
  --t-focus: #7aa2ff;      /* keyboard focus outline */
  --t-panel: #12151c;      /* panel background under the bar */
  --t-font: "Segoe UI", system-ui, sans-serif;
  --fp: clamp(0.75rem, 2.5vw, 2rem);   /* side padding inside the frame (small on phones) */
  position: relative; margin: 0; padding: 0; min-width: 0;
  background: var(--t-panel); border: 1px solid var(--t-line);
}
.tool-steps, .tool-panels { padding-inline: var(--fp); }
.tool-hint { margin-bottom: 0.7rem; }
.tool-tabs :focus-visible { outline-color: var(--t-focus); }
.tool-tabs a { color: var(--t-link); }
.visually-hidden, .tool-tabs input[type="radio"] {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0;
}
/* Pinned to the screen, so clicking a tab (which focuses its radio) never scrolls the page */
.tool-tabs input[type="radio"] { position: fixed; top: 50%; }

/* The bar, laid out like the tool's: "← Jobs", logo and job name, then each stage name over
   its plain text tabs with a thin line between stages, and "All changes saved" at the right */
.tool-bar {
  display: flex; align-items: stretch; min-height: 48px;
  padding-inline: 0.75rem; background: var(--t-bar); border-bottom: 1px solid var(--t-line);
  font-family: var(--t-font); color: var(--t-text);
}
/* Decoration: looks like the tool, but nothing here reacts to the mouse */
.tool-id, .tool-saved { display: flex; align-items: center; cursor: default; user-select: none; }
.tool-id { gap: 0.75rem; padding-right: 1rem; }
.tool-jobs {
  padding: 0.2rem 0.6rem; border: 1px solid var(--t-line); border-radius: 4px;
  font-size: 13px; line-height: 1.4; color: var(--t-text); white-space: nowrap;
}
.tool-id img { width: 26px; height: auto; }
.tool-job { font-size: 14px; font-weight: 600; white-space: nowrap; }
.tool-saved { margin-left: auto; padding-left: 1rem; font-size: 12px; color: var(--t-muted); white-space: nowrap; }

.tool-group {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0.4rem 0.5rem 0; border-left: 1px solid var(--t-line);
}
.tool-stage {
  padding-left: 10px;
  font-size: 11.5px; font-weight: 600; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--t-muted);
}
.tool-row { display: flex; flex-wrap: wrap; }   /* wraps only on very narrow phones */
/* Plain text tabs, as in the tool */
.tool-row label {
  position: relative; display: inline-flex; align-items: center; gap: 0.3rem;
  min-height: 44px; padding: 0 10px; border-radius: 4px 4px 0 0;
  font-size: 14px; font-weight: 500; color: var(--t-closed); white-space: nowrap; cursor: pointer;
}
.tool-row label:hover { color: var(--t-open); background: var(--t-hover); }
.tab-count { font-size: 12px; font-weight: 400; color: var(--t-muted); }

/* The open tab: white text with the tool's blue underline, inset 8px each side */
#tab-1:checked ~ .tool-bar [for="tab-1"], #tab-2:checked ~ .tool-bar [for="tab-2"],
#tab-3:checked ~ .tool-bar [for="tab-3"], #tab-4:checked ~ .tool-bar [for="tab-4"],
#tab-5:checked ~ .tool-bar [for="tab-5"], #tab-6:checked ~ .tool-bar [for="tab-6"],
#tab-7:checked ~ .tool-bar [for="tab-7"] { color: var(--t-open); }
#tab-1:checked ~ .tool-bar [for="tab-1"]::after, #tab-2:checked ~ .tool-bar [for="tab-2"]::after,
#tab-3:checked ~ .tool-bar [for="tab-3"]::after, #tab-4:checked ~ .tool-bar [for="tab-4"]::after,
#tab-5:checked ~ .tool-bar [for="tab-5"]::after, #tab-6:checked ~ .tool-bar [for="tab-6"]::after,
#tab-7:checked ~ .tool-bar [for="tab-7"]::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--t-accent);
}

/* Back / Next strip: seven strips in one grid cell, only the open tab's is visible */
.tool-steps { display: grid; border-bottom: 1px solid var(--t-line); }
.tool-step {
  grid-area: 1 / 1; visibility: hidden;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  font: 400 13px var(--t-font); white-space: nowrap;
}
#tab-1:checked ~ .tool-steps .s-1, #tab-2:checked ~ .tool-steps .s-2,
#tab-3:checked ~ .tool-steps .s-3, #tab-4:checked ~ .tool-steps .s-4,
#tab-5:checked ~ .tool-steps .s-5, #tab-6:checked ~ .tool-steps .s-6,
#tab-7:checked ~ .tool-steps .s-7 { visibility: visible; }
.tool-step label {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--t-link); cursor: pointer; text-underline-offset: 0.2em;
}
.tool-step label:hover { text-decoration: underline; }
.step-back { justify-self: start; }
.step-next { justify-self: end; }
.step-count { color: var(--t-muted); }
/* Narrow: drop "Tab 4 of 7" so Back and Next stay on one row */
@media (max-width: 639px) {
  .step-count { display: none; }
  .tool-step { grid-template-columns: auto auto; justify-content: space-between; }
}
@media (max-width: 420px) {
  .tool-step { font-size: 12px; gap: 0.5rem; }
}

/* Keyboard focus: outline the tab whose radio has focus (arrow keys move between tabs) */
#tab-1:focus-visible ~ .tool-bar [for="tab-1"], #tab-2:focus-visible ~ .tool-bar [for="tab-2"],
#tab-3:focus-visible ~ .tool-bar [for="tab-3"], #tab-4:focus-visible ~ .tool-bar [for="tab-4"],
#tab-5:focus-visible ~ .tool-bar [for="tab-5"], #tab-6:focus-visible ~ .tool-bar [for="tab-6"],
#tab-7:focus-visible ~ .tool-bar [for="tab-7"] { outline: 2px solid var(--t-focus); outline-offset: -2px; }

/* Fixed size: all seven panels share one grid cell, so the cell is always as tall as the
   tallest panel. The closed ones are hidden with visibility, which keeps their space. */
.tool-panels { display: grid; padding-block: clamp(1.25rem, 3vw, 2.4rem); }
.tool-panel { grid-area: 1 / 1; display: grid; gap: 1.6rem; align-content: start; visibility: hidden; }
#tab-1:checked ~ .tool-panels .p-1, #tab-2:checked ~ .tool-panels .p-2,
#tab-3:checked ~ .tool-panels .p-3, #tab-4:checked ~ .tool-panels .p-4,
#tab-5:checked ~ .tool-panels .p-5, #tab-6:checked ~ .tool-panels .p-6,
#tab-7:checked ~ .tool-panels .p-7 { visibility: visible; }
@media (min-width: 1000px) {
  .tool-panel { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
}
/* One column: the screenshot comes first, so the change shows right under the bar */
@media (max-width: 999px) {
  .tool-panel .shot { order: -1; }
}
/* "All changes saved" goes first when the bar gets tight. The bar needs about 1150px with it
   and 1030px without it (in Segoe UI); the breakpoints leave room for wider system fonts. */
@media (max-width: 1339px) {
  .tool-saved { display: none; }
}
/* Too narrow for the bar on one row: "← Jobs", logo and job name on the first row,
   then one row per stage, with the stage name above its tabs. */
@media (max-width: 1199px) {
  .tool-bar { flex-direction: column; }
  .tool-id { min-height: 48px; padding-right: 0; }
  .tool-group { padding: 0.4rem 0 0; border-left: 0; border-top: 1px solid var(--t-line); }
  .tool-stage { padding-left: 10px; }
}
/* Phones: slightly tighter tabs. The counts fit at 390px; below that they go. */
@media (max-width: 480px) {
  .tool-row label { padding: 0 8px; }
}
@media (max-width: 379px) {
  .tab-count { display: none; }
}

.tool-panel h3 { display: flex; align-items: baseline; gap: 0.7rem; }
.tool-panel h3 span { font: 500 0.55em var(--f-mono); color: var(--t-link); white-space: nowrap; }
/* Inside the window the accents are the tool's blue, not CAD yellow */
.tool-panel .note { border-left-color: var(--t-link); }
.tool-panel figcaption b { color: var(--t-link); }
.tool-panel h4 {
  margin: 1.6rem 0 0.6rem;
  font: 500 1.25rem/1.2 var(--f-display); color: var(--ink);
}
.tool-panel h3 + h4 { margin-top: 0; }
.tool-panel .does + .note { margin-top: 1.4rem; }

/* Every screenshot sits in a frame of the same shape, picture at the top */
.tool-panel .frame { aspect-ratio: 2400 / 1339; }
.tool-actions { margin: 2.4rem 0 0; }

.does { margin: 0; }
.does dt {
  margin-top: 1.1rem;
  font: 500 0.75rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.does dt:first-child { margin-top: 0; }
.does dd { margin: 0.25rem 0 0; }
.note { border-left: 2px solid var(--yellow); padding: 0.15rem 0 0.15rem 1rem; color: var(--muted-2); font-size: 0.95em; max-width: 60ch; }

/* ---------- Who makes it: headshot beside the text ---------- */
.who { display: grid; gap: 1.6rem; align-items: start; }
.headshot { width: 140px; height: auto; border: 1px solid var(--line-ctrl); }
/* Wider screens: text on the left, photo on the right beside it */
@media (min-width: 700px) {
  .who { grid-template-columns: minmax(0, 44rem) 180px; gap: 3rem; }
  .headshot { order: 2; width: 180px; align-self: center; }
}

/* ---------- Two columns of text ---------- */
.cols { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- Email address with a Copy button ---------- */
/* The address is text to copy, not a link: one click selects all of it */
.copy-email { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.9rem; margin-bottom: 1.6rem; }
.email-box {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0.4rem 1rem;
  font: 500 clamp(1.05rem, 0.95rem + 0.6vw, 1.35rem) var(--f-mono); color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line-ctrl);
  user-select: all; -webkit-user-select: all; cursor: text;
}
.copy-email .btn { min-width: 11.5em; }   /* same width for "Copy address" and "Copied" */
.copy-email .btn[hidden] { display: none; }

/* Anything you still have to fill in shows with a dashed yellow box */
.placeholder { border: 1px dashed var(--yellow); padding: 0 0.3em; color: var(--yellow); }

/* ---------- Footer (richardmccrary.com style) ---------- */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.6rem 2.5rem; padding-block: 2.2rem;
  font: 400 0.78rem/1.6 var(--f-mono); color: var(--muted);
}
.site-foot p { margin: 0; max-width: none; }
.site-foot .name { font: 500 1.2rem/1 var(--f-display); color: var(--ink); }
.site-foot a { color: var(--muted-2); }
.site-foot a:hover { color: var(--yellow); }

/* Windows high-contrast mode keeps the borders */
@media (forced-colors: active) {
  .btn, .shot img { border: 1px solid CanvasText; }
  .chips li::before { forced-color-adjust: none; }
  /* Tool tabs: the open tab is marked by system colours and a line, not by colour alone */
  #tab-1:checked ~ .tool-bar [for="tab-1"], #tab-2:checked ~ .tool-bar [for="tab-2"],
  #tab-3:checked ~ .tool-bar [for="tab-3"], #tab-4:checked ~ .tool-bar [for="tab-4"],
  #tab-5:checked ~ .tool-bar [for="tab-5"], #tab-6:checked ~ .tool-bar [for="tab-6"],
  #tab-7:checked ~ .tool-bar [for="tab-7"] { border-bottom: 3px solid Highlight; }
  .tool-tabs { border-color: CanvasText; }
}

/* ---------- One-page layout ---------- */
/* Keep section headings clear of the sticky top bar when a menu link jumps to them */
[id] { scroll-margin-top: 5.5rem; }

/* Hero animation */
.hero-video { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #111; }

/* =====================================================================
   Phone layout (up to 699px wide). Wider screens are unchanged.
   ===================================================================== */

/* Wider screens: the phone-only pieces stay hidden, and the folds are just headings */
.hint-phone, .sum, .cta-bar { display: none; }
.more > summary, .fold > summary { list-style: none; pointer-events: none; }
.more > summary { display: none; }
.more > summary::-webkit-details-marker, .fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { margin: 0; }
.fold > summary { margin-bottom: 2.4rem; }

@media (max-width: 699px) {

  /* ---- Top bar: one thin row, logo and the demo button ---- */
  .site-head .wrap { padding-block: 0.35rem; }
  .brand { min-height: 40px; }
  .brand img { width: 34px; }
  .site-nav a.btn { min-height: 38px; padding: 0.5rem 0.9rem; font-size: 0.75rem; }

  /* ---- Hero: headline, then the video, then the paragraph and the button ---- */
  .hero { padding-block: 1.4rem 2.6rem; }
  .hero .wrap { gap: 0; }
  .hero .wrap > div:first-child { display: contents; }
  .hero .label { order: 1; margin-bottom: 0.5rem; }
  .hero h1 { order: 2; font-size: 2.1rem; margin-bottom: 1rem; }
  .hero-shots { order: 3; margin-bottom: 1.2rem; }
  .hero .lede { order: 4; font-size: 1rem; }
  .hero .actions { order: 5; margin-bottom: 0; }
  .hero .aside, .hero .facts, .hero-shots figcaption { display: none; }

  /* ---- Tool tab bar: one row that swipes sideways, stuck under the top bar ---- */
  .hint-wide { display: none; }
  .hint-phone { display: inline; }
  .tool-bar {
    flex-direction: row; flex-wrap: nowrap; align-items: stretch;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    padding-inline: 0.25rem 2rem;
    position: sticky; top: var(--head-h, 52px); z-index: 5;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
  }
  .tool-bar::-webkit-scrollbar { display: none; }
  .tool-id, .tool-stage, .tab-count, .tool-saved { display: none; }
  .tool-group { flex-direction: row; padding: 0; border-top: 0; border-left: 1px solid var(--t-line); }
  .tool-group:first-of-type { border-left: 0; }
  .tool-row { flex-wrap: nowrap; }
  .tool-row label { padding: 0 11px; min-height: 46px; }
  .tool-tabs { overflow: visible; }

  /* ---- Tab panels: picture, heading, one line, then a Details fold ---- */
  .tool-panel { gap: 0.9rem; }
  .tool-panel .frame { aspect-ratio: 3 / 2; }
  .tool-panel .frame img { width: 100%; height: 100%; object-fit: cover; }
  .tool-panel figcaption { display: none; }
  .tool-panel h3 { margin-bottom: 0.4rem; }
  .sum { display: block; margin: 0 0 0.6rem; }
  .more > summary {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
    pointer-events: auto; cursor: pointer; color: var(--t-link);
    font: 500 0.78rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase;
  }
  .more > summary::before {
    content: ""; border-left: 0.5rem solid currentColor; border-block: 0.32rem solid transparent;
    transition: transform 0.15s;
  }
  .more[open] > summary::before { transform: rotate(90deg); }
  .more[open] > summary { margin-bottom: 0.8rem; }

  /* ---- Long sections fold behind their heading, like Common questions ---- */
  .fold > summary {
    display: flex; align-items: center; gap: 0.9rem; min-height: 48px; margin-bottom: 0;
    pointer-events: auto; cursor: pointer;
  }
  .fold > summary::before {
    content: ""; flex: none; width: 0; height: 0;
    border-left: 1.2rem solid var(--yellow); border-block: 0.75rem solid transparent;
    transition: transform 0.15s;
  }
  .fold[open] > summary::before { transform: rotate(90deg); }
  .fold[open] > summary { margin-bottom: 1.6rem; }
  .fold > summary h2, .faq-all > summary h2 { font-size: 1.75rem; }
  .band { padding-block: 2.4rem; }

  /* ---- "Ask for a demo" bar pinned to the bottom ---- */
  .cta-bar:not([hidden]) {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 0.6rem 16px calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .cta-bar .btn { width: 100%; }
  .site-foot { padding-bottom: 5rem; }
}
@media (max-width: 699px) and (prefers-reduced-motion: reduce) {
  .more > summary::before, .fold > summary::before { transition: none; }
}
@media (max-width: 699px) {
  .tool-actions { display: none; }   /* the bottom bar takes over this button on phones */
}

/* ---------- Menu dropdown (narrow screens, where the menu links are hidden) ---------- */
.nav-menu { display: none; }
@media (max-width: 959px) {
  .site-head .wrap { position: relative; }
  .nav-menu { display: block; }
  .nav-menu > summary {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0 0.4rem;
    list-style: none; cursor: pointer; color: var(--ink);
    font: 500 0.78rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase;
  }
  .nav-menu > summary::-webkit-details-marker { display: none; }
  .nav-menu > summary::after {
    content: ""; border-top: 0.38rem solid var(--yellow); border-inline: 0.32rem solid transparent;
    transition: transform 0.15s;
  }
  .nav-menu[open] > summary::after { transform: rotate(180deg); }
  .nav-menu-list {
    position: absolute; left: 0; right: 0; top: 100%;
    display: grid; padding: 0.4rem 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.35);
  }
  .site-nav .nav-menu-list a {
    display: flex; min-height: 48px; padding: 0 clamp(16px, 4vw, 56px);
    color: var(--ink); text-transform: none; letter-spacing: 0;
    font: 400 1rem var(--f-body, inherit); border-bottom: 0;
  }
  .site-nav .nav-menu-list a:hover { color: var(--yellow); background: var(--panel); }
  .site-nav { gap: 0.25rem 0.8rem; }
}
@media (prefers-reduced-motion: reduce) { .nav-menu > summary::after { transition: none; } }
