/* balatat.com — home: "The Dial". Loads after shared/theme.css (tokens, top bar, pills, buttons, link cards, footer).
   Hero layouts (owner decision): phones and tablets (< 900 px) = dial + a wide band of the cut face;
   desktop (≥ 900 px) = dial on one side with the cut sample stick under it, the shop on the other. */
:root {
  --gut: 16px;
  --buy-h: calc(96px + env(safe-area-inset-bottom, 0px));
  --D: min(120vw, 620px);                    /* dial diameter */
  --ring-r: calc(var(--D) / 2 + 17px);
  --len: 64px;                               /* length of an upright sample stick in the strip */
  --name-fs: 36px;                           /* the name's line box is fixed in px, so a long name scaled to fit never changes the block height */
}
body { padding-block-start: 0; background: transparent; }      /* the hero runs under the top bar; the flood is the ground */

/* ───────── flood: the selected colour takes the page (always light) ───────── */
.flood { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #fff; contain: strict; }
.flood i { position: absolute; display: block; }
.flood-base { inset: 0; background: var(--ground); }
.flood-bloom { left: 50%; top: 40%; width: 100vmax; height: 100vmax; border-radius: 50%; transform: translate(-50%, -50%) scale(3.2); will-change: transform, opacity; }

/* ───────── screen 1 ───────── */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 590px;
  padding-block: calc(var(--bar-h) + env(safe-area-inset-top, 0px)) var(--buy-h);
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
}
.stage { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.stage.is-drag { cursor: grabbing; }
.dial {
  position: absolute; left: 50%; bottom: 46px; width: var(--D); height: var(--D); margin-left: calc(var(--D) / -2);
  border-radius: 50%; outline-offset: 5px;
  opacity: 0; transform: scale(.9);
}
.is-ready .dial { opacity: 1; transform: none; transition: opacity .5s linear, transform 1.1s var(--ease); }
.dial:focus-visible { border-radius: 50%; }
.rotor { position: absolute; inset: 0; will-change: transform; }
.disc { position: absolute; inset: 0; }
/* soft ambient contact shadow, painted once; it turns with the rotor on the compositor */
.disc::before { content: ""; position: absolute; inset: -6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(21, 23, 28, .15) 89%, rgba(21, 23, 28, .05) 92.5%, rgba(21, 23, 28, 0) 97%); }
.disc-img { position: absolute; top: 0; left: 0; width: 100%; height: auto; max-width: none; opacity: 0; pointer-events: none; -webkit-user-drag: none; }
.ring, .nums { position: absolute; inset: 0; pointer-events: none; }
.nums b, .ring i { position: absolute; left: 50%; top: 50%; display: block; }
.nums b { will-change: transform; transition: color .3s; width: max-content; max-width: 62px; text-align: center; text-wrap: balance; font-size: 10px; line-height: 12px; font-weight: 400; letter-spacing: .01em; color: var(--ink-2); }
:lang(ar) .nums b { letter-spacing: 0; line-height: 14px; }
.nums b.is-on { font-weight: 600; color: var(--ink); }
.nums b.lim, .nums b.lim.is-on { font-weight: 600; color: var(--lim); }
.ring i { width: 2px; height: 2px; margin: -1px; border-radius: 50%; background: var(--ink-3); }
.index { position: absolute; left: 50%; bottom: 2px; width: 3px; height: 10px; margin-left: -1.5px; border-radius: 2px; background: var(--deep); transition: background-color .5s; }

.stage .tag { position: absolute; inset-inline-end: var(--gut); bottom: 6px; }
.sample { position: absolute; inset: 0; pointer-events: none; }
.sample > * { position: absolute; }
.sample-band { overflow: hidden; background: var(--wash); }
.band-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; will-change: transform; }
.sample-label { font-size: 9.5px; line-height: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }

