/* Roast My Ad (LOCAL BUILD 2026-11-19, not live): /roast (the game, and the sections under it) and the share page
   /roast/<id>. The site's own system (DESIGN.md: DM Serif Display over Libre Franklin, Courier for small print, stock and
   paper grounds, 1px keylines) under the ruling of 19 Nov late (the Codex project's prepared/DESIGN-DIRECTION-2026-11-19.md):
   one canvas, one flat framed object per screen, no box inside a box, no shadow, no gradient, lines and space instead of
   boxes, few words. The game's colour is EMBER: the burnt family, var(--burnt-dark) for its bands (cream on it is 5.78:1),
   a lighter ember (#e08a5c, 6.88:1) for marks on charcoal. Cream is the calm ground, charcoal the authority, ember the heat.
   Phone first. Only roast-* classes are defined here; site components (.btn, .brand-lockup, .vh) are used as they are. */

/* ---- the canvas ------------------------------------------------------------------------------------------------------- */
.roast-body { background: var(--cream); }
.roast-skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--cream); font-weight: 700; font-size: 14px; text-decoration: none; }
.roast-skip:focus { top: 12px; }
.roast-top { max-width: 1180px; margin: 0 auto; padding: 16px 20px 0; display: flex; align-items: center; }
.roast-top > a { min-height: 44px; }   /* a thumb-sized target on phones; the lockup is 28px high on its own */
.roast-col { max-width: 760px; margin: 0 auto; }
#main h1, #main h2, #main h3, #main p, #main li, #main blockquote, #main span, #main summary, #main dd { overflow-wrap: break-word; }

/* ---- the top: one centred column ---------------------------------------------------------------------------------------- */
.roast-hero { padding: 40px 20px 72px; text-align: center; }
.roast-eyebrow { margin: 0 0 16px; font-weight: 800; font-size: 12px; line-height: 1.5; letter-spacing: 0.18em; text-transform: uppercase; color: var(--burnt-dark); }
.roast-h1 { margin: 0 auto 18px; max-width: 12em; font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 10.5vw, 72px); line-height: 1.02; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
.roast-sub { margin: 0 auto; max-width: 620px; font-size: clamp(18px, 4.6vw, 21px); line-height: 1.5; color: var(--ink-body); text-wrap: pretty; }
.roast-stage { margin-top: 40px; text-align: left; }

/* the box: the one framed object here. Rows inside it are split by hairlines, never boxed. */
.roast-box { background: var(--paper); border: 1px solid var(--keyline); border-radius: var(--r-panel); padding: 16px 16px 14px; transition: border-color 150ms cubic-bezier(.22, 1, .36, 1); }
.roast-box:focus-within { border-color: var(--ink); }
.roast-form.is-drop .roast-box { border: 1px dashed var(--burnt-dark); background: var(--burnt-tint); }
.roast-types { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.roast-type { position: relative; display: inline-flex; }
.roast-type input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.roast-type span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--keyline); border-radius: var(--r-pill);
  font-weight: 600; font-size: 13.5px; color: var(--ink-body); transition: background-color 150ms, color 150ms, border-color 150ms; }
.roast-type input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.roast-type input:focus-visible + span { outline: 2px solid var(--petrol); outline-offset: 3px; }
.roast-read { padding: 14px 0 0; }
.roast-read-h { margin: 0 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.15; color: var(--ink); }
.roast-read-h:focus { outline: none; }
.roast-read-hint { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-body); }
.roast-text { display: block; width: 100%; height: 210px; min-height: 120px; margin: 0; padding: 16px 2px; border: 0; background: transparent;
  font-family: var(--font-ui); font-size: 18px; line-height: 1.55; color: var(--ink); resize: vertical; }
.roast-text::placeholder { color: var(--ink-dim); }
/* the card's own line turns to ink while the box has focus: that is the focus ring, so no ring is drawn inside it */
.roast-text:focus-visible { outline: none; }
.roast-box-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.roast-box-left { display: flex; align-items: center; gap: 4px 14px; min-width: 0; }
.roast-box-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.roast-drop { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 14.5px; color: var(--ink-body); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.roast-drop:hover { color: var(--burnt-dark); }
.roast-file:focus-visible + .roast-drop, .roast-drop:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }
/* the count only speaks up near the end */
.roast-count { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); visibility: hidden; }
.roast-count.is-near, .roast-count.is-over { visibility: visible; }
.roast-count.is-over { color: var(--burnt-dark); font-weight: 700; }

