/* ==========================================================================
   materials.css · sheet A-02 · materials, built with the TOWER logic
   Seven gold slabs in CSS 3D (js/tower3d.js), one group of materials per floor, a floor selector (a
   tablist of real buttons) and one card, its tabpanel (js/materials.js). Modes on .tw:
     (none)    no script or no CSS 3D: the logo mark and the full list of the seven groups
     .is-still reduced motion: a still 3D tower in the logo pose and the same full list
     .is-live  the interactive tower, the selector and the card
   Layouts (live): the keys stand beside their floors, number and name. Phones spread the floors so each
   name fits beside its floor (--min-pitch) and the card follows beneath; from 700 px the keys carry a
   leader line; from 1200 px the card sits to the right of a sticky tower. Short screens (under 560 px
   tall, landscape phones) set the keys as a grid under the tower.
   Nothing between .t3-origin and the faces may flatten 3D (no overflow, filter, opacity, mask or blend
   on those wrappers); only the faces carry opacity. Moving: transforms (the engine's springs, the
   explode, the float) and one short dim; a side face's light changes only while the tower turns.
   ========================================================================== */

@property --t3-dim { syntax: "<number>"; inherits: true; initial-value: 0; }

/* ---- tokens (plain values: palette mixes worked out in advance). Light = day: pale gold slabs on the
   plaster sheet, drawn in green ink ---- */
:root {
  --t3-top: #FBE0B4;            /* gold-200 */
  --t3-lit: #F8CF8E;            /* gold-300 */
  --t3-shade: #D7A256;          /* gold-500 + gold-600 */
  --t3-bot: #B7863E;            /* gold-600 + gold-700 */
  --t3-sel-top: #F8E7CC;        /* gold-200 + stone-50 */
  --t3-sel-lit: #FBE0B4;
  --t3-sel-shade: #E5B062;
  --t3-sel-bot: #C9954A;
  --t3-dimto: #E2D8CC;          /* stone-200: the plaster */
  --t3-dim-sel: .38;
  --t3-edge: rgba(10, 51, 32, .46);
  --t3-rim: rgba(245, 240, 234, .55);
  --t3-ghost: #A1742F;
  --t3-plot: rgba(10, 51, 32, .13);
  --t3-plot-2: rgba(10, 51, 32, .3);
  --t3-pool: rgba(99, 86, 75, .34);
  --t3-aura: rgba(226, 216, 204, 0);
  --t3-spring: cubic-bezier(.34, 1.4, .64, 1);
  --t3-key-on: #0A3320;
  --t3-key-on-fg: #EDE5DB;
  --t3-band-o: .9;
}
/* ---- dark = night: bronze slabs, glowing soffits and rims, a pool of light under the tower; the floors
   not picked recede a little toward gold-800, so the tower still reads gold ---- */
:root[data-theme="dark"]:not([data-vt="light"]), :root[data-vt="dark"] {
  --t3-top: #8D6427;            /* gold-700 + gold-800 */
  --t3-lit: #BD8B42;            /* gold-600 + gold-700 */
  --t3-shade: #6E4D1B;          /* gold-800 */
  --t3-bot: #E5B062;            /* gold-500 */
  --t3-sel-top: #C9954A;
  --t3-sel-lit: #F5C578;
  --t3-sel-shade: #A1742F;
  --t3-sel-bot: #F8CF8E;        /* gold-300 */
  --t3-dimto: #6E4D1B;          /* gold-800 */
  --t3-dim-sel: .3;
  --t3-edge: rgba(251, 224, 180, .74);
  --t3-rim: rgba(251, 224, 180, .5);
  --t3-ghost: #F5C578;
  --t3-plot: rgba(245, 197, 120, .14);
  --t3-plot-2: rgba(245, 197, 120, .32);
  --t3-pool: rgba(245, 197, 120, .2);
  --t3-aura: rgba(245, 197, 120, .1);
  --t3-key-on: #F5C578;
  --t3-key-on-fg: #051C11;
  --t3-band-o: .62;
}

