/* PAUSE · "night counter" design system
   One deliberate dark world: a boutique counter after hours. Warm oud-black ground,
   blotter-paper text, champagne accent that becomes the colour of the fragrance you keep. */

:root {
  color-scheme: dark;
  --ground: #0E0B09;
  --lacquer: #18130F;
  --lacquer-2: #221B15;
  --seam: #3A3027;
  --blotter: #F3EEE5;
  --text-2: #D6CEC2;
  --ash: #A99F90;
  --ash-2: #7E7568;
  --paper: #EFE8DC;
  --ink: #17110B;
  --ink-2: #4B4238;
  --champagne: #D9B77E;
  --accent: var(--champagne);
  --accent-ink: #1A130B;
  --accent-on-paper: #8A5A1C;
  --alert: #F2917A;

  --f-display: 'Bodoni Moda', 'Amiri', Didot, 'Bodoni 72', 'Times New Roman', serif;
  --f-ui: 'Jost', 'IBM Plex Sans Arabic', Futura, 'Century Gothic', 'Avenir Next', 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --f-sign: 'Mrs Saint Delafield', 'Aref Ruqaa', 'Snell Roundhand', 'Segoe Script', cursive;

  --gutter: clamp(16px, 5.5vw, 44px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --bar-h: 68px;
  --overlap: 56px;
  --stage-h: min(60vh, 600px);
  --stage-study: 46vh;
  --stage-compact: 25vh;
}
:root:lang(ar) {
  --f-display: 'Amiri', 'Bodoni Moda', 'Times New Roman', serif;
  --f-ui: 'IBM Plex Sans Arabic', 'Jost', 'Segoe UI', Tahoma, sans-serif;
}
@supports (height: 1svh) {
  :root { --stage-h: min(60svh, 600px); --stage-study: 46svh; --stage-compact: 25svh; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--blotter);
  font: 400 16px/1.55 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.in-study { overflow: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.mono { font-family: var(--f-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 3px; }
.skip:focus { top: 12px; }
/* English visitors on an Arabic-first page: hide the first paint until app.js swaps the text
   (it reveals itself after 1.5s regardless, in case scripts fail). */
.i18n-pending body { opacity: 0; animation: reveal 0s 1.5s forwards; }
@keyframes reveal { to { opacity: 1; } }

/* ── Mark ─────────────────────────────────────────── */
.mark { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--blotter); }
.mark-glyph { width: 19px; height: 23px; color: var(--accent); flex: none; transition: color .6s; }
.mark-word { font: 500 13px/1 'Jost', Futura, sans-serif; letter-spacing: .46em; margin-right: -.46em; }

/* ── Shell: hero on the landing page, full-screen app during the study ── */
.shell { position: relative; display: flex; flex-direction: column; }

.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; gap: 12px;
  min-height: var(--bar-h);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--gutter) 12px;
}
.bar::before {
  content: ''; position: absolute; inset: 0 0 -28px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--ground) 0%, rgba(14, 11, 9, .7) 55%, rgba(14, 11, 9, 0));
}
.bar-meta { margin: 0; margin-inline-start: auto; font: 400 10.5px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ash); text-align: end; }
.lang-btn {
  flex: none; height: 40px; min-width: 44px; padding: 0 13px; border: 0; border-radius: 20px; cursor: pointer;
  background: rgba(24, 19, 15, .72); box-shadow: inset 0 0 0 1px var(--seam); color: var(--blotter);
  font: 500 11.5px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .1em;
}
.lang-btn:hover { box-shadow: inset 0 0 0 1px var(--ash-2); }
.lang-btn:lang(ar) { font: 500 14px/1 'IBM Plex Sans Arabic', Tahoma, sans-serif; letter-spacing: 0; }
.bar-btn {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(24, 19, 15, .72); box-shadow: inset 0 0 0 1px var(--seam);
  color: var(--blotter); font: 300 20px/1 var(--f-ui);
}
.bar-btn:hover { box-shadow: inset 0 0 0 1px var(--ash-2); }
.progress { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.progress-count { unicode-bidi: isolate; font: 500 11px/1 var(--f-mono); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.progress-track { display: flex; align-items: center; gap: 3px; height: 18px; }
.progress-track i { display: block; width: 3px; height: 12px; border-radius: 1px; background: var(--seam); transition: background-color .3s, height .3s; }
.progress-track i.done { background: var(--accent); }
.progress-track i.now { background: var(--blotter); height: 18px; }

/* ── Stage: the lit vitrine ───────────────────────── */
.stage {
  position: relative; flex: none; height: var(--stage-h); overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% 38%, rgba(150, 108, 62, .30), transparent 70%),
    radial-gradient(120% 90% at 50% 20%, #1d1611 0%, var(--ground) 72%);
  transition: height .55s var(--ease);
}
.stage canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 1.1s var(--ease);
  touch-action: pan-y; cursor: grab;
}
.stage.gl-ready canvas { opacity: 1; }
.stage::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; pointer-events: none; z-index: 2;
  background: linear-gradient(to bottom, rgba(14, 11, 9, 0), var(--ground) 88%);
}
.stage-fallback {
  position: absolute; inset: 0; direction: ltr; display: flex; align-items: flex-end; justify-content: center; gap: 7%;
  padding-bottom: calc(var(--overlap) + 9%); transition: opacity .8s var(--ease);
}
.stage.gl-ready .stage-fallback { opacity: 0; pointer-events: none; }
.fb { width: 24%; max-width: 132px; overflow: visible; transition: transform .6s var(--ease), opacity .6s; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .55)); }
.fb[data-state="picked"] { transform: translateY(-9%) scale(1.05); }
.fb[data-state="dim"] { opacity: .32; transform: scale(.93); }
.fb-glass { fill: var(--glass); fill-opacity: .16; stroke: var(--glass); stroke-opacity: .55; stroke-width: 1.2; }
.fb-liquid { fill: var(--liq); }
.fb-cap { fill: var(--cap); stroke: rgba(255, 255, 255, .18); stroke-width: 1; }
.fb-collar { fill: var(--collar); }
.fb-shine { fill: #fff; fill-opacity: .28; }

.frame { position: absolute; inset-inline: var(--gutter); top: calc(env(safe-area-inset-top, 0px) + var(--bar-h) + 4px); bottom: calc(var(--overlap) + 14px); pointer-events: none; z-index: 3; }
.crop { position: absolute; width: 16px; height: 16px; border: 0 solid rgba(243, 238, 229, .5); }
.crop.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.crop.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.crop.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.crop.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.stage-caption, .stage-hint {
  position: absolute; bottom: 8px; margin: 0; max-width: calc(100% - 48px);
  font: 400 10px/1.3 var(--f-mono); letter-spacing: .13em; text-transform: uppercase; color: var(--ash);
}
.stage-caption { inset-inline-start: 24px; }
.stage-hint { top: 8px; bottom: auto; inset-inline-end: 24px; text-align: end; max-width: 60%; color: var(--ash-2); }

/* ── Panel ────────────────────────────────────────── */
.panel { position: relative; z-index: 4; margin-top: calc(var(--overlap) * -1); padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); }
.panel-inner { max-width: 540px; }

