/* Orchid V3: the anatomy poster, stepped off the wall.
   Four colors, each with one job (DIRECTION.md):
   cream = the page, ink = all text, teal = battery / chart / contact button, white = only on the battery and logo. */

@font-face {
  font-family: "Bebas Neue";
  src: url("../assets/fonts/bebas-neue-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-400.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --cream: #FBF9EE;
  --ink: #1B1E1D;
  --teal: #24BCB9;          /* poster band: lines, outlines, the contact button */
  --teal-battery: #52BAB6;  /* the battery's own finish */
  --white: #FFFFFF;
  --ink-soft: rgba(27, 30, 29, .72);
  --ink-faint: rgba(27, 30, 29, .2);
  --line: 1.5px;
  --ease: cubic-bezier(.65, 0, .35, 1); /* one easing for the battery, the leaders and the chart: heavy, no bounce */
  --head: "Bebas Neue", "Arial Narrow", sans-serif;
  --body: "Montserrat", "Trebuchet MS", sans-serif;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; overflow-x: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.5 var(--body);
  overflow-x: clip;
}
img, canvas { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: .95; letter-spacing: .01em; margin: 0; text-transform: uppercase; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cream); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 0;
  font: 600 16px/1 var(--body); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-rep { background: var(--teal); color: var(--ink); }
.btn-rep:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 var(--line) var(--ink); }
.btn-big { min-height: 56px; padding: 0 32px; font-size: 18px; }

