@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/spectral-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/spectral-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --table: #f6f5f2;
  --card: #ffffff;
  --ink: #141414;
  --muted: #545454;
  --red: #c1121f;
  --seam: #dad6ce;
  --edge: #b9b3a8;
  --shade: 0 1px 0 rgb(20 20 20 / 0.04), 0 12px 26px -20px rgb(20 20 20 / 0.55);
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--table);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-size-adjust: from-font;
}

img { display: block; max-width: 100%; height: auto; }

a, button, summary, select { touch-action: manipulation; }
a { color: var(--red); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0 0 0.55em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.6vw, 4.3rem); letter-spacing: -0.015em; overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p, ul, ol, dl { margin: 0 0 1em; }
p { text-wrap: pretty; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

svg.mini, svg.big, svg.mark { display: inline-block; fill: currentColor; flex: none; vertical-align: middle; }
svg.mini { width: 0.78em; height: 0.78em; }
svg.big { width: 2.8rem; height: 2.8rem; }
svg.mark { width: 1.35rem; height: 1.35rem; }
.red { color: var(--red); }
.black { color: var(--ink); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--ink);
  color: var(--card);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * clamp(1rem, 4vw, 3rem), 76rem); margin-inline: auto; }

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--seam);
  border-radius: 12px;
  box-shadow: var(--shade);
}

.idx {
  position: absolute;
  top: 0.5rem;
  left: 0.55rem;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  line-height: 1;
  pointer-events: none;
}
.idx b { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.idx .mini { width: 0.8rem; height: 0.8rem; }
.idx.end { top: auto; left: auto; bottom: 0.5rem; right: 0.55rem; rotate: 180deg; }

.top { border-bottom: 1px solid var(--seam); background: var(--table); }
.top-in {
  width: min(100% - 2 * clamp(1rem, 4vw, 3rem), 76rem);
  margin-inline: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2.4rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1;
  padding-bottom: 1.2rem;
  white-space: nowrap;
}
.wordmark .mark { color: var(--red); }

.hand ul { list-style: none; margin: 0; padding: 0 0.5rem 0 0; display: flex; align-items: flex-end; }
.hand li { flex: none; }
.navcard {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.6rem;
  aspect-ratio: 5 / 7;
  margin-bottom: -1.6rem;
  background: var(--card);
  border: 1px solid var(--seam);
  border-radius: 8px;
  box-shadow: var(--shade);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.15;
}
.navcard .name { padding: 0 0.3rem; }
.navcard .idx b { font-size: 0.9rem; }
.navcard .idx .mini { width: 0.65rem; height: 0.65rem; }
.navcard:hover, .navcard:focus-visible { border-color: var(--edge); }
.navcard[aria-current="page"] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shade); }

@media (min-width: 900px) {
  .top { overflow: hidden; }
  .hand li { margin-left: -0.55rem; transform-origin: 50% 160%; }
  .hand li:nth-child(1) { rotate: -9deg; }
  .hand li:nth-child(2) { rotate: -5.5deg; translate: 0 -0.25rem; }
  .hand li:nth-child(3) { rotate: -2deg; translate: 0 -0.4rem; }
  .hand li:nth-child(4) { rotate: 2deg; translate: 0 -0.4rem; }
  .hand li:nth-child(5) { rotate: 5.5deg; translate: 0 -0.25rem; }
  .hand li:nth-child(6) { rotate: 9deg; }
  .hand li:has([aria-current="page"]), .hand li:hover, .hand li:focus-within { z-index: 2; translate: 0 -1rem; }
  @media (prefers-reduced-motion: no-preference) {
    .hand li { transition: translate 0.18s ease, rotate 0.18s ease; }
  }
}

@media (max-width: 899px) {
  .top-in { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .wordmark { padding-bottom: 0; }
  .hand { margin-inline: calc(-1 * clamp(1rem, 4vw, 3rem)); }
  .hand ul {
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.4rem clamp(1rem, 4vw, 3rem) 0.9rem;
    scrollbar-width: thin;
  }
  .hand li { scroll-snap-align: start; }
  .navcard { width: 4.1rem; margin-bottom: 0; }
}

main { display: block; }

.opening { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem); overflow-x: clip; }
.opening-grid { display: grid; gap: 2.5rem; align-items: center; }
.opening-text { max-width: 34rem; }
.lead { font-size: 1.18rem; }
.opening-links { color: var(--muted); }

