/* RCIR site styles. Base layout and the Frost look first; the "Snowday" look (picked 2026-11-27) is the last section and wins.
   Fonts: Anybody = the RCIR mark (its width axis drives the hero motion), Unbounded = headings, Figtree = reading text.
   Shape rule: buttons and the nav are pills, every other box (cards, strips, images) uses --r. */
@property --fg { syntax: '<color>'; inherits: true; initial-value: #1b2533; }
:root {
  --veil: #e4f0f8; --paper: #f6f9fc; --tint: #eaf3fa; --surface: #ffffff;
  --ink: #1b2533; --muted: #56627a; --on-tint: #34405a; --line: #dbe6ef;
  --btn: #3d6fd6; --btn-ink: #ffffff; --btn-hover: #2f5ec2;
  --on: #1d7f78; --soon: #8a5d00; --off: #5d6d86;
  --mark: Anybody, system-ui, sans-serif; --display: Anybody, system-ui, sans-serif;
  --lift: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 32px -18px rgba(0, 0, 0, .22);
  --r: 24px; --ease: cubic-bezier(.16, 1, .3, 1); --gut: clamp(16px, 3.2vw, 40px);
  color-scheme: light;
}
/* Theme: the <head> script sets data-theme from the saved choice (Light / Dark / Auto = device) before first paint. */
:root[data-theme="dark"] {
  --veil: #1d2127; --paper: #16191e; --tint: #22272e; --surface: #1d2127;
  --ink: #eef1f5; --muted: #a8b0bb; --on-tint: #d0d6de; --line: #2f353e;
  --btn: #7aa2f0; --btn-ink: #10141a; --btn-hover: #9bb9f5;
  --on: #8fd8cf; --soon: #f2c572; --off: #8d95a1;
  --lift: 0 0 #0000; /* no shadow in dark, but still a valid value to stack with the frost highlight */
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; } /* anchors stop below the fixed nav */
body { --fg: var(--ink); margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 'Public Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; padding: 8px 14px; border-radius: 8px; background: var(--btn); color: var(--btn-ink); }
.skip:focus { left: 8px; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gut); }
.sec-tint { background: var(--tint); }
.h2 { margin: 0 0 14px; font: 800 clamp(2.4rem, 5vw, 4.25rem)/.92 var(--display); letter-spacing: -.005em; text-wrap: balance; }
.lede { margin: 0; max-width: 52ch; color: var(--muted); font-size: 1.125rem; }
h3 { margin: 0 0 6px; font: 700 1.5rem/1.1 var(--display); letter-spacing: .005em; }

.btn { display: inline-flex; align-items: center; padding: .85em 1.45em; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; border: 1.5px solid transparent; transition: transform .2s var(--ease), background-color .2s, border-color .2s; }
.btn:active { transform: scale(.98); }
.btn-fill { background: var(--btn); color: var(--btn-ink); } .btn-fill:hover { background: var(--btn-hover); }
.btn-line { border-color: color-mix(in srgb, var(--fg) 45%, transparent); } .btn-line:hover { border-color: var(--fg); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero (concept D, unchanged mechanics) ----------
   The photo sits still behind a sheet of page colour with RCIR cut out of it (SVG mask).
   Scrolling grows the sheet until you pass through the I. Scroll-driven CSS only; browsers without
   animation-timeline (and reduced motion) keep the first frame: the letters as windows. */
.stage { height: 260vh; view-timeline: --stage block; view-timeline-inset: 0; } /* inset 0: html's scroll-padding-top would otherwise start the zoom mid-way */
/* The hero nav sits over the pinned scene but outside .pin, so .pin clipping the zoom never clips the phone menu. */
.stage { position: relative; }
.stage > .nav { position: fixed; inset: 0 0 auto; z-index: 10; } /* fixed: stays on screen past the hero */
.pin { --fg: var(--ink); position: sticky; top: 0; height: 100dvh; overflow: hidden; isolation: isolate; color: var(--fg); background: var(--veil); } /* page colour until the photo loads */
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

/* Snow on the photo layer: inside the letters at rest, over the whole scene after the zoom.
   Two depths; each falls exactly one tile so the loop is seamless. */
.snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.snow::before, .snow::after { content: ''; position: absolute; inset: -320px 0 0; opacity: .6; }
.snow::before { background: radial-gradient(1.5px 1.5px at 30px 40px, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 130px 150px, #fff 50%, transparent 51%), radial-gradient(1px 1px at 170px 70px, #fff 50%, transparent 51%); background-size: 200px 200px; }
.snow::after { background: radial-gradient(2.5px 2.5px at 60px 90px, #fff 50%, transparent 51%), radial-gradient(3px 3px at 230px 250px, #fff 50%, transparent 51%); background-size: 320px 320px; opacity: .45; }
.pin::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(0deg, rgba(10,18,36,.85), rgba(10,18,36,0) 55%); }

.veil { position: absolute; left: 0; top: 0; width: 100%; height: 88%; overflow: visible; pointer-events: none; }
.veil .sheet { fill: var(--veil); }
.veil .zoom { transform-box: view-box; transform-origin: 635px 150px; } /* centre of the I, measured at 1440px */
.glyphs { font-family: var(--mark); font-weight: 900; font-variation-settings: 'wdth' 150; font-size: 258px; letter-spacing: -.03em; }
.two { display: none; font-size: 440px; }
/* Dark mode: a dark photo in a dark sheet loses the word, so the windows get a hairline frost edge. */
.edge { display: none; fill: none; stroke: #a5e5f5; stroke-opacity: .7; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
:root[data-theme="dark"] .edge.one { display: inline; }

.nav { position: relative; z-index: 2; height: 68px; display: flex; align-items: center; gap: 28px; padding-inline: var(--gut); }
.mark { font-family: var(--mark); font-weight: 900; font-variation-settings: 'wdth' 150; font-size: 1.3rem; text-decoration: none; }
.nav .mark { margin-right: auto; }
.links { display: flex; gap: 26px; font-size: .95rem; }

/* Theme switch (nav + footer). aria-pressed marks the saved choice. */
.theme { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.theme button { padding: .45em .85em; border: 0; border-radius: 999px; background: none; color: inherit; font: 600 .8125rem/1 'Public Sans', system-ui, sans-serif; cursor: pointer; }
.theme button:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.theme button[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); }
.links a { text-decoration: none; opacity: .8; } .links a:hover, .links a[aria-current] { opacity: 1; }
.links a[aria-current] { font-weight: 600; }
/* Phones: page links fold into a native <details> menu. */
.menu { display: none; position: relative; }
.menu summary { padding: .5em 1em; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); font: 600 .875rem/1 "Public Sans", system-ui, sans-serif; cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; display: grid; min-width: 200px; padding: 8px; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.menu nav a { padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.menu nav a:hover, .menu nav a[aria-current] { background: var(--tint); }
.bar { border-bottom: 1px solid var(--line); }

.copy { position: absolute; z-index: 2; left: var(--gut); right: var(--gut); bottom: clamp(48px, 8vh, 96px); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 48px; }
.copy h1 { margin: 0 0 10px; font: 800 clamp(2.2rem, 4vw, 3.6rem)/.95 var(--display); letter-spacing: -.005em; }
.copy p { margin: 0; max-width: 64ch; opacity: .88; } /* wide enough that the founders line stays ~3 lines and clear of the letters */
/* Discord-style @mention with the person's avatar. */
.mention { display: inline-flex; align-items: center; gap: .3em; padding: 0 .45em 0 .15em; border-radius: 999px; background: color-mix(in srgb, var(--btn) 40%, transparent); font-weight: 600; white-space: nowrap; vertical-align: bottom; }
.mention img { width: 1.25em; height: 1.25em; border-radius: 50%; object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
  .glyphs { animation: stretch 1.4s .2s var(--ease) both; }
  @keyframes stretch { from { font-variation-settings: 'wdth' 50; opacity: 0; } }
  .snow::before { animation: fall 9s linear infinite; --tile: 200px; }
  .snow::after { animation: fall 16s linear infinite; --tile: 320px; }
  @keyframes fall { to { transform: translate3d(0, var(--tile), 0); } }
  .state.on::before { animation: pulse 2s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .35; } }

  @supports (animation-timeline: view()) {
    .veil .zoom { animation: fly linear both; animation-timeline: --stage; animation-range: contain 0% contain 62%; }
    .veil { animation: gone linear both; animation-timeline: --stage; animation-range: contain 52% contain 62%; }
    .pin::after { animation: show linear both; animation-timeline: --stage; animation-range: contain 40% contain 62%; }
    /* Text steps aside while the sheet flies past, and comes back white over the scene. */
    .nav, .copy { animation: dip linear both; animation-timeline: --stage; animation-range: contain 0% contain 62%; }
    .pin { animation: ink linear both; animation-timeline: --stage; animation-range: contain 20% contain 40%; }
    @keyframes fly { 60% { transform: scale(6); } to { transform: scale(40); } }
    @keyframes gone { to { opacity: 0; } }
    @keyframes show { to { opacity: 1; } }
    @keyframes dip { 0%, 10% { opacity: 1; } 22%, 70% { opacity: 0; } 100% { opacity: 1; } }
    @keyframes ink { to { --fg: #f3f7fb; } }
  }
}
@supports not (animation-timeline: view()) { .stage { height: auto; } }
@media (prefers-reduced-motion: reduce) { .stage { height: auto; } html { scroll-behavior: auto; } }

/* ---------- Departments: concept C's agency strips ----------
   Side by side like book spines. Hover or tab to a strip to open it; with none hovered, the first is open.
   The abbreviation rides Anybody's width axis: narrow on a closed spine, full width when open. */
.strips { display: flex; gap: 10px; height: clamp(420px, 62vh, 580px); margin: 48px 0 0; padding: 0; list-style: none; }
.strips li { flex: 1 1 0; display: flex; min-width: 0; transition: flex-grow .7s var(--ease); }
.strip { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; border-radius: var(--r); overflow: hidden; color: #fff; text-decoration: none; background: var(--c); }
.strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.strip::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(10, 14, 24, .85)); }
.strip::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--c); }
.info { position: relative; padding: 20px 22px 26px; }
.abbr { display: block; font-family: var(--mark); font-weight: 900; font-variation-settings: 'wdth' 75; font-size: clamp(1.5rem, 2.2vw, 2.1rem); line-height: 1; letter-spacing: -.01em; transition: font-variation-settings .6s var(--ease), font-size .6s var(--ease); }
.full, .does { display: block; white-space: nowrap; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .5s var(--ease); }
.full { margin-top: 6px; font: 700 1.4rem/1.1 var(--display); letter-spacing: .005em; }
.does { margin-top: 4px; font-size: .95rem; color: #dbe3ef; white-space: normal; width: 38ch; max-width: 100%; } /* fixed width: wraps without reflowing while the strip opens */
.strips li:is(:hover, :focus-within), .strips:not(:has(li:hover, li:focus-within)) li:first-child { flex-grow: 4.2; }
.strips li:is(:hover, :focus-within) .abbr, .strips:not(:has(li:hover, li:focus-within)) li:first-child .abbr { font-variation-settings: 'wdth' 150; font-size: clamp(1.9rem, 3.2vw, 3.25rem); }
.strips li:is(:hover, :focus-within) :is(.full, .does), .strips:not(:has(li:hover, li:focus-within)) li:first-child :is(.full, .does) { opacity: 1; transform: none; transition-delay: .2s; }
.strip:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .strips li, .strip img, .abbr, .full, .does { transition: none; } }

/* ---------- Server status: live states, filled in by site.js from functions/api/sessions.js ---------- */
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.on { color: var(--on); } .soon { color: var(--soon); } .off, .wait { color: var(--off); }
.wait::before { opacity: .4; }
.srv small { color: var(--muted); }

/* ---------- Home chapters: one idea per section ---------- */
.ch { display: grid; grid-template-columns: minmax(0, 1fr); padding-block: clamp(56px, 7vw, 96px); }
.ch-in { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vh, 48px); }
.ch-head .h2 { margin-bottom: 10px; }
.ch .strips { height: clamp(360px, 52vh, 540px); margin: 0; }
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.nums .srv { display: grid; gap: 6px; padding-left: 4px; }
.num { font: 800 clamp(7rem, 20vh, 13rem)/.8 var(--display); color: var(--line); transition: color .4s; }
.nums .srv:has(.on) .num { color: var(--on); }
.nums .srv:has(.soon) .num { color: var(--soon); }
.nums .state { font-size: 1.15rem; }
.nums small { color: var(--muted); font-size: .95rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.big-steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.big-steps li { counter-increment: s; }
.big-steps li::before { content: counter(s); display: block; font: 800 clamp(4.5rem, 10vh, 7rem)/.85 var(--display); color: var(--btn-hover); }
.big-steps h3 { margin-top: 14px; font-size: 1.6rem; }
.big-steps p { margin: 0; color: var(--on-tint); }
.ch .btn { justify-self: start; }
.civ2 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 6vw, 88px); }
.biz2 { margin: 32px 0 0; padding: 0; list-style: none; font: 800 clamp(2.2rem, 4.6vw, 4rem)/1.04 var(--display); }
.biz2 li { display: flex; align-items: flex-start; gap: .35em; }
.biz2 li::before { content: ''; flex: none; width: .5em; height: .5em; margin-top: .27em; border-radius: 4px; background: var(--b); } /* swatch sits on the first line if a name wraps */
.civ-items { display: grid; gap: 26px; }
.civ-items > div { padding-top: 16px; border-top: 2px solid var(--ink); }
.civ-items h3 { font-size: 1.4rem; }
.civ-items p { margin: 0; color: var(--muted); }
@media (max-width: 900px) {
  .ch .strips { height: auto; } /* stacked strips grow to fit; the desktop height would let them spill into the next chapter */
  .big-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .civ2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nums { gap: 8px; }
  .num { font-size: 7rem; }
  .nums .state { font-size: .95rem; }
  .nums small { display: none; }
  .big-steps { grid-template-columns: 1fr; }
}

/* ---------- Close + footer ---------- */
.close { padding-block: clamp(64px, 9vw, 120px); text-align: center; }
.close .lede { margin: 0 auto 32px; }
.big { margin: 0 0 20px; font: 800 clamp(3.2rem, 8vw, 7.5rem)/.86 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 40px; }
.foot .mark { margin: 0; color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { text-decoration: none; } .foot nav a:hover { color: var(--ink); }
.fine { flex-basis: 100%; margin: 8px 0 0; max-width: 60ch; font-size: .875rem; }

/* ---------- Smaller screens ---------- */
/* Eight nav links stop fitting the pill below ~1060px, so they fold into the Menu early. */
@media (max-width: 1080px) { .links { display: none; } .menu { display: block; } }
@media (max-width: 900px) {
  .links { display: none; }
  .veil { height: 76%; }
  .photo { object-position: 64% 40%; }
  .menu { display: block; }
  .nav { gap: 10px; }
  /* Strips stack as full-width rows with everything showing: there is no hover on a phone. */
  .strips { flex-direction: column; height: auto; }
  .strips li { flex: none; height: 150px; }
  .strip::before { background: linear-gradient(90deg, rgba(10, 14, 24, .85), rgba(10, 14, 24, .4)); } /* text fills the row here, so shade all of it */
  .strips li .abbr { font-variation-settings: 'wdth' 150; }
  .strips li :is(.full, .does) { opacity: 1; transform: none; white-space: normal; }
}
@media (max-width: 640px) {
  /* One line of RCIR is only ~75px tall here, so stack it as RC / IR and fly through the second line's I. */
  .one, :root[data-theme] .edge.one { display: none; }
  .two:not(.edge) { display: inline; }
  .veil { height: 70%; }
  .veil .zoom { transform-origin: 268px 340px; }
}
@media (max-width: 640px) { :root[data-theme="dark"] .edge.two { display: inline; } }

/* ---------- Inner pages (about, penal codes, links, contact) ---------- */
.h1 { margin: 0 0 14px; font: 800 clamp(3rem, 8vw, 6.5rem)/.9 var(--display); letter-spacing: -.01em; }
.meta { margin: 14px 0 0; color: var(--muted); font-size: .95rem; }
.sec-tint, .ab-band, .ct-band { padding-block: clamp(56px, 7vw, 96px); }

/* Penal codes: sticky search + section strip, one table per section (cards on phones). */
.pc-bar { position: sticky; top: 84px; z-index: 4; background: var(--paper); border-block: 1px solid var(--line); }
/* While the search bar is stuck under the pill nav, paint the strip above it so table rows don't show between the two.
   scroll-state queries are Chromium-only for now; elsewhere the strip simply stays visible. */
.pc-bar { container-type: scroll-state; }
@container scroll-state(stuck: top) {
  .pc-bar-in::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 84px; background: var(--paper); }
}
.pc-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-block: 12px; }
.pc-search { flex: 0 1 340px; }
.pc-search input { width: 100%; padding: .7em 1.1em; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; }
.pc-search input::placeholder { color: var(--muted); }
.pc-search input:focus-visible { outline: 2px solid var(--btn-hover); outline-offset: 2px; border-color: var(--btn-hover); }
.pc-cats ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pc-cats a { display: block; padding: .45em .9em; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.pc-cats a:hover { background: var(--tint); color: var(--ink); }
.pc-cats a[aria-current] { background: var(--btn); color: var(--btn-ink); }
.pc-list { padding-block: 20px 24px; }
.pc-status { min-height: 1.6em; margin: 0; color: var(--muted); }
.pc-cat { padding-top: 28px; scroll-margin-top: 80px; }
.pc-cat-name { margin: 0 0 12px; font: 800 clamp(1.8rem, 3.4vw, 2.6rem)/1 var(--display); }
.pc-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.pc-table thead th { padding: 10px 12px; border-bottom: 2px solid var(--ink); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; white-space: nowrap; }
.pc-table td, .pc-table tbody th { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.pc-charge { font-weight: 600; }
.pc-code { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pc-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pc-flag { display: block; margin-top: 4px; color: var(--soon); font-size: .8rem; font-weight: 600; }
.pc-type { display: inline-block; padding: .2em .65em; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pc-type--felony { background: color-mix(in srgb, #c8262b 14%, var(--paper)); color: #a11d22; }
.pc-type--misd { background: color-mix(in srgb, var(--soon) 12%, var(--paper)); color: #6f4b00; }
:root[data-theme="dark"] .pc-type--misd { color: var(--soon); }
.pc-type--minor { background: var(--tint); color: var(--on-tint); }
:root[data-theme="dark"] .pc-type--felony { background: color-mix(in srgb, #c8262b 30%, var(--paper)); color: #ffb3b5; }
.pc-yes { font-weight: 600; } .pc-no { color: var(--muted); }
.pc-empty { padding: 32px 0; }
.pc-empty-title { margin: 0 0 6px; font: 700 1.6rem/1.1 var(--display); }
.pc-points { padding-block: clamp(48px, 6vw, 80px); scroll-margin-top: 80px; }
.pc-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0 40px; padding: 0; list-style: none; }
.pc-rules li { padding: 22px; border-radius: var(--r); background: var(--tint); }
.pc-rules b { font: 700 1.45rem/1.1 var(--display); }
.pc-rules p { margin: 6px 0 0; color: var(--on-tint); }
.pc-sub { margin: 0 0 14px; font-size: 1.6rem; }
.pc-pointlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px 32px; margin: 0; }
.pc-pointlist dt { font: 800 1.4rem/1 var(--display); }
.pc-pointlist dd { margin: 6px 0 0; color: var(--muted); }
.pc-notes { display: grid; gap: 8px; padding-bottom: clamp(56px, 7vw, 96px); }
.pc-notes p { margin: 0; max-width: 70ch; color: var(--muted); }
.pc-notes b { color: var(--ink); }

/* About */
.ab-play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 72px); padding-bottom: clamp(56px, 7vw, 96px); }
.ab-play p { max-width: 60ch; color: var(--muted); }
.ab-play img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.ab-section { padding-block: clamp(56px, 7vw, 96px); }
.ab-chain { counter-reset: c; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 32px 0 0; padding: 0; list-style: none; }
.ab-chain li { counter-increment: c; padding-top: 16px; border-top: 2px solid var(--ink); }
.ab-chain li::before { content: counter(c); display: block; margin-bottom: 6px; font: 800 3.5rem/1 var(--display); color: var(--btn-hover); }
.ab-chain p { margin: 0; color: var(--on-tint); }
.ab-ladder { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.ab-ladder li { padding: .6em 1.1em; border-radius: 999px; font-weight: 600; background: color-mix(in srgb, #c8262b var(--m), var(--paper)); }
.ab-ladder li:nth-child(1) { --m: 8%; } .ab-ladder li:nth-child(2) { --m: 18%; } .ab-ladder li:nth-child(3) { --m: 28%; }
.ab-ladder li:nth-child(4) { --m: 40%; } .ab-ladder li:nth-child(5) { --m: 54%; } .ab-ladder li:nth-child(6) { --m: 100%; color: #fff; }
.ab-rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.ab-rules p { margin: 0; color: var(--muted); }
/* Terms and Privacy: one readable column. */
.legal { max-width: 70ch; padding-block: clamp(16px, 2vw, 32px) clamp(56px, 7vw, 96px); }
.legal h2 { margin: 36px 0 10px; font: 700 1.2rem/1.25 var(--display); }
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: 0; padding-left: 1.2em; }
.legal li + li { margin-top: 10px; }
.legal strong { color: var(--ink); }

/* Departments page: one card per department, its colour as a bar under the photo. */
.dp-grid { list-style: none; margin: 0 auto; padding-block: clamp(32px, 4vw, 56px) clamp(56px, 7vw, 96px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.dp-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r); scroll-margin-top: 96px; }
.dp-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.dp-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 30px 24px 26px; box-shadow: inset 0 8px var(--c); } /* the department colour bar under the photo */
.dp-body p { margin: 0; color: var(--muted); }
.dp-body .dp-abbr { font-family: var(--mark); font-weight: 900; font-variation-settings: 'wdth' 150; font-size: 1.7rem; line-height: 1; color: var(--ink); }
.dp-body h2 { margin: 0; font: 700 1.15rem/1.2 var(--display); }
.dp-body .dp-actions { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .dp-grid { grid-template-columns: 1fr; } }
.ab-rules.fit { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } /* department pages: any count fills the row, no empty columns */
.dp-reqs { margin: 20px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 1.05rem; }
.dp-reqs li + li { margin-top: 8px; }
.dp-join { margin-top: clamp(48px, 6vw, 80px); }
.ab-more { margin: 28px 0 0; }

/* Links: one narrow column of rows; the Discord row is the filled one. */
.lk-wrap { display: grid; gap: clamp(32px, 4vw, 48px); padding-bottom: clamp(56px, 7vw, 96px); }
.lk-wrap > section { max-width: 720px; }
.lk-head { margin: 0 0 12px; color: var(--muted); font: 700 1.35rem/1 var(--display); }
.lk-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lk-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border: 1px solid transparent; border-radius: var(--r); background: var(--surface); box-shadow: var(--lift); text-decoration: none; transition: transform .2s var(--ease), border-color .2s; }
.lk-row:hover { transform: translateY(-1px); border-color: var(--btn); }
.lk-row b { display: block; font-size: 1.2rem; }
.lk-row span span { display: block; color: var(--muted); font-size: .95rem; }
.lk-row small { flex: none; color: var(--muted); font-size: .8rem; font-weight: 600; }
.lk-primary { background: var(--btn); color: var(--btn-ink); }
.lk-primary span span, .lk-primary small { color: var(--btn-ink); }
.lk-primary:hover { border-color: transparent; background: var(--btn-hover); }
:root[data-theme="dark"] .lk-row:not(.lk-primary) { border-color: var(--line); }
@media (max-width: 520px) { .lk-row small { display: none; } }

/* Contact */
.ct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: clamp(56px, 7vw, 96px); }
.ct-card { display: flex; flex-direction: column; align-items: flex-start; padding: 26px; border: 1px solid var(--line); border-radius: var(--r); }
.ct-card h2 { margin: 0 0 8px; font: 700 1.6rem/1.1 var(--display); }
.ct-card p { flex: 1; margin: 0 0 18px; color: var(--muted); }
.ct-appeals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.ct-appeals p { margin: 0 0 16px; color: var(--on-tint); }
.ct-partner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: clamp(32px, 5vw, 72px); padding-block: clamp(56px, 7vw, 96px); }
.ct-partner .lede { margin-bottom: 24px; }
.ct-reqs { display: grid; margin: 0; padding: 0; list-style: none; }
.ct-reqs li { padding: 14px 0; border-top: 1px solid var(--line); }
.ct-chain { padding-bottom: clamp(56px, 7vw, 96px); color: var(--muted); }

@media (max-width: 900px) {
  .ab-play, .ct-partner { grid-template-columns: 1fr; }
  .ab-chain, .ab-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-grid, .ct-appeals, .pc-rules { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* Penal tables become cards: code and charge on top, the numbers in a two-column grid. */
  .pc-search { flex-basis: 100%; }
  .pc-cats { width: 100%; }
  .pc-cats ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pc-cats a { white-space: nowrap; }
  .pc-cat, .pc-points { scroll-margin-top: 120px; }
  .pc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pc-table, .pc-table tbody { display: block; }
  .pc-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .pc-table td, .pc-table tbody th { padding: 0; border: 0; }
  .pc-table .pc-code, .pc-table tbody th { grid-column: 1 / -1; }
  .pc-table td:not(.pc-code)::before { content: attr(data-label); display: block; color: var(--muted); font-size: .75rem; font-weight: 600; }
}
@media (max-width: 640px) {
  .ab-chain, .ab-rules { grid-template-columns: 1fr; }
}

/* ---------- Frost look: headings, pill nav, lifted cards, rounded table rows ---------- */
/* Anybody is wide: headings run at a lighter width and smaller sizes so lines still fit. */
.h1, .h2, h3, .copy h1, .big, .num, .big-steps li::before, .ab-chain li::before, .pc-cat-name, .lk-row b, .ct-card h2, .pc-rules b, .pc-pointlist dt, .biz2, .full {
  font-family: var(--display); font-variation-settings: 'wdth' 112; letter-spacing: -.02em;
}
.h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); }
.h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
.copy h1 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); line-height: 1.02; }
/* Type steps of about 1.25x: body 17px, card titles 21.6px, contact card headings 27px. */
h3 { font-size: 1.35rem; }
.ct-card h2 { font-size: 1.7rem; }
.big { font-size: clamp(2.4rem, 6vw, 5.5rem); }
.num { font-size: clamp(5.5rem, 15vh, 9.5rem); }
.big-steps li::before { font-size: clamp(3.4rem, 8vh, 5.5rem); }
.biz2 { font-size: clamp(1.4rem, 2.6vw, 2.15rem); }
.full { font-size: 1.15rem; }
/* Floating pill nav on inner pages and over the hero. */
.bar { border: 0; padding: 14px var(--gut) 0; }
/* Pill width lines its inner padding (22px) up with the page content column (.wrap). */
.bar .nav, .stage > .nav { max-width: calc(1240px - 2 * var(--gut) + 44px); height: 60px; margin-inline: auto; padding-inline: 22px; border-radius: 999px; background: var(--surface); box-shadow: var(--lift); border: 1px solid transparent; }
:root[data-theme="dark"] :is(.bar .nav, .stage > .nav) { border-color: var(--line); } /* no shadow in dark, so the pill keeps an edge */
.stage > .nav { inset: 14px var(--gut) auto; }
.copy { left: max(var(--gut), calc((100% - 1240px) / 2 + var(--gut))); right: max(var(--gut), calc((100% - 1240px) / 2 + var(--gut))); } /* hero text lines up with the pill and the page column */
.links a[aria-current] { color: var(--btn); }
/* Cards are white and lifted instead of outlined. */
.ct-card, .pc-rules li { background: var(--surface); border-color: transparent; box-shadow: var(--lift); }
:root[data-theme="dark"] :is(.ct-card, .pc-rules li, .pk-tier) { border-color: var(--line); }
/* Tables: each charge is its own rounded row. */
.pc-table { border-collapse: separate; border-spacing: 0 6px; }
.pc-table thead th { border: 0; }
.pc-table tbody tr { background: var(--surface); box-shadow: var(--lift); }
.pc-table td, .pc-table tbody th { border: 0; }
.pc-table tbody tr > :first-child { border-radius: 14px 0 0 14px; }
.pc-table tbody tr > :last-child { border-radius: 0 14px 14px 0; }
.pc-bar { border: 0; box-shadow: var(--lift); }
.big-steps li::before, .ab-chain li::before { color: var(--btn); }
@media (max-width: 760px) {
  .pc-table tbody tr { padding: 14px 16px; margin-bottom: 8px; border-radius: 14px; }
  .pc-table tbody tr > :first-child, .pc-table tbody tr > :last-child { border-radius: 0; }
}

/* ---------- Winter touches: photo page heads, snowdrift edges, frosted cards, the Discord-panel signature ---------- */
/* Inner page heads: a winter photo fading into the page colour, with the hero's light snowfall; the pill nav floats over it. */
.bar { position: fixed; inset: 0 0 auto; z-index: 10; pointer-events: none; } /* fixed pill nav; only the pill takes clicks */
.bar .nav { pointer-events: auto; }
.page-head { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(124px, 13vw, 172px) clamp(40px, 5vw, 64px); }
.page-head::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--banner) 50% 60% / cover; }
.page-head::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--paper) 0%, color-mix(in srgb, var(--paper) 90%, transparent) 42%, color-mix(in srgb, var(--paper) 25%, transparent) 80%, color-mix(in srgb, var(--paper) 8%, transparent)),
    linear-gradient(0deg, var(--paper) 0%, transparent 45%); }