.hint {
  position: absolute; left: 50%; bottom: 112px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 14px 8px 11px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink);
  font-size: 12.5px; font-weight: 500; box-shadow: 0 6px 20px rgba(21, 23, 28, .14);
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none; transition: opacity .35s, transform .6s var(--ease);
}
.hint.is-on { opacity: 1; transform: translate(-50%, 0); }
.hint svg { flex: none; }
/* first-visit swipe cue on phones and tablets: a glare and a ghost fingertip crossing the disc (home.js drives --p and --o) */
.swipe-cue { position: absolute; inset: 0; z-index: 3; border-radius: 50%; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .35s; }
.swipe-cue.is-on { opacity: 1; }
.cue-glare { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; opacity: var(--o, 0); transform: translateX(calc(55% + var(--p, 0) * 150%)) skewX(-12deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, 0)); }
.cue-dot { position: absolute; top: 60%; left: calc(31% + var(--p, 0) * 38%); width: 48px; height: 48px; margin: -24px; border-radius: 50%; opacity: var(--o, 0);
  background: rgba(255, 255, 255, .72); box-shadow: 0 0 0 1.5px rgba(21, 23, 28, .34), 0 0 0 9px rgba(255, 255, 255, .3), 0 8px 20px rgba(21, 23, 28, .25); }

/* ───────── name block ───────── */
.info { position: relative; padding: 8px var(--gut) 12px; min-width: 0; }
.hero-line { display: none; }
.meta { display: flex; align-items: center; gap: 9px; height: 28px; }
.code { display: inline-flex; flex: none; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; font-weight: 500; letter-spacing: .04em; direction: ltr; }
.code i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px rgba(21, 23, 28, .1); transition: background-color .5s; }
.code b { font-weight: 500; }
.kind { flex: none; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.kind .ast { font-size: 1em; line-height: inherit; vertical-align: baseline; }
.counter { display: none; flex: none; white-space: nowrap; margin-inline-start: auto; font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .04em; color: var(--ink-3); }
.counter b { font-weight: 500; color: var(--ink); }
/* "All 16": opens the overview sheet (phones and tablets; desktop shows the grid itself) */
.all-btn { position: relative; z-index: 2; flex: none; margin-inline-start: auto; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding-inline: 10px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .3); font-size: 12px; font-weight: 500; white-space: nowrap; transition: transform .12s; }
.all-btn::after { content: ""; position: absolute; inset: -8px -6px; }
.all-btn:active { transform: scale(.95); }
.all-btn svg { flex: none; opacity: .8; }

/* edition: set like an engraving, never a badge */
.edition { white-space: nowrap; }
.ed-link { position: relative; z-index: 2; display: inline-flex; align-items: baseline; gap: inherit; pointer-events: auto; }
.ed-link::after { content: ""; position: absolute; inset: -14px 0; }      /* 44 px touch target */
.edition-s { display: inline-flex; flex: 0 1 auto; min-width: 0; overflow: hidden; overflow: clip visible; align-items: baseline; gap: 6px; padding-inline-start: 9px; border-inline-start: 1px solid var(--line); font-size: 11px; line-height: 16px; color: var(--ink-2); }
.edition-l { display: none; }

.name { margin-block: 0 8px; font-size: var(--name-fs); line-height: calc(var(--name-fs) * 1.22); font-weight: 500; letter-spacing: -.02em; }
.name-mask { position: relative; display: block; overflow: hidden; padding-block: .04em .1em; }
.name-line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; height: calc(var(--name-fs) * 1.22); white-space: nowrap; will-change: transform; }
.name-line.ghost { position: absolute; inset-inline: 0; top: .04em; }
.n2 { font-size: .68em; font-weight: 300; color: var(--ink-2); letter-spacing: 0; }
[dir="rtl"] .n2 { font-size: .56em; letter-spacing: -.01em; }

.filters-grid { display: none; }