/* ======================================================= the sheet's layout */
.tw { position: relative; display: grid; border-top: 1px solid var(--line-2); }
.tw__stage {
  /* geometry in units of --u (js/tower3d.js sets --u, --w, --t in px and --gapk, --zoom) */
  --u: 12px; --w: 120px; --t: 20px; --gapk: 1; --zoom: 1;
  --T: 1.7; --G: 1.25; --base: 1.3;
  --sh: calc(var(--base) + 7 * var(--T) + 6 * var(--G) * var(--gapk));   /* stack height (u) */
  --gx: 50%; --gy: 85%; --fit-w: 25; --fit-h: 32; --top-m: 24; --min-pitch: 0;
  --sel-x: -1.3; --sel-z: 2.3; --hov-z: 1.1;
  /* the hatch on the slabs' sides: ink and strength per theme (made into images once by js/tower3d.js) */
  --t3-ink-l: #0A3320; --t3-ink-d: #EDE5DB; --t3-gold: #F5C578; --t3-hpa-l: .34; --t3-hpa-d: .3;
  position: relative; min-width: 0;
}
.tw__view {
  position: relative; height: clamp(300px, 52vh, 480px); height: clamp(300px, 52svh, 480px);
  overflow: clip; touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none;
  border-bottom: 1px solid var(--line);
}
.tw.is-live .tw__view { cursor: grab; }
.tw.is-live .tw__view.is-dragging { cursor: grabbing; }
/* night: one soft, static aura behind the stack */
.tw__view::before {
  content: ""; position: absolute; left: var(--gx); top: calc(var(--gy) - var(--u) * 11 * var(--zoom));
  width: calc(var(--u) * 36); height: calc(var(--u) * 36); transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--t3-aura), rgba(245, 197, 120, 0)); pointer-events: none;
}

/* no script: the logo mark is the tower in its logo pose */
.tw__mark { position: absolute; left: 50%; top: 46%; height: min(64%, 340px); width: auto; aspect-ratio: 151 / 224.5; transform: translate(-50%, -50%); }
.tw.is-live .tw__mark, .tw.is-still .tw__mark { display: none; }
.tw__lv, .tw__dim, .tw__x, .tw__hint, .tw__sel, .mcard, .mwalk { display: none; }

/* the datum: ±0.00 at the foot of the tower */
.tw__gl {
  position: absolute; left: 0; right: 0; top: var(--gy); height: 1px; pointer-events: none;
  background: repeating-linear-gradient(to right, var(--line-2) 0 16px, transparent 16px 20px, var(--line-2) 20px 22px, transparent 22px 26px);
}
.tw__gl .lvl { position: absolute; right: 14px; top: 8px; font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .06em; color: var(--ink-2); white-space: nowrap; }
.tw__gl .lvl::before { transform: translateY(-1px); }

/* caption (top right on a phone, above the names), exploded-view toggle, hint */
.tw__cap { position: absolute; left: 14px; top: 15px; z-index: 2; pointer-events: none; }
.tw.is-live .tw__cap { left: auto; right: 14px; text-align: right; }
.tw__x {
  position: absolute; right: 0; top: 0; z-index: 3; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 12px;
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg);
  font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); transition: background-color .3s, color .3s;
}
.tw__xi { width: 18px; height: 18px; overflow: visible; flex: none; }
.tw__xi rect { fill: currentColor; transform-box: fill-box; transition: transform .5s var(--t3-spring), fill .3s; }
.tw__x.is-on .tw__xi rect:nth-child(1) { transform: translateY(-3px); }
.tw__x.is-on .tw__xi rect:nth-child(3) { transform: translateY(3px); }
.tw__x.is-on .tw__xi rect:nth-child(2) { fill: var(--gold-line); }
.tw__x:focus-visible { outline-offset: -4px; }
.tw__x:active { background: var(--ink); color: var(--bg); }
@media (hover: hover) { .tw__x:hover { background: var(--ink); color: var(--bg); } }
.tw.is-live .tw__hint { display: flex; }
.tw__hint { position: absolute; left: 14px; bottom: 13px; z-index: 2; align-items: center; gap: 10px; max-width: calc(100% - 130px); color: var(--ink-2); pointer-events: none; text-wrap: balance; }
.tw__hi { width: 26px; height: 12px; flex: none; }