.fan { list-style: none; margin: 0; padding: 0; }

.face {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  aspect-ratio: 5 / 7;
  padding: 2.4rem 1.2rem 2.9rem;
  color: var(--ink);
  text-decoration: none;
}
.face-pip { display: flex; justify-content: center; padding-block: 0.4rem 0.2rem; }
.face-text { display: grid; gap: 0.35rem; align-content: start; }
.face h2 { font-size: 1.4rem; margin: 0; }
.face .sub { font-family: var(--serif); font-weight: 600; font-size: 0.98rem; color: var(--muted); line-height: 1.25; }
.face .blurb { font-size: 0.88rem; line-height: 1.42; }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
.tags span { font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 999px; border: 1px solid var(--seam); color: var(--muted); white-space: nowrap; }
.face:hover { border-color: var(--edge); }
.face:hover h2 { color: var(--red); }

@media (min-width: 1000px) {
  .opening-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); }
  .fan { display: flex; justify-content: center; align-items: flex-end; padding: 2rem 0 1.5rem 1rem; }
  .fan > li { flex: 0 0 min(13.5rem, 26%); margin-inline: -1.15rem; transform-origin: 50% 120%; }
  .fan > li:nth-child(1) { rotate: -11deg; translate: 0 1.6rem; }
  .fan > li:nth-child(2) { rotate: -3.5deg; translate: 0 0.2rem; }
  .fan > li:nth-child(3) { rotate: 3.5deg; translate: 0 0.2rem; }
  .fan > li:nth-child(4) { rotate: 11deg; translate: 0 1.6rem; }
  .fan > li:hover, .fan > li:focus-within { z-index: 2; rotate: 0deg; translate: 0 -0.8rem; }
  @media (prefers-reduced-motion: no-preference) {
    .fan > li { transition: rotate 0.22s ease, translate 0.22s ease; }
  }
}
@media (max-width: 999px) {
  .fan {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * clamp(1rem, 4vw, 3rem));
    padding: 0.5rem clamp(1rem, 4vw, 3rem) 1rem;
  }
  .fan > li { flex: 0 0 min(15rem, 78%); scroll-snap-align: start; display: flex; }
  .fan .face { width: 100%; }
}

.band { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--seam); }
.band-intro { color: var(--muted); max-width: 44rem; margin-bottom: 2rem; }

.workbench { display: grid; gap: 1.75rem; }
@media (min-width: 960px) { .workbench { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; } }

.sheet { padding: clamp(2.25rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem); }

.sim-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.3rem; }
.field label { font-weight: 600; }
.field small { color: var(--muted); font-size: 0.88rem; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.8rem;
  background: var(--table);
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 8px;
  font: 600 1.15rem/1.2 var(--sans);
  font-variant-numeric: tabular-nums;
}
.field input:user-invalid { border-color: var(--red); }
.sim-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }

.act {
  min-height: 46px;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--card);
  font: 600 0.98rem/1.2 var(--sans);
  cursor: pointer;
}
.act:hover { background: #2c2c2c; }
.act.ghost { background: transparent; color: var(--ink); }
.act.ghost:hover { background: var(--card); border-color: var(--red); color: var(--red); }
.act:disabled { opacity: 0.45; cursor: not-allowed; }

.deckline { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.25rem; }
.deck {
  flex: none;
  display: grid;
  place-items: center;
  width: 5.2rem;
  aspect-ratio: 5 / 7;
  border-radius: 8px;
  border: 4px solid var(--card);
  background: var(--red) repeating-linear-gradient(45deg, rgb(255 255 255 / 0.16) 0 3px, transparent 3px 9px);
  box-shadow: 3px 3px 0 -1px var(--card), 3px 3px 0 0 var(--seam), 6px 6px 0 -1px var(--card), 6px 6px 0 0 var(--seam), var(--shade);
  color: var(--card);
  font: 600 1.5rem/1 var(--serif);
  font-variant-numeric: tabular-nums;
}
.result .big { font-family: var(--serif); font-size: clamp(2.6rem, 2rem + 2.2vw, 3.6rem); line-height: 1; color: var(--red); margin: 0 0 0.35rem; font-variant-numeric: tabular-nums; }
.result .note { color: var(--muted); font-size: 0.95rem; margin: 0; }
.result .error { color: var(--red); font-weight: 600; }

.drawn-box { margin-bottom: 1.25rem; }
.drawn-label { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.6rem; }
.drawn { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; min-height: 3.7rem; }
.drawn li {
  display: grid;
  place-items: center;
  width: 2.65rem;
  aspect-ratio: 5 / 7;
  background: var(--card);
  border: 1px solid var(--seam);
  border-radius: 5px;
  color: var(--edge);
}
.drawn li.hit { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.drawn li svg { width: 1rem; height: 1rem; fill: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .drawn li { animation: deal 0.28s ease both; animation-delay: calc(var(--i) * 45ms); }
  @keyframes deal { from { opacity: 0; translate: -0.6rem -0.3rem; } }
}

.odds { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--card); border: 1px solid var(--seam); }
.odds th, .odds td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--seam); }
.odds tbody tr:last-child > * { border-bottom: 0; }
.odds thead th { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.odds td:not(:first-child), .odds thead th:not(:first-child) { text-align: right; }

.why { max-width: 46rem; margin-top: 2.5rem; }
.math { padding: 0.9rem 1.1rem; background: var(--card); border: 1px solid var(--seam); border-left: 3px solid var(--red); border-radius: 8px; font-variant-numeric: tabular-nums; overflow-x: auto; }

.table-box { overflow: auto; max-inline-size: 100%; container-type: inline-size; background: var(--card); border: 1px solid var(--seam); border-radius: 12px; box-shadow: var(--shade); }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; }
.compare caption { text-align: left; padding: 1.25rem 1.25rem 0.25rem; font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--seam); }
.compare tr:last-child > * { border-bottom: 0; }
.compare thead th { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.compare tbody th { font-family: var(--serif); font-size: 1.1rem; white-space: nowrap; }
.compare tbody th .mini { margin-right: 0.3rem; vertical-align: 0; }
@container (width < 640px) {
  .compare, .compare thead, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare thead { display: none; }
  .compare caption { display: block; padding-bottom: 0.5rem; }
  .compare tbody tr { padding: 0.5rem 0; border-bottom: 1px solid var(--seam); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare tbody th, .compare td { border: 0; padding-block: 0.3rem; }
  .compare td::before { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
  .compare td:nth-child(2)::before { content: "Co wiesz"; }
  .compare td:nth-child(3)::before { content: "Co jest ukryte"; }
  .compare td:nth-child(4)::before { content: "Przykład"; }
}

.mission { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .mission { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); } }
.mission-text { max-width: 44rem; }
.stack { position: relative; display: block; width: min(17rem, 100%); justify-self: center; color: var(--ink); text-decoration: none; isolation: isolate; }
.stack::before, .stack::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--card);
  border: 1px solid var(--seam);
  border-radius: 12px;
}
.stack::before { rotate: -6deg; }
.stack::after { rotate: 4deg; }
.stack-top { display: grid; gap: 0.5rem; align-content: center; aspect-ratio: 5 / 7; padding: 2.4rem 1.5rem; }
.stack-title { font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.stack-sub { font-family: var(--serif); font-weight: 600; color: var(--muted); }
.stack .blurb { font-size: 0.92rem; line-height: 1.45; }
.stack:hover .stack-title { color: var(--red); }

.letter { max-width: 40rem; padding: 2.6rem clamp(1.5rem, 4vw, 3rem); }
.contact-list { margin: 0; display: grid; gap: 0.2rem; }
.contact-list div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 0.25rem 1rem; padding-block: 0.5rem; border-bottom: 1px solid var(--seam); }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { color: var(--muted); font-size: 0.92rem; }
.contact-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 520px) { .contact-list div { grid-template-columns: minmax(0, 1fr); } }
.hours { list-style: none; margin: 0; padding: 0; }