/* strip: the 16 real sample sticks, stood upright; tap one or slide across */
.sticks { display: flex; container-type: inline-size; touch-action: pan-y; user-select: none; -webkit-user-select: none; margin-block-end: 8px; }
.stick { position: relative; flex: 1 1 0; min-width: 0; height: calc(var(--len) + 25px); opacity: 0; transform: translateY(14px) scale(.9); }
.is-ready .stick { animation: pop .6s var(--ease) calc(.25s + var(--i) * 28ms) forwards; }
@keyframes pop { to { opacity: 1; transform: none; } }
.stick img {
  position: absolute; left: 50%; top: calc(50% + 3px); max-width: none; height: auto;
  width: min(var(--len), calc((100vw - 2 * var(--gut)) / 16 * .82 * var(--ar)));   /* browsers without container units */
  width: min(var(--len), calc(100cqw / 16 * .82 * var(--ar)));
  transform: translate(-50%, -50%) rotate(-90deg); transition: transform .45s cubic-bezier(.2, 1.5, .4, 1), opacity .3s; pointer-events: none;
}
.stick.is-on img { transform: translate(-50%, calc(-50% - 7px)) rotate(-90deg) scale(1.12); }
.stick::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--deep); transform: scale(0); transition: transform .35s var(--ease), background-color .5s; }
.stick.is-on::after { transform: scale(1); }
.stick-ed { position: absolute; inset-inline: -6px; top: 0; text-align: center; font-size: 9px; line-height: 11px; font-weight: 600; letter-spacing: 0; color: var(--lim); font-variant-numeric: tabular-nums; transition: opacity .2s; }
.stick.is-on .stick-ed { opacity: 0; }
.stick-code { display: none; }
.stick:active img { transition-duration: .12s; }

.pill-mat::before { vertical-align: 1px; }
.info .note { display: none; }
.order { display: none; }
.pre { display: block; font-size: 12.5px; color: var(--ink-2); }

/* ───────── buy bar ───────── */
.buybar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20; padding: 10px var(--gut) calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .86); box-shadow: 0 -1px 0 var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.buybar-in { display: flex; flex-direction: column-reverse; gap: 6px; max-width: 1180px; margin-inline: auto; }
.buybar-txt { display: flex; justify-content: center; gap: 6px; font-size: 12px; line-height: 18px; white-space: nowrap; }
.buybar-price { font-weight: 500; }
.buybar-pre { color: var(--ink-2); }
.buybar-pre::before { content: "·"; margin-inline-end: 6px; color: var(--ink-3); }

