/* Grey Eagle Aces Casino — the site in the app's own instrument: milled plates, level bars
   with a spirit vial, a bearing tape under every title, engraved art. Tokens from lib/theme. */

@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --edge: #060505;
  --dark: #0E0A0A;
  --dark-grey: #2D2A28;
  --plate: #262220;
  --plate-deep: #1D1918;
  --light-grey: #C8C5C3;
  --light: #F5F2EC;
  --white: #FFFEFB;
  --hint: #9FA6B4;
  --primary: #982228;
  --primary-ink: #E0646A;
  --primary-deep: #701517;
  --secondary: #535D9B;
  --secondary-cta: #6973B4;
  --tertiary: #FF9D23;
  --on-tertiary: #1A0F05;
  --spirit: #D8D5D2;
  --line: rgba(245, 242, 236, .14);
  --edge-light: rgba(245, 242, 236, .08);
  --edge-shade: rgba(14, 10, 10, .4);
  --tick: rgba(200, 197, 195, .7);
  --engrave: rgba(14, 10, 10, .7);
  --plate-shadow: rgba(6, 5, 5, .6);
  --ease-tip: cubic-bezier(.2, .9, .25, 1.15);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(14px, 4vw, 40px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-width: 250px;
  background: var(--dark);
  color: var(--light-grey);
  font-family: "Instrument Sans", system-ui, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}
/* Engraving: fine horizontal lines over everything, as on the app's plates. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(180deg, rgba(245, 242, 236, .018) 0 1px, transparent 1px 3px);
}
main, header, footer { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--primary); color: var(--light); }
:focus-visible { outline: 2px solid var(--tertiary); outline-offset: 3px; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--light); color: var(--dark); padding: 8px 12px; font: 600 12px "IBM Plex Mono", monospace; letter-spacing: .1em; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Type */
.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; }
.display { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; color: var(--light); line-height: .95; letter-spacing: -.01em; }
.label { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--light-grey); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--tertiary); }
.kicker::before { content: ""; width: 7px; height: 7px; background: var(--primary-ink); flex: none; }
.reading { font-family: "IBM Plex Mono", monospace; font-weight: 500; font-variant-numeric: tabular-nums; }
.lede { font-size: clamp(16px, 1.1vw + 12px, 19px); line-height: 1.55; color: var(--light-grey); max-width: 38em; }
.ink-light { color: var(--light); }
.ink-amber { color: var(--tertiary); }
.ink-red { color: var(--primary-ink); }
.ink-indigo { color: var(--secondary-cta); }
.break-any { overflow-wrap: anywhere; }

/* Plates: milled metal a little above the page, light along the top edge, shade along the bottom. */
.plate {
  position: relative;
  background: var(--plate);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 var(--edge-light), inset 0 -1px 0 var(--edge-shade), 0 3px 6px var(--plate-shadow);
  background-image: repeating-linear-gradient(180deg, rgba(245, 242, 236, .05) 0 1px, transparent 1px 3px);
}
.plate.deep { background-color: var(--plate-deep); }
.plate.ruled { padding-top: 22px; }
.plate.ruled::before, .ticks-top::before {
  content: "";
  position: absolute;
  left: 10px; right: 10px; top: 0; height: 9px;
  background:
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 8px);
  background-size: 100% 9px, 100% 5px;
  background-repeat: no-repeat;
  opacity: .55;
}
.plate-pad { padding: 18px; }
@media (min-width: 640px) { .plate-pad { padding: 24px; } }

/* The level bar: a milled bar with a spirit vial at its end. Hover or press tips it 2.5 degrees
   and the bubble runs to the high end; let go and it settles back level. */
