/* AILA configurator, round 10. Colours, fonts and motion come from ../brand/brand.css (generated from the
   brand folder). Two lights, one object: Paper (day) and Night.
   The model of the owner's company is the hero of every step; the guide beside it (beneath it on a phone)
   asks one question at a time, value first, with the price in one quiet line beside the one button.
   Type: one display, one heading, one body and one label size per screen class:
     laptop 52 / 30 / 18 / 13 · phone 32 / 22 / 16 / 12 · meeting room (Present) 64 / 36 / 22 / 15.
   Spacing comes from one scale: 4 8 12 16 24 32 48. */

/* ───────────── the two lights ───────────── */
:root, html[data-theme="light"], .tok-light {
  --bg: var(--paper);
  --bg-rgb: var(--paper-rgb);
  --surface: #F8F5EE;
  --surface-2: #EDE8DC;
  --fg: var(--ink);
  --fg-rgb: var(--ink-rgb);
  --muted: var(--graphite);
  --rule: var(--line);
  --rule-strong: #C9C2B2;
  --accent: var(--stamp);
  --accent-rgb: var(--stamp-rgb);
  --ok: var(--verified);
  --move: var(--yourmove);
  --card-shadow: 0 1px 0 rgba(var(--ink-rgb), .03), 0 26px 50px -38px rgba(var(--ink-rgb), .5);
  --label-bg: rgba(var(--paper-rgb), .92);
  color-scheme: light;
  background: var(--bg); color: var(--fg);
}
html[data-theme="dark"], .tok-dark {
  --bg: var(--night);
  --bg-rgb: 14,15,18;
  --surface: #15171B;
  --surface-2: #1B1D22;
  --fg: var(--paper);
  --fg-rgb: var(--paper-rgb);
  --muted: rgba(var(--paper-rgb), .62);
  --rule: rgba(var(--paper-rgb), .12);
  --rule-strong: rgba(var(--paper-rgb), .24);
  --accent: #8F9BE6;
  --accent-rgb: 143,155,230;
  --ok: #5DB88A;
  --move: var(--yourmove);
  --card-shadow: 0 1px 0 rgba(var(--paper-rgb), .04) inset, 0 30px 60px -40px rgba(0, 0, 0, .9);
  --label-bg: rgba(14, 15, 18, .78);
  color-scheme: dark;
  background: var(--bg); color: var(--fg);
}

:root {
  --serif: "AILA Serif", Georgia, "Times New Roman", serif;
  --sans: "AILA Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "AILA Mono", ui-monospace, Menlo, Consolas, monospace;
  --toph: 64px;
  --pad: 48px;
  --gw: clamp(420px, 33vw, 560px);        /* the guide's width */
  --t-display: clamp(40px, min(3.4vw, 6.4vh), 52px);
  --t-head: 30px;
  --t-body: 18px;
  --t-label: 13px;
  --barh: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: var(--sans); font-size: var(--t-body); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.show-body { height: 100vh; height: 100dvh; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: rgba(var(--accent-rgb), .25); }
.mono, .kicker { font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: var(--t-label); color: var(--muted); }
.num { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; }

/* the odometer: each digit on its own drum */
.odo { display: inline-block; white-space: nowrap; height: 1.15em; line-height: 1.15em; overflow: hidden; vertical-align: -0.26em; }
.od-d, .od-c { display: inline-block; height: 1.15em; vertical-align: top; overflow: hidden; }
.od-s { display: block; white-space: pre; line-height: 1.15em; text-align: center; will-change: transform; }
.od-c { white-space: pre; }

/* the mark drawing itself (motion contract: ring_draw, stem_rise, square_pop) */
.mk-ring { stroke: var(--fg); stroke-dasharray: 1; stroke-dashoffset: 1; }
.mk-stem { fill: var(--fg); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.mk-sq { fill: var(--yourmove); transform-box: fill-box; transform-origin: 50% 50%; transform: scale(0); }
.is-drawn .mk-ring { stroke-dashoffset: 0; transition: stroke-dashoffset 650ms var(--ring-draw-ease); }
.is-drawn .mk-stem { transform: scaleY(1); transition: transform 360ms var(--stem-rise-ease) 460ms; }
.is-drawn .mk-sq { transform: scale(1); transition: transform 320ms var(--square-pop-ease) 760ms; }

/* ───────────── the opening: the mark draws, and the light comes on from its red square ───────────── */
.opening {
  position: fixed; inset: 0; z-index: 100; background: var(--night);
  display: grid; place-items: center;
  --r: 0px; --x: 50%; --y: 50%;
  -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), transparent var(--r), #000 calc(var(--r) + 1px));
  mask-image: radial-gradient(circle at var(--x) var(--y), transparent var(--r), #000 calc(var(--r) + 1px));
}
html.no-opening .opening { display: none; }
.opening { animation: op-safety 1ms linear 6s forwards; }   /* the night can never stay down, even if a script fails */
@keyframes op-safety { to { visibility: hidden; pointer-events: none; } }
.opening svg { width: clamp(110px, 12vw, 190px); overflow: visible; }
.opening .mk-ring { stroke: var(--paper); }
.opening .mk-stem { fill: var(--paper); }
.opening.is-lifting { pointer-events: none; }

/* ───────────── header ───────────── */
.top { position: relative; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 0 var(--pad); height: var(--toph); background: var(--bg); border-bottom: 1px solid var(--rule); }
.top .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fg); }
.top .brand svg { width: 34px; height: auto; display: block; }
.top .brand svg circle { stroke: var(--fg); }
.top .brand svg rect { fill: var(--fg); }
.top .brand svg rect.sq { fill: var(--yourmove); }
.top .brand b { font-family: var(--serif); font-weight: 500; font-size: 21px; letter-spacing: .02em; }
.top .spacer { flex: 1; }
.btn-quiet { border: 1px solid var(--rule-strong); background: transparent; border-radius: 999px; padding: 8px 16px; font-family: var(--mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--fg); display: inline-flex; align-items: center; gap: 8px; transition: border-color var(--withdraw-ms), transform 120ms; }
.btn-quiet:hover { border-color: var(--fg); }
.btn-quiet:active { transform: scale(.96); }
#theme i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--fg); background: linear-gradient(90deg, var(--fg) 50%, transparent 50%); }