.eyebrow { margin: 0 0 14px; font: 500 10.5px/1.35 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
.display {
  margin: 0 0 18px; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(44px, 12.4vw, 84px); line-height: .98; letter-spacing: -.022em; text-wrap: balance;
}
.display em { font-style: italic; color: var(--accent); }
.lede { margin: 0 0 26px; max-width: 36ch; font-size: 17px; line-height: 1.55; color: var(--text-2); }

.cta {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  width: 100%; max-width: 440px; min-height: 58px; padding: 0 22px;
  border-radius: 3px; background: var(--accent); color: var(--accent-ink);
  font: 500 15px/1.2 var(--f-ui); letter-spacing: .05em;
  transition: transform .2s var(--ease), background-color .5s, color .3s, box-shadow .3s;
}
.cta:active { transform: scale(.985); }
.cta .arrow { font-size: 18px; transition: transform .3s var(--ease); }
.cta:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .cta .arrow, [dir="rtl"] .flip { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .cta:hover .arrow { transform: translateX(-4px) scaleX(-1); }
.cta[aria-disabled="true"] { background: var(--lacquer-2); color: var(--ash); box-shadow: inset 0 0 0 1px var(--seam); }
.cta.ghost { background: transparent; color: var(--blotter); box-shadow: inset 0 0 0 1px var(--seam); }
.cta.busy { opacity: .75; pointer-events: none; }

.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 0; padding: 0; font: 400 10.5px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ash); }
.facts strong { font-weight: 500; color: var(--blotter); }

