/* PBRP identity layer. Loaded last on every page.
   Idea: the site is the County Records Office. Case files, docket numbers, stamped tags,
   hard paper-cut edges. No glows, no blur, no lift-on-hover, no pill buttons. */

:root {
  --stamp: #a5321d;      /* jeepney red as a fill (cream text on it passes AA) */
  --stamp-text: #ef6a4f; /* same red, lightened for text on dark */
  --sun: #f0b43a;        /* sun yellow: the highlighted word, not a gradient */
  --sea: #2f5fa8;        /* flag blue: used only in the header stripe */
  --ink: #0e100d;
  --paper-line: rgba(246, 240, 223, 0.14);
  --r-sm: 0; --r-md: 0; --r-lg: 0; --r-xl: 0;
  --hard: 5px 5px 0 var(--ink);
  --hard-sm: 3px 3px 0 var(--ink);
}

/* grain: a faint paper texture instead of a smooth gradient */
body {
  background-color: #171a16;
  background-image: none;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}
.lite body::after { display: none; }

::selection { background: var(--sun); color: var(--ink); }

/* ---------- header: flag stripe, square tags ---------- */
.site-header {
  background: #12140f;
  border-bottom: 0;
  box-shadow: 0 3px 0 var(--ink);
}
.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 3px;
  background: linear-gradient(90deg, var(--sea) 0 33.33%, var(--stamp) 33.33% 66.66%, var(--sun) 66.66% 100%);
}
.nav-links a { transition: none; position: relative; }
.nav-links a:not(.nav-pill):hover { color: var(--sun); }
.nav-links a:not(.nav-pill):hover::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; background: var(--sun);
}
.nav-pill {
  border: 2px solid var(--sun);
  background: var(--sun);
  color: var(--ink) !important;
  border-radius: 0;
  box-shadow: var(--hard-sm);
}
.nav-pill:hover { background: var(--bright); border-color: var(--bright); color: var(--ink) !important; }

/* ---------- buttons: press, don't float ---------- */
.btn, .lp-imore .lp-actions .lp-play-cta, .lp-imore .lp-actions .lp-discord-cta {
  border-radius: 0;
  border: 2px solid var(--bright);
  background: transparent;
  color: var(--bright);
  box-shadow: var(--hard-sm);
  backdrop-filter: none;
  transition: transform .08s, box-shadow .08s, background .08s, color .08s;
}
.btn:hover, .lp-imore .lp-actions .lp-play-cta:hover, .lp-imore .lp-actions .lp-discord-cta:hover {
  transform: none; filter: none;
  background: var(--bright); color: var(--ink); border-color: var(--bright);
  box-shadow: var(--hard-sm);
}
.btn:active, .lp-imore .lp-actions .lp-play-cta:active, .lp-imore .lp-actions .lp-discord-cta:active {
  transform: translate(3px, 3px); box-shadow: none;
}
.btn-primary, .lp-imore .lp-actions .lp-play-cta {
  background: var(--sun); border-color: var(--ink); color: var(--ink);
  box-shadow: 4px 4px 0 var(--stamp-text);
}
.btn-primary:hover, .lp-imore .lp-actions .lp-play-cta:hover {
  background: var(--sun); color: var(--ink); border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--stamp-text); transform: translate(-1px, -1px);
}
.btn-primary:active, .lp-imore .lp-actions .lp-play-cta:active { transform: translate(4px, 4px); box-shadow: none; }
.btn-secondary { color: var(--bright); border-color: var(--paper-line); }
.btn-copy { border-radius: 0; border: 1px dashed var(--sun); color: var(--sun); }
.btn-copy:hover { background: var(--sun); color: var(--ink); border-style: solid; }

/* ---------- hero: no blurry glow behind the text ---------- */
.lp-intro-inner::before, .lp-fx .lp-arrive .lp-imore::before { display: none; }
.lp-slogan { letter-spacing: 2px; text-shadow: 3px 3px 0 var(--ink); }
.lp-slogan .lp-blue { color: var(--sun); }
.lp-lead { color: var(--bright); }
.lp-status code {
  padding: 3px 8px;
  background: var(--ink);
  border: 1px dashed var(--paper-line);
  color: var(--sun);
}