.lvl {
  --body: var(--primary);
  --ink: var(--light);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 0 12px 0 18px;
  border: 0;
  border-radius: 3px;
  background: var(--body);
  background-image: repeating-linear-gradient(180deg, rgba(245, 242, 236, .05) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 1px 0 rgba(245, 242, 236, .14), inset 0 -1px 0 var(--edge-shade), 0 3px 6px var(--plate-shadow);
  color: var(--ink);
  font: 600 13px/1.1 "Instrument Sans", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transform-origin: 50% 50%;
  transition: transform .5s var(--ease-tip), filter .2s ease;
  max-width: 100%;
}
.lvl > .lvl-label { display: inline-flex; align-items: center; gap: 10px; padding: 12px 0; text-align: left; min-width: 0; }
.lvl > .lvl-label i { font-size: 16px; letter-spacing: 0; }
.lvl:hover, .lvl:focus-visible { transform: rotate(-2.5deg); transition: transform .16s ease-out; }
.lvl:active { transform: rotate(-2.5deg) translateY(1px); filter: brightness(.95); }
.lvl.secondary { --body: var(--secondary); }
.lvl.reward { --body: var(--tertiary); --ink: var(--on-tertiary); }
.lvl.rule { --body: var(--light-grey); --ink: var(--dark); }
.lvl.reward::after, .lvl.rule::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 0; height: 9px;
  background:
    repeating-linear-gradient(90deg, var(--engrave) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--engrave) 0 1px, transparent 1px 8px);
  background-size: 100% 9px, 100% 5px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}
.lvl.block { width: 100%; }
.lvl.small { min-height: 40px; padding: 0 9px 0 14px; font-size: 11.5px; gap: 12px; }
.lvl[disabled], .lvl[aria-disabled="true"] { --body: #1D1918; --ink: var(--hint); cursor: not-allowed; transform: none; }

.vial {
  position: relative;
  flex: none;
  width: 64px;
  height: 16px;
  border-radius: 8px;
  background: var(--dark);
  border: 1px solid var(--line);
  padding: 2px;
}
.small .vial { width: 48px; height: 14px; }
.vial > span {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 11.5px), var(--engrave) calc(50% - 11.5px) calc(50% - 10px), transparent calc(50% - 10px) calc(50% + 10px), var(--engrave) calc(50% + 10px) calc(50% + 11.5px), transparent calc(50% + 11.5px)),
    var(--spirit);
}
.vial > span::after {
  content: "";
  position: absolute;
  top: 1.5px; bottom: 1.5px;
  left: calc(50% - 8px);
  width: 16px;
  border-radius: 6px;
  background: var(--white);
  box-shadow: inset 0 0 0 .5px rgba(14, 10, 10, .3), inset 3px 1.5px 0 -1.5px var(--light-grey);
  transition: transform .9s cubic-bezier(.2, 1.4, .35, 1);
}
.lvl:hover .vial > span::after, .lvl:focus-visible .vial > span::after, .lvl.busy .vial > span::after { transform: translateX(14px); transition: transform .26s cubic-bezier(.3, 0, .2, 1); }
.small .vial > span::after { width: 13px; left: calc(50% - 6.5px); }
@keyframes bubble-run { 0%, 100% { transform: translateX(-16px); } 50% { transform: translateX(16px); } }
.lvl.busy .vial > span::after { animation: bubble-run 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .lvl, .lvl:hover, .lvl:focus-visible { transform: none; transition: none; }
  .vial > span::after, .lvl.busy .vial > span::after { transition: none; animation: none; transform: none; }
}

