/* IsraelGPT — static site, no build step. Served from stelies.github.io/israelgpt/ so every path is relative. */

@font-face {
  font-family: "Big Shoulders";
  src: url("fonts/big-shoulders.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #0d0e24;
  --panel: #1a1b31;
  --line: #26253a;
  --line-2: #3a3956;
  --text: #f2f2f2;
  --dim: #a3a1b6;
  --mute: #6f6e87;
  --blue: #0202f1;
  --blue-line: #3635c5;
  --blue-hi: #5b5bff;

  --display: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(20px, 4.2vw, 76px);
  --max: 1760px;
  --gap: clamp(16px, 2vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  /* scrolling is eased in JS (site.js); native smooth scrolling would fight it */
  scroll-behavior: auto;
  scrollbar-width: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 300 clamp(16px, 1.22vw, 19px) / 1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

/* Fine film grain over the page, like the reference background (±2 levels of noise) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: url("grain.png") 0 0 / 256px 256px;
  opacity: .9;
  animation: grain .9s steps(1) infinite;
}
@keyframes grain {
  0% { background-position: 0 0; } 17% { background-position: -37px 21px; } 33% { background-position: 29px -53px; }
  50% { background-position: -61px -17px; } 67% { background-position: 43px 39px; } 83% { background-position: -19px 58px; }
}

::selection { background: var(--blue); color: #fff; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, figure, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--pad); top: -80px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 14px;
  font: 500 14px var(--mono);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

/* ———————————————— type primitives ———————————————— */
.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.display {
  font-family: var(--display);
  font-weight: 300;
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: 0;
}

/* ———————————————— topbar ————————————————
   Fixed, parked above the viewport. site.js drives transform from scroll/wheel/touch input:
   scrolling up (even at the very top, where the page can't move) pulls it down in proportion. */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 70;
  background: var(--bg);
  border-bottom: 1px solid var(--line-2);
  transform: translate3d(0, -101%, 0);
  will-change: transform;
}
.topbar.snap { transition: transform .3s cubic-bezier(.2, .7, .2, 1); }

.top {
  display: grid;
  grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  align-items: center;
  padding-block: 12px;
}
.top a.link {
  justify-self: center;
  font: 500 clamp(15px, 1.2vw, 19px) / 1 var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #b7b6c9;
  padding: 10px 6px;
  border-bottom: 1px solid transparent;
  transition: color .12s linear, border-color .12s linear;
}
.top a.link:hover { color: var(--text); border-bottom-color: var(--text); }

.emblem { justify-self: center; display: block; width: 44px; height: 60px; color: var(--text); }
.emblem svg { width: 100%; height: 100%; display: block; }

/* ———————————————— command bar ———————————————— */
.cmdbar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, clamp(320px, 52vw, 780px));
  height: 56px;
  margin: 0 auto;
  padding: 0 14px 0 18px;
  background: var(--panel);
  border: 2px solid var(--blue-line);
  text-align: left;
  transition: border-color .12s linear, background .12s linear;
}
.cmdbar:hover { border-color: var(--blue-hi); background: #202039; }
.cmdbar .glyph { flex: none; width: 30px; height: 30px; color: var(--blue-hi); }
.cmdbar .label { flex: 1; min-width: 0; font: 400 15px / 1 var(--sans); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdbar .label b { font-weight: 400; color: var(--text); }
.cmdbar .caret { display: inline-block; width: 8px; height: 15px; margin-left: 8px; vertical-align: -2px; background: var(--blue-hi); animation: blink 1.1s steps(1) infinite; }
.cmdbar .toggle { flex: none; display: flex; align-items: center; gap: 10px; color: var(--mute); }
.cmdbar .toggle .mono { font-size: 11px; }
.kbd {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 28px; padding: 0 6px;
  background: #2b2a45; border: 1px solid #4a4968;
  font: 500 12px / 1 var(--mono); letter-spacing: 0; color: var(--dim);
}
.kbds { display: inline-flex; gap: 5px; }

@keyframes blink { 50% { opacity: 0; } }

/* ———————————————— hero ———————————————— */
.hero { text-align: center; padding-top: clamp(100px, 8.4vw, 150px); }
.hero .cmdbar { margin-bottom: clamp(44px, 5.4vw, 96px); }

.eyebrow {
  font: 600 13px / 1 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .7em;
}
.eyebrow i { display: inline-block; width: 6px; height: 6px; background: var(--text); }

.fitbox { width: 100%; text-align: center; line-height: 1; }
.fit { display: inline-block; white-space: nowrap; font-size: 20vw; }

.hero .fitbox { margin: clamp(22px, 2.6vw, 44px) 0 clamp(26px, 3vw, 52px); }
.hero .fit, .close .fit { line-height: .8; font-weight: 300; }

.lede { max-width: 33em; margin-inline: auto; font-size: clamp(16px, 1.32vw, 21px); line-height: 1.32; color: var(--text); }
.lede + .lede { margin-top: 1.3em; }
.lede em { font-style: normal; color: var(--dim); }

.btns { display: inline-flex; margin-top: clamp(30px, 3vw, 52px); }
.btn {
  display: inline-block;
  padding: 17px 20px 15px;
  font: 500 clamp(17px, 1.34vw, 21px) / 1 var(--display);
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .1s linear, color .1s linear;
}
.btn-dark { background: var(--panel); color: var(--text); }
.btn-dark:hover { background: #2a2a48; }
.btn-blue { background: var(--blue); color: #fff; min-width: 9.4em; text-align: center; }
.btn-blue:hover { background: var(--text); color: var(--bg); }

.hint {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: clamp(56px, 7vw, 128px);
  color: var(--mute);
  transition: opacity .4s linear;
}
.hint.seen { opacity: 0; }

/* ———————————————— section scaffolding ———————————————— */
.sec { padding-top: clamp(96px, 11vw, 200px); }
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  position: relative;
  padding-top: 14px;
  color: var(--dim);
}
.sec-head::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--line-2);
  transform-origin: left center;
}
.js .sec-head::before { transform: scaleX(0); transition: transform 1.2s cubic-bezier(.2, .7, .1, 1) .1s; }
.js .sec-head.on::before { transform: none; }
.sec-head .idx { color: var(--mute); }

.statement {
  margin-top: clamp(28px, 3.6vw, 64px);
  font-size: clamp(42px, 7.2vw, 128px);
  max-width: 13.5em;
}
.statement s { text-decoration: none; color: var(--mute); }

.spec {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(40px, 5vw, 88px);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.spec > div { padding: 18px 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec dt { color: var(--mute); margin-bottom: 14px; }
.spec dd { font: 300 clamp(34px, 4vw, 68px) / 1 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.spec dd small { font: 400 12px var(--mono); letter-spacing: .08em; color: var(--dim); margin-left: 10px; }

/* ———————————————— images ————————————————
   Each plate is a flat black-and-white source. `screen` drops its blacks into the page navy;
   on the blue panel `multiply` does the reverse (whites become the blue). No gradients involved. */
.cap {
  position: absolute; left: 0; bottom: 0; z-index: 3;
  display: flex; gap: 14px;
  padding: 9px 12px 8px; background: var(--bg); color: var(--dim);
  font: 400 11px / 1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.cap b { font-weight: 400; color: var(--text); }
.cap.r { left: auto; right: 0; }

.fig { position: relative; margin: 0; overflow: hidden; background: var(--bg); border: 1px solid var(--line-2); }
.fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; }

/* full-bleed band, image drifts against the scroll */
.band {
  position: relative;
  height: clamp(320px, 66vh, 800px);
  margin-top: clamp(72px, 9vw, 160px);
  overflow: hidden;
  border-block: 1px solid var(--line-2);
  background: var(--bg);
}
.band img { position: absolute; left: 0; top: -17%; width: 100%; height: 134%; object-fit: cover; object-position: 50% 38%; mix-blend-mode: screen; will-change: transform; }

/* ———————————————— /askai ———————————————— */
.ask { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gap); margin-top: clamp(28px, 3.6vw, 64px); align-items: start; }
.fig-ask { grid-column: 1 / 5; aspect-ratio: 327 / 450; }
.ask-body { grid-column: 5 / 13; }
.block-title { font-size: clamp(44px, 5.4vw, 96px); }
.ask-body p.sub, .tr-copy p.sub { margin-top: 20px; color: var(--dim); max-width: 30em; }
.ask-body .term { margin-top: clamp(24px, 2.6vw, 44px); }
.ask-body .btn { margin-top: 24px; }

.term { border: 2px solid var(--blue-line); background: var(--panel); }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); color: var(--dim); }
.term-bar i { width: 8px; height: 8px; background: var(--blue-hi); display: inline-block; }
.term-bar span:last-child { margin-left: auto; color: var(--mute); }
.term-body { padding: clamp(18px, 2vw, 32px); min-height: 19rem; font: 400 clamp(13px, 1.02vw, 15px) / 1.75 var(--mono); }
#termAsk { min-height: 25rem; }
#termTr { min-height: 15rem; }
.ln { display: grid; grid-template-columns: 2ch 1fr; gap: 0 1ch; }
.ln + .ln { margin-top: 4px; }
.ln.gap { margin-top: 20px; }
.ln .p { color: var(--blue-hi); }
.ln.a .p, .ln.r .p { color: var(--mute); }
.ln.u .t { color: var(--text); }
.ln.a .t { color: #d6d5e4; }
.ln.r .t { color: var(--text); }
.ln.r .p { color: var(--blue-hi); }
.ln.h .t { color: var(--blue-hi); font-weight: 700; letter-spacing: .04em; }
.ln .t { white-space: pre-wrap; overflow-wrap: anywhere; }
.cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.18em; background: var(--text); animation: blink 1s steps(1) infinite; }

/* ———————————————— layers + curtain ————————————————
   A (opaque) → hole (transparent, tall) → B (opaque). The flag is position:fixed behind them, so it is
   only ever seen through the hole: layer A lifts off it, it sits perfectly still, then layer B slides up over it.
   site.js blurs/dims it as it is uncovered and covered. */
.layer { position: relative; z-index: 2; background: var(--bg); }
#layerA { border-bottom: 1px solid var(--line-2); padding-bottom: clamp(72px, 9vw, 160px); }
#layerB { border-top: 1px solid var(--line-2); margin-bottom: var(--fh); }

.hole { position: relative; z-index: 1; height: 210vh; height: 210svh; pointer-events: none; }
.curtain {
  position: fixed; left: 0; right: 0; top: 0;
  height: 100vh; height: 100lvh;
  overflow: hidden;
  background: var(--blue);
  pointer-events: auto;
}
.curtain-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; mix-blend-mode: multiply; image-rendering: pixelated;
  transform: scale(1.1); will-change: filter, transform;
}
.curtain-in {
  position: relative; z-index: 2;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  padding-block: clamp(24px, 3vw, 56px);
  will-change: transform, opacity;
}
.curtain .sec-head { color: #fff; }
.curtain .sec-head::before { background: rgba(255, 255, 255, .55); }
.curtain .sec-head .idx { color: #cfcfff; }
.tr-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gap); margin-top: clamp(24px, 3vw, 48px); align-items: end; }
.tr-copy { grid-column: 1 / 6; align-self: start; }
.tr-copy .block-title { color: #fff; }
.tr-copy p.sub { color: #e2e2ff; }
.tr-card { grid-column: 6 / 13; }
.curtain .term { border-color: var(--text); background: var(--bg); }
.curtain .cap { z-index: 3; }

/* ———————————————— rules ———————————————— */
.rules-top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gap); margin-top: clamp(28px, 3.6vw, 64px); align-items: end; }
.rules-copy { grid-column: 1 / 8; }
.rules-copy p.sub { margin-top: 20px; color: var(--dim); max-width: 30em; }
.fig-rules { grid-column: 8 / 13; aspect-ratio: 1500 / 1323; }