/* ---------- section titles: filed, not centred ---------- */
body { counter-reset: file; }
.lp-sec .lp-wrap, .sp-sec .sp-wrap { position: relative; }
.lp-title {
  text-align: left;
  font-size: clamp(48px, 7vw, 96px);
  counter-increment: file;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lp-title::before {
  content: 'CASE FILE No. ' counter(file, decimal-leading-zero);
  align-self: flex-start;
  padding: 3px 10px 2px;
  font: 600 12px/1.6 'IBM Plex Mono', monospace;
  letter-spacing: .18em;
  color: var(--stamp-text);
  border: 2px solid var(--stamp-text);
  transform: rotate(-1.5deg);
  opacity: .95;
}
.lp-title::after {
  content: '';
  height: 4px;
  margin-top: 6px;
  background: repeating-linear-gradient(90deg, var(--bright) 0 14px, transparent 14px 20px);
  opacity: .22;
}
.lp-sub, .sp-head p { text-align: left; max-width: 62ch; color: var(--text); }
.sp-head { text-align: left; }
#hub .lp-sub, #news .lp-sub { margin-top: 18px; }
.lp-link { color: var(--sun); text-decoration-color: var(--sun); text-decoration-thickness: 2px; }

/* ---------- pinned chapter panels ---------- */
.lp-panel::after { background: linear-gradient(90deg, var(--bg) 8%, rgba(23, 26, 22, 0.7)); opacity: var(--shade, .8); }
.lp-panel-title { text-shadow: 4px 4px 0 var(--ink); }
.lp-facts { gap: 10px; }
.lp-facts li {
  padding: 4px 12px;
  border: 2px solid var(--sun);
  color: var(--sun);
  font: 600 12px/1.5 'IBM Plex Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(14, 16, 13, .7);
}
.lp-start-step {
  backdrop-filter: none;
  background: #12140f;
  border: 2px solid var(--bright);
  border-radius: 0;
  box-shadow: var(--hard);
}
.lp-start-number { color: var(--stamp-text); font-size: 40px; text-shadow: 2px 2px 0 var(--ink); }
.lp-prog { border-radius: 0; }
.lp-fx .lp-prog i { background: var(--sun); }

/* ---------- news: bulletin-board clippings ---------- */
.nw-card {
  background: #1d211a;
  border: 2px solid var(--bright);
  border-radius: 0;
  box-shadow: var(--hard);
  transition: none;
  position: relative;
}
.nw-card:nth-child(odd) { transform: rotate(-.35deg); }
.nw-card:nth-child(even) { transform: rotate(.3deg); }
.nw-card:hover { transform: none; border-color: var(--sun); box-shadow: 5px 5px 0 var(--sun); }
.nw-card::before {
  /* pushpin */
  content: '';
  position: absolute; top: -9px; left: 50%;
  width: 14px; height: 14px; margin-left: -7px;
  background: var(--stamp);
  border: 2px solid var(--ink);
  border-radius: 50%;
  z-index: 3;
}
.nw-card .nw-body { padding-top: 24px; }
.nw-meta b {
  padding: 2px 8px;
  background: var(--stamp);
  color: var(--bright);
  border-radius: 0;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nw-more { color: var(--sun); font-weight: 600; }
.nw-chip { border-radius: 0; border-width: 2px; }

/* ---------- hub: a directory board ---------- */
.hb-group {
  background: #12140f;
  border: 2px solid var(--bright);
  border-radius: 0;
  box-shadow: var(--hard);
}
.hb-group h3 { background: var(--bright); color: var(--ink); border-bottom: 2px solid var(--ink); }
.hb-group h3 span { color: var(--stamp); }  /* sits on cream header */
.hb-row { border-left-width: 6px; transition: none; }
.hb-row + .hb-row, .hb-group li + li .hb-row { border-top: 1px dashed var(--paper-line); }
.hb-row:hover, .hb-row:focus-visible { background: var(--sun); border-left-color: var(--stamp); }
.hb-row:hover *, .hb-row:focus-visible * { color: var(--ink) !important; }

/* ---------- server window: old Windows chrome, flat ---------- */
.sp-win { background: #12140f; border: 2px solid var(--bright); border-radius: 0; box-shadow: 8px 8px 0 var(--ink); }
.sp-bar { background: var(--bright); color: var(--ink); border-bottom: 2px solid var(--ink); }
.sp-bar i { border-radius: 0; background: var(--stamp); }
.sp-bar.is-on i { background: #3f9a3f; box-shadow: none; }
.sp-table th { color: var(--sun); }
.sp-table tr:nth-child(even) { background: rgba(255, 255, 255, .035); }
.sp-meter { border-left: 2px dashed var(--paper-line); }
.sp-big { color: var(--sun); }
.sp-progress { border: 2px solid var(--bright); border-radius: 0; height: 18px; }
.sp-progress b { background: repeating-linear-gradient(90deg, var(--sun) 0 10px, transparent 10px 13px); }
.sp-foot { border-top: 2px solid var(--bright); background: #0c0e0b; }

/* ---------- commands: looks like the in-game chat box ---------- */
.sp-cmds {
  background: rgba(0, 0, 0, .78);
  border: 2px solid var(--bright);
  border-radius: 0;
  box-shadow: var(--hard);
  padding: 14px 22px;
  font-family: 'IBM Plex Mono', monospace;
}
.sp-cmds div { border-bottom: 0; padding: 6px 0; font-size: 14px; }
.sp-cmds code { color: var(--sun); min-width: 110px; text-shadow: 1px 1px 0 #000; }
.sp-cmds span { color: #e6e6e6; text-shadow: 1px 1px 0 #000; }

/* ---------- government: county ID cards ---------- */
.sp-person {
  background: #e9e2cf;
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: var(--hard);
  color: var(--ink);
  transition: none;
  padding-top: 0;
}
.sp-person::before {
  height: auto; position: static;
  content: 'PBRP COUNTY  \00B7  OFFICIAL ID';
  align-self: stretch;
  margin: 0 -12px;
  padding: 5px 0;
  background: var(--stamp);
  color: var(--bright);
  font: 600 11px/1.4 'IBM Plex Mono', monospace;
  letter-spacing: .16em;
}
.sp-person:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); border-color: var(--ink); }
.sp-model { margin-top: 12px; border: 2px solid var(--ink); background: #b9b4a3; aspect-ratio: 4 / 5; margin-left: 4px; margin-right: 4px; align-self: stretch; }
.sp-person:hover .sp-model img { transform: none; }
.sp-person span { color: var(--stamp); }
.sp-person b, .sp-person.is-open b { color: var(--ink); }
.sp-person.is-open b { opacity: .6; }
.sp-person small { border-radius: 0; border: 1px dashed var(--ink); color: var(--ink); }
a.sp-person:hover .sp-more, a.sp-person:focus-visible .sp-more { color: var(--stamp); }
.sp-more { color: rgba(14, 16, 13, .7); }
.sp-empty::before, .sp-empty::after { background: rgba(14, 16, 13, .18); }

/* ---------- FAQ: numbered ledger ---------- */
.sp-faq { counter-reset: q; margin: 0; max-width: 900px; gap: 0; border: 2px solid var(--bright); box-shadow: var(--hard); }
.sp-faq details { counter-increment: q; background: #12140f; border: 0; border-bottom: 1px dashed var(--paper-line); border-radius: 0; }
.sp-faq details:last-child { border-bottom: 0; }
.sp-faq summary::before {
  content: 'Q' counter(q);
  flex: none; width: 3ch; margin-right: 8px;
  font: 600 13px/1.9 'IBM Plex Mono', monospace;
  color: var(--stamp-text);
}
.sp-faq summary { justify-content: flex-start; }
.sp-faq summary::after { margin-left: auto; color: var(--sun); }
.sp-faq details[open] { background: #1b1f17; }
.sp-faq details[open] summary { color: var(--sun); }

/* ---------- support section ---------- */
.sp-tier { background: #12140f; border: 2px solid var(--bright); border-radius: 0; box-shadow: var(--hard); border-top-width: 6px; border-top-color: var(--sun); }
.sp-maint-card { border-radius: 0; border: 2px solid var(--bright); box-shadow: var(--hard); background: #12140f; }
.sp-maint-tag { border-radius: 0; background: var(--stamp); color: var(--bright); font-family: 'IBM Plex Mono', monospace; letter-spacing: .12em; }

/* ---------- record strip under the hero ---------- */
.rec-strip {
  position: relative;
  z-index: 3;
  background: var(--sun);
  color: var(--ink);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.rec-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  gap: 4px 0;
  padding: 10px 16px;
  font: 600 13px/1.4 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.rec-strip li + li::before { content: '\2605'; margin: 0 18px; color: var(--stamp); }

/* ---------- footer ---------- */
.site-footer { background: #0c0e0b; border-top: 3px solid var(--bright); position: relative; z-index: 2; }
.footer-links a { border: 2px solid var(--paper-line); border-radius: 0; transition: none; }
.footer-links a:hover { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.footer-subtitle { color: var(--sun); font-family: 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; }
.footer-social img { border-radius: 0 !important; }

/* ---------- keep the page calm for people who ask for it ---------- */
@media (prefers-reduced-motion: reduce) {
  .nw-card, .nw-card:nth-child(odd), .nw-card:nth-child(even), .lp-title::before { transform: none; }
}
.lite .nw-card, .lite .nw-card:nth-child(odd), .lite .nw-card:nth-child(even) { transform: none; }
@media (max-width: 860px) {
  .lp-title { font-size: clamp(40px, 12vw, 64px); }
  .rec-strip li + li::before { margin: 0 10px; }
  .rec-strip ul { font-size: 11px; justify-content: flex-start; }
}

/* ---------- focus: always visible, never colour-only ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}
.sp-person:focus-visible, .hb-row:focus-visible { outline-color: var(--ink); outline-offset: -3px; }

.nw-card { overflow: visible; }

/* ---------- <picture> wrappers (WebP with JPG/PNG fallback) must not change the layout ---------- */
.lp-stage picture, .lp-panel-img picture { display: contents; }

/* ---------- government list: vacant seats were faded to 50%, which made their text unreadable ---------- */
.gv-card.is-vacant { opacity: 1; }
.gv-card.is-vacant .gv-photo { opacity: .5; }
.gv-card.is-vacant .gv-name { color: var(--muted); }
.gv-office { font-size: 11.5px; color: #c9c4b3; }

/* ---------- county line: a green highway sign on the road into the county ---------- */
.cl-band {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 16px 0;
  background: linear-gradient(180deg, transparent, #10120e 70%);
  overflow: hidden;
}
.cl-sign {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  padding: 22px 26px 20px;
  text-align: center;
  color: #fff;
  background: #0d6b3f;
  border: 4px solid #0d6b3f;
  border-radius: 14px;
  box-shadow: inset 0 0 0 3px #f4f4ef, var(--hard);
  font-family: 'BankGothic', 'IBM Plex Sans', sans-serif;
}
.cl-small { font-size: 15px; letter-spacing: .3em; text-transform: uppercase; opacity: .95; }
.cl-name {
  margin: 4px 0 12px;
  font-family: 'BankGothic', 'IBM Plex Sans', sans-serif;
  font-size: clamp(34px, 8vw, 58px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cl-rows { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 28px; padding-top: 12px; border-top: 3px solid #f4f4ef; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.cl-rows b { font-weight: 400; color: #ffe27a; }
.cl-sub {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  padding: 7px 16px;
  background: #f4f4ef;
  color: var(--ink);
  border: 3px solid var(--ink);
  font: 600 13px/1.3 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.cl-sub b { color: var(--stamp); }
.cl-sub:hover { background: var(--sun); }
.cl-posts { display: flex; justify-content: space-between; width: min(380px, 70%); height: 60px; margin-top: -2px; }
.cl-posts i { width: 12px; background: linear-gradient(90deg, #6f7368, #b9bcb2 45%, #5d6058); }
/* the road: dashed centre line under the sign */
.cl-band::after {
  content: '';
  align-self: stretch;
  height: 10px;
  margin: 0 -16px;
  background: #22251f repeating-linear-gradient(90deg, var(--sun) 0 46px, transparent 46px 86px) center / 100% 4px no-repeat;
  border-top: 2px solid #33372f;
}
@media (max-width: 560px) {
  .cl-band { padding-top: 44px; }
  .cl-sign { padding: 16px 14px 14px; border-radius: 10px; }
  .cl-small, .cl-rows { font-size: 13px; }
  .cl-posts { height: 40px; }
}

/* ---------- footer: county seal ---------- */
.footer-seal { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.footer-seal img { width: 64px; height: 64px; flex: none; }
.footer-seal p { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.footer-seal b { font-family: 'BankGothic', sans-serif; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--bright); }
.footer-seal span { font: 500 11.5px/1.5 'IBM Plex Mono', monospace; letter-spacing: .06em; color: var(--muted); }

/* phones: leave room so the floating cookie button never covers the last footer line */
@media (max-width: 560px) { .site-footer { padding-bottom: 72px; } }


/* phones / lite mode with motion off: the browser skips laying out sections until they scroll near the screen.
   Only while motion is off, because the motion effects measure where each section sits.
   html.cv-off (set on in-page link clicks and #addresses) turns it off so jumps land exactly. */
html.lite:not(.lp-fx):not(.cv-off) .lp-chapter,
html.lite:not(.lp-fx):not(.cv-off) .lp-sec,
html.lite:not(.lp-fx):not(.cv-off) .sp-sec,
html.lite:not(.lp-fx):not(.cv-off) .site-footer { content-visibility: auto; contain-intrinsic-size: auto 900px; }