.hero-copy > * { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; }
.hero-copy > :nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: .35; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Study mode ───────────────────────────────────── */
body.in-study .shell { position: fixed; inset: 0; z-index: 30; height: 100%; background: var(--ground); }
body.in-study .brief, body.in-study .foot { display: none; }
body.in-study .stage { height: var(--stage-study); }
body.in-study { --overlap: 34px; }
body.in-study .panel { scrollbar-width: thin; scrollbar-color: var(--seam) transparent; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-top: 4px; }
body.in-study .mark-word { display: none; }
.shell[data-stage="compact"] .stage { height: var(--stage-compact); }
.shell[data-stage="compact"] .frame, .shell[data-stage="compact"] .stage-hint { display: none; }

.step-title { margin: 0 0 18px; font: 400 clamp(29px, 8.2vw, 42px)/1.05 var(--f-display); letter-spacing: -.016em; text-wrap: balance; outline: none; }
.step-title em { font-style: italic; color: var(--accent); }
.step-title + .step-body { margin-top: -8px; }
.step-body { margin: 0 0 22px; max-width: 42ch; font-size: 16px; color: var(--text-2); }
.step-body em { font-style: normal; color: var(--blotter); font-weight: 500; }

/* Blotter strips: answers shaped like perfume test strips; the chosen one gets dipped. */
.strips { display: grid; gap: 10px; }
.strip {
  --tip: 22px;
  position: relative; isolation: isolate; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px;
  width: 100%; min-height: 58px; padding-block: 12px; padding-inline: 14px calc(var(--tip) + 30px);
  border: 0; cursor: pointer; text-align: start; color: var(--blotter); background: var(--seam);
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%);
  transition: transform .18s var(--ease), color .25s;
}
.strip::before {
  content: ''; position: absolute; inset: 1px; z-index: -2; background: var(--lacquer);
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%);
  transition: background-color .25s;
}
.strip::after {
  content: ''; position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 0; z-index: -1;
  background: linear-gradient(to right, rgba(0, 0, 0, 0), var(--accent) 45%);
  transition: width .55s var(--ease);
}
[dir="rtl"] .strip, [dir="rtl"] .strip::before { clip-path: polygon(var(--tip) 0, 100% 0, 100% 100%, var(--tip) 100%, 0 50%); }
[dir="rtl"] .strip::after { background: linear-gradient(to left, rgba(0, 0, 0, 0), var(--accent) 45%); }
.strip:hover::before { background: var(--lacquer-2); }
.strip:active { transform: scale(.992); }
.strip[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.strip[aria-pressed="true"]::before { background: var(--paper); }
.strip[aria-pressed="true"]::after { width: 34%; }
.strip-key { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--seam); font: 500 10.5px/1 var(--f-mono); color: var(--ash); }
.strip[aria-pressed="true"] .strip-key { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(23, 17, 11, .35); }
.strip-label { display: block; font: 400 17px/1.25 var(--f-ui); }
.strip-hint { display: block; margin-top: 3px; font: 400 12.5px/1.35 var(--f-ui); color: var(--ash); }
.strip[aria-pressed="true"] .strip-hint { color: var(--ink-2); }