/* level marks beside the floors (still tower and short screens; elsewhere the keys take their place) */
.tw.is-still .tw__lv { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tw__mk {
  --ky: calc(var(--base) + var(--i) * (var(--T) + var(--G) * var(--gapk)) + var(--T) / 2);
  position: absolute; left: calc(var(--gx) + var(--u) * 8.2); top: var(--gy);
  display: flex; align-items: center; gap: 7px; height: 20px; margin-top: -10px;
  transform: translate(calc(var(--u) * 8.2 * (var(--zoom) - 1)), calc(var(--ky) * var(--u) * var(--zoom) * -1));
  font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .06em; color: var(--ink-2);
  transition: transform .62s var(--t3-spring) calc(var(--i) * 26ms), color .3s;
}
.tw__mk::before { content: ""; width: calc(var(--u) * .9); height: 1px; background: currentColor; opacity: .7; }
.tw__mk.is-on { color: var(--ink); }
.tw__mk.is-on::before { width: calc(var(--u) * 1.6); background: var(--hl); opacity: 1; }

/* the dimension: the stack's real height on screen, in px. It stands clear of the floor that slides out. */
.tw.is-still .tw__dim { display: block; }
.tw__dim {
  position: absolute; left: calc(var(--gx) - var(--u) * 10.4); top: var(--gy); z-index: 1; width: 0; height: 0; color: var(--ink-2); pointer-events: none;
  transform: translateX(calc(var(--u) * 10.4 * (1 - var(--zoom)))); transition: transform .62s var(--t3-spring);
}
.tw__dim::before {   /* the dimension line, scaled to the stack */
  content: ""; position: absolute; left: 0; bottom: 0; width: 1px; height: calc(var(--u) * 32); background: currentColor;
  transform-origin: 50% 100%; transform: scaleY(calc(var(--sh) * var(--zoom) / 32)); transition: transform .62s var(--t3-spring);
}
.tw__dim::after, .tw__dt { content: ""; position: absolute; left: -6px; bottom: 0; width: 13px; height: 1px; background: currentColor; }
.tw__dim::after { transform: rotate(-45deg); }
.tw__dt { transform: translateY(calc(var(--sh) * var(--u) * var(--zoom) * -1)) rotate(-45deg); transition: transform .62s var(--t3-spring); }
.tw__dv {
  position: absolute; right: 7px; bottom: 0; padding: 6px 0; writing-mode: vertical-rl; white-space: nowrap;
  font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .06em; background: var(--bg);
  transform: translateY(calc(var(--sh) * var(--u) * var(--zoom) * -.5 + 50%)) rotate(180deg); transition: transform .62s var(--t3-spring);
}
.tw__dv b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ======================================================= the 3D world */
.t3-world { position: absolute; inset: 0; pointer-events: none; }
.t3-origin {
  position: absolute; left: var(--gx); top: var(--gy); width: 0; height: 0; transform-style: preserve-3d;
  transform: scale3d(var(--zoom), var(--zoom), var(--zoom)); transition: transform .7s var(--t3-spring);
}
/* the ground plot, laid flat (follows the bottom floor) */
.t3-plot {
  position: absolute; left: 0; top: 0; width: calc(var(--u) * 30); height: calc(var(--u) * 30); margin: calc(var(--u) * -15) 0 0 calc(var(--u) * -15);
  transform: rotateX(90deg); pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #051C11 34%, rgba(5, 28, 17, 0) 98%); mask-image: radial-gradient(closest-side, #051C11 34%, rgba(5, 28, 17, 0) 98%);
}
.t3-plan { position: absolute; inset: 0; width: 100%; height: 100%; }
.t3-pg { fill: none; stroke: var(--t3-plot); stroke-width: .7; }
.t3-pa { fill: none; stroke: var(--t3-plot-2); stroke-width: .8; stroke-dasharray: 16 4 3 4; }
.t3-pf { fill: none; stroke: var(--t3-ghost); stroke-width: 1; stroke-dasharray: 5 4; opacity: .75; }
.t3-pt { fill: none; stroke: var(--t3-plot-2); stroke-width: .9; }
.t3-pool {
  position: absolute; left: 50%; top: 50%; width: calc(var(--u) * 15); height: calc(var(--u) * 15); margin: calc(var(--u) * -7.5) 0 0 calc(var(--u) * -7.5);
  background: radial-gradient(closest-side, var(--t3-pool), rgba(99, 86, 75, 0));
}

/* slabs: level (explode) · slot · slide-out (pick) · spin (JS) · solid (intro, float) */
.t3-turn, .t3-slab, .t3-ghost, .t3-move, .t3-spin, .t3-solid { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.t3-slab {
  --y: calc(var(--base) + var(--i) * (var(--T) + var(--G) * var(--gapk)) + var(--T) / 2);
  --t3-dim: 0;
  transform: translate3d(0, calc(var(--y) * var(--u) * -1), 0);
  transition: transform .62s var(--t3-spring) calc(var(--i) * 26ms), --t3-dim .22s;
}
/* a picked (or hovered) floor lights up at once: the slide-out carries the motion */
.t3-slab.is-hover, .t3-slab.is-sel { --t3-top: var(--t3-sel-top); --t3-lit: var(--t3-sel-lit); }
.t3-slab.is-sel { --t3-shade: var(--t3-sel-shade); --t3-bot: var(--t3-sel-bot); }
.tw__stage.has-sel .t3-slab:not(.is-sel) { --t3-dim: var(--t3-dim-sel); }
.tw__stage.has-sel .t3-slab.is-hover:not(.is-sel) { --t3-dim: calc(var(--t3-dim-sel) * .3); }

/* faces: w × w (top, bottom) and w × t (sides), centred on the slab's origin */
.t3-f, .t3-g { position: absolute; left: 0; top: 0; }
.t3-f { backface-visibility: hidden; -webkit-backface-visibility: hidden; pointer-events: auto; }
.t3-top, .t3-bot { width: var(--w); height: var(--w); margin: calc(var(--w) / -2) 0 0 calc(var(--w) / -2); }
.t3-top { transform: rotateX(90deg) translateZ(calc(var(--t) / 2)); }
.t3-bot { transform: rotateX(-90deg) translateZ(calc(var(--t) / 2)); }
.t3-side, .t3-g { width: var(--w); height: var(--t); margin: calc(var(--t) / -2) 0 0 calc(var(--w) / -2); }
.t3-s0 { transform: translateZ(calc(var(--w) / 2)); }
.t3-s1 { transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); }
.t3-s2 { transform: rotateY(180deg) translateZ(calc(var(--w) / 2)); }
.t3-s3 { transform: rotateY(270deg) translateZ(calc(var(--w) / 2)); }
/* colour: view-fixed light (--l, written by the engine) between lit and shade; the others dim when one is picked */
.t3-side { --l: .5; background-color: var(--t3-lit); }
.t3-top { background-color: var(--t3-top); }
.t3-bot { background-color: var(--t3-bot); }
@supports (background: color-mix(in srgb, #0A3320 50%, #F5C578)) {
  .t3-spin { --dimp: calc(var(--t3-dim) * 100%); }
  .t3-side { background-color: color-mix(in srgb, var(--t3-dimto) var(--dimp), color-mix(in srgb, var(--t3-lit) calc(var(--l) * 100%), var(--t3-shade))); }
  .t3-top { background-color: color-mix(in srgb, var(--t3-dimto) var(--dimp), var(--t3-top)); }
  .t3-bot { background-color: color-mix(in srgb, var(--t3-dimto) var(--dimp), var(--t3-bot)); }
}
/* the floor's drafting hatch on its sides: an image per material and theme, in rules the engine writes once
   (keyed by data-h); a picked or hovered floor draws it three times over, the stronger line of a selection */
.t3-side { background-size: 100% 100%; background-repeat: no-repeat; box-shadow: inset 0 0 0 1px var(--t3-edge), inset 0 2px 0 var(--t3-rim); }
/* drawn edges, a polished top, a glowing soffit by night */
.t3-top { box-shadow: inset 0 0 0 1px var(--t3-edge); background-image: linear-gradient(135deg, rgba(245, 240, 234, .42), rgba(245, 240, 234, 0) 62%); }
.t3-bot { box-shadow: inset 0 0 0 1px var(--t3-edge); background-image: radial-gradient(closest-side, rgba(110, 77, 27, .2), rgba(110, 77, 27, 0)); }
:root[data-theme="dark"]:not([data-vt="light"]) .t3-top, :root[data-vt="dark"] .t3-top { background-image: radial-gradient(closest-side, rgba(251, 224, 180, .2), rgba(251, 224, 180, 0)); }
:root[data-theme="dark"]:not([data-vt="light"]) .t3-bot, :root[data-vt="dark"] .t3-bot { background-image: radial-gradient(closest-side, rgba(251, 224, 180, .42), rgba(251, 224, 180, 0) 82%); }

/* the slot a picked floor slid out of: one dashed wireframe, moved into that floor (opacity on its faces) */
.t3-g { border: 1px dashed var(--t3-ghost); opacity: .9; pointer-events: none; animation: t3-slot .45s .18s both; }
@keyframes t3-slot { from { opacity: 0; } }

/* the floors drop in, bottom to top, the first time the sheet is seen (the drop itself: js/tower3d.js, in px) */
.tw__stage.is-pre .t3-f, .tw__stage.is-pre .t3-plot { opacity: 0; }
.tw__stage.is-intro .t3-f { animation: t3-in .22s linear both; animation-delay: calc(120ms + var(--i) * 135ms); }
.tw__stage.is-intro .t3-plot { animation: t3-in 1s .1s both; }
@keyframes t3-in { from { opacity: 0; } to { opacity: 1; } }
/* the picked floor hovers, out of its slot (fixed px, so the compositor can run it) */
.tw.is-live .tw__stage:not(.is-pre):not(.is-intro):not(.is-asleep) .t3-slab.is-sel .t3-solid { animation: t3-bob 4.8s ease-in-out .5s infinite; }
@keyframes t3-bob { 0%, 100% { transform: none; } 50% { transform: translate3d(0, -3px, 0); } }
@media (prefers-reduced-motion: reduce) { .tw .t3-solid { animation: none !important; } }

/* ======================================================= the selector: keys beside the floors
   (phones: number and name, the floors spread to make room; no exploded view, the floors are spread already) */
.tw.is-live .tw__stage { --gx: 31%; --gy: 88%; --fit-w: 31; --fit-h: 40; --min-pitch: 46; --top-m: 14; --sel-x: -.7; --sel-z: 2.6; }
.tw.is-live .tw__view { height: clamp(448px, 54vh, 500px); height: clamp(448px, 54svh, 500px); }
.tw.is-live .tw__sel { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.tw__key {
  --ky: calc(var(--base) + var(--i) * (var(--T) + var(--G) * var(--gapk)) + var(--T) / 2);
  --kx: calc(var(--u) * 7.35);
  position: absolute; left: calc(var(--gx) + var(--kx)); right: 0; top: var(--gy);
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 2px 0 0;
  transform: translate(calc(var(--kx) * (var(--zoom) - 1)), calc(var(--ky) * var(--u) * var(--zoom) * -1 - 50%));
  pointer-events: auto; text-align: left; color: var(--ink-2);
  transition: transform .62s var(--t3-spring) calc(var(--i) * 26ms), color .3s;
}
.tw__tri { display: none; }
.tw__n {
  flex: none; display: grid; place-items: center; min-width: 28px; height: 24px; padding: 0 3px; border: 1px solid var(--line-2);
  font: 500 .75rem/1 var(--font-mono); letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--ink);
  transition: background-color .3s, color .3s, border-color .3s;
}
.tw__name {
  min-width: 0; font: 600 .8125rem/1.22 var(--font-body); color: var(--ink); opacity: .78;
  overflow-wrap: break-word; text-wrap: balance; transition: opacity .3s;
}
html[lang="ka"] .tw__name { font-weight: 550; }
html[lang="en"] .tw__name { font-family: var(--font-display); font-stretch: 94%; }
.tw__key[aria-selected="true"] { color: var(--ink); }
.tw__key[aria-selected="true"] .tw__n { background: var(--t3-key-on); border-color: var(--t3-key-on); color: var(--t3-key-on-fg); }
.tw__key[aria-selected="true"] .tw__name, .tw__key.is-hover .tw__name { opacity: 1; }
.tw__key.is-hover:not([aria-selected="true"]) .tw__n, .tw__key:active .tw__n { border-color: var(--ink); }
.tw__key:focus-visible { outline-offset: 2px; }
.tw__stage.is-pre .tw__key, .tw__stage.is-pre .tw__dim { opacity: 0; }
.tw__stage.is-intro .tw__key { animation: t3-in .4s both; animation-delay: calc(420ms + var(--i) * 135ms); }
.tw__stage.is-intro .tw__dim { animation: t3-in .6s 1.3s both; }

/* ======================================================= the card (the tabpanel) */
.tw.is-live .mcard { display: flex; flex-direction: column; }
.mcard:focus-visible { outline-offset: 4px; }
.mcard__count { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); color: var(--ink-2); }   /* the tower's bottom line is its top rule */
.mcard__count .mono { color: var(--ink); font-size: .8125rem; letter-spacing: .08em; }
.mcard__band { height: 58px; border-bottom: 1px solid var(--line-2); background: var(--bg-2); }
.mcard__band svg { display: block; width: 100%; height: 100%; }
.mcard__band rect { opacity: var(--t3-band-o); }
.mcard__band line { stroke: var(--line-2); stroke-width: 1; }
.mcard__body { --bn: clamp(3.2rem, 2.5rem + 3vw, 5.4rem); position: relative; display: grid; gap: 12px; padding-top: 22px; }
.mcard__big {
  position: absolute; right: 0; top: 16px; font: 500 var(--bn)/.8 var(--font-mono); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px var(--line-2); pointer-events: none;
}
.mcard__name {
  padding-right: calc(var(--bn) * 1.16 + 12px); font: 800 clamp(1.6rem, 1.05rem + 2.1vw, 2.45rem)/1.02 var(--font-display); font-stretch: 80%;
  text-transform: uppercase; overflow-wrap: break-word; text-wrap: balance;
}
html[lang="ka"] .mcard__name { font-weight: 750; line-height: 1.1; }
.mcard__lbl { margin-top: 8px; color: var(--ink-2); }
.mcard__items { display: grid; border-top: 1px solid var(--line); }
.mcard__item { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; row-gap: 10px; align-items: start; padding: 16px 0 17px; border-bottom: 1px solid var(--line); }
.mcard__sw { grid-row: span 2; width: 48px; height: 48px; border: 1px solid var(--ink); background: var(--bg); }
.mcard__sw svg { display: block; width: 100%; height: 100%; }
.mcard__iname { align-self: center; font: 600 1.0625rem/1.3 var(--font-body); overflow-wrap: break-word; }
html[lang="en"] .mcard__iname { font-family: var(--font-display); font-stretch: 96%; }
.mcard__item.is-solo .mcard__iname { display: none; }
.mcard__item.is-solo .mcard__sw { grid-row: auto; }
.mcard__itext { grid-column: 2; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
.mcard__chips { grid-column: 2; gap: 6px; }
.mcard__chips li { padding: 6px 10px 6px 9px; font-size: .8125rem; }

/* the card's foot: the floor above and the floor below, by number and name (a lift panel) */
.tw.is-live .mwalk { display: grid; margin-top: 22px; border-top: 1px solid var(--line-2); }
.mwalk__go {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; min-height: 60px; padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line); color: var(--ink); text-align: left; transition: background-color .3s;
}
.mwalk__ar { justify-self: center; width: 16px; height: 16px; transition: transform .45s var(--ease); }
.mwalk__txt { display: grid; gap: 4px; min-width: 0; }
.mwalk__to { font: 600 .9375rem/1.3 var(--font-body); overflow-wrap: break-word; }
html[lang="en"] .mwalk__to { font-family: var(--font-display); font-stretch: 96%; }
.mwalk__to .mono { margin-right: 4px; font-size: .8125rem; font-weight: 500; color: var(--ink-2); }
.mwalk__go:active { background: var(--bg-2); }
.mwalk__go:focus-visible { outline-offset: -2px; }
@media (hover: hover) {
  .mwalk__go:hover { background: var(--bg-2); }
  .mwalk__go[data-mc-step="1"]:hover .mwalk__ar { transform: translateY(-3px); }
  .mwalk__go[data-mc-step="-1"]:hover .mwalk__ar { transform: translateY(3px); }
}

/* the foot of the side: a note, the price request (opens the chooser) and the number */
.tw__foot { display: grid; gap: 16px; padding-top: 22px; }
.tw__note { max-width: 46ch; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.tw__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; }
.tw__tel { gap: 12px; }
.tw__tel .mono { font-size: .875rem; font-weight: 500; letter-spacing: .06em; text-transform: none; }
html:not(.js) .tw__cta { display: none; }            /* the chooser needs the script; the number always works */

/* ======================================================= the full list (no script, reduced motion) */
.mlist { display: grid; }
.tw.is-live .mlist { display: none; }
.mfl { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; padding: 18px 0 20px; border-bottom: 1px solid var(--line); transition: background-color .3s; }
.mfl.is-on { background: var(--bg-2); }
.mfl__n { align-self: start; padding-top: 4px; font: 500 .8125rem/1 var(--font-mono); letter-spacing: .06em; color: var(--ink-2); }
.mfl__name { font: 700 1.125rem/1.3 var(--font-body); overflow-wrap: break-word; }
html[lang="ka"] .mfl__name { font-weight: 650; }
.mfl__items { grid-column: 2; display: grid; gap: 12px; margin-top: 12px; }
.mfl__items li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.mfl__sw { width: 36px; height: 36px; border: 1px solid var(--ink); background: var(--bg); }
.mfl__sw svg { display: block; width: 100%; height: 100%; }
.mfl__items p { font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }
.mfl__items b { display: block; margin-bottom: 2px; font-weight: 600; color: var(--ink); }

/* phones: the card and the list sit under the tower */
.tw__side { min-width: 0; padding-bottom: 4px; }
.tw:not(.is-live) .mlist { margin-top: 8px; }

/* ======================================================= short screens (landscape phones): the keys as a grid under the tower */
@media (max-height: 559.98px) {
  .tw.is-live .tw__stage { --gx: 50%; --gy: 84%; --fit-w: 34; --fit-h: 30; --min-pitch: 0; --top-m: 52; --sel-x: -1.3; --sel-z: 2.3; }
  .tw__view, .tw.is-live .tw__view { height: clamp(240px, calc(100vh - var(--hdr) - 48px), 460px); height: clamp(240px, calc(100svh - var(--hdr) - 48px), 460px); }
  .tw.is-live .tw__cap { left: 14px; right: auto; text-align: left; }
  .tw.is-live .tw__x { display: inline-flex; }
  .tw.is-live .tw__lv { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
  .tw.is-live .tw__sel {
    position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
    border-bottom: 1px solid var(--line-2); pointer-events: auto;
  }
  .tw__key { position: relative; left: auto; right: auto; top: auto; transform: none; min-height: 52px; margin-bottom: -1px; padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); }
  .tw__stage.is-intro .tw__key { animation: none; }
  .tw__stage.is-pre .tw__key { opacity: 1; }
}

/* ======================================================= from 700 px wide (and 560 px tall): keys with leader lines */
@media (min-width: 700px) and (min-height: 560px) {
  .tw__stage, .tw.is-live .tw__stage { --gx: 35%; --gy: 88%; --fit-w: 34; --fit-h: 29.5; --top-m: 24; --sel-x: -1.6; --sel-z: 2.1; }
  .tw.is-live .tw__stage { --min-pitch: 46; }
  .tw__view, .tw.is-live .tw__view { height: clamp(460px, calc(100vh - var(--hdr) - 150px), 640px); height: clamp(460px, calc(100svh - var(--hdr) - 150px), 640px); }
  .tw__gl .lvl { right: auto; left: 14px; }
  .tw.is-live .tw__cap { left: 14px; right: auto; text-align: left; }
  .tw.is-live .tw__x { display: inline-flex; }
  .tw.is-live .tw__dim { display: block; }
  .tw__hint { left: auto; right: 14px; max-width: calc(100% - 140px); }
  .tw__key {
    --kx: calc(var(--u) * 8.1);
    right: auto; max-width: calc(100% - var(--gx) - var(--kx) - 12px); gap: 10px; padding: 4px 10px 4px 0;
  }
  .tw__key::before { content: ""; flex: none; order: -2; width: calc(var(--u) * 1.1); height: 1px; background: currentColor; opacity: .6; transition: width .45s var(--t3-spring), opacity .3s; }
  .tw__tri { display: block; order: -1; flex: none; width: 9px; height: 8px; background: currentColor; clip-path: polygon(0 0, 100% 0, 50% 100%); transition: background-color .3s; }
  .tw__n { min-width: 32px; height: 26px; padding: 0 5px; }
  .tw__name { font-size: .875rem; line-height: 1.25; opacity: .74; }
  .tw__key[aria-selected="true"]::before { width: calc(var(--u) * 1.9); background: var(--hl); opacity: 1; }
  .tw__key[aria-selected="true"] .tw__tri { background: var(--gold-line); }
  .tw__key.is-hover::before { opacity: 1; }
}

/* ======================================================= desktop: the card to the right of a sticky tower */
@media (min-width: 1200px) {
  .tw { --sp: clamp(24px, 2.6vw, 44px); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  /* never stretched by a taller card; it stays in view while the card is read (the keys are placed in its box) */
  .tw__stage, .tw.is-live .tw__stage { --gx: 34%; align-self: start; position: sticky; top: var(--hdr); }
  .tw__view, .tw.is-live .tw__view { border-bottom: 0; height: clamp(500px, calc(100vh - var(--hdr) - 120px), 720px); height: clamp(500px, calc(100svh - var(--hdr) - 120px), 720px); }
  .tw__side { display: flex; flex-direction: column; padding: 0 var(--sp) 30px; border-left: 1px solid var(--line); }
  .mcard__count, .tw:not(.is-live) .mlist { margin-top: 0; border-top: 0; }
  .mcard__count { margin-inline: calc(var(--sp) * -1); padding-left: var(--sp); }
  .mcard__band { height: clamp(84px, 12vh, 132px); margin-inline: calc(var(--sp) * -1); }
  .mcard__body { --bn: clamp(3.4rem, 1.6rem + 3vw, 5rem); }
  .mcard__name { font-size: clamp(1.5rem, .75rem + 1.5vw, 2.25rem); }
  .tw__foot { margin-top: auto; padding-top: 28px; }
}
@media (min-width: 1200px) and (max-height: 559.98px) {
  .tw__view, .tw.is-live .tw__view { height: 460px; }
  .tw__stage, .tw.is-live .tw__stage { --gx: 50%; position: relative; top: auto; }
}

/* touch screens (most visitors, many on modest phones): a pick's colour changes snap and the slide-out carries
   the motion (no restyle of the floors and keys frame after frame); with a mouse they fade */
@media (hover: none) {
  .t3-slab, .tw__key { transition: transform .62s var(--t3-spring) calc(var(--i) * 26ms); }
  .tw__n, .tw__name, .tw__tri, .tw__key::before { transition: none; }
}