.page-head .wrap { position: relative; }
@media (max-width: 760px) {
  .page-head::after { background: linear-gradient(0deg, var(--paper) 10%, color-mix(in srgb, var(--paper) 78%, transparent)); }
}

/* Snowdrifts: soft, uneven bumps along the top edge of tinted bands and the footer (three overlapping half-ellipses per 360px tile). */
.sec-tint, .foot { position: relative; --drift: var(--tint); }
.sec-tint::before, .foot::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 20px; pointer-events: none;
  background:
    radial-gradient(40px 14px at 40px 100%, var(--drift) 96%, transparent) 0 0 / 360px 20px repeat-x,
    radial-gradient(110px 20px at 170px 100%, var(--drift) 96%, transparent) 0 0 / 360px 20px repeat-x,
    radial-gradient(60px 16px at 300px 100%, var(--drift) 96%, transparent) 0 0 / 360px 20px repeat-x; }
.foot { margin-top: 20px; border-top: 0; background: var(--tint); }

/* Frosted cards: a faint ice gradient and a bright top edge, like frosted glass. */
:root { --frost-hi: rgba(255, 255, 255, .95); }
:root[data-theme="dark"] { --frost-hi: rgba(255, 255, 255, .06); }
.ct-card, .pc-rules li, .pk-tier, .lk-row:not(.lk-primary), .tm-card {
  background: linear-gradient(170deg, var(--surface) 45%, color-mix(in srgb, var(--tint) 80%, var(--surface)));
  box-shadow: inset 0 1px 0 var(--frost-hi), var(--lift); }