/* ───────── All 16: bottom sheet ───────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.scrim { position: absolute; inset: 0; background: rgba(21, 23, 28, .34); opacity: 0; transition: opacity .35s linear; }
.sheet {
  position: absolute; inset-inline: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 22px 22px 0 0; padding-block-end: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateY(101%); transition: transform .5s var(--ease); will-change: transform;
  box-shadow: 0 -12px 40px rgba(21, 23, 28, .16);
}
.sheet-wrap.is-open .scrim { opacity: 1; }
.sheet-wrap.is-open .sheet { transform: none; }
.sheet.is-dragging { transition: none; }
.sheet-grab { height: 18px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet-grab i { width: 36px; height: 4px; border-radius: 4px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding-inline: var(--gut) 4px; touch-action: none; }
.sheet-head h2 { font-size: 20px; line-height: 44px; font-weight: 500; letter-spacing: -.015em; white-space: nowrap; }
.sheet-x { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); }
.filters-sheet { padding: 2px var(--gut) 12px; }
.filters-sheet .fpill { background: #fff; }
.filters-sheet .fpill[aria-pressed="true"] { background: var(--ink); }
.grid16 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; padding: 4px var(--gut) 0; }
.tile { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 5px; padding: 4px 0 2px; text-align: center; opacity: 0; transform: translateY(10px); transition: opacity .3s linear, transform .12s ease-out; }
.sheet-wrap.is-open .tile { opacity: 1; transform: none; transition: opacity .4s linear calc(var(--i) * 16ms + 60ms), transform .6s var(--ease) calc(var(--i) * 16ms + 60ms); }
.sheet-wrap.is-open .tile.is-dim { opacity: .16; transition-delay: 0s; }
.tile-img { position: relative; display: block; width: 86%; aspect-ratio: 1; border-radius: 50%; transition: transform .12s ease-out; }
.tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; filter: drop-shadow(0 2px 3px rgba(21, 23, 28, .18)); }
.tile:active .tile-img { transform: scale(.94); }
.tile.is-on .tile-img::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink); }
.tile-n { display: block; min-height: 28px; font-size: 11px; line-height: 14px; font-weight: 400; color: var(--ink); overflow-wrap: break-word; }
.tile.is-on .tile-n { font-weight: 600; }
.tile-n em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--lim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile-n i { font-style: normal; color: var(--ink-3); }
.tile-ed { white-space: nowrap; }
.sheet-note { margin: 12px var(--gut) 0; padding-block-start: 10px; border-block-start: 1px solid var(--line); }

/* ───────── below the fold ───────── */
.pair, .box, .links { padding-inline: var(--gut); }
.pair { padding-block: 44px 8px; display: grid; gap: 14px; justify-items: center; }
.pair-notes { justify-self: start; display: grid; gap: 4px; margin-block-end: 10px; }
.pair-notes .is-off { display: none; }
.pair figure { width: 100%; position: relative; }
.pair figcaption { display: flex; align-items: baseline; gap: 10px; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.pair-stick-img { display: grid; place-items: center; height: 116px; margin-block-start: 8px; border-radius: 20px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .06); }
.pair-stick-img img { width: auto; height: auto; max-width: 82%; max-height: 64px; }
.pair-arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 1px var(--line); color: var(--ink); }
.pair-arrow svg { transform: rotate(90deg); }
.pair-disc-img { position: relative; width: min(78vw, 340px); margin: 14px auto 0; aspect-ratio: 1; }
.pair-disc-img img { position: absolute; top: 0; left: 0; width: 100%; height: auto; }
.pair-disc .tag { position: absolute; inset-inline-end: 0; top: 4px; }

