/* The machine (machine.html): one screen per step of the pipeline, a footer that says what's still on the way, and at the end
   the tool. Workings look: paper, ink, Big Shoulders for names, Fragment Mono for the machine's own words. */
.machine { margin: 0; background: var(--paper, #f3ecdc); color: var(--ink, #1c1a17); font-family: var(--f-text, Spectral, serif); }
.m-top { position: fixed; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 4vw, 48px); font-size: 11px; background: linear-gradient(var(--paper, #f3ecdc) 70%, transparent); }
.m-top a { text-decoration: none; }
.machine.done .m-top { position: static; background: none; }
.m-top { align-items: baseline; }
.m-right { display: flex; align-items: baseline; gap: 18px; min-width: 0; }
.m-over { border: 0; background: none; padding: 0; font: 11px/1.2 var(--f-mono, monospace); color: var(--ink-2, #6b6458); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.m-over:hover { color: var(--ink, #1c1a17); }
@media (max-width: 560px) { .m-right .folio { display: none; } }

/* techniques: one colour each, everywhere */
.tech { display: inline-block; font: 700 10px/1 var(--f-mono, monospace); text-transform: uppercase; letter-spacing: .08em; padding: 5px 7px; color: #fff; }
.tech.search { background: var(--modem, #2a55c0); }
.tech.embed { background: var(--solder, #2c7d4f); }
.tech.model { background: var(--radio, #d4501c); }
.m-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; }

/* the stage: screens stacked, one on at a time */
.stage { position: fixed; inset: 0; overflow: hidden; }
.stage[hidden] { display: none; }
.screen { position: absolute; inset: 0; padding: 64px clamp(16px, 5vw, 72px) 96px; display: grid; grid-template-rows: auto auto 1fr; gap: 14px; align-content: start;
  opacity: 0; transform: translateY(48px); pointer-events: none; transition: opacity .5s var(--ease, ease), transform .6s var(--ease, ease); overflow: auto; }
.screen.past { transform: translateY(-48px); }
.screen.on { opacity: 1; transform: none; pointer-events: auto; }
.screen.intro { align-content: center; }
.intro__in { max-width: 760px; display: grid; gap: 16px; }
.m-h1 { font: 900 clamp(56px, 9vw, 128px)/.9 var(--f-display, 'Big Shoulders Display', sans-serif); text-transform: uppercase; margin: 0; }
.m-cap { margin: 0; max-width: 46rem; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; }
.sc__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sc__n { font: 11px/1 var(--f-mono, monospace); color: var(--ink-2, #5e574c); }
.sc__name { flex-basis: 100%; margin: 4px 0 0; font: 900 clamp(40px, 6vw, 84px)/.95 var(--f-display, sans-serif); text-transform: uppercase; }
.state { font: 11px/1 var(--f-mono, monospace); color: var(--ink-2, #5e574c); }
.state.working { color: var(--radio, #d4501c); }
.state.working::before { content: '● '; animation: blink 1s infinite; }
.state.done { color: var(--like, #2f7d4f); }
@keyframes blink { 50% { opacity: .2; } }
.viz { min-height: 0; }
.working { font: 13px/1.4 var(--f-mono, monospace); color: var(--ink-2, #5e574c); }

/* things appear one after another, only once their screen is on */
.screen .th, .screen .bigpill, .screen .mini img, .screen .tiny span, .screen circle { animation: pop .45s ease-out backwards; animation-delay: calc(var(--k, 0) * 45ms); }
.screen:not(.on) .th, .screen:not(.on) .bigpill, .screen:not(.on) .mini img, .screen:not(.on) .tiny span, .screen:not(.on) circle { animation-play-state: paused; }
.screen circle { animation-delay: calc(var(--k, 0) * 4ms); transition: fill .6s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* 1: store search */
.ths { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.th { margin: 0; border: 1px solid var(--ink, #1c1a17); background: #fff; position: relative; }
.th img, .th .noimg { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee; }
.th figcaption { font: 11px/1.3 var(--f-mono, monospace); padding: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th .price { position: absolute; top: 6px; left: 6px; background: #fff; border: 1px solid var(--ink, #1c1a17); font: 10px/1 var(--f-mono, monospace); padding: 3px 5px; }

/* 2 and 5: kinds and tastes */
.bigpills, .tastes { display: flex; flex-wrap: wrap; gap: 12px; align-content: start; }
.bigpill { display: inline-flex; align-items: center; gap: 12px; border: 2px solid var(--c, var(--ink)); background: #fff; padding: 12px 16px; font: 800 clamp(22px, 2.6vw, 34px)/1 var(--f-display, sans-serif); text-transform: uppercase; color: var(--c, var(--ink)); }
.bigpill b { font: 16px/1 var(--f-mono, monospace); letter-spacing: 2px; }
.bigpill i { font-style: normal; font-size: .7em; }
.bigpill.taste { font-style: italic; text-transform: none; font-family: var(--f-text, serif); font-weight: 600; }

/* placeholders while a step works */
.bigpill.wait { min-width: 200px; min-height: 58px; border-color: #ddd; background: linear-gradient(90deg, #f3f3f1 0%, #fff 50%, #f3f3f1 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.ghostsq { display: block; aspect-ratio: 1; background: linear-gradient(90deg, #ebe5d6 0%, #f7f3ea 50%, #ebe5d6 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }

/* 3: six searches */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.col { border-top: 4px solid var(--c); padding-top: 8px; }
.col h3 { margin: 0 0 8px; font: 800 20px/1.05 var(--f-display, sans-serif); text-transform: uppercase; display: flex; justify-content: space-between; gap: 6px; }
.col h3 span { font: 13px/1 var(--f-mono, monospace); }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mini img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border: 1px solid #0002; }

/* 4 and 7: points, kept small, with one worked example beside them */
.pts { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); gap: 24px; align-items: start; max-width: 1100px; }
.scatter { width: 100%; height: clamp(180px, 42vh, 380px); height: clamp(180px, 42dvh, 380px); background: #fff; border: 1px solid var(--ink, #1c1a17); display: block; }
.scatter .lab { font: 800 15px/1 var(--f-display, sans-serif); text-transform: uppercase; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.scatter .mark line { stroke: var(--ink, #1c1a17); stroke-width: 1.5; }
.scatter .mark .ring { fill: none; stroke: var(--ink, #1c1a17); stroke-width: 2; animation: none; }
.scatter .mark .ring.big { stroke-width: 3; }
.scatter { cursor: crosshair; touch-action: manipulation; }
.scatter .lab, .scatter .mark { animation: fadein .5s 1s ease-out backwards; }
.screen:not(.on) .scatter .lab, .screen:not(.on) .scatter .mark { animation-play-state: paused; }
@keyframes fadein { from { opacity: 0; } }
.eg { display: grid; gap: 8px; align-content: start; }
.eg > .th { max-width: 120px; }
.eg__h { margin: 4px 0 0; font: 12px/1.3 var(--f-mono, monospace); text-transform: uppercase; letter-spacing: .04em; }
.eg__ths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.eg__ths.one { grid-template-columns: minmax(0, 120px); }
.eg__ths .th figcaption { font-size: 10px; }
.eg__note { margin: 4px 0 0; font-size: 16px; line-height: 1.4; }
.key { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 12px/1.3 var(--f-mono, monospace); margin: 8px 0 0; }
.key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* 5: the sample beside the tastes */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.tiny { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; opacity: .8; }
.tiny span { display: block; aspect-ratio: 1; background: #e6dfcf; }
.tiny img, .tiny .noimg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 6: readers hand products out into taste buckets */
.helpers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 18px; }
.helper { border: 1px dashed #9b937f; padding: 6px; background: linear-gradient(90deg, #f3f3f1 0%, #fff 50%, #f3f3f1 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.helper.landed { border: 1px solid #0003; background: transparent; animation: none; }
.helper h3 { margin: 0 0 5px; font: 11px/1 var(--f-mono, monospace); display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .05em; }
.helper.landed .st { color: var(--like, #2f7d4f); }
.hths { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.hths span { display: block; aspect-ratio: 1; background: #e6dfcf; transition: opacity .4s; }
.hths span.gone { opacity: .18; }
.hths img, .hths .noimg, .bths img, .bths .noimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; align-items: start; }
.bucket { border: 2px solid var(--c); border-top-width: 6px; background: #fff; padding: 6px; min-height: 90px; }
.bucket h3 { margin: 0 0 6px; font: italic 600 17px/1.1 var(--f-text, serif); color: var(--c); display: flex; justify-content: space-between; gap: 6px; }
.bucket h3 .n { font: 12px/1.4 var(--f-mono, monospace); font-style: normal; color: var(--ink-2, #5e574c); }
.bths { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.bths .dropped { display: block; aspect-ratio: 1; background: #eee; }

/* 7: borrowed tastes, a few worked examples and then everything before and after */
.borrow { display: grid; gap: 10px; margin-bottom: 18px; max-width: 1000px; }
.brow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(7rem, auto); gap: 12px; align-items: center; animation: pop .45s ease-out backwards; animation-delay: calc(var(--k, 0) * 250ms + 200ms); }
.screen:not(.on) .brow { animation-play-state: paused; }
.bcell { display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 10px; align-items: center; background: #fff; border: 1px solid var(--ink, #1c1a17); padding: 6px; }
.bcell img, .bcell .noimg { grid-row: span 2; width: 56px; height: 56px; object-fit: cover; display: block; background: #eee; }
.bcell span { font: 12px/1.25 var(--f-mono, monospace); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcell em { font: 11px/1 var(--f-mono, monospace); font-style: normal; color: var(--ink-2, #5e574c); }
.bcell .tchip { justify-self: start; }
.arrow { font: 12px/1.2 var(--f-mono, monospace); color: var(--ink-2, #5e574c); white-space: nowrap; }
.tchip { display: inline-block; border: 2px solid var(--c); color: var(--c); background: #fff; font: italic 600 15px/1 var(--f-text, serif); padding: 5px 8px; }
.all { max-width: 1000px; }
.sq { display: grid; grid-template-columns: repeat(auto-fill, minmax(14px, 1fr)); gap: 3px; margin: 8px 0; }
.sq i { display: block; aspect-ratio: 1; background: #d9d3c4; transition: background .5s; }
.sq i.lit { animation: lit .6s ease-out; }
@keyframes lit { from { transform: scale(1.6); } }
/* how good the guess is: one square per product the AI read, filled where the guess matched it */
.check { max-width: 1000px; margin-top: 18px; }
.cbar { display: grid; grid-template-columns: 8rem minmax(0, 1fr) 16rem; gap: 12px; align-items: center; margin: 6px 0; font: 12px/1.3 var(--f-mono, monospace); }
.cbar > div { position: relative; height: 18px; background: #0000000d; }
.cbar i, .cbar b { position: absolute; left: 0; top: 0; bottom: 0; transform-origin: left; animation: grow .8s cubic-bezier(.2, .8, .2, 1) backwards .3s; }
.cbar i { background: #b9b2a3; }
.cbar b { background: var(--ink, #1c1a17); }
.cbar em { font-style: normal; color: var(--ink-2, #6b6458); }
.screen:not(.on) .cbar i, .screen:not(.on) .cbar b { animation-play-state: paused; }
.check .key i.ok { background: var(--ink, #1c1a17); border-radius: 0; }
.check .key i.fit { background: #b9b2a3; border-radius: 0; }
@media (max-width: 560px) { .cbar { grid-template-columns: 6rem minmax(0, 1fr); } .cbar em { grid-column: 1 / -1; margin-top: -4px; } }

/* the footnote under the tool: every step on one clock */
.gantt { display: grid; gap: 8px; max-width: 1100px; }
.g__row { display: grid; grid-template-columns: minmax(150px, 15rem) minmax(0, 1fr); gap: 14px; align-items: center; }
.g__n { font: 13px/1.25 var(--f-mono, monospace); }
.g__n b { font: 800 17px/1 var(--f-display, sans-serif); text-transform: uppercase; margin-right: 4px; }
.g__t { position: relative; height: 22px; background: repeating-linear-gradient(90deg, #0000 0 calc(10% - 1px), #0001 calc(10% - 1px) 10%); }
.g__t i { position: absolute; top: 0; bottom: 0; min-width: 3px; transform-origin: left; animation: grow .6s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--k, 0) * 160ms + 200ms); }
@keyframes grow { from { transform: scaleX(0); } }
.tech-search .g__t i { background: var(--modem, #2a55c0); }
.tech-embed .g__t i { background: var(--solder, #2c7d4f); }
.tech-model .g__t i { background: var(--radio, #d4501c); }
.g__axis .g__t { height: 16px; background: none; border-top: 1px solid var(--ink, #1c1a17); }
.g__axis em { position: absolute; top: 4px; transform: translateX(-50%); font: 11px/1 var(--f-mono, monospace); font-style: normal; }
.g__axis em:first-child { transform: none; }

/* the footer: what's still on the way */
.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: flex; align-items: center; gap: 14px; padding: 10px clamp(12px, 3vw, 32px) calc(10px + env(safe-area-inset-bottom)); background: var(--ink, #1c1a17); color: #fff; }
.foot[hidden] { display: none; }
.segs { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.segs li button { display: block; width: 26px; height: 8px; border: 0; padding: 0; background: #57524a; cursor: pointer; }
.segs li.working button { background: linear-gradient(90deg, #57524a 0%, #d4501c 50%, #57524a 100%); background-size: 200% 100%; animation: shimmer 1s infinite; }
.segs li.done button { background: #f3ecdc; }
.segs li.here button { outline: 2px solid #fff; outline-offset: 2px; }
.segs li.end button { width: 40px; }
.segs li.end.done button { background: var(--like, #2f7d4f); }
.foot__arrows { display: flex; gap: 4px; }
.foot__arrows .foot__btn { padding: 0 12px; font-size: 16px; }
.foot__what { font: 12px/1.3 var(--f-mono, monospace); opacity: .85; flex: 1; }
.foot__btn { min-height: 44px; padding: 0 16px; border: 1px solid #fff; background: transparent; color: #fff; font: 700 13px/1 var(--f-mono, monospace); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.foot__btn.next:not(:disabled) { background: #fff; color: var(--ink, #1c1a17); }
.foot__btn:disabled { opacity: .35; cursor: default; }

/* the end: a strip of what it took, then the tool, built from the top down */
.final { padding: 8px clamp(16px, 5vw, 72px) 0; max-width: 1400px; margin: 0 auto; }
.final[hidden] { display: none; }
.final__top { display: grid; gap: 14px; margin-bottom: 18px; }
.m-back { justify-self: start; border: 0; background: none; font: 12px/1 var(--f-mono, monospace); text-decoration: underline; cursor: pointer; padding: 4px 0; }
.speed { margin: 0; font: 14px/1.5 var(--f-mono, monospace); padding: 10px 12px; background: #1c1a17; color: #f3ecdc; box-shadow: 6px 6px 0 var(--accent, #d4501c); }
.speed b { color: #fff; background: var(--like, #2f7d4f); padding: 0 4px; }
.final__tool { display: grid; gap: 14px; }
.final__tool .part__h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font: 12px/1 var(--f-mono, monospace); text-transform: uppercase; }
.final__tool h2 { font: 900 clamp(28px, 3.4vw, 44px)/1 var(--f-display, sans-serif); margin: 0; text-transform: uppercase; }
.final__tool .bar { margin: 0 calc(-1 * clamp(16px, 5vw, 72px)); }
.final .layer { opacity: 0; transform: translateY(14px); }
.final .layer.in { opacity: 1; transform: none; transition: opacity .5s ease-out, transform .6s cubic-bezier(.2, .8, .2, 1); }
.took { margin: 40px 0 24px; border-top: 1px solid var(--ink, #1c1a17); padding-top: 12px; max-width: 1000px; }
.took summary { cursor: pointer; font: 12px/1.4 var(--f-mono, monospace); text-transform: uppercase; letter-spacing: .05em; }
.took p { font-size: 15px; line-height: 1.5; max-width: 46rem; }

@media (max-width: 700px) {
  .split { grid-template-columns: 1fr; }
  .foot__btn .nm { display: none; }
  .foot__btn.busy .nm + .nw::before { content: none; }
  .pts { grid-template-columns: 1fr; gap: 14px; }
  .eg > .th { max-width: 110px; }
  .eg__ths .th figcaption { display: none; }
  .g__row { grid-template-columns: 1fr; gap: 3px; }
  .brow { grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); gap: 6px; }
  .brow .arrow:first-of-type { font-size: 0; }
  .brow .arrow:first-of-type::after { content: '→'; font-size: 14px; }
  .brow > .arrow:nth-of-type(2), .brow > .tchip { display: none; }
  .bcell { grid-template-columns: 40px minmax(0, 1fr); }
  .bcell img, .bcell .noimg { width: 40px; height: 40px; }
  .helpers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g__axis .g__n { display: none; }
  .screen { padding-top: 72px; }
  .foot__what { font-size: 11px; }
  .foot__btn.next { display: none; }
  .foot { gap: 10px; }
  .segs li button { width: 16px; }
  .scatter { height: 30vh; height: 30dvh; }
}
@media (prefers-reduced-motion: reduce) { .screen { transition: none; } }

/* 12-05 (Matt: "make sure there's a loading state for the long-load pages"): Next waits for the next screen to finish and
   says what it's waiting on, with a spinner and the seconds; a screen still working shows a moving bar */
@keyframes spin { to { transform: rotate(1turn); } }
.foot__btn.busy { display: inline-flex; align-items: center; gap: 8px; }
.foot__btn.busy::before { content: ''; width: 12px; height: 12px; border: 2px solid #fff4; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
#down.busy { font-size: 0; }
.foot__btn .nw { margin-left: .5em; }
.foot__btn.busy .nm + .nw::before { content: '· '; }
.loading { display: grid; gap: 10px; max-width: 30rem; }
.loading i { display: block; height: 4px; background: linear-gradient(90deg, transparent 0%, var(--radio, #d4501c) 50%, transparent 100%) #e6dfcf; background-size: 40% 100%; background-repeat: no-repeat; animation: sweep 1.2s ease-in-out infinite; }
@keyframes sweep { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.helper.slow h3 .st { color: var(--radio, #d4501c); }
.bcell em .tchip { margin-left: 4px; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { .foot__btn.busy::before, .loading i { animation: none; } }
.m-err { font: 13px/1.5 var(--f-mono, monospace); color: var(--radio, #d4501c); border-left: 3px solid currentColor; padding: 4px 10px; margin: 0 0 12px; }
.m-err button { font: inherit; color: var(--ink, #1c1a17); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0; }

/* ---- 12-05: the Workings chrome (Matt: "the first page and the rest of it need to be in the workings Chrome ... ready to
   launch into the blog"). The site's folio rail on the left; on phones it folds into the top line ---- */
.machine .rail { z-index: 8; }
.machine .stage, .machine .m-top, .machine .foot { left: var(--rail, 124px); }
.machine .final { margin: 0 0 0 var(--rail, 124px); }
.final .colophon { padding-inline: 0; margin-top: 48px; }
.m-left { display: flex; align-items: baseline; gap: 14px; }
.m-mark { display: none; font: 900 24px/1 var(--f-display, sans-serif); letter-spacing: .01em; text-decoration: none; }
@media (max-width: 860px) {
  .machine .rail { display: none; }
  .machine .stage, .machine .m-top, .machine .foot { left: 0; }
  .machine .final { margin-left: 0; }
  .m-mark { display: inline; }
}

/* the first screen: a post's opener, the points of Matt's intro, the steps ahead, then the question */
.screen.intro { align-content: start; padding-top: 56px; }
.intro__in { max-width: 880px; gap: 0; padding-bottom: 24px; }
.intro__in .issue-label { margin: 8px 0 14px; }
.m-head { font-size: clamp(48px, 7vw, 104px); max-width: 14ch; margin: 0; }
.m-deck { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.3; margin-top: 16px; max-width: 34ch; }
.intro__in .byline { margin-top: 20px; }
.m-intro { margin: 22px 0 0; padding-left: 1.1em; list-style: disc; font-size: 18px; line-height: 1.5; max-width: 40rem; display: grid; gap: 4px; }
.parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; margin: 30px 0 0; }
.parts li { border-top: 6px solid var(--c); padding-top: 8px; display: grid; gap: 4px; align-content: start; }
.parts b { font: 800 21px/1 var(--f-display, sans-serif); text-transform: uppercase; }
.parts li > span:last-child { font-size: 15px; line-height: 1.35; }
.t-search { --c: var(--modem, #2a55c0); }
.t-embed { --c: var(--solder, #2c7d4f); }
.t-model { --c: var(--radio, #d4501c); }
.t-end { --c: var(--ink, #1c1a17); }
.m-ask { font: 900 clamp(34px, 4vw, 52px)/1 var(--f-display, sans-serif); text-transform: uppercase; margin: 34px 0 12px; }
@media (max-width: 860px) { .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .screen.intro { padding-top: 48px; }
  .m-intro { font-size: 16px; }
  .parts { gap: 10px 12px; margin-top: 22px; }
  .parts b { font-size: 17px; }
  .parts li > span:last-child { font-size: 13px; }
}

/* the footer's boxes take the same colours as the list, so it reads as the list, filling in */
.segs li.done button { background: var(--c, #f3ecdc); }
.segs li.working button { background: linear-gradient(90deg, #57524a 0%, var(--c, #d4501c) 50%, #57524a 100%); background-size: 200% 100%; }
.segs li.end.done button { background: #f3ecdc; }

/* the gift ideas next to the plain search */
.vs { margin: 0; font-size: 17px; line-height: 1.5; max-width: 50rem; border-left: 4px solid var(--modem, #2a55c0); padding: 2px 0 2px 12px; }
.card .plain { font: 10px/1.3 var(--f-mono, monospace); color: var(--modem, #2a55c0); text-transform: uppercase; letter-spacing: .04em; flex-basis: 100%; }
.card .meta { flex-wrap: wrap; }
.machine.done .m-top { margin-left: var(--rail, 124px); }
@media (max-width: 860px) { .machine.done .m-top { margin-left: 0; } }
.screen { grid-template-columns: minmax(0, 1fr); }
.intro__in { grid-template-columns: minmax(0, 1fr); }
.intro .ask { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) {
  .intro .ask form { flex-wrap: wrap; }
  .intro .ask input { flex-basis: 100%; }
  .intro .ask button.primary { flex: 1; min-height: 48px; }
}
/* phones: no Next button, so the footer's words say what it's working on */
.fw-busy { display: none; }
@media (max-width: 700px) {
  .foot__btn.next.busy { display: none; }
  .fw-busy { display: inline; }
  .fw-busy + .fw-left { display: none; }
}
/* the screen's bottom padding doesn't count when it scrolls, so a spacer keeps the last lines clear of the footer */
.screen:not(.intro)::after { content: ''; display: block; height: 24px; }
.screen .viz { min-height: auto; }
.brow > .tchip { justify-self: start; }
.m-start { margin: 34px 0 0; padding-top: 12px; border-top: 1px solid var(--ink, #1c1a17); }
.m-start + .m-ask { margin-top: 6px; }
.m-head { max-width: 22ch; font-size: clamp(44px, 6.4vw, 100px); }
.foot__btn.toideas { border-color: #f3ecdc; color: #f3ecdc; white-space: nowrap; }
.foot__btn.toideas:hover { background: #f3ecdc; color: var(--ink, #1c1a17); }
.foot__btn.toideas[hidden] { display: none; }
@media (max-width: 700px) {
  .foot:has(#skip:not([hidden])) .foot__what { display: none; }
  .foot__btn.toideas { padding: 0 10px; font-size: 11px; margin-left: auto; }
}
.m-fine { margin: 14px 0 0; font: 12px/1.5 var(--f-mono, monospace); color: var(--ink-2, #5e574c); max-width: 46rem; }
.m-fine--end { margin-top: 36px; }

/* ---- 12-05: a saved example run (Matt: "label it clearly at the top of the run ... add a Try again button"; no live prices,
   no buy links) ---- */
.m-saved { position: fixed; top: 40px; left: var(--rail, 124px); right: 0; z-index: 6; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px clamp(16px, 4vw, 48px); background: var(--crust, #b8861a); color: #1c1a17; font: 13px/1.4 var(--f-mono, monospace); }
.m-saved[hidden] { display: none; }
.m-saved button { font: inherit; font-weight: 700; border: 1px solid #1c1a17; background: #f3ecdc; padding: 6px 12px; min-height: 36px; cursor: pointer; }
body.saved .screen:not(.intro) { padding-top: 112px; }
body.saved.done .m-saved { position: static; margin-left: var(--rail, 124px); }
body.saved .price { display: none; }
@media (max-width: 860px) { .m-saved { left: 0; top: 44px; } body.saved.done .m-saved { margin-left: 0; } body.saved .screen:not(.intro) { padding-top: 132px; } }

/* 12-05 phone pass at 390px: the shortcut is short enough to share the footer with the arrows and the boxes, and stays on
   step 7 (no Next button on phones); screens leave room above the footer for their last line */
.sk-short { display: none; }
.foot__btn.toideas.last { display: none; }
@media (max-width: 700px) {
  .sk-full { display: none; } .sk-short { display: inline; }
  .foot__btn.toideas.last:not([hidden]) { display: inline-flex; align-items: center; }
  .foot { gap: 8px; }
}
.screen:not(.intro)::after { height: 56px; }
@media (max-width: 860px) {
  .m-saved { font-size: 12px; padding: 6px 16px; gap: 6px 10px; }
  .m-saved button { min-height: 36px; padding: 4px 10px; }
}
@media (max-width: 860px) { body.saved .screen:not(.intro) { padding-top: 148px; } }
body.saved #vs { display: none; }   /* the comparison means nothing against invented products */

/* ---- 12-05: the start, as a step of its own (Matt: "unceremonial … doesn't really fit the look and feel of the rest of the
   steps"). Same head as a step (tag, count, the big name), the footer's eight boxes filling in as it scrolls into view, a
   caption, then the question; it gets most of a screen to itself ---- */
.screen.intro { gap: 0; }
.m-cue { justify-self: start; margin-top: 28px; font: 12px/1 var(--f-mono, monospace); text-transform: uppercase; letter-spacing: .06em; color: var(--ink, #1c1a17); }
.m-begin { max-width: 880px; min-height: calc(100vh - 80px); min-height: calc(100dvh - 80px); display: grid; align-content: center; gap: 16px;
  margin-top: 56px; padding: 40px 0 48px; border-top: 2px solid var(--ink, #1c1a17); scroll-margin-top: 40px; }
.tech.begin { background: var(--ink, #1c1a17); }
.m-begin .sc__name { font-size: clamp(48px, 8vw, 112px); }
.m-boxes { display: flex; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.m-boxes li { width: clamp(28px, 6vw, 56px); height: 10px; background: var(--c); transform-origin: left; transform: scaleX(0); transition: transform .45s var(--ease, ease); transition-delay: calc(var(--k) * 90ms); }
.m-boxes li.end { width: clamp(44px, 9vw, 84px); background: var(--ink, #1c1a17); }
.m-begin.in .m-boxes li { transform: none; }
.m-begin .sc__head, .m-begin .m-cap, .m-begin .ask { opacity: 0; transform: translateY(24px); transition: opacity .6s ease-out, transform .7s var(--ease, ease); }
.m-begin.in .sc__head, .m-begin.in .m-cap, .m-begin.in .ask { opacity: 1; transform: none; }
.m-begin.in .m-cap { transition-delay: .25s; } .m-begin.in .ask { transition-delay: .4s; }
.m-begin .ask input { font-size: 20px; min-height: 60px; }
@media (max-width: 560px) { .m-begin { margin-top: 40px; padding-top: 28px; } .m-begin .ask input { font-size: 17px; min-height: 52px; } }
@media (prefers-reduced-motion: reduce) { .m-boxes li, .m-begin .sc__head, .m-begin .m-cap, .m-begin .ask { transform: none; opacity: 1; transition: none; } }
/* 12-05 (seen at 720px while filming the teaser): between phone and wide desktop the footer can't hold the boxes, the words,
   the shortcut and Next at full length, so the shortcut goes short and the words step aside while it shows */
@media (max-width: 1100px) {
  .sk-full { display: none; } .sk-short { display: inline; }
  .foot:has(#skip:not([hidden])) .foot__what { display: none; }
}