/* The line every RCIR Discord panel ends with. */
.sig { flex-basis: 100%; margin: 6px 0 0; color: var(--ink); font-weight: 600; font-size: .95rem; }
.sig span { color: var(--btn); }

/* Management team (contact page): avatar with a ring in the member's Discord role colour, initials if the avatar fails. */
.tm { padding-bottom: clamp(56px, 7vw, 96px); }
.tm-group { margin-top: 28px; }
.tm-head { margin: 0 0 14px; color: var(--muted); font: 700 1.35rem/1 var(--display); }
.tm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.tm-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r); }
.tm-av { position: relative; flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--tint); color: var(--on-tint); font-weight: 700; box-shadow: 0 0 0 3px var(--rc), 0 0 0 4px var(--line); }
.tm-av::before { content: attr(data-i); }
.tm-av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tm-card b { display: block; font: 800 1.2rem/1.15 var(--display); font-variation-settings: 'wdth' 112; letter-spacing: -.02em; }
.tm-card small { display: block; color: var(--muted); font-size: .85rem; }
.tm-role { display: block; margin-top: 4px; color: var(--on-tint); font-size: .9rem; font-weight: 600; }

/* Perks page: tier cards (frosted, with an expandable vehicle list), name colour swatches, limits table. */
.pk-section { padding-block: clamp(48px, 6vw, 80px); }
.pk-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; margin-top: 28px; }
.pk-tier { padding: 26px; border-radius: var(--r); }
.pk-top { margin: 0; color: var(--btn); font: 800 2.2rem/1 var(--display); font-variation-settings: 'wdth' 112; letter-spacing: -.02em; }
.pk-top span { color: var(--muted); font: 600 1rem/1 "Public Sans", system-ui, sans-serif; letter-spacing: 0; }
.pk-tier h3 { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; color: var(--muted); }
/* RCIR Plus tiers get their gem (the Discord custom emoji) before the name. */
.pk-tier[style*="--gem"] h3::before { content: ""; width: 22px; height: 22px; background: var(--gem) center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.pk-cta { margin: 28px 0 0; }
.pk-tier ul { display: grid; gap: 6px; margin: 0; padding-left: 1.1em; color: var(--on-tint); }
.pk-tier details { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.pk-tier summary { color: var(--btn-hover); font-weight: 600; cursor: pointer; } /* deeper blue: small text on the frosted card needs 4.5:1 */
.pk-tier details ul { margin-top: 10px; color: var(--muted); font-size: .95rem; }
.pk-band { padding-block: clamp(56px, 7vw, 96px); }
.pk-sub { margin: 28px 0 12px; font-size: 1.35rem; }
.pk-sub span { margin-left: 8px; color: var(--muted); font: 600 .9rem/1 'Public Sans', system-ui, sans-serif; letter-spacing: 0; }
.pk-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pk-swatches li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; font-weight: 600; }
.pk-swatches li::before { content: ''; width: 24px; height: 24px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pk-table { width: 100%; max-width: 760px; margin-top: 24px; border-collapse: collapse; }
.pk-table th, .pk-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.pk-table thead th { border-bottom: 2px solid var(--ink); color: var(--muted); font-size: .85rem; font-weight: 600; }
.pk-table tbody th { font-weight: 600; }
.pk-note { margin: 14px 0 0; color: var(--muted); }
@media (max-width: 900px) { .pk-tiers { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .pk-table th, .pk-table td { padding: 10px 8px; font-size: .9rem; } }

/* Perks: RCIR Plus comparison table. A frosted card like the tier cards; scrolls sideways on phones with the perk column pinned. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pk-cmp-wrap { position: relative; margin-top: 12px; overflow-x: auto; border-radius: var(--r);
  background: linear-gradient(170deg, var(--surface) 45%, color-mix(in srgb, var(--tint) 80%, var(--surface)));
  box-shadow: inset 0 1px 0 var(--frost-hi), var(--lift); }
:root[data-theme="dark"] .pk-cmp-wrap { border: 1px solid var(--line); }
.pk-cmp { width: 100%; min-width: 640px; border-collapse: collapse; }
.pk-cmp th, .pk-cmp td { padding: 12px 18px; border-bottom: 1px solid var(--line); text-align: center; }
.pk-cmp th[scope="row"], .pk-cmp thead th:first-child { width: 38%; text-align: left; font-weight: 600; }
.pk-cmp thead th { padding-block: 22px 16px; border-bottom: 2px solid var(--ink); vertical-align: bottom; }
.pk-cmp thead b { display: inline-flex; align-items: center; gap: 8px; font: 800 1.35rem/1 var(--display); font-variation-settings: 'wdth' 112; letter-spacing: -.02em; }
.pk-cmp thead b::before { content: ""; width: 22px; height: 22px; background: var(--gem) center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.pk-cmp thead span { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.pk-cmp-group th { padding: 18px 18px 8px; border-bottom: 0; color: var(--btn-hover); font: 700 .8rem/1 'Public Sans', system-ui, sans-serif; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.pk-cmp tbody:last-child tr:last-child > * { border-bottom: 0; }
.pk-cmp td { color: var(--on-tint); font-weight: 600; }
.pk-yes { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); font-size: .85rem; }
.pk-no { color: var(--muted); }
@media (max-width: 520px) { .pk-cmp th, .pk-cmp td { padding: 10px 12px; font-size: .9rem; } .pk-cmp :is(th[scope="row"], thead th:first-child) { position: sticky; left: 0; z-index: 1; width: 180px; background: var(--surface); }
  .pk-cmp-group span { position: sticky; left: 12px; } }

/* ---------- Snowday look: RCIR as a game lobby. Sticker-style panels (2px ink outline, a hard offset shadow,
   18px corners) that press down when clicked, Unbounded for headlines, Figtree for reading, RCIR Ice as the button
   colour with ink text, and page heads where the photo sits in its own framed card. Overrides the Frost rules above. ---------- */
:root {
  --veil: #e3f1f8; --paper: #f7f9fb; --tint: #e6f2f8; --surface: #ffffff;
  --ink: #15202b; --muted: #4c5a68; --on-tint: #2f3d4a; --line: #cfdbe3;
  --btn: #7cc9e8; --btn-ink: #15202b; --btn-hover: #a5e5f5;
  --acc: #1c6a92; /* deeper ice for text */
  --stroke: #15202b; --drop: #15202b;
  --display: Unbounded, system-ui, sans-serif; --body: Figtree, system-ui, sans-serif;
  --r: 18px; --lift: none; --frost-hi: transparent;
}
:root[data-theme="dark"] {
  --veil: #1b2a33; --paper: #16191d; --tint: #1c262e; --surface: #1f242a;
  --ink: #eef3f6; --muted: #a9b4bd; --on-tint: #d3dbe1; --line: #313a43;
  --btn: #7cc9e8; --btn-ink: #15202b; --btn-hover: #a5e5f5; --acc: #8fd3ee;
  --stroke: #47525d; --drop: #0b0d10;
}
body, .theme button, .menu summary, .pk-top span, .pk-sub span, .pk-cmp-group th { font-family: var(--body); }
.h1, .h2, h3, .copy h1, .big, .num, .big-steps li::before, .ab-chain li::before, .pc-cat-name, .lk-row b, .ct-card h2,
.pc-rules b, .pc-pointlist dt, .biz2, .full, .pk-top, .pk-cmp thead b, .tm-card b, .tm-head, .lk-head, .pc-empty-title {
  font-family: var(--display); font-variation-settings: normal; font-weight: 800; letter-spacing: -.03em;
}
/* Unbounded is very wide, so every heading steps down a size. */
.h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: .98; }
.h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1; }
h3 { font-size: 1.15rem; }
.ct-card h2 { font-size: 1.35rem; }
.big { font-size: clamp(2.2rem, 5.4vw, 4.4rem); }
.num { font-size: clamp(4.5rem, 12vh, 8rem); }
.big-steps li::before { font-size: clamp(3rem, 7vh, 4.6rem); }
.biz2 { font-size: clamp(1.2rem, 2.2vw, 1.8rem); }
.pk-top { font-size: 1.9rem; }
.links a[aria-current], .sig span, .pk-top, .big-steps li::before, .ab-chain li::before, .pk-tier summary, .pk-cmp-group th { color: var(--acc); }

/* Stickers: outline + hard offset shadow on every panel. */
.ct-card, .pc-rules li, .pk-tier, .lk-row, .tm-card, .pk-cmp-wrap, .strip, .dp-card {
  background: var(--surface); border: 2px solid var(--stroke); box-shadow: 5px 5px 0 var(--drop);
}
.strip { border-radius: var(--r); }
.lk-primary { background: var(--btn); color: var(--btn-ink); }
.lk-row:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--drop); border-color: var(--stroke); }