.rows { margin-top: clamp(40px, 5vw, 88px); border-bottom: 1px solid var(--line-2); }
.row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1.1fr) minmax(0, 1fr) 8.5rem;
  gap: 0 var(--gap);
  align-items: center;
  padding: clamp(22px, 2.2vw, 36px) 16px;
  border-top: 1px solid var(--line-2);
  transition: background .1s linear;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--panel); }
.row .n { color: var(--mute); align-self: start; padding-top: .5em; }
.row h3 { font-size: clamp(40px, 5.4vw, 92px); }
.row p { color: var(--dim); max-width: 32em; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.45; }
.tag {
  justify-self: end;
  padding: 6px 9px 5px; border: 1px solid var(--line-2); color: var(--dim);
  font: 400 11px / 1 var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.tag.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.row:hover .tag:not(.on) { border-color: var(--dim); }

/* ———————————————— closing ———————————————— */
.close { text-align: center; padding-bottom: clamp(48px, 6vw, 100px); }
.close .fitbox { margin: clamp(24px, 3vw, 52px) 0 clamp(20px, 2vw, 32px); }
.close .lede { color: var(--dim); }
.fine { margin: clamp(36px, 4vw, 64px) auto 0; max-width: 46em; color: var(--mute); line-height: 1.8; }

/* ———————————————— footer: light, fixed underneath, revealed as layer B lifts ———————————————— */
:root { --fh: clamp(430px, 66vh, 660px); --ink: #0a0ac8; }
.foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 0;
  height: var(--fh);
  background: #f2f2f2; color: var(--ink);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.foot ::selection { background: var(--ink); color: #f2f2f2; }
.foot .ghost { position: absolute; left: 0; right: 0; top: clamp(14px, 3vh, 40px); text-align: center; line-height: .8; pointer-events: none; user-select: none; }
.foot .ghost .fit { color: #e6e7f5; font-weight: 200; line-height: .8; }
.foot-row {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px;
  padding-bottom: clamp(32px, 4.4vw, 68px);
  font: 500 clamp(15px, 1.3vw, 21px) / 1.9 var(--display);
  letter-spacing: .02em; text-transform: uppercase;
}
.foot-row p { margin: 0; }
.foot .fr { text-align: right; }
.fcards { display: flex; gap: clamp(14px, 1.6vw, 24px); }
.fcard {
  display: grid; place-items: center;
  width: clamp(38px, 3.4vw, 50px); height: clamp(54px, 4.8vw, 70px);
  border: 2px solid var(--ink); color: var(--ink);
  transition: background .12s linear, color .12s linear;
}
.fcard:hover { background: var(--ink); color: #f2f2f2; }
.foot :focus-visible { outline-color: var(--ink); }

/* ———————————————— command palette ———————————————— */
.pal { position: fixed; inset: 0; z-index: 80; display: none; }
.pal.open { display: block; }
.pal-bg { position: absolute; inset: 0; background: rgba(8, 9, 24, .94); }
.pal-box { position: absolute; left: 50%; top: clamp(70px, 14vh, 160px); width: min(760px, calc(100vw - 32px)); transform: translateX(-50%); }
.pal-in { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 16px 0 18px; background: var(--panel); border: 2px solid var(--blue-hi); }
.pal-in .glyph { width: 28px; height: 28px; color: var(--blue-hi); flex: none; }
.pal-in input {
  flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0;
  color: var(--text); font: 400 16px var(--sans); caret-color: var(--blue-hi);
}
.pal-in input::placeholder { color: var(--mute); }
.pal-list { max-height: min(52vh, 420px); overflow: auto; margin-top: 8px; background: var(--panel); border: 1px solid var(--line-2); }
.pal-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; font: 400 15px / 1.1 var(--sans); color: var(--dim); cursor: pointer; }
.pal-item .g { font: 400 11px / 1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.pal-item[aria-selected="true"] { background: var(--blue); color: #fff; }
.pal-item[aria-selected="true"] .g { color: #c9c9ff; }
.pal-empty { padding: 22px 18px; color: var(--mute); }
.pal-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line-2); color: var(--mute); }
.pal-foot .msg { margin-left: auto; color: var(--text); }

/* ———————————————— page-load + scroll reveal ———————————————— */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wipe { from { clip-path: inset(0 0 100% 0); transform: translateY(.1em); } to { clip-path: inset(0 0 0 0); transform: none; } }

.js .in { animation: rise .6s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
.js .wipe { animation: wipe .9s cubic-bezier(.2, .7, .1, 1) backwards; animation-delay: .22s; }
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .rv.on { opacity: 1; transform: none; }

/* ———————————————— scroll progress (replaces the native scrollbar) ———————————————— */
.prog { position: fixed; top: 0; right: 0; width: 3px; height: 100%; z-index: 75; background: var(--blue-hi); transform: scaleY(0); transform-origin: top; pointer-events: none; }

/* ———————————————— hero / closing wordmark: letters rise out of a mask ———————————————— */
.js [data-letters]:not(.letters), .js [data-words]:not(.words) { visibility: hidden; animation: unhide 0s 2.6s forwards; }
@keyframes unhide { to { visibility: visible; } }
.letters .l { display: inline-block; overflow: hidden; vertical-align: top; padding: .11em 0 .11em; margin: -.11em 0; }
.letters .c { display: inline-block; transform: translateY(112%); }
.letters.on .c { animation: lift 1s cubic-bezier(.2, .85, .1, 1) forwards; animation-delay: calc(var(--k) * 60ms + var(--base, 0ms)); }
@keyframes lift { from { transform: translateY(112%); } to { transform: none; } }

/* ———————————————— headings: words rise out of a mask ———————————————— */
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em 0 .24em; margin: -.1em 0 -.24em; }
.words .w > span { display: inline-block; transform: translateY(115%); }
.words.on .w > span { transform: none; transition: transform .95s cubic-bezier(.2, .85, .1, 1); transition-delay: calc(var(--k) * 55ms); }

/* ———————————————— images: unmask on entry ———————————————— */
.js .clip { clip-path: inset(0 0 100% 0); transition: clip-path 1.25s cubic-bezier(.7, 0, .1, 1); }
.js .clip.on { clip-path: inset(0 0 0 0); }
.js .fig.clip img { transform: scale(1.16); transition: transform 1.9s cubic-bezier(.2, .7, .1, 1); }
.js .fig.clip.on img { transform: none; }

/* ———————————————— ticker ———————————————— */
.ticker { overflow: hidden; margin-top: clamp(72px, 9vw, 160px); border-block: 1px solid var(--line-2); padding: clamp(14px, 1.6vw, 26px) 0 clamp(10px, 1.2vw, 20px); }
.ticker-track { display: flex; width: max-content; will-change: transform; }
.tk { display: flex; align-items: center; gap: clamp(24px, 3vw, 56px); padding-right: clamp(24px, 3vw, 56px); font: 300 clamp(48px, 7vw, 120px) / .9 var(--display); text-transform: uppercase; white-space: nowrap; }
.tk i { flex: none; width: clamp(10px, 1vw, 16px); height: clamp(10px, 1vw, 16px); background: var(--blue-hi); }
.tk span:nth-of-type(even) { color: var(--mute); }

/* ———————————————— palette open ———————————————— */
.pal.open .pal-bg { animation: fade .2s linear; }
.pal.open .pal-box { animation: palin .28s cubic-bezier(.2, .7, .2, 1); }
@keyframes palin { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.pal-list { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ———————————————— small screens ———————————————— */
@media (max-width: 900px) {
  .row { grid-template-columns: 2.4rem minmax(0, 1fr) auto; row-gap: 12px; }
  .row .n { grid-row: 1; align-self: center; padding-top: 0; }
  .row .tag { grid-column: 3; grid-row: 1; }
  .row h3 { grid-column: 2 / 4; grid-row: 2; }
  .row p { grid-column: 2 / 4; grid-row: 3; }
  .ask-body, .fig-ask, .tr-copy, .tr-card, .rules-copy, .fig-rules { grid-column: 1 / 13; }
  .fig-ask { aspect-ratio: 327 / 320; margin-bottom: 32px; }
  .fig-rules { margin-top: 32px; }
  .tr-grid { row-gap: 24px; align-content: space-between; }
  .spec { grid-template-columns: 1fr; }
}
@media (max-height: 780px) {
  .curtain .block-title { font-size: clamp(36px, 4.2vw, 64px); }
  #termTr { min-height: 11rem; }
}
@media (max-width: 640px) {
  .foot-row { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; }
  .foot .fr { text-align: center; }
  :root { --fh: clamp(480px, 74vh, 620px); }
  .top { grid-template-columns: repeat(4, auto) !important; justify-content: space-between; }
  .top .emblem { display: none; }
  .top a.link { padding-inline: 0; font-size: 14px; letter-spacing: .1em; }
  .cmdbar .toggle { display: none; }
  .cmdbar .label { font-size: 14px; }
  .btns { display: flex; flex-direction: column; width: 100%; }
  .btn { text-align: center; padding-block: 18px 16px; }
  .hint { flex-direction: column; gap: 6px; }
  .foot .wrap { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .js .in, .js .wipe { animation: none; }
  .letters .c, .words .w > span { transform: none !important; animation: none !important; transition: none !important; }
  .js .clip, .js .fig.clip img { clip-path: none; transform: none; transition: none; }
  .js .sec-head::before { transform: none; transition: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .cmdbar .caret, .cur, body::after { animation: none; }
  .topbar.snap { transition: none; }
}