.box { padding-block: 44px 0; }
/* the line drawing sits on a white card so its paper never fights the colour flood behind the page */
.box .kab { --kab-ink: var(--ink); --kab-ink2: var(--ink-2); --kab-paper: #fff; --kab-accent: var(--maroon); --kab-h-size: 24px; --kab-h-weight: 300; --kab-h-track: -.02em; --kab-h-lh: 1.2;
  background: #fff; border-radius: 24px; padding: 26px 12px 16px; box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .05); }
.box .kab-p { font-weight: 300; }
.box .kab-copy, .box .kab-note { padding-inline: 8px; }

.links { padding-block: 44px 56px; }

/* ───────── phones and tablets: dial above a full-bleed band of the cut face ───────── */
@media (max-width: 899px) {
  /* the dial shrinks on short screens so that more than half of it is always in view */
  :root { --D: clamp(270px, calc((100vh - 548px) * 1.6), min(104vw, 620px)); --ring-r: calc(var(--D) / 2 + 17px); }
  @supports (height: 100svh) { :root { --D: clamp(270px, calc((100svh - 548px) * 1.6), min(104vw, 620px)); } }
  .stage { --zone: calc(100vw / 4.4); --rz: 52px; }
  .dial { bottom: calc(var(--rz) + var(--zone)); }
  .index { bottom: calc(7px + var(--zone)); }
  .stage .tag { bottom: calc(7px + var(--zone)); }
  .hint { bottom: calc(112px + var(--zone)); }
  .sample-band { inset-inline: 0; bottom: 0; height: var(--zone); }
  .sample-label { inset-inline-start: var(--gut); bottom: calc(10px + var(--zone)); }
  /* the hero keeps --buy-h free for the sticky order bar; the next section starts inside that reserve, so once the
     page scrolls the notes follow the pills at the normal rhythm instead of after an empty band */
  .pair { margin-block-start: calc(16px - var(--buy-h)); padding-block-start: 0; }
  /* …and stays out of sight behind the translucent bar until the page has moved */
  html:not(.is-scrolled) .pair { visibility: hidden; }
}
/* phones: the pill block is planned — material pill on its own line, then the four size pills as one full-width row */
@media (max-width: 699px) {
  .pills { gap: 0 6px; }
  .pills::after { content: ""; flex-basis: 100%; height: 0; order: 1; }
  .pills > li { order: 2; flex: 1 1 auto; margin-block-start: 6px; text-align: center; padding-inline: clamp(5px, 1.9vw, 10px); font-size: clamp(10px, 2.95vw, 11.5px); }
  .pills > li.pill-mat { order: 0; flex: none; margin-block-start: 0; padding-inline: 10px; font-size: clamp(10.5px, 2.95vw, 11.5px); }
  /* Arabic labels are longer: a clean 2 + 2 of equal halves */
  html[lang="ar"] .pills > li:not(.pill-mat) { flex: 1 1 calc(50% - 3px); font-size: 11.5px; }
}
@media (min-width: 700px) and (max-width: 899px) {
  :root { --D: clamp(420px, calc((100vh - 850px) * 1.6), 96vw); --ring-r: calc(var(--D) / 2 + 22px); }
  @supports (height: 100svh) { :root { --D: clamp(420px, calc((100svh - 850px) * 1.6), 96vw); } }
  .stage { --zone: min(22vw, 180px); --rz: 62px; }
  .hint { bottom: calc(150px + var(--zone)); }
  .sample-label { font-size: 10.5px; }
  .grid16 { gap: 18px 14px; }
  .tile-n { font-size: 13px; line-height: 17px; min-height: 34px; }
  .tile-n em { font-size: 13.5px; }
  .tile-img { width: 78%; }
  .sheet { inset-inline: 0; margin-inline: auto; width: min(100%, 680px); }
  .sheet-head h2 { font-size: 24px; }
}
/* shorter tablets (768 × 1024): smaller sticks and band, so the dial keeps its share of the screen */
@media (min-width: 700px) and (max-width: 899px) and (max-height: 1100px) {
  :root { --len: 72px; }
  .stage { --zone: min(17vw, 136px); }
  .edition-l { margin-block-end: 8px; }
  .sticks { margin-block-end: 10px; }
}

/* ───────── small phones ───────── */
@media (max-width: 374px) {
  :root { --len: 58px; --name-fs: 34px; }
  .meta { gap: 7px; }
  .edition-s { padding-inline-start: 7px; }
}
@media (max-height: 700px) and (max-width: 699px) {
  :root { --len: 52px; }
  .name { margin-block-end: 4px; }
}

/* ───────── tablet and up: name stacked, edition mark on a reserved line ───────── */
@media (min-width: 700px) {
  :root { --gut: 40px; --name-fs: 60px; --D: 108vw; --len: 104px; --buy-h: calc(84px + env(safe-area-inset-bottom, 0px)); --ring-r: calc(var(--D) / 2 + 22px); }
  .hero { min-height: 860px; }
  .nums b { font-size: 12px; line-height: 14px; max-width: 78px; }
  .index { height: 13px; width: 4px; margin-left: -2px; }
  .hint { font-size: 14px; padding: 10px 18px 10px 14px; }
  .info { padding-block: 10px 22px; display: grid; grid-template-columns: minmax(0, 1fr); }
  .meta { height: 30px; gap: 12px; }
  .code, .kind { font-size: 13px; }
  .all-btn { height: 32px; font-size: 13px; padding-inline: 13px 15px; }
  .edition-s { display: none; }
  .name { line-height: calc(var(--name-fs) * 1.14); margin-block-end: 0; }
  .name-mask { padding-block: .04em 0; }
  .name-line { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; height: auto; }
  .n1 { height: calc(var(--name-fs) * 1.14); }
  .n2, [dir="rtl"] .n2 { font-size: 28px; line-height: 44px; height: 44px; }
  /* the edition mark shares the second name line, pinned to the far end: it never moves and never pushes anything */
  .edition-l { display: flex; align-items: baseline; justify-content: flex-end; justify-self: end; gap: 8px; height: 44px; margin-block: -44px 16px; line-height: 44px; pointer-events: none; }
  .edition-l .ed-l { font-size: 10.5px; }
  .edition-l .ed-n { font-size: 13px; }
  .edition-l .ed-n b { font-size: 34px; font-weight: 500; letter-spacing: -.01em; margin-inline-end: 2px; }
  .edition-l .ed-open { font-size: 13px; }
  .stick { height: calc(var(--len) + 36px); }
  .stick img { top: calc(50% - 9px); }
  .stick.is-on img { transform: translate(-50%, calc(-50% - 10px)) rotate(-90deg) scale(1.1); }
  .stick::after { bottom: 18px; }
  .stick-ed { display: none; }
  .stick-code { display: block; position: absolute; inset-inline: 0; bottom: 0; text-align: center; line-height: 14px; }
  .stick-code .sn { display: none; }
  .stick-code em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--lim); font-variant-numeric: tabular-nums; }
  .sticks { margin-block-end: 14px; }
  /* the material pill takes its own line; the four size pills sit together under it */
  .pills { gap: 0 8px; }
  .pills::after { content: ""; flex-basis: 100%; height: 0; order: 1; }
  .pills > li { order: 2; margin-block-start: 8px; }
  .pills > li.pill-mat { order: 0; margin-block-start: 0; }
  .buybar { padding-block: 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .buybar-in { flex-direction: row; align-items: center; gap: 16px; }
  .buybar-txt { flex: 1; display: grid; justify-content: start; gap: 0; }
  .buybar-price { font-size: 15px; line-height: 1.35; } .buybar-pre { font-size: 13px; }
  .buybar-pre::before { display: none; }

  .pair { grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding-block: 8px 16px; margin-block-start: calc(0px - var(--buy-h)); }
  .pair-notes { grid-column: 1 / -1; margin-block-end: 8px; }
  .pair-arrow svg { transform: none; }
  [dir="rtl"] .pair-arrow svg { transform: scaleX(-1); }
  .pair figcaption { font-size: 20px; }
  .pair-stick-img { height: 300px; }
  .pair-stick-img img { max-height: 84px; }
  .pair-disc { display: grid; }
  .pair-disc-img { width: min(34vw, 300px); margin-block-start: 8px; height: 300px; aspect-ratio: auto; display: grid; }
  .pair-disc-img img { position: static; align-self: center; }
  .box { padding-block: 72px 0; }
  .box .kab { padding: 40px 32px 28px; border-radius: 28px; }
  .links { padding-block: 72px 88px; }
}