/* Header: the lockup, the nav, and the bearing tape that every page title sits on. */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(14, 10, 10, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.lockup img { width: 34px; height: 34px; flex: none; }
.lockup .word { display: flex; flex-direction: column; min-width: 0; }
.lockup .name { font-family: "Instrument Serif", serif; font-style: italic; font-size: 25px; line-height: .95; color: var(--light); white-space: nowrap; }
.lockup .sub { font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 8.5px; letter-spacing: .22em; color: var(--light-grey); margin-top: 3px; white-space: nowrap; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a { position: relative; padding: 10px 12px; text-decoration: none; font: 600 12px "Instrument Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--light-grey); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--light); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 6px; height: 6px; margin-left: -3px; background: var(--primary-ink); transform: rotate(45deg); }
.header-cta { display: none; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: 3px; background: var(--dark-grey); color: var(--light); font-size: 17px; cursor: pointer; box-shadow: inset 0 1px 0 var(--edge-light), 0 3px 6px var(--plate-shadow); }
.mobile-nav { display: none; padding: 6px 0 18px; }
.mobile-nav.open { display: block; }
.mobile-nav a.row { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font: 600 13px "Instrument Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--light); }
.mobile-nav a.row i { color: var(--light-grey); font-size: 12px; }
.mobile-nav .lvl { margin-top: 14px; }
@media (min-width: 1024px) {
  .nav { display: flex; }
  .header-cta { display: inline-flex; }
  .menu-btn, .mobile-nav, .mobile-nav.open { display: none; }
}
@media (max-width: 340px) {
  .lockup .name { font-size: 20px; }
  .lockup img { width: 28px; height: 28px; }
  .lockup .sub { font-size: 7.5px; letter-spacing: .16em; }
}

.tape { position: relative; height: 34px; overflow: hidden; border-top: 1px solid rgba(245, 242, 236, .05); }
.tape svg { position: absolute; left: 50%; top: 0; height: 34px; width: 2400px; margin-left: -1200px; }
.tape .index { position: absolute; left: 50%; top: 13px; width: 0; height: 0; margin-left: -6px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid var(--primary-ink); }
.tape .brg { position: absolute; right: var(--gutter); top: 0; padding: 0 0 0 10px; background: linear-gradient(90deg, transparent, var(--dark) 12px); font: 500 10px/34px "IBM Plex Mono", monospace; letter-spacing: .14em; color: var(--light-grey); }

/* Page head: kicker, serif title, mono reading. */
.page-head { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-head .art { position: absolute; inset: 0; background-size: cover; background-position: center 40%; opacity: .32; filter: saturate(.9); }
.page-head .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 10, .4), var(--dark) 92%), linear-gradient(90deg, var(--dark) 0, rgba(14, 10, 10, .2) 60%); }
.page-head .inner { position: relative; padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(36px, 6vw, 72px); }
.page-head h1 { font-size: clamp(44px, 7vw, 92px); margin: 16px 0 14px; }

/* Sections */
.section { padding: clamp(64px, 9vw, 128px) 0; position: relative; }
.section-head h2 { font-size: clamp(38px, 5.4vw, 72px); margin: 14px 0 16px; }
.rule-line { height: 1px; background: var(--line); }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: min(100svh, 980px); display: flex; align-items: center; }
.hero .bg { position: absolute; inset: -4% 0 0 0; background-size: cover; background-position: 62% 40%; }
.hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--dark) 6%, rgba(14, 10, 10, .78) 42%, rgba(14, 10, 10, .45) 70%, rgba(14, 10, 10, .7)), linear-gradient(180deg, rgba(14, 10, 10, .2) 50%, var(--dark) 98%); }
.hero h1 { font-size: clamp(54px, 9.4vw, 140px); margin: 18px 0 22px; }
.hero h1 em { font-style: italic; color: var(--light); }
.hero-grid { position: relative; display: grid; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.store-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.store-row .lvl { flex: 1 1 250px; max-width: 340px; }
@media (max-width: 300px) { .store-row .lvl { flex-basis: 100%; } .lvl { letter-spacing: .08em; font-size: 11.5px; padding-left: 12px; gap: 8px; } .lvl .vial { width: 34px; } }
.fine { font: 500 11px/1.5 "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--light-grey); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 34px; max-width: 480px; }
.stat { padding: 14px 12px 12px; text-align: left; }
.stat b { display: block; font: 400 clamp(30px, 4vw, 44px)/.9 "Instrument Serif", serif; color: var(--light); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; font: 500 10px "IBM Plex Mono", monospace; letter-spacing: .16em; text-transform: uppercase; }

/* Phone */
.phone-stage { position: relative; display: flex; justify-content: center; align-items: center; padding: 20px 0; }
.reticle { position: absolute; width: min(560px, 120%); aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .55; pointer-events: none; }
.reticle svg { width: 100%; height: 100%; animation: turn 120s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .reticle svg { animation: none; } }
.phone {
  position: relative;
  width: min(300px, 76vw);
  aspect-ratio: 1206 / 2622;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #3a3532, #171413 40%, #221e1c);
  box-shadow: inset 0 0 0 1px rgba(245, 242, 236, .16), 0 40px 80px -20px rgba(0, 0, 0, .85), 0 12px 30px rgba(0, 0, 0, .55);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; background: var(--dark); }
.phone.sm { width: min(232px, 64vw); border-radius: 36px; padding: 8px; }
.phone.sm img { border-radius: 29px; }
.float-plate { position: absolute; z-index: 2; padding: 12px 14px; min-width: 150px; }
.float-plate .t { font: 400 22px/1 "Instrument Serif", serif; color: var(--light); }
@media (max-width: 520px) { .float-plate { display: none; } }

/* Duel ledger */
.ledger { font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.ledger .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ledger .row:last-child { border-bottom: 0; }
.ledger .tot { color: var(--light); font-weight: 600; }
.steps { counter-reset: step; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.step .n { font: 400 44px/.8 "Instrument Serif", serif; color: var(--primary-ink); min-width: 1.3ch; }
.step h3 { margin: 0 0 6px; font: 600 16px "Instrument Sans", sans-serif; color: var(--light); }
.step p { margin: 0; }

/* Mini playing cards */
.cards { display: flex; gap: 8px; flex-wrap: wrap; }
.pcard { width: 46px; height: 64px; border-radius: 4px; background: var(--white); color: #1b1b1b; position: relative; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); font: 400 17px/1 "Instrument Serif", serif; flex: none; }
.pcard .c { position: absolute; left: 5px; top: 4px; text-align: center; }
.pcard .c small { display: block; font-size: 12px; }
.pcard .pip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%); font-size: 22px; }
.pcard.red { color: #b3262d; }
.pcard.held { transform: translateY(-8px); outline: 2px solid var(--tertiary); outline-offset: 2px; }

/* Eagle cards */
.eagle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
@media (max-width: 360px) { .eagle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 270px) { .eagle-grid { grid-template-columns: 1fr; } }
.eagle { position: relative; padding: 8px; transition: transform .5s var(--ease-tip); }
.eagle:hover { transform: rotate(-1.2deg) translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .eagle:hover { transform: none; } }
.eagle .art { position: relative; aspect-ratio: 600 / 906; overflow: hidden; border-radius: 2px; background: var(--edge); }
.eagle .art img { width: 100%; height: 100%; object-fit: cover; }
.eagle .idx { position: absolute; top: 6px; right: 8px; font: 400 22px/1 "Instrument Serif", serif; color: var(--light); text-align: center; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.eagle .idx small { display: block; font-size: 14px; }
.eagle .idx.red small { color: var(--primary-ink); }
.eagle .meta { padding: 10px 4px 4px; }
.eagle .meta .n { font: 400 20px/1.05 "Instrument Serif", serif; color: var(--light); }
.eagle .meta .p { margin-top: 4px; font-size: 13px; line-height: 1.35; }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 600 10px "IBM Plex Mono", monospace; letter-spacing: .14em; text-transform: uppercase; }
.tag::before { content: ""; width: 2px; height: 10px; background: currentColor; }
.r-common { color: var(--light-grey); }
.r-rare { color: var(--secondary-cta); }
.r-epic { color: var(--primary-ink); }
.r-legendary { color: var(--tertiary); }

.meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.meter .m { padding: 12px; }
.meter b { display: block; font: 400 30px/1 "Instrument Serif", serif; color: var(--light); }
.meter .bar { margin-top: 10px; height: 4px; background: rgba(245, 242, 236, .1); }
.meter .bar i { display: block; height: 100%; background: currentColor; }
@media (max-width: 420px) { .meter { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Regions */
.regions { display: grid; gap: 18px; }
@media (min-width: 900px) { .regions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.region { overflow: hidden; display: flex; flex-direction: column; }
.region .pic { position: relative; aspect-ratio: 1200 / 795; overflow: hidden; }
.region .pic img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 6s var(--ease-out); }
.region:hover .pic img { transform: scale(1.12) translateX(-2%); }
@media (prefers-reduced-motion: reduce) { .region .pic img, .region:hover .pic img { transform: none; transition: none; } }
.region .num { position: absolute; left: 14px; top: 10px; font: 400 44px/1 "Instrument Serif", serif; color: var(--light); text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.region .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.region h3 { margin: 0; font: 400 30px/1 "Instrument Serif", serif; color: var(--light); }
.kv { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--light-grey); }
.kv b { color: var(--light); font-weight: 500; }

/* Tables row */
.tables { display: grid; gap: 14px; }
@media (min-width: 900px) { .tables { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.table-plate { padding: 22px 20px 20px; }
.table-plate .ic { width: 44px; height: 44px; border-radius: 3px; display: grid; place-items: center; background: var(--dark); color: var(--light); font-size: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.table-plate h3 { margin: 16px 0 4px; font: 400 28px/1 "Instrument Serif", serif; color: var(--light); }

/* Ladder */
.ladder { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ladder .d { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 2px; background: var(--dark); box-shadow: inset 0 0 0 1px var(--line); font: 600 14px "IBM Plex Mono", monospace; color: var(--light); }
.ladder .d.done { background: var(--secondary); box-shadow: none; }
.ladder .d.today { box-shadow: inset 0 0 0 2px var(--light); }
.ladder .d.big { box-shadow: inset 0 0 0 1px var(--tertiary); color: var(--tertiary); }
.ladder-cap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 6px; font: 500 9px/1.3 "IBM Plex Mono", monospace; letter-spacing: .04em; text-transform: uppercase; color: var(--light-grey); text-align: center; overflow-wrap: anywhere; }
@media (max-width: 300px) { .ladder, .ladder-cap { gap: 3px; } .ladder .d { font-size: 11px; } .ladder-cap { font-size: 7.5px; } }

/* Ranks: a vernier with the six titles */
.ranks { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 28px; }
.ranks::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 12px); opacity: .5; }
.ranks .r { position: relative; padding: 14px 8px 0 0; border-left: 1px solid var(--line); padding-left: 10px; }
.ranks .r::before { content: ""; position: absolute; left: -4px; top: -20px; width: 7px; height: 7px; background: var(--light-grey); transform: rotate(45deg); }
.ranks .r:last-child::before { background: var(--tertiary); }
.ranks .r b { display: block; font: 400 clamp(18px, 2vw, 26px)/1 "Instrument Serif", serif; color: var(--light); }
.ranks .r span { display: block; margin-top: 6px; font: 500 10px "IBM Plex Mono", monospace; letter-spacing: .12em; color: var(--light-grey); }
@media (max-width: 760px) { .ranks { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; } }
@media (max-width: 360px) { .ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Screens strip */
.strip { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px var(--gutter) 30px; scrollbar-width: thin; scrollbar-color: var(--dark-grey) transparent; }
.strip figure { margin: 0; scroll-snap-align: center; flex: none; }
.strip figcaption { margin-top: 14px; text-align: center; }
.strip-ctl { display: flex; gap: 8px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 2px; font: 400 clamp(21px, 2.3vw, 27px)/1.15 "Instrument Serif", serif; color: var(--light); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .knob { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 3px; background: var(--dark-grey); color: var(--light-grey); font-size: 12px; transition: transform .4s var(--ease-tip); }
.faq details[open] summary .knob { transform: rotate(45deg); color: var(--tertiary); }
.faq .a { padding: 0 2px 24px; max-width: 46em; }
.faq .a p { margin: 0 0 10px; }

/* Forms */
.field { display: block; }
.field .label { display: block; margin-bottom: 8px; }
.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: 3px;
  background: var(--dark);
  color: var(--light);
  font: 400 16px "Instrument Sans", sans-serif;
  box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 4px rgba(0, 0, 0, .4);
  transition: box-shadow .2s;
}
.input::placeholder { color: rgba(200, 197, 195, .5); }
.input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--tertiary), inset 0 2px 4px rgba(0, 0, 0, .4); }
textarea.input { min-height: 170px; resize: vertical; background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(245, 242, 236, .05) 27px 28px); line-height: 28px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--light-grey) 50%), linear-gradient(135deg, var(--light-grey) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.err { margin-top: 8px; font: 500 11px/1.4 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-ink); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border-radius: 3px; background: var(--dark); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; display: grid; place-items: center; }
.check input:checked { background: var(--secondary); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--light); border-bottom: 2px solid var(--light); transform: translateY(-1px) rotate(-45deg); }
.sent { text-align: left; }
.stamp { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--tertiary); color: var(--tertiary); font-size: 24px; transform: rotate(-8deg); }

/* Legal */
.legal-layout { display: grid; gap: 40px; }
.legal-layout > * { min-width: 0; }
@media (min-width: 1024px) { .legal-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; } }
.toc { align-self: start; }
@media (min-width: 1024px) { .toc { position: sticky; top: 120px; max-height: calc(100vh - 140px); overflow: auto; } }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; }
.toc a { display: block; padding: 6px 0; text-decoration: none; font: 500 11px/1.4 "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--light-grey); border-left: 1px solid var(--line); padding-left: 12px; }
.toc a:hover { color: var(--light); border-left-color: var(--primary-ink); }
.toc details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc details summary::-webkit-details-marker { display: none; }
.legal { max-width: 46em; color: var(--light-grey); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.legal .meta { font: 500 12px/1.6 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--light-grey); padding: 14px 16px; margin: 0 0 28px; }
.legal h2 { scroll-margin-top: 120px; margin: 52px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); font: 400 clamp(22px, 2.2vw, 28px)/1.15 "Instrument Serif", serif; letter-spacing: .03em; color: var(--light); }
.legal h2 .no { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: .14em; color: var(--tertiary); display: block; margin-bottom: 8px; }
.legal h3 { margin: 30px 0 10px; font: 600 17px "Instrument Sans", sans-serif; color: var(--light); }
.legal h3 .no { font: 500 13px "IBM Plex Mono", monospace; color: var(--primary-ink); margin-right: 8px; }
.legal p { margin: 0 0 14px; }
.legal ul, .legal ol { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal ul li::marker { color: var(--primary-ink); }
.legal ol li::marker { color: var(--tertiary); font-family: "IBM Plex Mono", monospace; }
.legal a { color: var(--light); text-decoration-color: var(--primary-ink); text-underline-offset: 3px; }
.legal .table-wrap { overflow-x: auto; margin: 6px 0 20px; }
.legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font: 500 10.5px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--light-grey); background: var(--plate-deep); }
.legal td:first-child { color: var(--light); font-family: "IBM Plex Mono", monospace; font-size: 13px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--edge); padding: 64px 0 28px; }
.foot-grid { display: grid; gap: 36px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.site-footer h4 { margin: 0 0 14px; font: 600 11px "IBM Plex Mono", monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--tertiary); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a, .site-footer li button { display: inline-block; padding: 5px 0; font: 400 15px "Instrument Sans", sans-serif; color: var(--light-grey); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.site-footer li a:hover, .site-footer li button:hover { color: var(--light); }
.foot-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.age-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--light-grey); font: 600 12px "IBM Plex Mono", monospace; color: var(--light); flex: none; }

/* Cookie banner: a plate that rises from the bottom edge. */
.cookie {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 60;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px;
  transform: translateY(140%);
  transition: transform .6s var(--ease-tip);
  box-shadow: inset 0 1px 0 var(--edge-light), 0 20px 50px rgba(0, 0, 0, .7);
}
.cookie.show { transform: none; }
@media (prefers-reduced-motion: reduce) { .cookie { transition: none; } }
.cookie .row { display: grid; gap: 16px; align-items: center; }
@media (min-width: 860px) { .cookie .row { grid-template-columns: 1fr auto; } }
.cookie .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie .actions .lvl { flex: 1 1 170px; }
.cookie .manage { font: 600 11px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--light); text-decoration: underline; text-decoration-color: var(--primary-ink); text-underline-offset: 4px; padding: 10px 4px; }
@media (max-width: 300px) { .cookie { left: 6px; right: 6px; bottom: 6px; padding: 14px; } }

.toast { position: fixed; left: 50%; bottom: 20px; z-index: 70; transform: translate(-50%, 160%); padding: 12px 16px; transition: transform .5s var(--ease-tip); max-width: calc(100% - 24px); }
.toast { visibility: hidden; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