/* the heat: three radio buttons, drawn as one, two and three chillies (the card decks' mark) */
.roast-heat { display: flex; align-items: center; gap: 10px; }
.roast-heat-opts { display: inline-flex; gap: 4px; }
.roast-heat-opt { position: relative; display: inline-flex; }
.roast-heat-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.roast-heat-opt .roast-heat-pips { min-height: 44px; min-width: 44px; padding: 0 10px; justify-content: center; border: 1px solid var(--keyline); border-radius: var(--r-pill); color: var(--ink-dim);
  transition: background-color 150ms, color 150ms, border-color 150ms; }
.roast-heat-opt input:checked + .roast-heat-pips { background: var(--ink); border-color: var(--ink); color: #e08a5c; }
.roast-heat-opt input:focus-visible + .roast-heat-pips { outline: 2px solid var(--petrol); outline-offset: 3px; }
.roast-heat-pips { display: inline-flex; align-items: center; gap: 1px; }
.roast-chili { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.roast-heat-name { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); min-width: 4.5em; }
.roast-go { min-height: 52px; padding: 0 28px; font-size: 15px; }
.roast-go[disabled], .roast-gate-go[disabled] { background: var(--disabled-bg); color: var(--disabled-fg); cursor: default; }

/* under the box: one small line, where the visitor stands, and anything that went wrong. Text, never boxes. */
.roast-note { margin: 14px 0 0; text-align: center; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--ink-dim); }
.roast-left { margin: 10px 0 0; text-align: center; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--ink-dim); }
.roast-left.is-none { font-family: var(--font-ui); font-size: 15.5px; font-weight: 600; color: var(--ink); }
.roast-error { margin: 12px 0 0; text-align: center; font-size: 15px; line-height: 1.5; font-weight: 600; color: var(--burnt-on-tint); }
.roast-input { display: block; width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--r-pill); background: var(--paper); font-family: var(--font-ui); font-size: 16px; color: var(--ink); }
.roast-input:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }

/* ---- 2. the roasting ------------------------------------------------------------------------------------------------- */
.roast-wait { min-height: 240px; display: flex; align-items: center; justify-content: center; text-align: center; border-top: 1px solid var(--keyline); border-bottom: 1px solid var(--keyline); }
.roast-wait-line { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 6vw, 34px); line-height: 1.15; color: var(--ink); }

/* ---- 3. the result: on the canvas, in the column, parts split by space and rules -------------------------------------- */
.roast-result { min-width: 0; }
.roast-result:focus { outline: none; }
.roast-scorerow { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.roast-score { margin: 0; display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); color: var(--ink); line-height: 0.86; }
.roast-score-n { font-size: clamp(96px, 28vw, 140px); letter-spacing: -0.03em; }
.roast-score-of { font-size: clamp(26px, 8vw, 38px); color: var(--ink-dim); }
.roast-bandbox { min-width: 0; }
.roast-band { display: inline-block; padding: 8px 15px; border-radius: var(--r-pill); background: var(--ink); color: var(--cream); font-weight: 800; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.roast-band-line { margin: 10px auto 0; font-size: 16px; line-height: 1.5; color: var(--ink-body); max-width: 30em; }
.roast-scale { display: flex; gap: 4px; margin: 22px 0 4px; }
.roast-scale span { height: 8px; border-radius: 4px; background: var(--keyline); transition: background-color .4s cubic-bezier(.22, 1, .36, 1); }
.roast-scale span.is-on { background: var(--burnt-dark); }
/* the names under the scale need room: on a phone the band is already named in the pill above */
.roast-scale-names { display: none; gap: 4px; }
.roast-scale-names span { font-size: 10px; line-height: 1.3; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roast-scale-names span.is-on { color: var(--ink); }
.roast-note-line { margin: 14px 0 0; text-align: center; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--ink-dim); }

.roast-h { margin: 36px 0 12px; padding-top: 14px; border-top: 1px solid var(--keyline); font-weight: 800; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.roast-roast { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 5.8vw, 31px); line-height: 1.24; color: var(--ink); }

.roast-loss { padding: 14px 0; }
.roast-loss + .roast-loss { border-top: 1px solid var(--hairline); }
.roast-loss-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); }
.roast-pts { flex-shrink: 0; display: inline-block; min-width: 46px; text-align: center; padding: 3px 9px; border-radius: 8px; background: var(--burnt-tint); color: var(--burnt-on-tint); font-family: var(--font-display); font-size: 19px; line-height: 1.2; }
.roast-pts--zero { background: var(--petrol-tint); color: var(--petrol-dark); }
.roast-pts--dim { background: var(--hairline); color: var(--ink-dim); }
.roast-quote { margin: 12px 0 8px; padding: 2px 6px; border-radius: 4px; background: var(--highlight); color: var(--ink); font-size: 16px; line-height: 1.55; font-weight: 600;
  display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; quotes: "\201C" "\201D"; }