/* ───────── desktop (900+): the dial on one side with the cut sample under it, the shop on the other ───────── */
@media (min-width: 900px) {
  :root { --gut: 36px; --name-fs: clamp(42px, 4.4vw, 62px); --buy-h: 0px; --D: min(56vh, 38vw, 52vw - 200px, 760px); --ring-r: calc(var(--D) / 2 + 28px); --cx: max(24vw, calc(var(--D) / 2 + 102px)); --sh: clamp(100px, calc(var(--D) * .25), 124px); }      /* band height: at most 124 px, so a 2× screen never upscales the ~250 px tall crops */
  @supports (height: 100svh) { :root { --D: min(56svh, 38vw, 52vw - 200px, 760px); } }
  /* narrower desktops: a slightly smaller dial, moved inwards, so the colour names around it have room on the outer side */
  @media (max-width: 1299px) { :root { --D: min(56vh, 33vw, 52vw - 200px, 760px); --cx: max(25.5vw, calc(var(--D) / 2 + 102px)); } @supports (height: 100svh) { :root { --D: min(56svh, 33vw, 52vw - 200px, 760px); } } }
  .hero { min-height: 700px; max-height: 1180px; padding-block: 0; grid-template-rows: none; grid-template-columns: 52vw minmax(0, 1fr); }
  .stage { --dt: calc(var(--bar-h) + (100% - var(--bar-h) - var(--D) - var(--sh) - 68px) / 2 + 6px); }
  .dial { left: auto; margin-left: 0; bottom: auto; inset-inline-start: calc(var(--cx) - var(--D) / 2); top: var(--dt); }
  .index { left: auto; margin: 0; bottom: auto; inset-inline-start: calc(var(--cx) + var(--D) / 2 + 8px); top: calc(var(--dt) + var(--D) / 2 - 2px); width: 12px; height: 4px; }
  .nums b { font-size: 11px; line-height: 13px; max-width: 64px; }
  .hint { left: auto; bottom: auto; inset-inline-start: var(--cx); top: calc(var(--dt) + var(--D) * .74); transform: translate(-50%, 8px); }
  [dir="rtl"] .hint { transform: translate(50%, 8px); }
  .hint.is-on { transform: translate(-50%, 0); }
  [dir="rtl"] .hint.is-on { transform: translate(50%, 0); }
  .stage .tag { bottom: auto; inset-inline-end: auto; inset-inline-start: 16px; top: calc(var(--bar-h) + 6px); }
  /* the cut-face band under the dial, bleeding to the page's start edge and ending under the dial's far edge */
  .sample-band { inset-inline-start: 0; width: calc(var(--cx) + var(--D) / 2); height: var(--sh); top: calc(var(--dt) + var(--D) + 68px); }
  .sample-band::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 1px 0 rgba(21, 23, 28, .1), inset 0 7px 8px -7px rgba(21, 23, 28, .28); }      /* a soft top edge so a plain colour still reads as a cut face */
  .sample-label { font-size: 10px; inset-inline-start: calc(var(--cx) - var(--D) / 2); top: calc(var(--dt) + var(--D) + 49px); }

  .info { align-self: center; min-width: 0; max-width: 680px; padding-block: calc(var(--bar-h) - 20px) 0; padding-inline: 4px var(--gut); }
  .hero-line { display: block; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin-block-end: 16px; }
  .hero-line b { display: block; font-weight: 500; color: var(--ink); }
  .meta { height: 26px; }
  .all-btn { display: none; }
  .counter { display: block; font-size: 13px; }
  .edition-l { margin-block-end: 14px; }

  .filters-grid { display: flex; margin-block-end: 8px; }
  .filters-grid .fpill { height: 26px; line-height: 26px; font-size: 11.5px; padding-inline: 11px; }
  /* 4 × 4: every tile has the same image box and the same label line */
  .sticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-block-end: 12px; touch-action: auto; container-type: normal; }
  .stick { height: 86px; border-radius: 14px; background: rgba(255, 255, 255, .5); transition: background-color .3s, box-shadow .3s, transform .5s var(--ease); }
  .stick:hover { background: rgba(255, 255, 255, .9); transform: translateY(-2px); }
  .stick.is-on { background: #fff; box-shadow: 0 0 0 2px var(--deep), 0 10px 24px -12px rgba(21, 23, 28, .35); }
  .stick img, .stick.is-on img { top: 11px; left: 12%; width: 76%; height: 24px; object-fit: contain; object-position: 50% 50%; transform: none; }
  .stick::after { display: none; }
  /* name line starts at the same height in every tile; two lines allowed */
  .stick-code { display: block; inset-inline: 5px; top: 43px; bottom: auto; height: 28px; text-align: center; font-size: 10.5px; line-height: 14px; font-weight: 400; color: var(--ink-2); white-space: normal; overflow-wrap: normal; transition: opacity .3s; }
  .stick-code .sn { display: inline; }
  .stick.is-on .stick-code { color: var(--ink); font-weight: 500; }
  .stick-code em { font-size: 12.5px; line-height: 0; white-space: nowrap; }
  .stick.is-limited .sn::after { content: " ·"; color: var(--ink-3); }
  /* filtered out: dimmed, not focusable, not clickable */
  .stick.is-dim { background: rgba(255, 255, 255, .28); box-shadow: none; pointer-events: none; }
  .stick.is-dim img, .stick.is-dim .stick-code { opacity: .2; }

  .pills { margin: 0 0 12px; }
  .pills > li { height: 28px; line-height: 28px; font-size: 12.5px; padding-inline: 12px; }
  .info .note { display: block; }
  .info .note-pattern { margin-block-end: 14px; }
  .info .note-size { margin-block-end: 18px; }
  .pair-notes { display: none; }
  .order { display: flex; align-items: center; gap: 18px; }
  .price { font-size: 14px; line-height: 1.4; color: var(--ink); }
  .buybar { transform: translateY(110%); transition: transform .5s ease-in-out; }
  .buybar.is-up { transform: none; }
  .ka-foot { padding-block-end: 120px; }

  .pair, .box, .links { max-width: 1180px; margin-inline: auto; box-sizing: content-box; }
  .pair { padding-block: 110px 20px; gap: 36px; margin-block-start: 0; }
  .pair-stick-img { height: 380px; border-radius: 28px; }
  .pair-stick-img img { max-height: 132px; max-width: 84%; }
  .pair-disc-img { width: min(34vw, 380px); height: 380px; }
  .box { padding-block: 110px 0; }
  .box .kab { padding: 28px 56px 28px 28px; --kab-h-size: 25px; }
  [dir="rtl"] .box .kab { padding: 28px 28px 28px 56px; }
  .links { padding-block: 110px 120px; }
}