/* Tester cards: hang tags with a punched hole, one per bottle. */
.testers { direction: ltr; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.tester {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 188px; padding: 32px 14px 16px; border: 0; border-radius: 4px; cursor: pointer; text-align: start;
  background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--seam);
  -webkit-mask: radial-gradient(circle at 50% 14px, transparent 4.5px, #000 5px);
  mask: radial-gradient(circle at 50% 14px, transparent 4.5px, #000 5px);
  transition: box-shadow .25s, background-color .25s, transform .3s var(--ease);
}
[dir="rtl"] .tester { direction: rtl; }
.tester:hover { box-shadow: inset 0 0 0 1px var(--ash-2); }
.tester[aria-pressed="true"] { background: var(--lacquer-2); box-shadow: inset 0 0 0 1.5px var(--accent); transform: translateY(-4px); }
.tester-side { position: absolute; top: 9px; inset-inline-start: 12px; font: 500 9.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ash-2); }
.tester-badge {
  position: absolute; top: 7px; inset-inline-end: 8px; padding: 4px 6px; border-radius: 2px;
  font: 500 9px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink); opacity: 0; transform: translateY(-3px); transition: opacity .25s, transform .25s;
}
.tester[aria-pressed="true"] .tester-badge { opacity: 1; transform: none; }
.tester-house { margin-top: 4px; font: 500 10.5px/1.3 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }
.tester-name { margin: 3px 0 8px; font: italic 400 23px/1.06 var(--f-display); color: var(--blotter); text-wrap: balance; }
.tester-latin { margin: -4px 0 8px; font: 400 9.5px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ash-2); unicode-bidi: isolate; }
.tester-meta { font-size: 12.5px; line-height: 1.35; color: var(--text-2); }
.tester-notes { margin-top: auto; padding-top: 10px; font: 400 10.5px/1.5 var(--f-mono); color: var(--ash); }

.scale { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.scale button { height: 58px; border: 0; border-radius: 3px; cursor: pointer; background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--seam); font: 400 23px/1 var(--f-display); font-variant-numeric: lining-nums; transition: background-color .2s, color .2s; }
.scale button:hover { box-shadow: inset 0 0 0 1px var(--ash-2); }
.scale button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.scale-ends { display: flex; justify-content: space-between; margin-top: 10px; font: 400 10.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }

.duel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.duel-btn {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 22px;
  min-height: 132px; padding: 16px 14px; border: 0; border-radius: 4px; cursor: pointer; text-align: start;
  background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--seam); transition: box-shadow .2s, background-color .2s;
}
.duel-btn:hover { box-shadow: inset 0 0 0 1px var(--ash-2); }
.duel-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: none; }
.duel-verb { font: 500 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }
.duel-btn[aria-pressed="true"] .duel-verb { color: var(--ink-2); }
.duel-name { font: italic 400 23px/1.08 var(--f-display); text-wrap: balance; }

/* ── Sign step ────────────────────────────────────── */
.summary { list-style: none; display: grid; gap: 9px; margin: 0 0 26px; padding: 0; }
.summary li { position: relative; padding-inline-start: 24px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.summary li::before { content: ''; position: absolute; inset-inline-start: 3px; top: .5em; width: 7px; height: 11px; border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }

.field { display: grid; gap: 8px; margin: 0 0 20px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 500 14px/1.25 var(--f-ui); }
.req, .opt { font: 500 9.5px/1 var(--f-mono); letter-spacing: .13em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.opt { color: var(--ash-2); }
.input {
  width: 100%; height: 56px; padding: 0 16px; border-radius: 3px; outline: none;
  background: var(--lacquer); border: 1px solid var(--seam); color: var(--blotter);
  font: 400 17px/1 var(--f-ui); transition: border-color .2s;
}
.input::placeholder { color: var(--ash-2); }
.input:focus { border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--alert); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ash) 50%), linear-gradient(135deg, var(--ash) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 40px; }
[dir="rtl"] select.input { background-position: 15px 50%, 20px 50%; }
.phone { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.cc { position: relative; }
.cc select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; z-index: 1; }
.cc-view {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 56px; padding: 0 12px 0 14px;
  border-radius: 3px; background: var(--lacquer); border: 1px solid var(--seam); pointer-events: none;
  font: 400 15px/1 var(--f-mono);
}
.cc-view small { font-size: 10px; letter-spacing: .08em; color: var(--ash); }
.cc select:focus-visible + .cc-view { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { margin: 0; font: 400 11.5px/1.45 var(--f-mono); letter-spacing: .02em; color: var(--ash); }
.hint.ok { color: var(--blotter); }
.err { margin: 0; font: 400 13.5px/1.45 var(--f-ui); color: var(--alert); }

.consents { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; border: 0; }
.check {
  position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 14px; border-radius: 3px; cursor: pointer;
  background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--seam);
  font-size: 14px; line-height: 1.45; color: var(--text-2); transition: box-shadow .2s;
}
.check input { position: absolute; inset-inline-start: 14px; top: 14px; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.check-box { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; border: 1.5px solid var(--ash-2); transition: background-color .15s, border-color .15s; }
.check-box::after { content: ''; width: 11px; height: 6px; margin-top: -3px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) scale(0); transition: transform .18s var(--ease); }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 3px; }
.check a { color: var(--blotter); }
.check[data-invalid="true"] { box-shadow: inset 0 0 0 1px var(--alert); }
.check .req, .check .opt { margin-inline-start: 6px; }