.roast-quote::before { content: open-quote; }
.roast-quote::after { content: close-quote; }
.roast-why { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-body); }
.roast-locked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 14px 0; border-top: 1px solid var(--hairline); color: var(--ink-dim); font-weight: 600; font-size: 15.5px; }
.roast-locked-name { display: inline-flex; align-items: center; gap: 10px; }
.roast-lock { font-family: var(--font-mono); font-size: 13px; font-weight: 400; }
.roast-cardlock { margin: 14px 0 0; text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); }

/* ---- 4. the email gates: a heading, a line, a field and a pill. No frame. ----------------------------------------------- */
.roast-gate { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--ink); text-align: center; }
.roast-gate--second { margin-top: 28px; }
.roast-gate-h { margin: 0 auto 10px; max-width: 16em; font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 6.4vw, 36px); line-height: 1.1; color: var(--ink); text-wrap: balance; }
.roast-gate-line { margin: 0 auto 18px; max-width: 34em; font-size: 16.5px; line-height: 1.55; color: var(--ink-body); }
.roast-gate-row { display: flex; flex-direction: column; gap: 10px; max-width: 520px; margin: 0 auto; }
.roast-gate-go { min-height: 52px; }
.roast-gate-fine { margin: 12px auto 0; max-width: 40em; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-dim); }
.roast-gate .roast-error { margin-top: 10px; }
.roast-ok { margin: 14px 0 0; font-weight: 600; font-size: 15.5px; line-height: 1.5; color: var(--petrol-dark); }

/* ---- 5. the full breakdown: rows and rules ----------------------------------------------------------------------------- */
.roast-working .roast-quote { background: var(--petrol-tint); }
.roast-empty { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-dim); }
.roast-checks { margin: 0; padding: 0; list-style: none; }
.roast-group { margin: 22px 0 2px; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--ink); }
.roast-check { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.roast-check-name { margin: 0; font-weight: 700; font-size: 15.5px; color: var(--ink); }
.roast-check-q { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-dim); }
.roast-check-side { display: flex; align-items: center; gap: 8px; align-self: start; }
.roast-level { font-weight: 800; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.roast-level--loss { color: var(--burnt-on-tint); }
.roast-check-more { grid-column: 1 / -1; }
.roast-check-more .roast-quote { font-size: 15px; }
.roast-check-more .roast-why { font-size: 14.5px; }
.roast-saw-label { margin: 12px 0 4px; font-weight: 800; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.roast-heat-mark { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; letter-spacing: 0.14em; color: var(--ink); }
.roast-heat-mark .roast-heat-pips { color: var(--burnt-dark); }

/* ---- 6. the Copy Machine, as an offer: one charcoal panel, cream words, the burnt pill (the result has no frame of its own,
   so this is not a box inside a box) ------------------------------------------------------------------------------------- */
.roast-fix { margin-top: 40px; padding: 28px 22px 30px; border-radius: var(--r-panel); background: var(--ink); color: var(--cream); }
.roast-fix-h { margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 6.4vw, 36px); line-height: 1.08; color: var(--cream); text-wrap: balance; max-width: 20em; }
.roast-fix-body { margin: 0 0 18px; font-size: 16.5px; line-height: 1.6; color: var(--cream-dim); max-width: 42em; }
.roast-fix .roast-quote { margin: 0 0 14px; display: inline-block; }
.roast-fix-points { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; max-width: 42em; }
.roast-fix-points li { position: relative; padding-left: 28px; font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--cream); }
.roast-fix-points li::before { content: ""; position: absolute; left: 3px; top: .42em; width: 12px; height: 6px; border-left: 2.5px solid #e08a5c; border-bottom: 2.5px solid #e08a5c; transform: rotate(-45deg); }
.roast-fix-go { min-height: 52px; display: inline-flex; align-items: center; gap: 10px; padding: 0 26px; font-size: 15px; }
.roast-fix-go::after { content: "\2192"; font-size: 17px; line-height: 1; transition: transform 150ms cubic-bezier(.22, 1, .36, 1); }
.roast-fix-go:hover::after { transform: translateX(3px); }
.roast-fix-guarantee { margin: 18px 0 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--cream-dim); max-width: 46em; }
#main .roast-fix a:focus-visible, #main .roast-fix button:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.roast-out { margin-top: 28px; }