.notice-wrap { padding-block: 0 clamp(2.5rem, 6vw, 4rem); }
.notice { margin: 0; padding: 1.1rem 1.3rem; background: var(--card); border: 1px solid var(--seam); border-left: 3px solid var(--red); border-radius: 8px; color: var(--muted); font-size: 0.95rem; }
.notice strong { color: var(--ink); }

.page-top { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.page-top p { color: var(--muted); font-size: 1.15rem; max-width: 44rem; }

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.2rem; font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.95rem); }
.prose h3 { margin-top: 1.8rem; }
.prose li { margin-bottom: 0.4rem; }
.updated { color: var(--muted); font-size: 0.92rem; }
.sheet.prose { margin-bottom: clamp(2.5rem, 6vw, 4rem); }

.toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
@media (min-width: 800px) { .toolbar { grid-template-columns: 1fr auto; align-items: end; } }
.toolbar fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.toolbar legend { font-weight: 600; margin-bottom: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  min-height: 44px;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: var(--card);
  color: var(--ink);
  font: 600 0.95rem/1 var(--sans);
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.sort label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.sort select {
  max-width: 100%;
  min-height: 44px;
  padding: 0.4rem 2.2rem 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background-color: var(--card);
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--sans);
}

.catalog { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); }
.catalog li { display: flex; }
.catalog li[hidden] { display: none; }
.catalog .face { width: 100%; }
.meters { display: grid; gap: 0.15rem; font-size: 0.85rem; color: var(--muted); margin: 0.4rem 0 0; }
.meters div { display: flex; justify-content: space-between; gap: 0.5rem; }
.meters dt { font-weight: 600; }
.meters dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.meters dd span { color: var(--red); letter-spacing: 0.1em; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.dossier { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--seam); }
.dossier-grid { display: grid; gap: 1.75rem 2.5rem; }
@media (min-width: 1000px) { .dossier-grid { grid-template-columns: minmax(0, 1fr) 17rem; } .dossier-side { position: sticky; top: 1.5rem; align-self: start; } }
.dossier .prose { max-width: none; background: var(--card); border: 1px solid var(--seam); border-radius: 14px; box-shadow: var(--shade); padding: clamp(1.5rem, 4vw, 3rem); }
.dossier .prose > h2 { margin-top: 0; font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); }
.dossier .cover { width: 100%; border-radius: 10px; margin-bottom: 2rem; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--seam); }
.facts-card { padding: 2.3rem 1.25rem; }
.facts { margin: 0; font-size: 0.95rem; }
.facts div { padding-block: 0.45rem; border-bottom: 1px solid var(--seam); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.facts dd { margin: 0; }

.scheme { margin: 2rem 0; padding: 1.25rem; background: var(--table); border: 1px solid var(--seam); border-radius: 10px; }
.scheme svg { width: 100%; height: auto; display: block; }
.scheme figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.75rem; }
.scheme .t { font: 600 15px var(--sans); fill: var(--ink); }
.scheme .s { font: 500 13px var(--sans); fill: var(--muted); }
.scheme .n { font: 600 18px var(--serif); fill: var(--ink); }
.scheme .sc { fill: var(--card); stroke: var(--edge); stroke-width: 1.2; }
.scheme .sc-dim { fill: #e9e6df; }
.scheme .line { stroke: var(--red); stroke-width: 2; fill: none; }
.scheme .thin { stroke: var(--muted); stroke-width: 1.5; fill: none; }

.rules-link { font-weight: 600; }

.term {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline dotted var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  cursor: help;
}
.term:hover { color: var(--red); }

.term-card {
  width: min(100% - 2rem, 30rem);
  padding: 1.75rem;
  border: 1px solid var(--seam);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  overscroll-behavior: contain;
}
.term-card::backdrop { background: rgb(20 20 20 / 0.45); overflow: hidden; overscroll-behavior: contain; }
.term-card h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.term-card a { color: var(--red); font-weight: 600; }
.term-card form { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.term-card button { min-height: 44px; padding: 0.4rem 1.1rem; border-radius: 8px; border: 0; background: var(--ink); color: var(--card); font: 600 0.95rem/1 var(--sans); cursor: pointer; }

.glossary-list { max-width: 50rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.glossary-list details { background: var(--card); border: 1px solid var(--seam); border-radius: 10px; box-shadow: var(--shade); }
.glossary-list details[open] { border-color: var(--edge); }
.glossary-list summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 60px;
  padding: 0.6rem 1rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  cursor: pointer;
}
.glossary-list summary::-webkit-details-marker { display: none; }
.glossary-list summary:hover { color: var(--red); }
.mini-card {
  flex: none;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.1rem;
  width: 2.2rem;
  aspect-ratio: 5 / 7;
  border: 1px solid var(--seam);
  border-radius: 5px;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--ink);
}
.glossary-list details[open] .mini-card { border-color: var(--red); }
.glossary-list .def { padding: 0 1.25rem 1.25rem 4.1rem; }
.glossary-list .def p:last-child { margin-bottom: 0; }
.glossary-list .eg { color: var(--muted); }
@media (max-width: 480px) { .glossary-list summary { font-size: 1.12rem; overflow-wrap: anywhere; } .glossary-list .def { padding-left: 1rem; } }
.glossary-list details::details-content { overflow: clip; }

.jobs { display: grid; gap: 1.25rem; max-width: 54rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.job { padding: 2.4rem clamp(1.5rem, 4vw, 3rem); }
.job .type { display: inline-block; margin-bottom: 0.6rem; padding: 0.15rem 0.7rem; border-radius: 6px; border: 1px solid var(--ink); font-size: 0.85rem; font-weight: 600; }
.job h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
.job h3 { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin: 1rem 0 0.4rem; }
.job ul { padding-left: 1.2rem; margin-bottom: 0; }
.apply { margin: 1.25rem 0 0; font-weight: 600; }

.charter { list-style: none; padding: 0; display: grid; gap: 0.9rem; }
.charter li.card { padding: 1.2rem 1.4rem 1.2rem 3.2rem; box-shadow: none; }
.charter strong { display: block; }

.helpline { padding: 1.5rem; background: var(--table); border: 2px solid var(--red); border-radius: 12px; margin: 1.5rem 0; }
.helpline .phone { font-family: var(--serif); font-size: clamp(1.8rem, 1.4rem + 2vw, 2.6rem); line-height: 1.1; margin: 0.2rem 0 0.4rem; font-variant-numeric: tabular-nums; }
.helpline a { color: var(--ink); font-weight: 600; }

.site-foot { border-top: 1px solid var(--seam); background: #eeece7; padding-block: 3rem 2rem; font-size: 0.95rem; }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.site-foot h2 { font-family: var(--sans); font-size: 0.95rem; margin-bottom: 0.7rem; display: flex; align-items: center; gap: 0.4rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.15rem; }
.site-foot ul a { color: var(--ink); text-decoration: none; display: inline-block; padding-block: 0.3rem; }
.site-foot ul a:hover { color: var(--red); text-decoration: underline; }
.foot-brand .wordmark { padding-bottom: 0.8rem; }
.foot-brand p { color: var(--muted); max-width: 24rem; }
.foot-contact { margin: 1rem 0 0; display: grid; gap: 0.5rem; }
.foot-contact dt { color: var(--muted); font-size: 0.85rem; }
.foot-contact dd { margin: 0; overflow-wrap: anywhere; }
.copy { grid-column: 1 / -1; margin: 0.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--seam); color: var(--muted); font-size: 0.88rem; }

.lost { min-height: 100svh; display: grid; place-items: center; padding: 2rem; text-align: center; }
.lost .back { width: 6.5rem; height: auto; margin: 0 auto 2rem; rotate: -6deg; display: block; }
.lost p { color: var(--muted); max-width: 30rem; margin-inline: auto; }
.lost .code { font-family: var(--serif); font-weight: 600; color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