/* the four questions */
.steps { position: absolute; left: 50%; top: 0; height: 100%; transform: translateX(-50%); display: flex; align-items: center; gap: 32px; }
.steps button { position: relative; height: 100%; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0 2px; color: var(--muted); font-family: var(--mono); font-size: var(--t-label); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: color var(--document-slide-ms) var(--document-slide-ease); }
.steps button:hover { color: var(--fg); }
.steps button i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--rule-strong); display: inline-grid; place-items: center; font-size: var(--t-label); letter-spacing: 0; transition: background var(--document-slide-ms) var(--document-slide-ease), color var(--document-slide-ms), border-color var(--document-slide-ms); }
.steps button i svg { width: 11px; height: 11px; }
.steps button i path { fill: none; stroke: currentColor; stroke-width: 1.8; }
.steps button.is-on { color: var(--fg); }
.steps button.is-on i { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.steps button.is-done { color: var(--fg); }
.steps .bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 10px; background: var(--fg); transform-origin: 0 0; pointer-events: none; opacity: 0; }
.steps .now { display: none; }

/* ───────────── the showroom: the model, and the guide beside it ───────────── */
.show { position: fixed; left: 0; right: 0; top: var(--toph); bottom: 0; }
.stage { position: absolute; inset: 0; overflow: hidden; }
.stage canvas { touch-action: pan-y; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.guide { position: absolute; top: 0; right: 0; bottom: 0; width: var(--gw); z-index: 5; display: flex; flex-direction: column; padding: 40px var(--pad) 32px 0; background: var(--bg); }
.guide::before { content: ""; position: absolute; left: -48px; top: 0; bottom: 0; width: 48px; background: linear-gradient(90deg, rgba(var(--bg-rgb), 0), var(--bg)); pointer-events: none; }
.g-body { flex: 1; min-height: 0; overflow: hidden auto; scrollbar-width: none; position: relative; }
.g-body::-webkit-scrollbar { display: none; }
.g-in { will-change: auto; }
.g-foot { position: relative; flex: none; display: flex; flex-wrap: wrap; align-items: flex-end; align-content: flex-end; justify-content: space-between; gap: 0 24px; padding-top: 24px; border-top: 1px solid var(--fg); margin-top: 16px;
  min-height: calc(28px + var(--t-label) * 4.5 + var(--t-head) * 1.2); }   /* one height in every moment: the rule above it never moves */

/* the step's words */
.g-label { display: block; margin: 0 0 12px; }
.g-title { font-family: var(--serif); font-weight: 400; font-size: var(--t-display); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 12px; }
.g-text { margin: 0 0 24px; color: var(--muted); font-size: var(--t-body); max-width: 34em; }

/* welcome: three facts */
.facts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts b { display: block; font-family: var(--mono); font-weight: 500; font-size: var(--t-label); letter-spacing: .1em; text-transform: uppercase; color: var(--fg); margin-bottom: 2px; }
.facts span { color: var(--muted); }

/* a list of choices with one selection frame that slides (edition, where she thinks) */
.rows { position: relative; border-top: 1px solid var(--rule); }
.row { position: relative; display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 12px 16px; color: var(--fg); z-index: 1; }
.row:hover .r-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.row.is-on:hover .r-name { text-decoration: none; }
.r-h { display: flex; align-items: baseline; gap: 12px; }
.r-name { font-family: var(--serif); font-size: var(--t-head); line-height: 1.15; letter-spacing: -.01em; flex: none; }
.r-work { color: var(--muted); font-size: var(--t-body); flex: 1; min-width: 0; }
.r-price { color: var(--muted); font-size: var(--t-body); white-space: nowrap; }
.row.is-on .r-price { color: var(--fg); }
.r-h, .r-more { display: block; }
.r-h { display: flex; }
.r-more { height: 0; overflow: hidden; }
.row.is-on .r-more { height: auto; }
.r-more-in { display: block; padding-bottom: 4px; visibility: hidden; transition: visibility 0s linear var(--document-slide-ms); }
.row.is-on .r-more-in { visibility: visible; transition-delay: 0s; }
.r-more .p { display: block; margin: 8px 0 0; font-size: var(--t-body); line-height: 1.45; }
.r-more .gives { color: var(--accent); margin-top: 8px; }
.r-more .save { color: var(--ok); margin-top: 8px; }
.r-more .fee { margin-top: 8px; }   /* round 17: hybrid's monthly plan, its own line */
.r-price .w-sh { display: none; }
.row.is-custom .r-name { font-style: italic; }
.row.is-custom .r-price { font-family: var(--sans); }
/* round 20: hybrid in an edition without it: shown, never chosen, as the engineers' counter is in Quarto */
.row.is-off { cursor: default; }
.row.is-off .r-name, .row.is-off .r-price { color: var(--muted); }
.row.is-off:hover .r-name { text-decoration: none; }
.row.is-off .r-more { height: auto; }
.row.is-off .r-more-in { visibility: visible; transition-delay: 0s; }
.r-more .hy-off { color: var(--muted); }
.r-more .hy-up { margin-top: 10px; }
.r-more .hy-up + .fee { margin-top: 2px; color: var(--muted); font-size: var(--t-label); }
.frame { position: absolute; left: 0; top: 0; width: 100%; height: 0; border: 1px solid var(--fg); border-radius: 6px; background: var(--surface); pointer-events: none; z-index: 0; }
.frame::before { content: ""; position: absolute; left: -16px; top: calc(50% - 4px); width: 8px; height: 8px; background: var(--yourmove); }
.frame.is-none { opacity: 0; }

/* team: two counters */
.cnts { border-top: 1px solid var(--rule); }
.cnt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.cnt .c-name { font-size: var(--t-body); font-weight: 500; }
.cnt .c-hint { font-size: var(--t-label); color: var(--muted); }
.cnt .picks { grid-column: 1; display: flex; gap: 8px; margin-top: 8px; }
.g-in.is-tray .picks, .g-in.is-offer .picks { display: none; }
.g-in.is-offer .hwline { display: none; }
.g-in.is-tray .result { min-height: 0; }
.g-in.is-tray .r2, .g-in.is-offer .r2 { display: none; }
.cnt .picks button { border: 1px solid var(--rule-strong); background: transparent; border-radius: 999px; padding: 2px 10px; font-family: var(--mono); font-size: var(--t-label); color: var(--muted); transition: border-color var(--withdraw-ms), color var(--withdraw-ms); }
.cnt .picks button:hover, .cnt .picks button.is-on { border-color: var(--fg); color: var(--fg); }
.cnt .c-off { grid-column: 1 / -1; font-size: var(--t-body); color: var(--muted); }
.cnt .c-off .linkish { margin-left: 8px; }
.stepper { grid-column: 2; grid-row: 1 / span 3; display: inline-flex; align-items: center; border: 1px solid var(--rule-strong); border-radius: 999px; overflow: hidden; flex: none; }
.stepper button { width: 48px; height: 52px; border: 0; background: transparent; font-size: var(--t-body); line-height: 1; display: grid; place-items: center; transition: background var(--withdraw-ms); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.stepper button span { display: block; transition: transform 140ms var(--square-pop-ease); }
.stepper button:hover:not(:disabled) { background: rgba(var(--fg-rgb), .07); }
.stepper button:active:not(:disabled) span { transform: scale(.72); }
.stepper button:disabled { opacity: .28; cursor: default; }
.stepper .val { position: relative; width: 76px; height: 52px; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); display: grid; place-items: center; font-family: var(--serif); font-size: var(--t-head); }
.stepper .val input { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); text-align: center; font-family: var(--serif); font-size: var(--t-head); opacity: 0; }
.stepper .val input:focus { opacity: 1; outline: none; }
.result { padding: 16px 0 0; min-height: 96px; }
.result .r1 { font-size: var(--t-body); font-weight: 500; margin: 0; }
.result .r1.is-all { color: var(--ok); }
.result .r1 .ck { width: .8em; height: .8em; margin-right: .35em; vertical-align: -.05em; }
.result .r2 { margin: 4px 0 0; font-size: var(--t-body); }
.hwline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; font-size: var(--t-label); color: var(--muted); }
.ck { display: inline-block; width: .82em; height: .82em; }
.ck path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: square; }
.linkish { background: none; border: 0; padding: 0; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; cursor: pointer; }