.sig-pad { position: relative; display: flex; align-items: flex-end; height: 86px; margin-top: 6px; padding: 0 0 8px; padding-inline-start: 28px; overflow: hidden; border-bottom: 1px solid rgba(243, 238, 229, .55); }
.sig-x { position: absolute; inset-inline-start: 4px; bottom: 10px; font: 300 20px/1 var(--f-ui); color: var(--ash); }
.sig-ink { display: block; white-space: nowrap; font: 400 50px/1 var(--f-sign); color: var(--blotter); transform: rotate(-3deg); transform-origin: left bottom; }
[dir="rtl"] .sig-ink { transform: rotate(3deg); transform-origin: right bottom; }
.sig-ink:empty::before { content: attr(data-empty); font: 400 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ash-2); }
.seal { margin: 8px 0 0; font: 400 10.5px/1.55 var(--f-mono); color: var(--ash); overflow-wrap: anywhere; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.demo-note { margin: 14px 0 0; font: 400 11px/1.5 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ash); }

/* ── Result ───────────────────────────────────────── */
.readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 22px; border-top: 1px solid var(--seam); border-inline-start: 1px solid var(--seam); }
.readout > div { padding: 14px 14px 16px; border-inline-end: 1px solid var(--seam); border-bottom: 1px solid var(--seam); }
.readout dt { margin: 0 0 8px; font: 500 9.5px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }
.readout dd { margin: 0; font: 400 34px/1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; }
.readout dd small { margin-left: 2px; font: 400 14px/1 var(--f-ui); color: var(--ash); }
.profile { margin: 0 0 22px; }
.profile .eyebrow { margin-bottom: 6px; color: var(--ash); }
.profile h3 { margin: 0 0 8px; font: italic 400 32px/1.08 var(--f-display); color: var(--accent); }
.profile p { margin: 0; max-width: 42ch; color: var(--text-2); }
.note { margin: 16px 0 0; max-width: 44ch; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.note strong { color: var(--blotter); font-weight: 500; }
.link-btn { margin-top: 10px; padding: 10px 0; border: 0; background: none; cursor: pointer; color: var(--ash); font: 400 14px/1 var(--f-ui); text-decoration: underline; text-underline-offset: 4px; }

/* ── Brief (landing sections) ─────────────────────── */
.brief { display: grid; gap: clamp(80px, 14vw, 128px); max-width: 1160px; margin: 0 auto; padding: clamp(72px, 12vw, 120px) var(--gutter) 24px; }
.sec { display: grid; gap: 22px; }
.sec-label { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ash); }
.sec-label::before { content: ''; width: 7px; height: 12px; border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.sec-title { margin: 0; max-width: 16ch; font: 400 clamp(34px, 8.8vw, 62px)/1.03 var(--f-display); letter-spacing: -.02em; text-wrap: balance; }
.sec-title em { font-style: italic; color: var(--accent); }
.sec-body { margin: 0; max-width: 60ch; font-size: 17px; line-height: 1.65; color: var(--text-2); }

.tags { list-style: none; display: grid; gap: 12px; margin: 10px 0 0; padding: 0; }
.tag {
  padding: 36px 22px 24px; border-radius: 4px; background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--seam);
  -webkit-mask: radial-gradient(circle at 50% 16px, transparent 5px, #000 5.5px);
  mask: radial-gradient(circle at 50% 16px, transparent 5px, #000 5.5px);
}
.tag-id { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; color: var(--accent); }
.tag h3 { margin: 12px 0 8px; font: 400 24px/1.18 var(--f-display); text-wrap: balance; }
.tag p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ash); }

