/* The Fireplace Guys — cap builder
 * One screen, no page-to-page hopping, no scrolling: the question lives on the left, the
 * customer's own cap is drawn on the right, and the answer changes the drawing immediately.
 */

:root {
  --ink:        #17130f;
  --ink-2:      #33291f;
  --canvas:     #14100d;
  --canvas-2:   #1b1611;
  --panel:      #221b15;
  --panel-2:    #2a211a;
  --line:       #3a2f26;
  --sand:       #f5efe6;
  --sand-2:     #cec3b6;
  --muted:      #9a8d7e;
  --ember:      #e0703c;
  --ember-2:    #f0904f;
  --ember-soft: rgba(224,112,60,.14);
  --steel:      #dcd8d1;
  --ok:         #6f9d63;
  --paper:      #fbf9f6;
  --radius:     16px;
  --radius-lg:  24px;
  --shadow:     0 18px 50px rgba(0,0,0,.35);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2,.8,.25,1);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--sand);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; }

/* ── shell ─────────────────────────────────────────────────────────────────────────────── */
.shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    radial-gradient(1200px 620px at 78% -12%, rgba(224,112,60,.14), transparent 62%),
    radial-gradient(900px 500px at 8% 108%, rgba(224,112,60,.07), transparent 60%),
    var(--canvas);
}

.bar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px clamp(16px, 3vw, 40px) 10px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.mark {
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--ember-2), #b8501f);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(224,112,60,.32);
}
.mark svg { width: 24px; height: 24px; display: block; }

.brand-name {
  font-size: 15px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }

.track {
  flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,.09);
  overflow: hidden; min-width: 60px;
}
.track > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--ember), var(--ember-2));
  border-radius: 999px;
  transition: width .45s var(--ease);
}

.counter { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── stage ─────────────────────────────────────────────────────────────────────────────── */
.stage.solo { display: block; overflow: hidden; }
.stage.solo > .welcome, .stage.solo > .done { height: 100%; }
.stage > * { min-height: 0; }

.stage {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(14px, 2vw, 28px);
  padding: 4px clamp(16px, 3vw, 40px) 0;
  min-height: 0;
}

.ask, .show {
  min-height: 0; min-width: 0;
  display: flex; flex-direction: column;
}

.ask { justify-content: center; padding-right: 6px; }

.kicker {
  font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ember); font-weight: 700; margin-bottom: 12px;
}

.q {
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  max-width: 22ch;
}
.q em { font-style: normal; color: var(--ember-2); }

.help { font-size: 14.5px; line-height: 1.5; color: var(--sand-2); margin: 0 0 18px; max-width: 46ch; }
.help b { color: var(--sand); font-weight: 600; }

.body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
        scrollbar-color: #4a3d32 transparent; padding-right: 2px; }