/* ---- 7. the score card: the card itself is the object; the rest is text and pills under it ----------------------------- */
.roast-share { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--keyline); }
.roast-share-h { margin: 0 0 14px; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.12; color: var(--ink); }
.roast-canvas { display: block; width: 100%; height: auto; border-radius: var(--r-tint); background: var(--ink); }
.roast-switch { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; min-height: 44px; font-size: 15.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.roast-switch input { width: 20px; height: 20px; margin: 0; accent-color: var(--petrol); }
.roast-post { margin: 12px 0 0; padding-left: 12px; border-left: 2px solid var(--keyline); font-size: 15.5px; line-height: 1.55; color: var(--ink-body); }
.roast-share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.roast-share-row .btn { min-height: 46px; white-space: normal; text-align: center; }
.roast-share-sub { margin: 18px 0 0; font-weight: 800; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.roast-share-note { margin: 10px 0 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-dim); }
.roast-next { margin: 22px auto 0; max-width: 34em; text-align: center; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--ink-dim); }
.roast-again { display: block; margin: 36px auto 0; }

/* ---- the result owns the page (assets/roast.js owning()): while a score is on screen the sections under the game are gone and
   the box is folded away. "Roast another" brings them back. ---------------------------------------------------------------- */
.roast-showing .roast-land, .roast-showing .roast-skill { display: none; }
.roast-showing .roast-hero { padding-bottom: 56px; }
.roast-result { scroll-margin-top: 12px; }
/* a quiet text link at the top of the result; the filled one at the bottom stays */
.roast-topbar { display: flex; justify-content: flex-end; margin: -4px 0 6px; }
.roast-again-top, .roast-jump { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 14.5px; color: var(--ink-body); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.roast-again-top:hover, .roast-jump:hover { color: var(--burnt-dark); }
.roast-jump { margin-top: 2px; }
.roast-share-h:focus { outline: none; }
/* every check, closed: one row split by rules, like the questions under the game */
.roast-checks-d { margin-top: 40px; border-top: 1px solid var(--keyline); border-bottom: 1px solid var(--keyline); }
.roast-checks-sum { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; list-style: none; cursor: pointer; min-height: 44px; padding: 16px 40px 16px 0;
  font-family: var(--font-display); font-size: 22px; line-height: 1.25; color: var(--ink); }
.roast-checks-sum::-webkit-details-marker { display: none; }
.roast-checks-sum::after { content: "+"; position: absolute; right: 4px; top: 10px; font-family: var(--font-ui); font-weight: 400; font-size: 28px; line-height: 1.2; color: var(--burnt-dark); }
.roast-checks-d[open] .roast-checks-sum::after { content: "\2212"; }
.roast-checks-sum:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }
.roast-checks-lost { font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); }
.roast-checks-note { margin: 0 0 4px; }
.roast-checks-d[open] .roast-checks { padding-bottom: 8px; }

/* ---- the free skill (only once it is published), the footer ----------------------------------------------------------- */
.roast-skill { padding: 72px 20px; border-top: 1px solid var(--keyline); text-align: center; }
.roast-skill-h { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 6vw, 40px); line-height: 1.1; color: var(--ink); }
.roast-skill-line { margin: 0 auto 20px; font-size: 17px; line-height: 1.6; color: var(--ink-body); max-width: 36em; }
.roast-foot { max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; line-height: 1.55; color: var(--ink-dim); }
.roast-foot span { flex: 1 1 100%; max-width: 62em; }
.roast-foot a { display: inline-block; margin: -10px 0; padding: 12px 0; color: var(--ink-dim); }