/* the move-up offer, and the hardware by hand: quiet cards in the guide */
.card { position: relative; margin: 16px 0 8px; padding: 16px; border: 1px solid var(--fg); border-radius: 6px; background: var(--surface); }
.card::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; background: var(--yourmove); border-radius: 0 0 6px 0; }
.card p { margin: 0 0 12px; font-size: var(--t-body); }
.card .o-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.card .o-split { margin-top: 8px; font-size: var(--t-label); color: var(--muted); }
.card h3 { margin: 0 0 8px; font-family: var(--mono); font-weight: 500; font-size: var(--t-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tu { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.tu b { font-weight: 500; }
.tu small { display: block; font-size: var(--t-label); color: var(--muted); }
.tu .stepper { grid-row: 1 / span 2; }
.tu .stepper button { width: 40px; height: 40px; }
.tu .stepper .val { width: 56px; height: 40px; font-size: var(--t-body); }
.card .t-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: var(--t-label); color: var(--muted); }

/* yours */
.typed { font-family: var(--serif); font-style: italic; font-size: var(--t-body); line-height: 1.35; margin: 0 0 16px; min-height: 1.35em; }
.typed .caret, .letter .caret { display: inline-block; width: .06em; height: .86em; background: var(--yourmove); margin-left: .08em; vertical-align: -.06em; animation: blink var(--blink-ms) steps(1) infinite; }
.typed.is-done .caret { animation: none; opacity: 0; transition: opacity var(--withdraw-ms); }
@keyframes blink { 50% { opacity: 0; } }
.takes { margin: 0 0 16px; padding: 0; list-style: none; }
.takes li { position: relative; padding: 2px 0 2px 20px; font-size: var(--t-body); }
.takes li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--accent); }
.receipt { border-top: 1px solid var(--rule); }
.receipt .ln { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-body); }
.receipt .ln small { display: block; color: var(--muted); font-size: var(--t-label); margin: 2px 0 0; }
.receipt .ln.t { border-bottom: 0; padding-top: 12px; }
.receipt .ln.rec > .num { white-space: nowrap; }   /* round 21: the monthly fee never breaks, beside how it is built */
.receipt .ln.t b { font-family: var(--serif); font-weight: 400; font-size: var(--t-head); }
.receipt .pay { font-size: var(--t-label); color: var(--muted); margin: 0 0 16px; }
.forwho { display: flex; align-items: center; gap: 16px; }
.forwho label { font-family: var(--mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.forwho input { flex: 1; min-width: 0; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--surface); padding: 10px 14px; font-size: var(--t-body); }
.forwho input:focus { outline: none; border-color: var(--fg); }
.g-after { display: none; flex: 1 1 100%; order: 3; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: var(--t-label); color: var(--muted); }
.g-after a, .g-after button { color: var(--fg); }
.show[data-moment="yours"] .g-after { display: flex; }

/* the price, in one quiet line beside the one button */
.price { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.price .p-label { display: block; white-space: nowrap; }   /* round 19: the label stays on one line (it sits above the button, never beside it) */
.price .p-tot { font-family: var(--serif); font-size: var(--t-head); line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; }
/* round 19: "from" stands with the number on the Edition step before a choice */
.price .p-big { display: flex; align-items: baseline; gap: .28em; white-space: nowrap; min-width: 0; }
.price .p-big > * { flex: none; }
.price .p-from { font-family: var(--serif); font-style: italic; font-size: calc(var(--t-head) * .66); line-height: 1.2; color: var(--muted); }
.price .p-from:empty { display: none; }
.show[data-moment="welcome"] .price .p-big { display: none; }
.price .p-line { font-size: var(--t-label); color: var(--muted); max-width: 26em; }
.price .p-line.is-save { color: var(--ok); }
.show[data-moment="welcome"] .price .p-tot { display: none; }
.show[data-moment="welcome"] .price .p-line { font-size: var(--t-body); color: var(--muted); white-space: normal; }
.show[data-moment="yours"] .price { display: none; }
.show[data-moment="yours"] .btn-next { flex: 1 1 100%; justify-content: space-between; }

/* buttons */
.btn-ink, .btn-line, .btn-next, .btn-small {
  border-radius: 999px; font-family: var(--sans); font-size: var(--t-body); font-weight: 500;
  text-decoration: none; display: inline-flex; gap: 12px; align-items: center; white-space: nowrap; transition: filter var(--withdraw-ms), transform 120ms, background var(--withdraw-ms), border-color var(--withdraw-ms);
}
.btn-ink { background: var(--fg); color: var(--bg); border: 1px solid var(--fg); padding: 12px 20px; }
.btn-line { background: transparent; color: var(--fg); border: 1px solid var(--fg); padding: 12px 20px; }
.btn-small { padding: 8px 16px; font-size: var(--t-body); border: 1px solid var(--fg); background: transparent; color: var(--fg); }
.btn-ink:hover, .btn-line:hover, .btn-next:hover, .btn-small:hover { filter: brightness(1.12); }
.btn-ink:active, .btn-line:active, .btn-next:active, .btn-small:active { transform: scale(.97); }
.btn-next { position: relative; flex: none; background: var(--fg); color: var(--bg); border: 1px solid var(--fg); padding: 16px 24px; }
.btn-next::after { content: ""; position: absolute; right: -6px; bottom: -6px; width: 10px; height: 10px; background: var(--yourmove); }
.btn-next i { font-style: normal; transition: transform var(--withdraw-ms) var(--withdraw-ease); }
.btn-next:hover i { transform: translateX(4px); }
.btn-next span { display: inline-block; }

/* the labels on the model */
/* each label: a dot on what it names, a leader line, and its words in clear space beside it (placed in app.js) */
.lb { position: absolute; left: 0; top: 0; width: 0; height: 0; white-space: nowrap; }
.lb-in { position: absolute; left: 0; top: 0; }
.lb i { position: absolute; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--fg); will-change: transform; }
.lb s { position: absolute; left: 0; top: 0; width: 0; height: 1px; margin-top: -0.5px; background: var(--fg); transform-origin: 0 50%; text-decoration: none; will-change: transform, width; }
.lb-t { position: absolute; left: 0; top: 0; display: block; will-change: transform; }
.lb span { font-family: var(--mono); font-size: var(--t-label); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; background: var(--label-bg); padding: 2px 6px; border-radius: 2px; }
.lb.is-pale span { color: var(--fg); opacity: .78; font-style: normal; }
.lb.is-top .lb-t { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; }
.lb.is-top span { color: var(--accent); background: none; padding: 0; }
.lb.is-top em { font-style: normal; font-size: var(--t-label); color: var(--muted); }
.lb.is-plain i, .lb.is-plain s { display: none; }

/* the stamp: a decision made */
.stampmark { position: absolute; pointer-events: none; z-index: 6; border: 2.5px solid var(--accent); color: var(--accent); border-radius: 3px; padding: 6px 12px 5px; font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-5deg) scale(1.6); opacity: 0; white-space: nowrap; mix-blend-mode: multiply; }
html[data-theme="dark"] .stampmark, .tok-dark .stampmark { mix-blend-mode: normal; }
.stampmark.is-down { animation: stamp-down var(--stamp-ms) cubic-bezier(.3, 1.6, .5, 1) forwards, stamp-settle var(--stamp-settle-ms) ease-out var(--stamp-ms) forwards; }
.stampmark.is-set { opacity: .92; transform: rotate(-5deg); }
@keyframes stamp-down { 0% { transform: rotate(-5deg) scale(1.6); opacity: 0; } 70% { opacity: 1; } 100% { transform: rotate(-5deg) scale(1); opacity: 1; } }
@keyframes stamp-settle { from { opacity: 1; } to { opacity: .9; transform: rotate(-5deg) scale(1); } }