/* ---------- the first screen's logo (there is no header: the asks live in the bar along the bottom) ---------- */
.intro-logo { display: block; width: min(100%, 170px); height: auto; margin-bottom: 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 1. the first screen: the battery standing still with its five points, one screen, no scrolling ----------
   Words on top, battery in the middle taking whatever height is left, the two asks below. hero-battery.webp is
   1160 x 2220 with the battery centered and 402 wide, so the battery is 18.1% of the picture's height (--bw, in
   the figure's own height units). Each point's line sits at --at, a share of the figure's height, and runs from
   its words to the battery's edge. */
.hero { min-height: 100svh; display: flex; flex-direction: column; gap: 8px; padding: 10px var(--gutter); background: var(--cream); text-align: center; }
.hero h1 { font-size: min(44px, 7vw); }
.hero .intro-logo { width: 72px; margin: 0 auto 6px; }
.hero-who { margin: 8px auto 0; font-size: clamp(14px, 2vw, 18px); line-height: 1.4; max-width: 40ch; }
.hero-fig { flex: 1 1 0; min-height: 420px; margin: 0; position: relative; container-type: size; --bw: 18.1cqh; }
.hero-batt { position: absolute; top: 0; left: 50%; height: 100cqh; width: auto; max-width: none; transform: translateX(-50%); }
.hero-pts { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.pt {
  --in: 5cqh;   /* how far in over the battery's edge the line reaches */
  position: absolute; top: calc(var(--at) * 100%); width: min(calc(50% - var(--bw) / 2 + var(--in) / 2), 15em);
  border-top: var(--line) solid var(--ink); padding-top: 3px; font-size: clamp(12.5px, 1.9vw, 16px); line-height: 1.2;
}
.pt b { position: absolute; bottom: 100%; left: 0; right: 0; padding-bottom: 2px; font: 400 clamp(21px, 3.4vw, 32px)/1 var(--head); letter-spacing: .01em; text-transform: uppercase; }
.pt span { display: block; color: var(--ink-soft); }
.pt strong { font-weight: 600; color: var(--ink); }
.pt-l { right: calc(50% + var(--bw) / 2 - var(--in) / 2); text-align: left; }
.pt-r { left: calc(50% + var(--bw) / 2 - var(--in) / 2); text-align: left; }
/* the line reaches over the battery; the words stop short of its edge */
.pt-l span, .pt-l b { padding-right: calc(var(--in) / 2 + 6px); }
.pt-r span, .pt-r b { padding-left: calc(var(--in) / 2 + 6px); }
.pt-button { --in: 6cqh; }   /* reaches in to the round button itself */
.pt::after {
  content: ""; position: absolute; top: -5px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 1.5px var(--cream);
}
.pt-l::after { right: -4px; }
.pt-r::after { left: -4px; }
/* the tiniest phones: the points' words need a taller battery, so this first screen runs a little past one screen */
@media (max-width: 359px) {
  .hero-fig { min-height: 600px; }
  .pt { font-size: 12px; }
  .pt b { font-size: 18px; }
}
.hero-acts { display: flex; gap: 10px; }
.hero-acts .btn { flex: 1 1 0; padding: 0 8px; font-size: 15px; white-space: nowrap; }

/* ---------- 2. the proof ---------- */
.proof { padding: 72px var(--gutter); max-width: 1120px; margin: 0 auto; }
.mid-ask { margin-top: 40px; font-size: 18px; font-weight: 600; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.proof h2 { font-size: clamp(48px, 13vw, 112px); max-width: 16ch; }
/* the proof chart: BDSA's top six with names, two bars each, sales and units, no numbers
   (Greg, 2026-11-03). Sideways on a phone so the names fit; standing columns on a wide screen.
   --v is the bar's share of the tallest, on BDSA's own two scales ($1M reads level with 40k units). */
.chart { margin: 32px 0 0; }
.chart-key { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.key { display: inline-flex; align-items: center; gap: 8px; }
.key::before { content: ""; width: 14px; height: 14px; border-radius: 3px; }
.key-money::before { background: var(--teal-battery); }
.key-units::before { background: var(--ink); }
.bars { list-style: none; margin: 0; padding: 0; }
.brand { padding: 9px 0; }
.bar-name { display: block; font-size: 16px; margin-bottom: 4px; }
.brand-orchid .bar-name { font-weight: 700; }
.bar-pair { display: grid; gap: 3px; }
.bar { display: flex; align-items: center; }
.bar-fill {
  flex: none; height: 18px;
  width: calc(var(--v) * 100%);
  border-radius: 0 4px 4px 0;
  transform-origin: 0 50%;
  transition: transform .8s var(--ease);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.bar-money .bar-fill { background: var(--teal-battery); }
.bar-units .bar-fill { background: var(--ink); }
.chart.pre .bar-fill { transform: scaleX(0); }
.chart figcaption { margin-top: 16px; font-size: 16px; color: var(--ink-soft); max-width: 60ch; }

/* ---------- 5. two doors ---------- */
.doors { display: grid; grid-template-columns: 1fr; gap: 56px; padding: 64px var(--gutter); max-width: 1120px; margin: 0 auto; }
.door { display: flex; flex-direction: column; align-items: center; text-align: center; border-top: var(--line) solid var(--ink); padding-top: 22px; }
.door-head h2 { font-size: 72px; }
.door-head p { font-size: 17px; margin-top: 6px; }
.door-head .door-demo { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.shop-limits { font-size: 15px; color: var(--ink-soft); margin-top: 18px; max-width: 46ch; }
.door-view { position: relative; width: 100%; height: 470px; margin-top: 18px; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 14px; }
.yours-still { height: 440px; width: auto; position: relative; z-index: 1; }
.yours-flat { height: 420px; width: auto; position: relative; z-index: 1; }
.yours-view .door-shadow { display: none; }
.yours-view.flat-on .door-shadow { display: block; }
.yours-view.flat-on .yours-still, .yours-view.gl-on .yours-still { display: none; }
.door-shadow {
  position: absolute; left: 50%; bottom: 18px; width: 150px; height: 22px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(27,30,29,.32), rgba(27,30,29,0));
}
.tint {
  position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tint b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tint[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--cream), 0 0 0 4.5px var(--ink); }
.tint span, .tint-any-dot { display: block; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(27,30,29,.25); }
.tint-any-dot { background: conic-gradient(#b8312c, #c7a250, #52bab6, #2364a8, #2b2e30, #b8312c); }

.yours-gl { position: absolute; inset: 0; z-index: 2; display: none; touch-action: pan-y; }
.yours-view.gl-on .yours-gl { display: block; }
.yours-view.gl-on .yours-flat, .yours-view.gl-on .door-shadow { visibility: hidden; }
.yours-tools { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 18px; width: 100%; }
.yours-upload { position: relative; overflow: hidden; }
.yours-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.yours-upload:focus-within { outline: 2.5px solid var(--ink); outline-offset: 3px; }
.yours-colors { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 360px; }
.yours-knock { font-size: 16px; display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 0 10px 0 0; cursor: pointer; }
.yours-knock input { width: 20px; height: 20px; accent-color: var(--ink); }
.yours-note { font-size: 16px; color: var(--ink-soft); }
.yours-row-label { font-size: 16px; font-weight: 600; margin-bottom: -6px; }

/* the design shop: the flat skin to edit, the live battery beside it */
.shop-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(88px, 27%, 150px); gap: 6px;
  width: 100%; max-width: 420px; margin-top: 18px; align-items: stretch;
}
.shop-skin-wrap { min-width: 0; }
.shop-skin { display: block; width: 100%; height: 420px; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.shop-skin:active { cursor: grabbing; }
.shop-skin:focus { outline: none; }
.shop-skin:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.shop-stage .door-view { height: auto; margin-top: 0; padding: 14px 0 24px; align-items: stretch; }
.shop-stage .yours-still, .shop-stage .yours-flat { height: 100%; width: auto; max-width: 100%; object-fit: contain; align-self: flex-end; }
.shop-stage .door-shadow { width: 80%; bottom: 26px; }
.yours-status { grid-column: 1 / -1; font-size: 14px; line-height: 1.35; min-height: 1.35em; margin: 4px auto 6px; max-width: 42ch; color: var(--ink-soft); }
.yours-status a { color: inherit; font-weight: 600; }
/* the way back to the starting battery, right under the picture (Greg, 2026-10-28); it asks first */
.yours-restart { grid-column: 1 / -1; margin: 0 auto 2px; text-align: center; }
.yours-restart .shop-link { font-size: 14px; color: var(--ink-soft); min-height: 36px; }

/* the picked piece: size, turn, and what else it can do */
.shop-sel {
  width: 100%; max-width: 420px; margin-top: 12px; padding: 12px 16px 14px; text-align: left;
  border: var(--line) solid var(--ink); border-radius: 22px; display: grid; gap: 4px;
}
.shop-sel-head { min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 16px; }
.shop-sel-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-link { background: none; border: 0; font: 600 16px var(--body); color: var(--ink); text-decoration: underline; min-height: 44px; padding: 0 4px; cursor: pointer; }
/* the small links and Big view: a touch area at least 44px tall around them, without moving anything (WCAG 2.5.8) */
.yours-note .shop-link, .yours-restart .shop-link, .form-design .shop-link { position: relative; }
.yours-note .shop-link::after, .yours-restart .shop-link::after, .form-design .shop-link::after, .shop-enlarge::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%);
}
.shop-range { display: grid; grid-template-columns: 84px 1fr; align-items: center; font-size: 16px; font-weight: 600; }
.shop-range input { width: 100%; height: 44px; accent-color: var(--ink); }
.shop-sel-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.shop-chip {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 var(--line) var(--ink); font: 600 15px var(--body); cursor: pointer;
}
.shop-chip:active { background: var(--ink); color: var(--cream); }
.shop-logo-opts { display: flex; flex-wrap: wrap; column-gap: 16px; }

/* the designs to start from */
.shop-designs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.shop-design {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 78px; padding: 0;
  border: 0; background: none; color: var(--ink); font: 600 13px var(--body); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.shop-thumb { display: block; width: 56px; height: 92px; border-radius: 10px; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(27,30,29,.25); }
img.shop-thumb { box-shadow: 0 0 0 1px rgba(27,30,29,.25); }
.shop-design[aria-pressed="true"] .shop-thumb { box-shadow: 0 0 0 3px var(--cream), 0 0 0 4.5px var(--ink); }
.shop-thumb-plain { background: linear-gradient(90deg, #a9adb0, #eef0f1 30%, #c9ccce 55%, #9fa3a6); }
.shop-thumb-up { display: grid; place-items: center; font: 400 34px var(--body); box-shadow: inset 0 0 0 var(--line) var(--ink); border-radius: 10px; }
.shop-design-up input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.shop-design-up:focus-within .shop-thumb { outline: 2.5px solid var(--ink); outline-offset: 3px; }
.shop-send { margin-top: 10px; }

/* the four steps under the battery: background, logo, text, colors */
.shop-step { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 4px; border-top: var(--line) solid var(--ink-faint); }
.shop-step:first-child { border-top: 0; padding-top: 0; }
.shop-step-h { font: 400 34px/1 var(--head); letter-spacing: .02em; }
.shop-help { font-size: 15px; line-height: 1.45; color: var(--ink-soft); max-width: 38ch; }
.shop-sub { font-size: 15px; font-weight: 600; margin-top: 6px; }
.shop-sel .shop-help, .shop-sel .shop-sub { text-align: left; max-width: none; }
.shop-sel .yours-colors { justify-content: flex-start; max-width: none; }
.shop-range { grid-template-columns: 84px 1fr; }
.shop-logo-opts, .shop-text-opts, .shop-ph-opts { display: grid; gap: 6px; margin-bottom: 6px; padding-bottom: 12px; border-bottom: var(--line) solid var(--ink-faint); }
.shop-text-opts textarea { font: 600 18px var(--body); padding: 10px 12px; border-radius: 12px; border: var(--line) solid var(--ink); background: var(--white); resize: vertical; }
.shop-chip[aria-pressed="true"] { background: #b8312c; color: var(--white); box-shadow: none; }

/* fonts */
.shop-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; }
.shop-font {
  min-height: 48px; padding: 0 4px; border: 0; border-radius: 12px; background: var(--white); color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(27,30,29,.2); font-size: 17px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.shop-font[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--ink); }

/* Pantone and any color: the More button in every color row, the slots, and the sheet; More wears the pick */
.tint-more span { display: grid; place-items: center; font: 400 26px/1 var(--body); color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 var(--line) var(--ink); }
.tint-more.is-worn span { box-shadow: inset 0 0 0 1px rgba(27,30,29,.25); }
.pms-any {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 12px;
  box-shadow: inset 0 0 0 var(--line) var(--ink); font: 600 16px var(--body); cursor: pointer;
}
.pms-any i { font-style: normal; font-weight: 400; color: var(--ink-soft); }
.pms-any .tint-any-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.pms-any input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.tint-none, .tint-orig { display: grid !important; place-items: center; background: var(--white); }
.tint-none::after { content: ""; width: 30px; height: 2px; background: #b8312c; transform: rotate(-45deg); }
.tint-orig { background: conic-gradient(#ff6b35, #ffd23f, #2e7d32, #5b2a86, #ff6b35) !important; }
.shop-spots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.shop-spot {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; padding: 0; border: 0; background: none;
  font: 600 13px var(--body); color: var(--ink); cursor: pointer;
}
.shop-spot span { display: grid; place-items: center; width: 72px; height: 52px; border-radius: 10px; font-size: 26px; box-shadow: inset 0 0 0 var(--line) var(--ink); }
.pms-sheet .sheet-in { max-height: 86svh; overflow: auto; }
.pms-q { font: 16px var(--body); min-height: 48px; padding: 0 14px; border-radius: 12px; border: var(--line) solid var(--ink); background: var(--white); width: 100%; }
.pms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pms-mine { display: grid; gap: 6px; }
.pms-chip {
  display: grid; gap: 4px; padding: 0 0 6px; border: 0; border-radius: 10px; overflow: hidden; background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(27,30,29,.2); font: 600 12px var(--body); color: var(--ink); cursor: pointer; text-align: center;
}
.pms-chip span { display: block; height: 44px; }
.pms-none { grid-column: 1 / -1; font-size: 15px; color: var(--ink-soft); }

/* keeping and sharing */
.shop-share-msg { font-size: 15px; font-weight: 600; min-height: 0; }
.shop-share-msg:empty { display: none; }
.shop-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.shop-link-out { display: flex; gap: 8px; width: 100%; max-width: 420px; }
.shop-link-out input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: var(--line) solid var(--ink); background: var(--white); font: 15px var(--body); }
.yours-note .shop-link { font-size: 16px; min-height: 0; padding: 0 2px; }

/* the battery's own "Big view" button, and the big view */
.shop-enlarge {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 3;
  min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--cream);
  box-shadow: inset 0 0 0 var(--line) var(--ink); font: 600 13px var(--body); color: var(--ink); cursor: pointer; white-space: nowrap;
}
.shop-big { position: fixed; inset: 0; z-index: 100; background: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 var(--gutter) calc(18px + env(safe-area-inset-bottom)); }
.shop-big-gl { position: absolute; inset: env(safe-area-inset-top) 0 120px 0; touch-action: none; }
.shop-big-hint { position: relative; font-size: 16px; color: var(--ink-soft); }
.shop-big .btn { position: relative; }
html.shop-big-on, html.shop-big-on body { overflow: hidden; }

.shop-tabs, .shop-subtabs, .shop-pane-help { display: none; }
.shop-pane { display: grid; gap: 6px; }
.shop-sel-more { display: grid; gap: 4px; }
/* wide screens have the room: the sliders and extra moves always show, with no More */
@media (min-width: 768px) {
  .shop-sel .shop-sel-more[hidden] { display: grid !important; }
  #shop-more { display: none; }
}

/* phones: the battery stays pinned at the top while the buyer works through the steps below it */
@media (max-width: 767px) {
  .shop-stage {
    position: sticky; top: 0; z-index: 5; background: var(--cream);
    padding-top: max(6px, env(safe-area-inset-top)); grid-template-columns: minmax(0, 1fr) minmax(0, .74fr);
    box-shadow: 0 12px 14px -14px rgba(27,30,29,.45);
  }
  .shop-skin-wrap { max-width: calc((46svh - 38px) * .6108 + 28px); justify-self: center; width: 100%; }
  /* one step at a time, picked from the tabs pinned under the battery; a picked piece's panel stands in for it */
  .shop-tabs { grid-column: 1 / -1; display: flex; gap: 4px; padding: 0 0 8px; }
  .shop-tab {
    flex: 1 1 auto; min-height: 44px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
    box-shadow: inset 0 0 0 var(--line) var(--ink-faint); font: 600 14px var(--body); cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .shop-tab[aria-selected="true"] { background: var(--ink); color: var(--cream); box-shadow: none; }
  .shop-tab:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }
  .shop-step:not(.is-on), .door-yours.has-sel .shop-step { display: none; }
  .shop-step, .shop-step:first-child { border-top: 0; padding-top: 2px; }
  .shop-step-h { display: none; }
  .yours-status { margin: 2px auto 4px; }
  /* a color row on one line: the presets and More */
  .yours-colors { flex-wrap: nowrap; gap: 6px; max-width: none; }
  .tint, .tint span { width: 37px; height: 37px; flex: none; }
  .tint-more span { font-size: 22px; }
  /* a picked piece: its settings one tab at a time, the fonts in one row to swipe */
  .shop-subtabs { display: flex; gap: 4px; margin: 2px 0 6px; }
  .shop-subtab {
    flex: 1 1 auto; min-height: 40px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
    box-shadow: inset 0 0 0 var(--line) var(--ink-faint); font: 600 14px var(--body); cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .shop-subtab[aria-selected="true"] { background: var(--ink); color: var(--cream); box-shadow: none; }
  .shop-pane:not(.is-on) { display: none; }
  .shop-pane > .shop-sub { display: none; }
  .shop-pane-help { display: block; }
  .shop-fonts { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .shop-font { flex: 0 0 128px; scroll-snap-align: start; }
  /* inside the panel a color row has less width: smaller swatches, so it still fits on one line */
  .shop-sel, .shop-pane, .shop-pane > * { min-width: 0; }
  .shop-sel .yours-colors { gap: 5px; }
  .shop-sel .tint, .shop-sel .tint span { width: 32px; height: 32px; }
  .shop-sel .tint-more span { font-size: 20px; }
  .shop-sel .tint-none::after { width: 22px; }
  /* typing: the keyboard is up, so the battery shrinks to about half and the tabs and hint step aside */
  .door-yours.typing .shop-skin-wrap { max-width: calc((24svh - 38px) * .6108 + 28px); }
  .door-yours.typing .shop-tabs, .door-yours.typing .yours-status, .door-yours.typing .yours-restart, .door-yours.typing .shop-enlarge { display: none; }
  .door-yours.typing .shop-stage { padding-bottom: 4px; }
}

/* ---------- 6. the close ---------- */
.close { padding: 56px var(--gutter) 56px; text-align: center; border-top: var(--line) solid var(--ink); max-width: 1120px; margin: 0 auto; }
.close h2 { font-size: clamp(30px, 8vw, 48px); max-width: 22ch; margin: 0 auto; }
.close-or { margin: 10px auto 0; font-size: 15px; max-width: 34ch; }
.form { max-width: 440px; margin: 24px auto 0; text-align: left; display: grid; gap: 14px; }
.form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.form legend { font-weight: 600; font-size: 16px; margin-bottom: 8px; padding: 0; }
.form-want label {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; box-shadow: inset 0 0 0 var(--line) var(--ink-faint); cursor: pointer; font-size: 16px;
}
.form-want input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.form-want label:has(input:checked) { background: var(--ink); color: var(--cream); box-shadow: none; }
.form-want label:has(input:focus-visible) { outline: 2.5px solid var(--ink); outline-offset: 3px; }
.field { display: grid; gap: 4px; }
.field span { font-weight: 600; font-size: 14px; }
.field i { font-weight: 400; font-style: normal; color: var(--ink-soft); }
/* 16px: an iPhone zooms the whole page into any smaller field */
.field input, .field textarea {
  font: 16px/1.4 var(--body); color: var(--ink); background: var(--cream);
  border: var(--line) solid rgba(27,30,29,.35); border-radius: 12px; padding: 9px 12px; width: 100%;
}
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.btn-submit { justify-self: start; min-height: 46px; padding: 0 24px; font-size: 15px; }
.form-error { color: var(--ink); font-weight: 700; font-size: 14px; }
/* a design from the shop, riding along on the main form */
.form-design { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; box-shadow: inset 0 0 0 var(--line) var(--teal); }
.form-design[hidden] { display: none; }
.form-design img { width: 96px; flex: none; border-radius: 10px; background: var(--white); }
.form-design p { font-size: 15px; line-height: 1.4; }
.form-design-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.form-design .shop-link { font-size: 15px; min-height: 0; padding: 0; }
.form-design-file { position: relative; cursor: pointer; }
.form-design-file i { font-style: normal; color: var(--ink-soft); }
.form-design-file input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; font-size: 0; }
.form { scroll-margin-top: 12px; }
.form-done { max-width: 480px; margin: 36px auto 0; text-align: left; border: var(--line) solid var(--teal); border-radius: 22px; padding: 22px; }
.form-done h3 { font-size: 26px; margin-bottom: 10px; }
.form-done p { margin-bottom: 16px; font-size: 15px; }

/* ---------- footer ---------- */
.foot { padding: 40px var(--gutter); text-align: center; font-size: 16px; }
.foot img { height: 42px; width: auto; margin: 0 auto 12px; }
.foot-small { font-size: 16px; color: var(--ink-soft); margin-top: 6px; }

/* the page holds still while a piece is dragged in the design shop: picking it opens its panel under the battery,
   and the browser would otherwise scroll to keep its place, carrying the battery away from the finger (Greg, 2026-10-23) */
html.in-shop { overflow-anchor: none; }

/* ---------- contact sheet ---------- */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 480px;
  background: var(--cream); color: var(--ink);
  border-radius: 22px 22px 0 0;
}
.sheet::backdrop { background: rgba(27, 30, 29, .45); }
.sheet-in { display: grid; gap: 10px; padding: 24px var(--gutter) calc(20px + env(safe-area-inset-bottom)); }
.sheet h2 { font-size: 40px; }
.sheet-sub { font-size: 16px; margin-bottom: 6px; }
.sheet-opt {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 18px; border-radius: 16px;
  border: var(--line) solid var(--teal); text-decoration: none; font-weight: 600; font-size: 17px;
}
.sheet-opt { white-space: nowrap; }
.sheet-opt[hidden] { display: none; }
/* the form's spam trap: off screen for people, present for bots */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; margin: 0; }
.sheet-opt span { font-weight: 400; font-size: 16px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; text-align: right; }
.sheet-form { font-size: 16px; padding: 8px 0; }
.sheet-todo { font-size: 16px; background: rgba(27,30,29,.06); border-radius: 10px; padding: 8px 12px; }
.sheet-x { justify-self: center; background: none; border: 0; font: 600 16px var(--body); color: var(--ink); min-height: 44px; padding: 0 18px; cursor: pointer; text-decoration: underline; }

/* ---------- wider screens ---------- */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  body { font-size: 18px; }
  .bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 28px); }
  .brand { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 0; }
  .bar-name { text-align: center; font-size: 16px; margin: 10px 0 0; }
  .bar-pair { display: flex; gap: 4px; height: 360px; border-bottom: var(--line) solid var(--ink); }
  .bar { flex: 1 1 0; min-width: 0; height: 100%; align-items: flex-end; }
  .bar-fill { width: 100%; height: calc(var(--v) * 100%); border-radius: 4px 4px 0 0; transform-origin: 50% 100%; }
  .chart.pre .bar-fill { transform: scaleY(0); }
  .doors { max-width: 1240px; }
  /* the design shop side by side: the battery (flat and 3D) held in view on the left, the steps, the picked
     piece's controls and the send form scrolling past on the right */
  .door-yours {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 56px;
    align-items: start; text-align: left;
  }
  .door-yours .door-head { grid-column: 1 / -1; text-align: center; max-width: 46ch; justify-self: center; }
  .door-yours .shop-stage {
    grid-column: 1; grid-row: 2 / span 2; position: sticky; top: 24px; max-width: none; margin-top: 28px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px;
  }
  .door-yours .shop-skin-wrap { max-width: calc((100vh - 170px) * .6108 + 28px); justify-self: end; width: 100%; }
  .door-yours .shop-stage .door-view { padding-top: 14px; }
  .door-yours .yours-status { text-align: center; font-size: 15px; }
  .door-yours .shop-sel { grid-column: 2; grid-row: 2; max-width: none; margin-top: 28px; }
  .door-yours .yours-tools { grid-column: 2; grid-row: 3; align-items: stretch; margin-top: 24px; }
  .door-yours .shop-step { max-width: none; align-items: flex-start; padding-top: 24px; }
  .door-yours .shop-step:first-child { padding-top: 0; }
  .door-yours .shop-help { max-width: 52ch; }
  .door-yours .shop-designs, .door-yours .yours-colors, .door-yours .shop-spots { justify-content: flex-start; max-width: none; }
  .door-yours .shop-share { justify-content: flex-start; }
  .door-yours .shop-link-out { max-width: none; }
  .door-yours .shop-send { align-self: flex-start; }
  .door-yours .yours-note { text-align: left; }
  .door-head h2 { font-size: 96px; }
  .sheet { margin: auto; border-radius: 22px; }
}

/* the first screen side by side only on a window wider than it is tall: a tall one makes the battery too wide
   to leave the points any room, so it keeps the stacked layout */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 40px;
    grid-template-rows: 1fr auto auto 1fr; grid-template-areas: ". fig" "words fig" "acts fig" ". fig";
    height: 100svh; min-height: 600px; max-width: 1500px; margin: 0 auto;
    padding: 28px var(--gutter) 28px min(6vw, 64px); text-align: left;
  }
  .hero-words { grid-area: words; }
  .hero-fig { grid-area: fig; min-height: 0; }
  .hero .intro-logo { width: clamp(170px, 12vw, 230px); margin: 0 0 18px; }
  .hero h1 { font-size: clamp(40px, 3.9vw, 76px); max-width: 12ch; }
  .hero-who { margin: 14px 0 0; font-size: clamp(17px, 1.2vw, 21px); max-width: 32ch; }
  .hero-acts { grid-area: acts; margin-top: 24px; gap: 12px; }
  .hero-acts .btn { flex: 0 0 auto; min-height: 48px; padding: 0 26px; font-size: 16px; }
  .pt { font-size: clamp(14px, 1vw, 19px); }
  .pt b { font-size: clamp(22px, 2.1vw, 42px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