/* ---- the share page ------------------------------------------------------------------------------------------------- */
.roast-main { max-width: 760px; margin: 0 auto; padding: 0 20px 56px; }
.roast-shared { display: grid; gap: 28px; padding-top: 24px; }
.roast-sharecard { background: var(--ink); color: var(--cream); border-radius: var(--r-panel); padding: 24px 22px 22px; min-width: 0; }
.roast-sharecard-brand { margin: 0 0 16px; font-weight: 800; font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-dim); }
.roast-sharecard-heat { margin: -8px 0 16px; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream); }
.roast-sharecard-heat-label { color: var(--cream-dim); }
.roast-sharecard-heat .roast-heat-pips { color: #e08a5c; }
.roast-sharecard-score { margin: 0; display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); line-height: 0.86; }
.roast-sharecard-n { font-size: clamp(96px, 30vw, 150px); letter-spacing: -0.03em; color: var(--cream); }
.roast-sharecard-of { font-size: clamp(28px, 8vw, 40px); color: var(--cream-dim); }
.roast-sharecard-band { display: inline-block; margin: 16px 0 0; padding: 8px 15px; border-radius: var(--r-pill); background: var(--cream); color: var(--ink); font-weight: 800; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.roast-sharecard-line { margin: 18px 0 0; font-family: var(--font-display); font-size: clamp(24px, 6.4vw, 34px); line-height: 1.16; color: var(--cream); }
.roast-sharecard-foot { margin: 22px 0 0; padding-top: 12px; border-top: 1px solid #4a433b; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream-dim); }
.roast-shared-note { margin: -8px 0 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-dim); }
.roast-own { text-align: center; padding: 8px 0 0; min-width: 0; }
.roast-own-h1 { margin: 0 auto 12px; max-width: 14em; font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 7.6vw, 48px); line-height: 1.05; color: var(--ink); text-wrap: balance; }
.roast-own-line { margin: 0 auto 22px; max-width: 34em; font-size: 17px; line-height: 1.55; color: var(--ink-body); }

#main a:focus-visible, #main button:focus-visible, .roast-top a:focus-visible, .roast-foot a:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }

/* ---- the sections under the game ---------------------------------------------------------------------------------------
   Bands take turns: cream, a slightly deeper stock, one charcoal band, one ember band. Each: a small ember tag, a big serif
   heading, one line under it, then the thing itself. Columns only where a row of them is the point. */
.roast-sec { padding: 72px 20px; background: var(--cream); color: var(--ink); text-align: center; }
.roast-sec--stock { background: var(--stock); }
.roast-sec--ink { background: var(--ink); color: var(--cream); }
.roast-sec--ember { background: var(--burnt-dark); color: var(--cream); }
.roast-sec-in { max-width: 1080px; margin: 0 auto; }
.roast-sec-tag { margin: 0 0 16px; font-weight: 800; font-size: 12px; line-height: 1.5; letter-spacing: 0.18em; text-transform: uppercase; color: var(--burnt-dark); }
.roast-sec--ink .roast-sec-tag { color: #e08a5c; }
.roast-sec--ember .roast-sec-tag { color: var(--cream); }
.roast-sec-h { margin: 0 auto 18px; max-width: 15em; font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 8.4vw, 58px); line-height: 1.04; letter-spacing: -0.01em; color: inherit; text-wrap: balance; }
.roast-sec-line { margin: 0 auto; max-width: 620px; font-size: clamp(18px, 4.4vw, 21px); line-height: 1.5; color: var(--ink-body); text-wrap: pretty; }
.roast-sec--ink .roast-sec-line { color: var(--cream-dim); }
.roast-sec--ember .roast-sec-line { color: var(--cream); }
.roast-sec-small { margin: 40px auto 0; max-width: 620px; font-size: 15px; line-height: 1.6; color: var(--ink-dim); }
.roast-sec--ink .roast-sec-small { color: var(--cream-dim); }