/* ───────────── Manuscript: the letter (unchanged from round 6) ───────────── */
.manu { position: fixed; left: 0; right: 0; top: var(--toph); bottom: 0; z-index: 40; overflow: auto; display: none; clip-path: circle(150% at 50% 50%); }
.manu.is-on { display: block; }
.manu .m-in { max-width: 640px; margin: 0 auto; padding: clamp(24px, 6vh, 72px) 24px 60px; position: relative; }
.manu .back { font-family: var(--mono); font-size: var(--t-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: none; border: 0; padding: 0; }
.manu .back:hover { color: var(--fg); }
.manu .script { display: block; width: min(100%, 470px); height: auto; overflow: visible; margin: 22px 0 10px; }
.manu .script text { font-family: var(--serif); font-style: italic; font-size: 92px; font-weight: 400; fill: currentColor; stroke: currentColor; stroke-width: .9; stroke-dasharray: 340; stroke-dashoffset: 0; letter-spacing: -.5px; }
.manu.is-writing .script tspan { animation: write 1100ms var(--ring-draw-ease) calc(80ms + var(--k) * 70ms) both; }
@keyframes write { 0% { stroke-dashoffset: 340; fill-opacity: 0; } 70% { stroke-dashoffset: 0; fill-opacity: 0; } 100% { stroke-dashoffset: 0; fill-opacity: 1; } }
.letter p { font-family: var(--serif); font-size: clamp(20px, 2vw, 25px); line-height: 1.42; margin: 0 0 14px; min-height: 1.42em; }
.slip { position: relative; margin-top: 30px; padding: 24px 24px 22px; border: 1px solid var(--fg); border-radius: 4px; background: var(--surface); }
.slip::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; background: var(--yourmove); }
.slip h3 { font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; color: var(--accent); }
.slip label { display: block; margin-bottom: 14px; }
.slip label span { display: block; font-size: var(--t-label); color: var(--muted); margin-bottom: 2px; }
.slip input, .slip textarea { width: 100%; border: 0; border-bottom: 1px solid var(--rule-strong); background: transparent; padding: 5px 0 6px; font-family: var(--serif); font-size: 19px; resize: none; }
.slip input:focus, .slip textarea:focus { outline: none; border-bottom-color: var(--fg); }
.slip .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.slip .s-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.slip .addr { font-size: 14px; color: var(--muted); }
.slip .addr b { color: var(--fg); font-weight: 500; }
.slip .stampmark { right: 22px; top: 18px; }
/* Manuscript keeps round 6's buttons exactly: mono, upper case, ink on paper */
.manu .btn-ink { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; padding: 12px 20px; gap: 10px; }