.body::-webkit-scrollbar { width: 6px; }
.body::-webkit-scrollbar-thumb { background: #4a3d32; border-radius: 3px; }

/* choices ──────────────────────────────────────────────────────────────────────────────── */
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts.five { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }

.opt {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  text-align: left;
  padding: 14px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--sand);
  cursor: pointer;
  transition: border-color .18s var(--ease), transform .18s var(--ease), background .18s var(--ease);
}
.opt:hover { border-color: #56463a; transform: translateY(-1px); }
.opt:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.opt[aria-pressed="true"] {
  border-color: var(--ember);
  background: linear-gradient(180deg, rgba(224,112,60,.18), rgba(224,112,60,.07));
  box-shadow: 0 0 0 1px rgba(224,112,60,.5) inset;
}
.opt .t { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; }
.opt .s { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.opt .k {
  position: absolute; top: 10px; right: 12px;
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.opt .num { font-variant-numeric: tabular-nums; }

/* product cards with the shop's own photos */
.cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.card {
  padding: 0; overflow: hidden; text-align: left; cursor: pointer;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--sand);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); border-color: #56463a; }
.card:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.card[aria-pressed="true"] { border-color: var(--ember); box-shadow: 0 0 0 1px rgba(224,112,60,.55) inset; }
.card .ph {
  aspect-ratio: 4 / 3.05; width: 100%;
  background: var(--paper);
  display: grid; place-items: center; overflow: hidden;
}
.card .ph img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; }
.card .cap { padding: 9px 11px 11px; }
.card .cap .t { font-size: 13px; font-weight: 650; line-height: 1.2; }
.card .cap .s { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.32;
               display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* numeric answer ────────────────────────────────────────────────────────────────────────── */
.measure { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inchbox {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 8px 14px;
  transition: border-color .18s var(--ease);
}
.inchbox:focus-within { border-color: var(--ember); }
.inchbox input {
  width: 132px; border: 0; background: transparent; color: var(--sand);
  font-size: 40px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; outline: none;
  font-family: inherit;
  padding: 2px 0;
}
.inchbox .unit { font-size: 20px; color: var(--muted); font-weight: 600; padding-bottom: 6px; }
.inchbox input::placeholder { color: #5a4c40; }

.fracs { display: flex; gap: 6px; flex-wrap: wrap; max-width: 340px; }
.frac {
  border: 1px solid var(--line); background: var(--panel); color: var(--sand-2);
  border-radius: 10px; padding: 8px 10px; font-size: 13px; cursor: pointer;
  font-variant-numeric: tabular-nums; min-width: 44px;
}
.frac[aria-pressed="true"] { border-color: var(--ember); color: var(--sand); background: var(--ember-soft); }
.frac:hover { border-color: #56463a; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ghost {
  border: 1px dashed var(--line); background: transparent; color: var(--sand-2);
  border-radius: 10px; padding: 9px 12px; font-size: 13px; cursor: pointer;
}
.ghost:hover { border-color: var(--ember); color: var(--sand); }

/* swatches ─────────────────────────────────────────────────────────────────────────────── */
.sw {
  display: block; width: 34px; height: 34px; border-radius: 9px; flex: none;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -6px 12px rgba(0,0,0,.28);
}
.mrow { display: flex; align-items: center; gap: 12px; }
.mrow .t { font-size: 14.5px; font-weight: 600; }
.mrow .s { font-size: 12px; color: var(--muted); }

.sw-galv    { background: linear-gradient(135deg,#e9e7e3,#c9c6c0 45%,#dedbd5 60%,#b6b2ab); }
.sw-paint   { background: conic-gradient(from 210deg,#7f9cae,#ae9a81,#8f6b62,#5d5d5d,#67785f,#7f9cae); }
.sw-grip    { background: linear-gradient(135deg,#cfc7bb,#b9b0a3); }
.sw-valume  { background: linear-gradient(135deg,#dcdcd8,#bdbdb6 55%,#d3d3cd); }
.sw-bonder  { background: linear-gradient(135deg,#8f8d89,#6f6d69); }
.sw-copper  { background: linear-gradient(135deg,#c8845a,#a5613a 55%,#8c4c2c); }
.sw-stainless { background: linear-gradient(135deg,#eef0f1,#c3c8cb 50%,#dfe3e5); }

.colours { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); }
.colour {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--sand-2);
}
.colour:hover { border-color: var(--line); }
.colour[aria-pressed="true"] { border-color: var(--ember); background: var(--ember-soft); color: var(--sand); }
.colour .dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); }
.colour .n { font-size: 10.5px; text-align: center; line-height: 1.15; }
.colour .p { font-size: 9.5px; color: var(--ember); letter-spacing: .06em; text-transform: uppercase; }
.cgroup { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

/* toggles ──────────────────────────────────────────────────────────────────────────────── */
.tog {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: var(--sand);
  cursor: pointer; text-align: left;
}
.tog[aria-pressed="true"] { border-color: var(--ember); background: var(--ember-soft); }
.tog .box {
  width: 42px; height: 24px; border-radius: 999px; background: #453a30; position: relative; flex: none;
  transition: background .18s var(--ease);
}
.tog .box::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #efeadf; transition: transform .2s var(--ease);
}
.tog[aria-pressed="true"] .box { background: var(--ember); }
.tog[aria-pressed="true"] .box::after { transform: translateX(18px); }
.tog .t { font-size: 15px; font-weight: 600; }
.tog .s { font-size: 12.5px; color: var(--muted); }
.tog .price { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ember-2); font-weight: 600; }

/* form ─────────────────────────────────────────────────────────────────────────────────── */
.grid2 { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  border: 1px solid var(--line); background: var(--panel); color: var(--sand);
  border-radius: 11px; padding: 11px 13px; font-size: 15px; outline: none; font-family: inherit;
  width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--ember); }
.field input[aria-invalid="true"] { border-color: #b4553f; }
.field .err { font-size: 11.5px; color: #e08c74; min-height: 14px; }
textarea { resize: none; min-height: 96px; line-height: 1.45; }

/* ── show panel ────────────────────────────────────────────────────────────────────────── */
.show {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(620px 320px at 50% 0%, rgba(255,255,255,.30), transparent 70%),
    linear-gradient(180deg, #fdfcfa, #f1ece4);
  border: 1px solid #e5ded3;
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--ink);
}
.show.dark {
  background: linear-gradient(180deg, #1f1914, #17120e);
  border-color: var(--line);
  color: var(--sand);
}
.stagearea {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 8px 8px 64px;
  min-height: 0;
  overflow: hidden;
}
.draw { width: 100%; height: 100%; display: block; }

.specbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  overflow: hidden;
  padding: 11px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.92) 42%);
  border-top: 1px solid rgba(23,19,15,.08);
  font-size: 12.5px; color: #6b635a;
  min-height: 52px;
}
.show.dark .specbar {
  background: linear-gradient(180deg, rgba(20,16,13,0), rgba(20,16,13,.94) 42%);
  border-top-color: var(--line); color: var(--sand-2);
}
.specbar .pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(23,19,15,.14); border-radius: 999px; padding: 5px 10px;
  white-space: nowrap; background: rgba(255,255,255,.75);
  min-width: 0; max-width: 42%; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto;
}
.show.dark .specbar .pill { border-color: var(--line); background: rgba(255,255,255,.04); }
.specbar .pill .dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.specbar .grow { flex: 1; }
.specbar .total { font-weight: 700; color: var(--ember); font-variant-numeric: tabular-nums; }
.specbar svg.ic { width: 22px; height: 16px; color: currentColor; opacity: .8; }

.hero { display: grid; place-items: center; height: 100%; padding: 18px; }
.photo { max-width: 92%; max-height: 88%; object-fit: contain; display: block;
         mix-blend-mode: multiply;
         filter: drop-shadow(0 20px 26px rgba(60,45,32,.20)); }
.hero img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(23,19,15,.16)); }

/* ── footer ────────────────────────────────────────────────────────────────────────────── */
.foot {
  display: flex; align-items: center; gap: 14px;
  padding: 12px clamp(16px, 3vw, 40px) 16px;
}
.btn {
  border: 0; border-radius: 999px; padding: 13px 26px;
  font-size: 15px; font-weight: 650; cursor: pointer;
  background: linear-gradient(180deg, var(--ember-2), var(--ember));
  color: #201008;
  box-shadow: 0 10px 26px rgba(224,112,60,.30);
  transition: transform .16s var(--ease), filter .16s var(--ease), opacity .16s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.plain {
  background: transparent; color: var(--sand-2); border: 1px solid var(--line); box-shadow: none;
  padding: 12px 20px; font-weight: 550;
}
.btn.plain:hover { color: var(--sand); border-color: #56463a; }
.btn.big { padding: 16px 34px; font-size: 16.5px; }

.hint { font-size: 12.5px; color: var(--muted); }
.hint kbd {
  font-family: inherit; font-size: 11px; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--sand-2);
}
.spacer { flex: 1; }

/* ── welcome ───────────────────────────────────────────────────────────────────────────── */
.welcome { display: grid; grid-template-columns: minmax(0,1.02fr) minmax(0,.98fr); gap: 28px; height: 100%; align-items: center; }
.w-copy .brandline {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--ember-2);
  font-weight: 700; margin-bottom: 16px;
}
.w-copy h1 {
  font-size: clamp(30px, 3.6vw, 50px); line-height: 1.03; letter-spacing: -0.03em;
  margin: 0 0 16px; font-weight: 750;
}
.w-copy h1 em { font-style: normal; color: var(--ember-2); }
.w-copy p { font-size: 15.5px; line-height: 1.6; color: var(--sand-2); margin: 0 0 10px; max-width: 44ch; }
.w-copy .facts { display: flex; gap: 18px; flex-wrap: wrap; margin: 20px 0 24px; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact .n { font-size: 19px; font-weight: 700; }
.fact .l { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.w-visual { position: relative; height: 100%; display: grid; place-items: center; }
.w-visual .frame {
  width: 100%; height: 100%; border-radius: var(--radius-lg);
  background:
    radial-gradient(620px 420px at 50% 4%, #ffffff, #f2ece3 62%, #e7dfd3);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 26px 60px rgba(0,0,0,.42);
  display: grid; place-items: center; overflow: hidden;
  position: relative;
}
.w-visual .frame img {
  max-width: 84%; max-height: 76%; object-fit: contain;
  mix-blend-mode: multiply;                 /* the shop's photos are shot on white */
  filter: drop-shadow(0 22px 22px rgba(60,45,32,.20));
}
.w-visual .stamp {
  position: absolute; bottom: 14px; left: 18px; right: 18px;
  font-size: 11.5px; color: #8a7f72; letter-spacing: .06em; text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 10px;
}

/* ── review ────────────────────────────────────────────────────────────────────────────── */
.review { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 18px; height: 100%; }
.rlist { overflow: hidden; display: grid; grid-template-columns: minmax(0,1fr); gap: 0; align-content: start; }
.rrow { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 12px; align-items: baseline;
        border-bottom: 1px dashed var(--line); padding: 5px 0; font-size: 13px; }
.rrow .k { color: var(--muted); white-space: nowrap; }
.rrow .v { font-weight: 600; }
.rtotals { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.rtotal { display: flex; justify-content: space-between; font-size: 14px; color: var(--sand-2); }
.rtotal.sum { font-size: 18px; color: var(--sand); font-weight: 700; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.rtotal .num { font-variant-numeric: tabular-nums; }
.note-small { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── done ──────────────────────────────────────────────────────────────────────────────── */
.done { display: grid; place-items: center; text-align: center; height: 100%; padding: 24px; }
.done .tick {
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(111,157,99,.16); border: 1px solid rgba(111,157,99,.5); margin-bottom: 18px;
}
.done h2 { font-size: clamp(24px, 3vw, 36px); margin: 0 0 10px; letter-spacing: -0.02em; }
.done p { color: var(--sand-2); max-width: 46ch; margin: 0 auto 8px; line-height: 1.6; }
.done .ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ember-2); }

/* ── entrance animation ────────────────────────────────────────────────────────────────── */
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: riseIn .32s var(--ease) both; }
.rise-2 { animation: riseIn .32s .06s var(--ease) both; }
.rise-3 { animation: riseIn .32s .12s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .rise, .rise-2, .rise-3 { animation: none; } }

/* ── narrow / short screens ────────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .stage { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0, 43%) minmax(0, 57%); }
  .ask { order: 2; justify-content: flex-start; padding-top: 6px; overflow: hidden; }
  .show { order: 1; }
  .q { max-width: none; }
  .welcome { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0, 0.82fr) minmax(0, 1fr); gap: 14px; }
  .w-visual { order: -1; }
  .w-copy { overflow: hidden; }
  .review { grid-template-columns: minmax(0,1fr); }
  .opts.five { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .inchbox input { font-size: 32px; width: 104px; }
  .bar { padding-top: 12px; }
  .brand-sub { display: none; }
}

@media (max-width: 560px) {
  .stage { grid-template-rows: minmax(0, 40%) minmax(0, 60%); }
  .q { font-size: 21px; }
  .help { font-size: 13px; margin-bottom: 12px; }
  .kicker { margin-bottom: 8px; }
  .opt { padding: 11px 12px; }
  .opt .t { font-size: 14px; }
  .opt .s { font-size: 11.5px; }
  .card .cap .s { display: none; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .colours { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
  .colour .n { font-size: 9.5px; }
  .stagearea { padding-bottom: 54px; }
  .specbar { font-size: 11.5px; gap: 7px; padding: 9px 12px; }
  .foot { padding-bottom: 12px; }
  .btn { padding: 12px 20px; font-size: 14.5px; }
  .counter { display: none; }
}

@media (max-height: 560px) {
  .stage:not(.has-visual) { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); }
  .stage:not(.has-visual) .show { display: none; }
  .stage:not(.has-visual) .ask { order: 1; }
  .stage.has-visual { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0, 44%) minmax(0, 56%); }
  .stage.has-visual .show { order: 1; }
  .stage.has-visual .ask { order: 2; }
  .stage.has-visual .stagearea { padding: 0 6px 42px; }
  .stage.has-visual .specbar { padding: 6px 10px; min-height: 40px; font-size: 10.5px; gap: 6px; }
  .stage.has-visual .specbar .pill { padding: 3px 8px; }
  .frac { padding: 6px 7px; min-width: 34px; font-size: 12px; }
  .fracs { gap: 5px; max-width: none; }
  .inchbox { padding: 4px 10px; }
  .inchbox input { font-size: 26px; width: 84px; }
  .measure { gap: 10px; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 7px; }
  .card .ph { aspect-ratio: 4 / 2.25; }
  .card .cap { padding: 6px 8px 8px; }
  .card .cap .t { font-size: 11.5px; line-height: 1.15; }
  /* the question and the drawing carry a 420px-tall window; the prose steps aside */
  .help { display: none; }
  .q { margin-bottom: 10px; }
  .kicker { margin-bottom: 6px; }
  .body .quick { margin-top: 8px; }
}

@media (max-height: 620px) {
  .w-copy h1 { font-size: clamp(22px, 4.4vh, 38px); margin-bottom: 8px; }
  .w-copy p { font-size: 13.5px; margin-bottom: 6px; }
  .w-copy .facts { margin: 10px 0 12px; gap: 14px; }
  .fact .n { font-size: 16px; }
  .brand-sub { display: none; }
  .q { font-size: clamp(18px, 3.4vh, 26px); }
  .help { font-size: 12.5px; }
  .opt { padding: 9px 11px; }
  .opt .s { display: none; }
  .card .cap .s { display: none; }
  .inchbox input { font-size: 28px; }
  .foot { padding-top: 8px; padding-bottom: 10px; }
  .btn { padding: 10px 18px; font-size: 14px; }
  .stagearea { padding-bottom: 46px; }
}

@media (max-height: 620px) and (min-width: 981px) {
  .q { font-size: 22px; }
  .help { font-size: 13px; margin-bottom: 10px; }
  .opt { padding: 10px 13px; }
  .stagearea { padding-bottom: 52px; }
}