/* what comes back: small tabs, then ONE example result, flat */
.roast-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 40px 0 18px; }
.roast-tab { min-height: 44px; padding: 0 16px; border: 1px solid var(--keyline); border-radius: var(--r-pill); background: transparent; cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--ink-body); transition: background-color 150ms, color 150ms, border-color 150ms; }
.roast-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.roast-exes { display: grid; gap: 18px; justify-items: center; margin-top: 40px; }
.roast-tabs + .roast-exes { margin-top: 0; }
.roast-ex { width: 100%; max-width: 620px; margin: 0; padding: 22px 20px 20px; text-align: left; background: var(--paper); border: 1px solid var(--keyline); border-radius: var(--r-panel); }
.roast-ex[hidden] { display: none; }
.roast-ex-k { display: block; margin: 0 0 4px; font-family: var(--font-ui); font-weight: 800; font-size: 10.5px; line-height: 1.5; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.roast-ex-pasted { margin: 0; padding-bottom: 16px; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; color: var(--ink-body); }
.roast-ex-score { margin: 0; padding-top: 16px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 14px; }
.roast-ex-n { font-family: var(--font-display); font-size: 72px; line-height: .86; letter-spacing: -0.03em; color: var(--ink); }
.roast-ex-of { align-self: flex-end; margin-left: -10px; font-family: var(--font-display); font-size: 22px; color: var(--ink-dim); }
.roast-ex-roast { margin: 16px 0 0; font-family: var(--font-display); font-size: clamp(21px, 5vw, 24px); line-height: 1.28; color: var(--ink); }
.roast-ex-loss { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.roast-ex-lossrow { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15.5px; color: var(--ink); }
.roast-ex-loss .roast-quote { margin: 0; }

/* who is roasting you: the five groups as columns on charcoal. Space and a thin rule; no boxes. */
.roast-who { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; text-align: left; }
.roast-who-col { padding-top: 18px; border-top: 1px solid #4a433b; }
.roast-who-n { display: block; font-family: var(--font-display); font-size: 56px; line-height: 1; color: #e08a5c; }
.roast-who-h { margin: 10px 0 6px; font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--cream); }
.roast-who-line { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--cream-dim); }

/* the rules: three plain columns with a small ember number */
.roast-rules { list-style: none; margin: 48px auto 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 980px; }
.roast-rule-n { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1; color: var(--burnt-dark); }
.roast-rule-h { margin: 10px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1.15; color: var(--ink); }
.roast-rule-line { margin: 0 auto; max-width: 22em; font-size: 17px; line-height: 1.55; color: var(--ink-body); }

/* Phones (Andrej, 19 Nov: the stacked groups ran into a long dark wall): each group and each rule is one compact row,
   the number on the left, the words beside it. From the wide layout up they are columns again. */
.roast-who-col { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 14px; align-items: baseline; padding: 16px 0 18px; }
.roast-who { gap: 0; }
.roast-who-n { grid-row: span 2; font-size: 40px; }
.roast-who-h { margin: 0 0 4px; }
.roast-rule { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; text-align: left; }
.roast-rule-n { grid-row: span 2; font-size: 24px; padding-top: 3px; }
.roast-rule-h { margin: 0 0 6px; font-size: 23px; }
.roast-rule-line { margin: 0; max-width: none; }
.roast-rules { gap: 24px; max-width: 560px; }

/* the questions: rows split by thin rules */
.roast-qs { max-width: 760px; margin: 40px auto 0; text-align: left; border-top: 1px solid var(--keyline); }
.roast-q { border-bottom: 1px solid var(--keyline); }
.roast-q summary { position: relative; list-style: none; cursor: pointer; min-height: 44px; padding: 20px 44px 20px 0; font-family: var(--font-display); font-size: 22px; line-height: 1.25; color: var(--ink); }
.roast-q summary::-webkit-details-marker { display: none; }
.roast-q summary::after { content: "+"; position: absolute; right: 6px; top: 15px; font-family: var(--font-ui); font-weight: 400; font-size: 28px; line-height: 1.2; color: var(--burnt-dark); }
.roast-q[open] summary::after { content: "\2212"; }
.roast-q summary:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }
.roast-q p { margin: 0 0 22px; font-size: 17px; line-height: 1.6; color: var(--ink-body); max-width: 40em; }

/* the close, on ember: a paper pill back to the box, a quiet link to the Copy Machine */
.roast-sec-cta { margin: 36px 0 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.roast-pill-paper { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px; border-radius: var(--r-pill); background: var(--paper); color: var(--ink); font-weight: 700; font-size: 15.5px; text-decoration: none; }
.roast-pill-paper:hover { background: #fff; color: var(--ink); }
.roast-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: 15.5px; color: var(--cream); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.roast-arrow { display: inline-block; transition: transform 150ms cubic-bezier(.22, 1, .36, 1); }
.roast-link:hover .roast-arrow { transform: translateX(3px); }
/* #main a:focus-visible (above) has an id in it, so these carry the id too, or the petrol ring wins on charcoal and ember */
#main .roast-sec--ember a:focus-visible, #main .roast-sec--ink a:focus-visible, #main .roast-sec--ember button:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
/* the site's a:hover turns a link burnt: on the ember band that is almost the band's own colour, so the text stays cream */
.roast-link:hover, .roast-skip:hover { color: var(--cream); }

/* a quiet arrival as a band scrolls in. Only once the page script says it can watch for it, so with no script, an old
   browser or a visitor who asked for less motion, everything is simply there. */
.roast-arrives [data-roast-arrive] .roast-sec-in { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1); }
.roast-arrives [data-roast-arrive].is-in .roast-sec-in { opacity: 1; transform: none; }
@media print { .roast-arrives [data-roast-arrive] .roast-sec-in { opacity: 1; transform: none; } }

/* the result arrives in beats: the parts rise in turn, the band stamps on, the score counts up (assets/roast.js) */
@keyframes roast-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes roast-stamp { 0% { opacity: 0; transform: scale(1.4); } 70% { opacity: 1; transform: scale(.97); } 100% { opacity: 1; transform: none; } }
.roast-sheet.is-arriving > * { animation: roast-rise .5s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.roast-sheet.is-arriving .roast-band { animation: roast-stamp .45s cubic-bezier(.22, 1, .36, 1) .75s both; }
.btn, .roast-type span, .roast-heat-opt .roast-heat-pips { transition: background-color 150ms cubic-bezier(.22, 1, .36, 1), color 150ms, border-color 150ms; }
.roast-tabs + .roast-exes .roast-ex.is-in { animation: roast-rise .35s cubic-bezier(.22, 1, .36, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .roast-body *, .roast-type span { transition: none; animation: none; }
  .roast-arrives [data-roast-arrive] .roast-sec-in { opacity: 1; transform: none; transition: none; }
  .roast-sheet.is-arriving > *, .roast-sheet.is-arriving .roast-band, .roast-tabs + .roast-exes .roast-ex.is-in { animation: none; }
  .roast-fix-go::after, .roast-arrow { transition: none; }
}

/* ---- wider screens ------------------------------------------------------------------------------------------------------- */
@media (max-width: 559px) {
  .roast-hero { padding-top: 28px; }
  .roast-stage { margin-top: 28px; }
  .roast-text { height: 150px; min-height: 120px; padding: 12px 2px; font-size: 17px; }
  .roast-types { gap: 5px; padding-bottom: 10px; }
  .roast-type span { min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px; font-size: 13px; }
  /* wraps, so the longer "Looks right. Roast it." button (after an image is read) drops under the heat picker instead of running off the card */
  .roast-box-right { width: 100%; margin-left: 0; justify-content: space-between; flex-wrap: wrap; }
  .roast-go { flex: 1 1 auto; white-space: nowrap; }
  .roast-heat-name { display: none; }
}
@media (min-width: 640px) {
  .roast-top { padding: 22px 32px 0; }
  .roast-hero { padding: 64px 32px 120px; }
  .roast-box { padding: 20px 22px 16px; }
  .roast-sec { padding: 120px 32px; }
  .roast-ex { padding: 28px 30px 26px; }
  .roast-fix { padding: 34px 34px 36px; }
  .roast-gate-row { flex-direction: row; }
  .roast-gate-row .roast-input { flex: 1 1 240px; }
  .roast-scale-names { display: flex; }
  .roast-rules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; max-width: 980px; }
  .roast-rule { display: block; text-align: center; }
  .roast-rule-n { font-size: 28px; padding-top: 0; }
  .roast-rule-h { margin: 10px 0 6px; font-size: 25px; }
  .roast-rule-line { margin: 0 auto; max-width: 22em; }
  .roast-who { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px 32px; }
  .roast-who-col { display: block; padding: 18px 0 0; grid-column: span 2; }
  .roast-who-n { font-size: 56px; }
  .roast-who-h { margin: 10px 0 6px; }
  .roast-who-col:nth-child(4) { grid-column: 2 / span 2; }
  .roast-foot { padding: 24px 32px 48px; }
}
@media (min-width: 1100px) {
  .roast-who { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .roast-who-col, .roast-who-col:nth-child(4) { grid-column: auto; }
}