/* ───────────── the quotation, on its paper ground ───────────── */
.qlayer { position: fixed; inset: 0; z-index: 70; background: #E9E4D8; color: var(--ink); overflow: auto; display: none; }
.qlayer.is-on { display: block; }
.qlayer .q-tools { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px clamp(16px, 3vw, 40px); background: #E9E4D8; }
.qlayer .q-tools .spacer { flex: 1; }
.qlayer .q-tools .btn-line, .qlayer .q-tools .btn-ink { font-size: 16px; padding: 10px 18px; }
.q-tools .sh { display: none; }
.qlayer:focus { outline: none; }
.qlayer .q-tools .btn-ink { position: relative; }
.qlayer .q-tools .btn-ink::after { content: ""; position: absolute; right: -5px; bottom: -5px; width: 9px; height: 9px; background: var(--yourmove); }
.q-wrap { display: flex; justify-content: center; align-items: flex-start; gap: 32px; padding: 0 24px 60px; }
.qlayer .doc { margin: 10px 0 0; }
.q-fly { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; font-family: var(--serif); white-space: nowrap; transform-origin: 0 0; color: var(--ink); }

.toast { position: fixed; left: 50%; top: calc(var(--toph) + 14px); z-index: 90; transform: translate(-50%, -12px); opacity: 0; background: var(--fg); color: var(--bg); border-radius: 999px; padding: 11px 18px; font-size: 16px; pointer-events: none; transition: opacity var(--withdraw-ms), transform var(--document-slide-ms) var(--document-slide-ease); display: flex; gap: 14px; align-items: center; white-space: nowrap; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .6); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.warn { background: var(--yourmove); color: #fff; padding: 10px 20px; font-size: 14px; display: none; position: relative; z-index: 95; }
.warn.is-on { display: block; }

/* the change of light: the page's own circle (view transition); the model is drawn in the new light inside it */
.th-ov { position: fixed; inset: 0; z-index: 36; pointer-events: none; background: transparent !important; will-change: clip-path; }
.th-ov .top { position: absolute; left: 0; right: 0; top: 0; }
.th-ov .stage { display: none; }
html.th-swap *, html.th-swap *::before, html.th-swap *::after { transition: none !important; }

/* ───────────── a short laptop screen ───────────── */
@media (max-height: 820px) and (min-width: 761px) {
  :root { --t-display: 40px; --gw: clamp(420px, 41vw, 560px); }
  .cnt .picks { display: none; }
  .guide { padding-top: 24px; padding-bottom: 24px; }
  .g-label { margin-bottom: 8px; }
  .g-title { margin-bottom: 8px; }
  .g-text { margin-bottom: 12px; }
  .row { padding: 6px 16px; }
  .r-more .p { margin-top: 4px; }
  .g-foot { padding-top: 16px; margin-top: 12px; }
  .g-in.is-tray .g-text, .g-in.is-tray .result { display: none; }
  .cnt { padding: 12px 0; }
  .result { min-height: 80px; }
  .facts li { padding: 8px 0; }
}
@media (max-width: 1280px) and (min-width: 761px) {
  :root { --pad: 32px; --gw: clamp(400px, 38vw, 520px); }
  .steps { gap: 20px; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .steps button span { display: none; }
  .steps button.is-on span { display: inline; }
}

/* ───────────── present: the meeting-room screen (Night, larger type) ───────────── */
html.present { --toph: 76px; --t-display: clamp(52px, min(3.4vw, 6.6vh), 64px); --t-head: 36px; --t-body: 22px; --t-label: 15px; --gw: clamp(560px, 36vw, 720px); --pad: 56px; }
html.present .steps button i { width: 28px; height: 28px; font-size: 14px; }
html.present .stepper button { height: 60px; width: 56px; }
html.present .stepper .val { height: 60px; width: 92px; }
html.present .btn-next { padding: 20px 30px; }

/* ───────────── phone: the tower above, the guide beneath, a pinned bar for the price and the button ─────────────
   Designed for the phone, not squeezed: every step fits the lower third the tower leaves it, with no scrolling.
   Edition and Where become one segmented choice with the chosen one's words beneath; the two counters stand side
   by side; Yours keeps her line, the payment and the name. The bar holds the price and the one button. */
.ph-more, .ph-manu { display: none; }
@media (max-width: 760px) and (orientation: portrait) {
  :root { --toph: 52px; --pad: 16px; --t-display: 32px; --t-head: 22px; --t-body: 16px; --t-label: 12px; --barh: calc(68px + env(safe-area-inset-bottom)); }
  .top { gap: 8px; padding: 0 12px; }
  .top .brand b { display: none; }
  .top .brand svg { width: 28px; }
  .steps { gap: 6px; }
  .steps button { gap: 0; padding: 0; }
  .steps button span { display: none; }
  .steps button i { width: 22px; height: 22px; font-size: var(--t-label); }
  .steps .now { display: inline; margin-left: 6px; font-family: var(--mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
  .btn-quiet { padding: 6px 12px; }
  #present { display: none; }
  .guide { left: 0; right: 0; top: auto; width: auto; height: var(--panelh, 300px); padding: 0; border-top: 1px solid var(--rule); }
  .guide::before { display: none; }
  .g-body { padding: 10px 16px 4px; overflow: hidden; }
  .g-head { position: static; margin: 0; padding: 0; }
  .g-label { display: none; }
  .g-title { font-size: var(--t-head); line-height: 1.2; margin: 0 0 8px; }
  .show[data-moment="welcome"] .g-title { font-size: var(--t-display); margin-bottom: 6px; }
  .g-text { display: none; }
  .show[data-moment="welcome"] .g-text { display: block; margin: 0 0 10px; }

  /* welcome: the three facts as three short lines */
  .facts { border: 0; }
  .facts li { padding: 2px 0; border: 0; }
  .facts li span { display: none; }
  .facts b { margin: 0; color: var(--fg); }
  .facts b::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--accent); margin-right: 8px; vertical-align: 1px; }

  /* edition and where: one segmented choice; the frame slides sideways */
  .rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 6px; }
  .rows.is-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { border: 0; padding: 6px 4px; text-align: center; }
  .row + .row { border-left: 1px solid var(--rule); }
  .row.is-custom { display: none; }
  .row:hover .r-name { text-decoration: none; }
  .r-h { flex-direction: column; align-items: center; gap: 2px; }
  .r-name { font-size: var(--t-head); }
  .rows.is-mode .r-name { font-family: var(--sans); font-weight: 500; font-size: var(--t-body); line-height: 1.4; }
  .r-work, .r-more { display: none; }
  .r-price { font-size: var(--t-label); }
  .frame { border-radius: 6px; margin: -1px; }
  .frame::before { display: none; }
  .ph-more { display: block; margin-top: 8px; }
  .ph-more .mono { display: block; margin-bottom: 2px; }
  .ph-more .gives { display: block; color: var(--accent); }
  .ph-more .p { display: block; }
  .ph-more .save { display: block; color: var(--ok); margin-top: 2px; }
.ph-more .fee { display: block; margin-top: 2px; }
  .rows.is-mode .row.is-off .r-name { color: var(--muted); }
  .row.is-off .r-price { display: none; }
  .ph-more .hy-off { display: block; }
  .ph-more .hy-up { display: block; margin-top: 4px; }
  .ph-more .hy-up + .fee { color: var(--muted); }
  .ph-manu { display: inline-block; margin-top: 6px; font-size: var(--t-label); color: var(--muted); }

  /* team: the two counters side by side */
  .cnts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border: 0; }
  .cnt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; border: 0; }
  .cnt .c-name { font-family: var(--mono); font-weight: 500; font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .cnt .c-hint, .cnt .picks { display: none; }
  .stepper { grid-row: auto; }
  .stepper button { width: 40px; height: 40px; }
  .stepper .val { width: 62px; height: 40px; }
  .cnt.is-off .c-name { display: block; }
  .cnt.is-off .c-off { font-size: var(--t-label); line-height: 1.4; }
  .cnt.is-off .c-off .linkish { display: block; margin: 4px 0 0; font-size: var(--t-body); }
  .result { min-height: 0; padding-top: 10px; }
  .result .r2, .hwline { display: none; }
  .g-in.is-offer .result, .g-in.is-offer .cnt.is-off { display: none; }   /* the offer speaks for the engineers too */
  .card { margin: 8px 0 0; padding: 0; border: 0; border-radius: 0; background: none; }
  .card::after { display: none; }
  .card p { margin: 0 0 4px; }
  .card .o-row { gap: 16px; flex-wrap: nowrap; }
  .card .o-split { display: none; }
  .card .btn-small { padding: 6px 14px; }

  /* yours: her line, the payment, and the name; the total is in the bar */
  .typed { margin-bottom: 8px; }
  .takes { display: none; }
  .receipt { border: 0; }
  .receipt .ln { display: none; }
  .receipt .ln.rec { display: flex; padding: 0 0 10px; border: 0; font-size: var(--t-label); }   /* round 17: hybrid each month stays on the phone */
  .r-price .w-lg { display: none; }
  .r-price .w-sh { display: inline; }
  .receipt .pay { margin: 0 0 10px; }
  .forwho { margin-top: 0; }
  .forwho input { padding: 8px 12px; }
  .g-after { display: none !important; }

  /* the pinned bar */
  .g-foot { position: relative; height: var(--barh); min-height: 0; flex-wrap: nowrap; gap: 12px; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--fg); align-items: center; background: var(--bg); }
  .price .p-label { display: none; }
  .price .p-tot { font-size: var(--t-head); }
  .show[data-moment="yours"] .price { display: flex; }
  .show[data-moment="yours"] .btn-next { flex: none; }
  .show[data-moment="welcome"] .price .p-line { font-size: var(--t-label); max-width: 14em; }
  .btn-next { padding: 14px 20px; }

  /* the labels on the model, as on a laptop, at the phone's label size */
  .lb span { padding: 1px 5px; }

  .manu .script text { font-size: 76px; }
  .letter p { font-size: 19px; }
  .slip .two { grid-template-columns: 1fr; gap: 0; }
  .toast { white-space: normal; width: calc(100vw - 32px); border-radius: 12px; }
  .q-wrap { padding: 0 0 40px; flex-direction: column; align-items: center; }
  .qlayer .q-tools { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; }
  .qlayer .q-tools .btn-line, .qlayer .q-tools .btn-ink { font-size: 14px; padding: 8px 12px; }
  .q-tools .lg { display: none; } .q-tools .sh { display: inline; }
}
@media (max-width: 760px) and (orientation: portrait) and (max-height: 830px) {
  .r-price { display: none; }
  .show[data-moment="welcome"] .g-text { display: none; }
  .row { padding: 8px 4px; }
  .g-in.is-offer .cnt .c-name { display: none; }
  .g-in.is-offer .stepper button { height: 36px; }
  .g-in.is-offer .stepper .val { height: 36px; }
  .card .btn-small { padding: 4px 12px; }
}

/* ───────────── reduced motion: every movement becomes a short fade ───────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .toast { transition: opacity var(--reduced-ms) linear !important; }
  .mk-ring { stroke-dashoffset: 0 !important; } .mk-stem, .mk-sq { transform: none !important; }
  .stampmark.is-down { animation: none !important; opacity: .92; transform: rotate(-5deg); }
  .opening { display: none !important; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
html[data-motion="off"] .stampmark.is-down { opacity: .92; transform: rotate(-5deg); }
html[data-motion="off"] .opening { display: none !important; }

/* printing from the configurator prints the quotation only */
@media print {
  body.show-body { height: auto; overflow: visible; }
  body > *:not(.qlayer) { display: none !important; }
  .qlayer { position: static !important; display: block !important; inset: auto !important; width: auto !important; height: auto !important; overflow: visible !important; background: #fff !important; }
  .qlayer .q-tools, .q-next { display: none !important; }
  .q-wrap { display: block; padding: 0; }
}

/* round 18: before an edition is chosen, Next waits (it says what to do, and a click puts the focus on the rows) */
.btn-next.is-wait { opacity: .42; cursor: default; }
.btn-next.is-wait:hover { filter: none; }
.btn-next.is-wait:hover i { transform: none; }
.steps button:disabled { opacity: .45; cursor: default; }
.steps button:disabled:hover { color: var(--muted); }
.receipt .pay.rest { color: var(--fg); }
.q-short { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--yourmove, #D9462B); font-size: 0.95em; }