/* Buttons and the nav are pills that press down. */
.btn { border: 2px solid var(--stroke); box-shadow: 3px 3px 0 var(--drop); transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .2s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--drop); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--drop); }
.btn-line { background: var(--surface); color: var(--ink); }
.page-head .btn-line, .pin .btn-line { color: var(--ink); }
.bar .nav, .stage > .nav { border: 2px solid var(--stroke); box-shadow: 4px 4px 0 var(--drop); background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] :is(.bar .nav, .stage > .nav) { border-color: var(--stroke); }
.theme { border: 2px solid var(--stroke); }
.links a[aria-current] { text-decoration: underline 3px var(--btn); text-underline-offset: 6px; }
.pc-type, .pk-swatches li, .ab-ladder li { border: 1.5px solid var(--stroke); }
.pk-yes { border: 2px solid var(--stroke); background: var(--btn); color: var(--btn-ink); }
.pc-search input { border: 2px solid var(--stroke); background: var(--surface); }

/* Page heads: a wide framed photo across the page column (close to the screenshots' own shape, so little is cropped), text underneath on clean paper. */
.page-head { --col: max(var(--gut), calc((100% - 1240px) / 2 + var(--gut))); padding-block: 100px clamp(40px, 5vw, 64px); }
.page-head::before { position: relative; display: block; inset: auto; z-index: 0; margin: 0 var(--col) clamp(28px, 4vw, 44px); aspect-ratio: 5 / 2; border-radius: 24px; border: 2px solid var(--stroke); box-shadow: 6px 6px 0 var(--drop); }
.page-head::after { display: none; }
.page-head .wrap > * { max-width: 760px; }
@media (max-width: 900px) { .page-head { padding-top: 92px; } }

