/* BAB-0074: the Make page. A light page, white cards, real renders, plain words. One screen at every width: the bot big in the middle, what to choose in a dock under it,
   the price and the two big actions always on the right (a phone: the top bar, the thumb bar and sheets, see phone-make.css). Targets at least 44 px, text at least 14 px,
   a solid 2 px focus ring. The neon is an accent (a tick, a ring, a dot), never a ground; no blur, no gradients on text. */
:root {
  --page: #F5F6F8; --card: #FFFFFF; --raised: #ECEFF3; --line: #D6DBE3; --hair: rgba(20, 26, 33, 0.10); --ink: #242830; --ink2: #566070;
  --accent: #0B6B80; --night: #141A21; --bad: #BC3030; --bad-line: #E7B3B3;
  --hue: #04D9C4; --hue-ink: #087F75; --hue-rgb: 4, 217, 196; --neon: #04D9C4;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --r-btn: 10px; --r-card: 16px; --sumw: 292px; --cw: 148px; --gap: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  height: 100dvh; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 10px 16px 14px;
  background: var(--page); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
button, input, select { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, canvas:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 12px 16px; border-radius: var(--r-btn); z-index: 60; }
.skip:focus { left: 8px; }
.ico { width: 24px; height: 24px; flex: none; fill: currentColor; color: var(--hue-ink); }
h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---- the header: logo, the three steps, the status chip ---- */
.top { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 16px; min-height: 48px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; margin-right: auto; }
.steps { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.step { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--card); color: var(--ink2); font-size: 14px; }
.step .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--raised); font-weight: 700; }
.step.is-now { color: #fff; background: var(--night); border-color: var(--night); font-weight: 600; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--hue); }
.step.is-now .n { background: var(--hue); color: var(--night); }
.stepbtn { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 -14px; padding: 0 14px; border: 0; background: transparent; color: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: var(--r-btn); }
.stepbtn[aria-disabled="true"] { color: var(--ink2); cursor: not-allowed; opacity: 0.7; }
.step.is-link:has(.stepbtn:not([aria-disabled="true"]):hover) { border-color: var(--hue-ink); }
.chip { margin: 0; position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 14px 0 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-btn); font-size: 14px; color: var(--ink2); max-width: 36ch; }
.chip::before { content: ""; position: absolute; left: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 8px var(--hue); }
.chip.busy::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---- the page: stage and dock on the left, the price column on the right ---- */
.make { display: grid; grid-template-columns: minmax(0, 1fr) var(--sumw); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage sum" "dock sum"; gap: var(--gap); min-height: 0; min-width: 0; }
.stage { grid-area: stage; position: relative; min-height: 0; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: #E6EBF1; }
.view { position: absolute; inset: 0; }
.view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.view canvas:focus-visible { outline-offset: -4px; }
.loading { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; background: var(--card); text-align: center; padding: 24px; color: var(--ink2); z-index: 3; }
.notice { position: absolute; left: 14px; bottom: 14px; z-index: 4; max-width: min(520px, calc(100% - 100px)); margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--night); color: #fff; font-size: 14px; line-height: 1.35; box-shadow: 0 0 0 1px rgba(var(--hue-rgb), 0.6); }
.notice.bad { background: #fff; color: var(--bad); font-weight: 600; box-shadow: 0 0 0 2px var(--bad-line); }
#cube { position: absolute; right: 16px; top: 16px; width: 60px; height: 60px; perspective: 420px; z-index: 2; }
.vc-cube { position: relative; width: 60px; height: 60px; transform-style: preserve-3d; }
.vc-face { position: absolute; left: 0; top: 0; width: 60px; height: 60px; display: grid; place-items: center; padding: 0; font-size: 14px; font-weight: 600; color: var(--ink); background: #FFFFFF; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.vc-face:hover { background: var(--raised); }
.vc-face.is-now { background: #E3F1F5; border-color: var(--accent); color: var(--accent); }

/* ---- cards and buttons ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; position: relative; }
.card::before { content: ""; position: absolute; left: 18px; top: -1px; width: 46px; height: 3px; border-radius: 0 0 3px 3px; background: var(--hue); box-shadow: 0 0 10px rgba(var(--hue-rgb), 0.6); pointer-events: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 6px 14px; font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: var(--r-btn); cursor: pointer; text-decoration: none; user-select: none; -webkit-user-select: none; transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .12s var(--ease); }
.btn:hover { border-color: var(--hue-ink); background: #F3FBFA; }
.btn:active { transform: scale(0.97); }
.btn.main { background: var(--night); border-color: var(--night); color: #fff; box-shadow: 0 0 0 1px rgba(var(--hue-rgb), 0.55) inset; }
.btn.main:hover { box-shadow: 0 0 0 1px var(--hue) inset, 0 0 0 4px rgba(var(--hue-rgb), 0.22); background: var(--night); }
.btn[aria-disabled="true"] { color: var(--ink2); background: var(--raised); border-color: var(--line); cursor: not-allowed; opacity: 0.75; box-shadow: none; }

/* ---- the price column ---- */
.sum { grid-area: sum; display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mix { font-weight: 700; font-size: 16px; line-height: 1.3; }
.facts { color: var(--ink2); font-size: 14px; }
.recap { margin: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.3; }
.recap div { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 8px; }
.recap dt { color: var(--ink2); }
.recap dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.prices { margin: 4px 0 0; display: grid; gap: 10px; }
.price { padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.price dt { font-size: 14px; font-weight: 700; color: var(--ink2); }
.price dd { margin: 0; }
.price dd:not(.n) { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.price .n { font-size: 14px; color: var(--ink2); }
.price.built { border-color: var(--hue-ink); box-shadow: inset 4px 0 0 var(--hue); }
.prices.busy dd:not(.n) { opacity: 0.45; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 4px; }
.acts .btn { min-height: 52px; font-size: 17px; }
.acts2 { display: grid; gap: 8px; }
.acts2 .btn { justify-content: flex-start; font-weight: 600; }

/* ---- the dock: six tabs, and one strip of picture cards under them ---- */
.dock { grid-area: dock; padding: 12px 14px 12px; min-width: 0; display: grid; gap: 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: nowrap; }
.tab { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 10px; font-size: 15px; font-weight: 700; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: var(--r-btn); cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.tab:hover { border-color: var(--hue-ink); }
.tab[aria-selected="true"] { background: var(--night); border-color: var(--night); color: #fff; box-shadow: 0 0 0 1px rgba(var(--hue-rgb), 0.55) inset; }
.tab[aria-selected="true"] .ico { color: var(--hue); }
.tab .ico { width: 22px; height: 22px; }
.stripwrap { position: relative; min-width: 0; height: calc(var(--cw) * 0.75 + 112px); }     /* the same height on every step, so the bot does not change size when you change step */
.strip { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 4px 2px 8px; scroll-snap-type: x proximity; scroll-padding-left: 2px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.strip > * { scroll-snap-align: start; }
.nav { position: absolute; top: 40%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; padding: 0; background: var(--card); border: 2px solid var(--line); border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(20, 26, 33, 0.18); }
.nav:hover { border-color: var(--hue-ink); }
.nav.prev { left: -10px; } .nav.next { right: -10px; }

.pick { flex: 0 0 auto; width: var(--cw); display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 8px; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s var(--ease), transform .15s var(--ease); }
.pick:hover { border-color: var(--hue-ink); transform: translateY(-2px); }
.pick:active { transform: translateY(0) scale(0.98); }
.pick .pic { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 9px; background: #E6EBF1; object-fit: cover; }
.pick canvas.pic { background: #0E1217; }
/* what the card costs against the default (BAB-0075): a small white tag on the corner of the picture, so a card keeps its height; no red (a dearer card is not an error) */
.pick .fig { position: relative; display: block; }
.delta { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 1px 7px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-style: normal; font-weight: 700; font-size: 14px; line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.delta.down { color: var(--hue-ink); border-color: var(--hue-ink); }
.delta.same { color: var(--ink2); font-weight: 600; }
.pick b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.2; padding: 0 2px; }
.pick small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.25; color: var(--ink2); padding: 0 2px; }
.pick[aria-pressed="true"] { border-color: var(--hue-ink); background: #F1FBFA; box-shadow: inset 0 -4px 0 var(--hue), 0 0 0 1px var(--hue-ink); }
/* the pick is marked by a tick in the corner (the old "· chosen" after the name was cut off on a narrow card) */
.pick { position: relative; }
.pick[aria-pressed="true"]::after { content: ""; position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 0 2px #fff; pointer-events: none; }
.pick[aria-pressed="true"]::before { content: ""; position: absolute; top: 18px; right: 18.5px; width: 11px; height: 6px; border-left: 3px solid var(--night); border-bottom: 3px solid var(--night); transform: rotate(-45deg); z-index: 1; pointer-events: none; }
.pick.person[aria-pressed="true"]::after { top: 8px; right: 8px; } .pick.person[aria-pressed="true"]::before { top: 14px; right: 14.5px; } .pick.person b { padding-right: 28px; }
.pick[aria-disabled="true"] { cursor: not-allowed; background: var(--raised); border-style: dashed; }
.pick[aria-disabled="true"]:hover { transform: none; border-color: var(--line); }
.pick[aria-disabled="true"] .pic { filter: grayscale(1); opacity: 0.45; }
.pick[aria-disabled="true"] b { color: var(--ink2); }
.pick.person { width: 224px; padding: 10px 12px; gap: 6px; }
.pick.person small { font-size: 14px; }
.pick.note { cursor: default; border-style: dashed; background: transparent; width: 220px; justify-content: center; }
.pick.note:hover { transform: none; border-color: var(--line); }

/* colours: three roles, then their swatches */
.colours { flex: 1 1 100%; display: grid; gap: 8px; min-width: 0; align-content: start; padding: 2px; }
.roles { display: flex; gap: 8px; flex-wrap: wrap; }
.role { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 14px 4px 8px; font-weight: 700; font-size: 15px; background: var(--card); border: 2px solid var(--line); border-radius: 22px; cursor: pointer; }
.role:hover { border-color: var(--hue-ink); }
.role[aria-pressed="true"] { border-color: var(--hue-ink); background: #F1FBFA; box-shadow: 0 0 0 1px var(--hue-ink); }
.role .dot, .sw .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0, 0, 0, 0.28); flex: none; }
.role small { font-weight: 500; color: var(--ink2); font-size: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; background: var(--card); border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.sw:hover { border-color: var(--hue-ink); }
.sw[aria-pressed="true"] { border-color: var(--hue-ink); box-shadow: 0 0 0 2px var(--hue); }
.sw .dot { width: 30px; height: 30px; }
.colour-note { font-size: 14px; color: var(--ink2); }

/* ---- a big screen: bigger cards and price column ---- */
@media (min-width: 1700px) and (min-height: 860px) { :root { --cw: 176px; --sumw: 340px; } .pick b { font-size: 16px; } }
/* ---- a shorter screen: smaller cards, so the bot keeps its room ---- */
@media (min-width: 600px) and (max-height: 820px) { :root { --cw: 128px; } .pick b { font-size: 14px; } .dock { padding: 10px 12px; gap: 8px; } .acts .btn { min-height: 48px; } .price dd:not(.n) { font-size: 26px; } }
@media (min-width: 600px) and (max-height: 860px) { .recap { display: none; } }   /* the recap needs room: it goes when the screen is short */
@media (min-width: 600px) and (max-height: 700px) { :root { --cw: 112px; } .sum { gap: 8px; } .facts { display: none; } .pick small { -webkit-line-clamp: 2; } }
/* a narrow window above the phone breakpoint: the price column goes under the bot as one slim row */
@media (min-width: 600px) and (max-width: 1099px) { :root { --sumw: 244px; --cw: 128px; } .tab .ico { display: none; } }
@media (min-width: 600px) and (max-width: 819px) {
  .make { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; grid-template-areas: "stage" "sum" "dock"; }
  .sum { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; overflow: visible; padding: 10px 14px; gap: 10px; }
  .sum h2, .sum .facts, .sum .recap { display: none; }
  .sum .mix { grid-column: 1 / -1; }
  .prices { grid-column: 1 / span 2; grid-template-columns: 1fr 1fr; margin: 0; }
  .acts { grid-column: 3; grid-template-columns: 1fr; margin: 0; }
  .acts2 { display: none; }
  .brand span { display: none; }
}
.pick[aria-disabled="true"] small { -webkit-line-clamp: 3; }          /* a greyed card says why: room for three lines (after the short-screen rules, which clamp to two) */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .pick:hover { transform: none; } }