/* The duels on the counter: house, name, family, with the bottle's colour as a thin swatch. */
.duel-list { display: grid; gap: 12px; margin-top: 10px; }
.duel-card { padding: 22px 20px 22px; border-radius: 4px; background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--seam); }
.duel-counter { margin: 0 0 18px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ash); }
.duel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 14px; }
.duel-side { display: grid; gap: 4px; justify-items: start; }
.duel-side:last-child { justify-items: end; text-align: end; }
.duel-swatch { width: 26px; height: 3px; margin-bottom: 10px; border-radius: 2px; background: var(--sw); }
.duel-house { font: 500 10.5px/1.3 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ash); }
.duel-title { font: italic 400 23px/1.08 var(--f-display); color: var(--blotter); text-wrap: balance; }
.duel-family { margin-top: 2px; font-size: 12.5px; color: var(--ash); }
.duel-vs { align-self: center; margin-top: 10px; font: italic 400 18px/1 var(--f-display); color: var(--accent); }
:lang(ar) .duel-title { font-style: normal; font-size: 24px; line-height: 1.3; }
:lang(ar) .duel-vs { font-style: normal; font-size: 20px; }
:lang(ar) .duel-counter, :lang(ar) .duel-house { font-family: var(--f-ui); font-size: 12.5px; }

.tester::after {
  content: ''; position: absolute; inset-inline: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--liq, transparent); opacity: .85;
}

.steps { list-style: none; display: grid; gap: 26px; margin: 10px 0 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; }
.steps li::before { content: counter(step); grid-row: span 2; font: italic 400 46px/.9 var(--f-display); color: var(--accent); }
.steps h3 { margin: 4px 0 6px; font: 500 17px/1.3 var(--f-ui); }
.steps p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ash); }

.controls { display: grid; margin: 10px 0 0; }
.controls > div { display: grid; gap: 6px; padding: 18px 0; border-top: 1px solid var(--seam); }
.controls > div:last-child { border-bottom: 1px solid var(--seam); }
.controls dt { font: 500 11.5px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.controls dd { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.6; color: var(--text-2); }

.promise { padding: clamp(36px, 7vw, 72px) clamp(22px, 5vw, 64px); border-radius: 6px; background: var(--paper); color: var(--ink); }
.promise .sec-label { color: var(--ink-2); }
.promise .sec-label::before { border-color: var(--accent-on-paper); }
.promise .sec-title em { color: var(--accent-on-paper); }
.promise-grid { display: grid; gap: 22px; margin-top: 10px; }
.promise-grid h3 { margin: 0 0 6px; font: 500 16px/1.3 var(--f-ui); }
.promise-grid p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.promise-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 8px 0 0; font: 500 14px/1.4 var(--f-ui); }
.promise-links a { color: var(--ink); }

.merchants { display: grid; gap: 18px; }
.merchants .sec-title { font-size: clamp(28px, 6.6vw, 44px); max-width: 20ch; }
.merchants .cta { max-width: 360px; }

.foot { display: grid; gap: 14px; max-width: 1160px; margin: 0 auto; padding: 72px var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px)); font-size: 13.5px; color: var(--ash); }
.foot p { margin: 0; max-width: 70ch; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--blotter); }
.foot .fine { font-size: 12px; line-height: 1.55; color: var(--ash-2); }