/* narrow desktop: the four size pills must stay on one line in Arabic too */
@media (min-width: 900px) and (max-width: 1179px) {
  .pills { column-gap: 6px; }
  .pills > li { font-size: 12px; padding-inline: 10px; }
}
@media (min-width: 900px) and (max-width: 999px) {
  .pills { column-gap: 5px; }
  .pills > li { font-size: 11.5px; padding-inline: 9px; }
}
@media (min-width: 1180px) {
  :root { --gut: 64px; }
  .info { padding-inline: 8px var(--gut); }
}
/* very wide: shift the pair inwards so the margins either side of dial + shop match */
@media (min-width: 1700px) {
  :root { --cx: max(27.5vw, calc(var(--D) / 2 + 102px)); }
  .hero { grid-template-columns: 55vw minmax(0, 1fr); }
}

/* short desktop windows: tighten, and let the two footnotes drop below the fold */
/* the shop column always starts below the menu, and the hero is tall enough to hold it (the page scrolls a little instead) */
@media (min-width: 900px) and (max-height: 920px) {
  .info { padding-block-start: calc(var(--bar-h) + 8px); }
  .hero { min-height: calc(var(--bar-h) + 776px); }
}
@media (min-width: 900px) and (max-height: 820px) {
  .hero { min-height: calc(var(--bar-h) + 650px); }
  .hero-line { margin-block-end: 6px; font-size: 13px; }
  :root { --name-fs: clamp(40px, 4vw, 54px); }
  .n2, [dir="rtl"] .n2 { font-size: 24px; line-height: 38px; height: 38px; }
  .edition-l { height: 38px; line-height: 38px; margin-block: -38px 8px; }
  .edition-l .ed-n b { font-size: 28px; }
  .filters-grid { margin-block-end: 6px; }
  .filters-grid .fpill { height: 24px; line-height: 24px; }
  .sticks { gap: 6px; margin-block-end: 10px; }
  .stick { height: 64px; border-radius: 12px; }
  .stick img, .stick.is-on img { top: 7px; height: 18px; }
  .stick-code { top: 29px; font-size: 10px; line-height: 13px; height: 26px; }
  .stick-code em { font-size: 12px; }
  .pills { column-gap: 6px; margin-block-end: 12px; }
  .pills > li { margin-block-start: 6px; }
  .order .btn { height: 48px; }
}
@media (min-width: 900px) and (max-height: 960px) {
  .info .note { display: none; }
  .pair-notes { display: grid; }
}
html.sheet-open { overflow: hidden; }