/* Penal codes: one outlined card per section, flat hairline rows inside. */
.pc-table { border-collapse: collapse; }
.pc-table tbody tr { background: transparent; box-shadow: none; }
.pc-table td, .pc-table tbody th { border-bottom: 1px solid var(--line); }
.pc-table tbody tr > :first-child, .pc-table tbody tr > :last-child { border-radius: 0; }
.pc-cat { padding: 20px 22px 8px; margin-top: 24px; border: 2px solid var(--stroke); border-radius: var(--r); background: var(--surface); box-shadow: 5px 5px 0 var(--drop); }
.pc-bar { box-shadow: none; border-bottom: 2px solid var(--stroke); }
@media (max-width: 760px) { .pc-cat { padding-inline: 16px; } .pc-table tbody tr { padding-inline: 0; } }
@media (prefers-reduced-motion: reduce) { .btn, .lk-row { transition: none; } }
.pc-cat-name { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
.ab-play img { border: 2px solid var(--stroke); box-shadow: 6px 6px 0 var(--drop); }
.tm-card b { font-size: 1rem; }
/* Phones: the wide headline font would run the hero title to three lines and into the RC / IR letters. */
@media (max-width: 640px) {
  .copy h1 { font-size: 1.4rem; line-height: 1.1; }
  .copy .row { flex-wrap: nowrap; gap: 10px; } /* both buttons on one line keeps the copy clear of the letters */
  .copy .btn { padding: .7em 1em; font-size: .9rem; }
}
/* Small phones: the outlined pill nav needs a little less padding to fit the mark, theme switch and menu. */
@media (max-width: 400px) {
  .bar .nav, .stage > .nav { padding-inline: 12px; gap: 8px; }
  .theme button { padding: .45em .6em; }
  .menu summary { padding: .5em .8em; }
}

/* Home: live Discord member and boost counts under the server status intro. */
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.stats[hidden] { display: none; }
.stats span { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 18px; border: 2px solid var(--stroke); border-radius: 999px; background: var(--surface); box-shadow: 3px 3px 0 var(--drop); color: var(--muted); font-weight: 600; }
.stats b { color: var(--ink); font: 800 1.5rem/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .stats { gap: 8px; } .stats span { padding: 8px 12px; gap: 6px; font-size: .9rem; } .stats b { font-size: 1.15rem; } }

/* ---------- Guidelines: server rules, session topics, restricted vehicles sheet ---------- */
.gl-jump { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.gl-jump a { padding: 8px 16px; border: 2px solid var(--stroke); border-radius: 999px; background: var(--surface); box-shadow: 3px 3px 0 var(--drop); color: var(--ink); font-weight: 600; text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.gl-jump a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--drop); }
.gl-section { padding-block: clamp(48px, 6vw, 80px); }
.gl-band { scroll-margin-top: 84px; }
.gl-section, .gl-topic { scroll-margin-top: 96px; }
.gl-num { display: inline-grid; place-items: center; flex: none; min-width: 2em; height: 2em; padding-inline: .4em; border: 2px solid var(--stroke); border-radius: 999px; background: var(--btn); color: var(--btn-ink); font: 800 .8rem/1 var(--display); }
.gl-section ul, .gl-topic ul { display: grid; gap: 8px; margin: 0; padding-left: 1.1em; color: var(--on-tint); }
.gl-section li.gl-note, .gl-topic li.gl-note { margin-top: -4px; list-style: none; color: var(--muted); font-size: .9rem; }
.gl-topic a, .gl-section li a { color: var(--acc); font-weight: 600; }

.gl-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.gl-rules > li { padding: 22px; border: 2px solid var(--stroke); border-radius: var(--r); background: var(--surface); box-shadow: 5px 5px 0 var(--drop); }
.gl-rules h3 { margin: 12px 0 10px; }

.gl-topics { display: grid; gap: 12px; margin-top: 28px; }
.gl-topic { border: 2px solid var(--stroke); border-radius: var(--r); background: var(--surface); box-shadow: 5px 5px 0 var(--drop); }
.gl-topic summary, .gl-agree h3 { display: flex; align-items: center; gap: 14px; margin: 0; padding: 16px 20px; font: 800 1rem/1.25 var(--display); letter-spacing: -.02em; }
.gl-topic summary { cursor: pointer; list-style: none; }
.gl-topic summary::-webkit-details-marker { display: none; }
.gl-topic summary::after { content: ""; width: 10px; height: 10px; margin-left: auto; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-3px); transition: transform .2s var(--ease); }
.gl-topic[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.gl-topic summary:hover { color: var(--acc); }
.gl-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; padding: 18px 20px 22px; border-top: 2px solid var(--stroke); }
.gl-agree .gl-body { grid-template-columns: 1fr; max-width: 80ch; }
.gl-body h3 { margin: 0 0 10px; color: var(--acc); font: 700 .95rem/1.2 var(--body); letter-spacing: 0; }
.gl-peace { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 20px 22px; }
.gl-level { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1.5px solid var(--stroke); border-radius: 14px; background: var(--tint); }
.gl-level h4 { margin: 0; font: 800 .95rem/1.2 var(--display); letter-spacing: -.02em; }
.gl-level ul { font-size: .95rem; }
.gl-level-sub { margin: 4px 0 -2px; font-weight: 700; }
.gl-frp { display: grid; gap: 6px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; }
.gl-frp div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.gl-frp dt { min-width: 8.5em; color: var(--muted); font-weight: 600; }
.gl-frp dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .gl-peace { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .gl-body { grid-template-columns: 1fr; } .gl-topic summary, .gl-agree h3 { padding: 14px 16px; gap: 12px; } .gl-body { padding-inline: 16px; } .gl-peace { padding-inline: 16px; } }