/* ── Sheets (legal documents, leave confirmation) ─── */
dialog.sheet {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  background: var(--ground); color: var(--blotter);
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .38s var(--ease); }
dialog.sheet::backdrop { background: rgba(8, 6, 5, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) 14px; border-bottom: 1px solid var(--seam); }
.sheet-head h2 { flex: 1; margin: 0; font: 400 22px/1.2 var(--f-display); }
.sheet-body { flex: 1; overflow-y: auto; padding: 8px var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px)); }
.doc h2 { margin: 30px 0 8px; font: 400 21px/1.25 var(--f-display); }
.doc h3 { margin: 18px 0 6px; font: 500 11px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }
.doc p, .doc li { max-width: 68ch; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.doc ul { padding-inline-start: 20px; }
.doc strong { color: var(--blotter); font-weight: 500; }
.doc-lede { margin-top: 18px; font-size: 16.5px !important; color: var(--blotter) !important; }
.doc-meta { margin-top: 32px; font: 400 10.5px/1.6 var(--f-mono) !important; color: var(--ash) !important; overflow-wrap: anywhere; }
dialog.sheet-small { height: auto; max-width: 420px; margin: auto; padding: 28px 24px 24px; border-radius: 6px; box-shadow: 0 0 0 1px var(--seam); }
dialog.sheet-small[open] { display: block; }
dialog.sheet-small h2 { margin: 0 0 8px; font: 400 28px/1.1 var(--f-display); }
dialog.sheet-small p { margin: 0 0 22px; color: var(--text-2); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-actions .cta { min-height: 52px; justify-content: center; }

/* ── Wider screens ────────────────────────────────── */
@media (min-width: 720px) {
  .tags { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .duel-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
  .steps li { grid-template-columns: 1fr; }
  .steps li::before { grid-row: auto; margin-bottom: 14px; }
  .promise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 44px; }
  .controls > div { grid-template-columns: 250px minmax(0, 1fr); gap: 28px; }
  dialog.sheet:not(.sheet-small) { max-width: 760px; height: min(88vh, 920px); margin: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--seam); }
}

@media (min-width: 960px) {
  :root { --overlap: 0px; --bar-h: 76px; }
  body.in-study { --overlap: 0px; }
  .shell { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 1fr); min-height: min(94vh, 880px); }
  .stage { grid-column: 1; grid-row: 1; height: auto; min-height: 600px; }
  .stage::after { top: 0; left: auto; right: 0; width: 26%; height: auto; background: linear-gradient(to right, rgba(14, 11, 9, 0), var(--ground)); }
  .panel { grid-column: 2; grid-row: 1; display: flex; align-items: center; margin: 0; padding: calc(var(--bar-h) + 24px) var(--gutter) 48px; }
  .panel-inner { width: 100%; }
  .frame { bottom: 26px; inset-inline-end: 12%; }
  [dir="rtl"] .stage::after { left: 0; right: auto; background: linear-gradient(to left, rgba(14, 11, 9, 0), var(--ground)); }
  .stage-fallback { padding-bottom: 12%; }
  body.in-study .shell { display: grid; }
  body.in-study .stage, .shell[data-stage="compact"] .stage { height: auto; }
  .shell[data-stage="compact"] .frame { display: block; }
  body.in-study .panel { align-items: flex-start; overflow-y: auto; padding-top: calc(var(--bar-h) + 28px); }
  body.in-study .mark-word { display: inline; }
}

/* ── Arabic ───────────────────────────────────────── */
:root:lang(ar) body { line-height: 1.75; }
:lang(ar) body *:not(.mark-word):not(.tester-latin):not(.lang-btn) { letter-spacing: normal !important; }
:lang(ar) em, :lang(ar) .tester-name, :lang(ar) .duel-name, :lang(ar) .profile h3, :lang(ar) .steps li::before { font-style: normal; }
:lang(ar) .display { font-size: clamp(42px, 11.6vw, 80px); line-height: 1.3; }
:lang(ar) .step-title { font-size: clamp(28px, 7.8vw, 40px); line-height: 1.4; }
:lang(ar) .sec-title { line-height: 1.32; }
:lang(ar) .tag h3, :lang(ar) .doc h2 { line-height: 1.5; }
:lang(ar) .tester-name { font-size: 26px; line-height: 1.3; }
:lang(ar) .duel-name, :lang(ar) .profile h3 { line-height: 1.4; }
:lang(ar) .lede, :lang(ar) .sec-body, :lang(ar) .step-body { line-height: 1.8; }
:lang(ar) .strip-label { font-size: 16.5px; line-height: 1.5; }
:lang(ar) .eyebrow, :lang(ar) .sec-label, :lang(ar) .facts, :lang(ar) .bar-meta, :lang(ar) .stage-caption, :lang(ar) .stage-hint,
:lang(ar) .req, :lang(ar) .opt, :lang(ar) .tester-side, :lang(ar) .tester-badge, :lang(ar) .duel-verb, :lang(ar) .scale-ends,
:lang(ar) .readout dt, :lang(ar) .tag-id, :lang(ar) .controls dt, :lang(ar) .doc h3, :lang(ar) .demo-note { font-family: var(--f-ui); font-size: 12.5px; line-height: 1.5; }
:lang(ar) .hint, :lang(ar) .seal, :lang(ar) .strip-key { font-family: var(--f-ui); font-size: 12px; line-height: 1.7; }
:lang(ar) .tester-house { font-size: 12px; }
:lang(ar) .tester-notes { font-size: 11.5px; }

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