/* Restricted vehicles as a spreadsheet: column letters, row numbers, gridlines, and sheet tabs along the bottom that
   filter the rows (radio buttons + :has, no script). Row numbers are a CSS counter, so filtered rows renumber. */
.gl-dept { max-width: 72ch; margin: 22px 0 0; padding: 14px 18px; border: 2px solid var(--stroke); border-radius: 14px; background: var(--tint); color: var(--on-tint); }
.sheet { margin-top: 24px; overflow: hidden; border: 2px solid var(--stroke); border-radius: var(--r); background: var(--surface); box-shadow: 5px 5px 0 var(--drop); }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 2px solid var(--stroke); background: var(--tint); }
.sheet-name { font: 800 .95rem/1.2 var(--display); letter-spacing: -.02em; }
.sheet-count { color: var(--muted); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet-scroll { overflow-x: auto; }
.sheet-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.sheet-table th, .sheet-table td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; vertical-align: middle; }
.sheet-table tr > :first-child { border-left: 0; }
.sheet-table tr > :last-child { border-right: 0; }
.sheet-table tbody tr:last-child > * { border-bottom: 0; }
.sheet-cols td, .sheet-n { background: var(--tint); color: var(--muted); font-size: .75rem; font-weight: 600; text-align: center !important; }
.sheet-cols td { padding-block: 4px; border-top: 0; }
.sheet-n { width: 44px; padding-inline: 6px !important; }
.sheet-table thead th { background: var(--surface); color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--stroke); }
.sheet-table tbody { counter-reset: row 1; }
.sheet-table tbody tr { counter-increment: row; }
.sheet-table tbody .sheet-n::before { content: counter(row); }
.sheet-table tbody th { font-weight: 600; }
.sheet-table tbody tr:hover > :not(.sheet-n) { background: color-mix(in srgb, var(--btn) 14%, var(--surface)); }
.sheet-year { width: 5.5em; color: var(--muted); }
.sheet-tier { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1.5px solid var(--stroke); border-radius: 999px; background: var(--tint); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.sheet-tier[style*="--gem"]::before { content: ""; width: 16px; height: 16px; background: var(--gem) center / contain no-repeat; }
.sheet-tabs { display: flex; gap: 0; margin: 0; padding: 0 12px; overflow-x: auto; border: 0; border-top: 2px solid var(--stroke); background: var(--tint); scrollbar-width: none; }
.sheet-tabs label { position: relative; flex: none; padding: 10px 16px; color: var(--muted); font-size: .9rem; font-weight: 600; cursor: pointer; }
.sheet-tabs label:hover { color: var(--ink); }
.sheet-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.sheet-tabs label:has(:checked) { margin-top: -2px; border: 2px solid var(--stroke); border-top: 0; border-radius: 0 0 10px 10px; background: var(--surface); color: var(--acc); }
.sheet-tabs label:has(:focus-visible) { outline: 3px solid var(--acc); outline-offset: -5px; border-radius: 8px; }
.sheet:has([value="I"]:checked) tbody tr:not([data-tier="I"]),
.sheet:has([value="II"]:checked) tbody tr:not([data-tier="II"]),
.sheet:has([value="III"]:checked) tbody tr:not([data-tier="III"]),
.sheet:has([value="M"]:checked) tbody tr:not([data-tier="M"]) { display: none; }
.pk-sheet { display: inline-block; margin-top: 10px; color: var(--acc); font-weight: 600; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .gl-jump a, .gl-topic summary::after { transition: none; } }
.gl-rules > li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.gl-rules > li > ul { grid-column: 1 / -1; }
.gl-rules h3 { margin: 0; }
.gl-section ul, .gl-topic ul { list-style: disc; }
.gl-rules > li { align-content: start; }
.sheet-table th, .sheet-table td { padding-block: 7px; } .sheet-tier { padding-block: 2px; }

/* Photographer credit: a small tag on the photo's top-right corner (see CREDITS in src/layout.mjs). */
.credit { position: absolute; z-index: 1; top: 12px; right: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(10, 14, 24, .72); color: #fff; font-size: .75rem; line-height: 1.4; white-space: nowrap; pointer-events: none; }
.page-head .credit { top: 112px; right: calc(var(--col) + 12px); }
@media (max-width: 900px) { .page-head .credit { top: 104px; } }
.dp-card { position: relative; }
.strips li .credit { opacity: 0; transition: opacity .3s var(--ease); }
.strips li:is(:hover, :focus-within) .credit, .strips:not(:has(li:hover, li:focus-within)) li:first-child .credit { opacity: 1; }
@media (max-width: 900px) { .strips li .credit { opacity: 1; } }

/* Page-to-page transitions: same-site navigations cross-fade (native View Transitions, Chrome/Edge/Safari 18.2+; other browsers just load the page).
   The pill nav has its own name so it stays put while the page under it changes. */
@view-transition { navigation: auto; }
.bar { view-transition-name: site-nav; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .16s ease-in both; }
  ::view-transition-new(root) { animation: vt-in .34s var(--ease) both; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Skeleton loading: a soft shimmer where photos and live numbers will appear. site.js adds .is-loaded / removes [data-loading]
   when they arrive; the .js class (set in <head>) keeps skeletons off when scripts don't run. */
:root { --skel: color-mix(in srgb, var(--ink) 9%, transparent); --skel-hi: color-mix(in srgb, var(--ink) 17%, transparent);
  --skel-bg: linear-gradient(100deg, var(--skel) 30%, var(--skel-hi) 50%, var(--skel) 70%); }
.js main img:not(.is-loaded), .js [data-loading] :is([data-stat]), .js [data-stat][data-loading], .js .state.wait, .js .srv:has(.state.wait) small {
  background: var(--skel-bg) 0 0 / 300% 100%; animation: skel 1.3s linear infinite; }
.js .page-head:not(.is-loaded)::before { background-image: var(--banner), var(--skel-bg); background-size: cover, 300% 100%; background-position: 50% 60%, 0 0; animation: skel-head 1.3s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes skel-head { from { background-position: 50% 60%, 100% 0; } to { background-position: 50% 60%, 0 0; } }
.js [data-stat][data-loading], .js [data-loading] [data-stat] { color: transparent; border-radius: 6px; }
.js .stats[data-loading] b { display: inline-block; min-width: 2.6ch; height: 1em; border-radius: 6px; vertical-align: -.1em; }
.js .state.wait { color: transparent; border-radius: 999px; justify-self: start; width: 6.5ch; max-width: 100%; overflow: hidden; } .js .state.wait::before { visibility: hidden; }
.js .srv:has(.state.wait) small { display: block; width: 80%; height: .95em; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .js main img, .js [data-stat], .js .state.wait, .js .srv small, .js .page-head::before { animation: none; } }
html:not(.js) .stats[data-loading] { display: none; }
