/* Janta Report Card — neobrutalism meets the school report card.
   Two border weights only (3px structure, 2px detail), one shadow direction,
   a 4px spacing scale, red-pen grades. */

@font-face { font-family: "Archivo Black"; src: url("../fonts/ArchivoBlack-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #111111;
  --paper: #FFF4D6;
  --paper-2: #FFF9E8;
  --dot: #EADBB2;
  --white: #FFFFFF;
  --yellow: #FFE14D;
  --pink: #FF6BB5;
  --cyan: #4DD4FF;
  --lime: #B8FF3B;
  --orange: #FF9F1C;
  --purple: #B69CFF;
  --red: #E5322D;
  --rule: #C9DDF2;
  --muted: #5B5546;

  --bw: 3px;               /* structure: cards, buttons, inputs */
  --bw-2: 2px;             /* detail: badges, bars, chips inside cards */
  --border: var(--bw) solid var(--ink);
  --border-2: var(--bw-2) solid var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --sh: 5px 5px 0 var(--ink);
  --sh-lg: 8px 8px 0 var(--ink);
  --r: 14px;
  --r-sm: 10px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px; --s9: 64px;
  --gutter: clamp(16px, 4vw, 32px);

  --f-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --f-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Space Mono", ui-monospace, Menlo, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font: 500 17px/1.55 var(--f-body); color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.6px, transparent 2px);
  background-size: 26px 26px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 var(--s3); }
:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: var(--s2); z-index: 50; background: var(--yellow); border: var(--border); padding: var(--s2) var(--s3); }
.skip:focus { left: var(--s2); }
.muted { color: var(--muted); font-weight: 500; }
html:not(.js) .js-only { display: none !important; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.22em; }

[id] { scroll-margin-top: 96px; }
main { max-width: 1120px; margin: 0 auto; padding: var(--s4) var(--gutter) var(--s8); }
.page { padding-top: var(--s2); }

/* ---------- topbar ---------- */
.topbar { border-bottom: var(--border); background: var(--paper); position: relative; z-index: 20; }
@media (min-width: 900px) and (min-height: 600px) { .topbar { position: sticky; top: 0; } }
.topbar__in { max-width: 1120px; margin: 0 auto; padding: var(--s3) var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; min-width: 0; }
.brand__seal { width: clamp(48px, 11vw, 64px); height: auto; aspect-ratio: 1; flex: none; transition: transform .35s cubic-bezier(.2,.9,.3,1.3); filter: drop-shadow(3px 3px 0 var(--ink)); }
.brand:hover .brand__seal { transform: rotate(-12deg) scale(1.05); }
.brand__word { font: clamp(19px, 5vw, 26px)/1 var(--f-display); letter-spacing: -.02em; white-space: nowrap; background: var(--yellow); border: var(--border); box-shadow: var(--sh-sm); padding: 8px 12px 9px; border-radius: var(--r-sm); transform: rotate(-1.5deg); }
.logo__a { color: var(--red); }
.logo__dot { color: var(--pink); -webkit-text-stroke: 1px var(--ink); }
.nav { display: flex; gap: var(--s2); }
.nav__link {
  display: inline-flex; align-items: center; gap: var(--s2); padding: 9px 14px; text-decoration: none;
  font: 700 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .02em;
  background: var(--white); border: var(--border); border-radius: 999px; box-shadow: var(--sh-sm);
  transition: transform .1s, box-shadow .1s;
}
.nav__link .icon { width: 18px; height: 18px; }
.nav__link:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.nav__link.is-active { background: var(--yellow); }
.nav__link--cta { background: var(--lime); }
@media (max-width: 600px) {
  .topbar__in { padding-block: var(--s2) var(--s3); }
  .brand__word { padding: 6px 9px 7px; }
  .nav { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .nav__link { justify-content: center; padding: 10px 6px; font-size: 11px; gap: 6px; border-radius: var(--r-sm); }
  .nav__more { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 12px 18px; text-decoration: none; text-align: center;
  font: 16px/1.15 var(--f-display); letter-spacing: .01em;
  background: var(--bg); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn .icon { width: 1.25em; height: 1.25em; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled] { cursor: not-allowed; opacity: .55; transform: none; }
.btn--black { --bg: var(--ink); color: var(--yellow); box-shadow: 4px 4px 0 var(--pink); }
.btn--black:hover { box-shadow: 6px 6px 0 var(--pink); }
.btn--black:active { box-shadow: 0 0 0 var(--pink); }
.btn--yellow { --bg: var(--yellow); } .btn--lime { --bg: var(--lime); } .btn--pink { --bg: var(--pink); } .btn--white { --bg: var(--white); }
.btn--danger { --bg: #FF8A8A; }
.btn--xl { width: 100%; min-height: 58px; font-size: clamp(16px, 4.4vw, 19px); padding: 16px 22px; border-radius: var(--r); }
.btn--sm { min-height: 38px; font-size: 14px; padding: 8px 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; font: 700 12px/1 var(--f-mono); text-transform: uppercase; background: var(--white); border: var(--border-2); border-radius: 999px; padding: 8px 12px; box-shadow: 2px 2px 0 var(--ink); }
.chip--lime { background: var(--lime); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.actions .btn { flex: 1 1 auto; }
@media (min-width: 720px) { .actions .btn { flex: 0 0 auto; } }

/* ---------- headings ---------- */
.eyebrow { margin: 0 0 var(--s4); font: 700 12px/1.6 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; }
.eyebrow .icon { width: 16px; height: 16px; margin-right: 6px; }
.dot { display: inline-block; vertical-align: -1px; margin-right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #FF3B3B; border: var(--border-2); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.6); } }
.page-title { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin: 0 0 var(--s4); font: clamp(30px, 6.5vw, 50px)/1.04 var(--f-display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.title-icon { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; background: var(--yellow); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm); }
.title-icon .icon { width: .7em; height: .7em; }
.kicker { margin: 0 0 var(--s2); font: 700 12px/1.3 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.section-title { font: clamp(24px, 5vw, 34px)/1.1 var(--f-display); margin: var(--s8) 0 var(--s5); letter-spacing: -.02em; }
.section-title span { background: var(--lime); border: var(--border); padding: 4px 12px 6px; border-radius: var(--r-sm); box-shadow: var(--sh-sm); display: inline-block; transform: rotate(-1deg); }
.section-title span.alt { background: var(--cyan); }
.lede { font-size: 18px; margin-bottom: var(--s6); }
.big-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: var(--s4); background: var(--yellow); border: var(--border); border-radius: 50%; box-shadow: var(--sh); }
.big-icon .icon { width: 36px; height: 36px; }

/* ---------- hero ---------- */
.hero { display: grid; gap: var(--s7); align-items: center; padding: var(--s4) 0 var(--s7); }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: var(--s8); } }
.hero__title { margin: 0 0 var(--s5); font: clamp(36px, 8vw, 66px)/1.02 var(--f-display); letter-spacing: -.03em; }
.hero__title mark { display: inline; background: none; color: var(--red); background-image: linear-gradient(transparent 82%, rgba(229, 50, 45, .28) 82%); }
.hero__sub { font-size: clamp(17px, 2.2vw, 19px); max-width: 580px; margin-bottom: var(--s6); }
.hero__cta { max-width: 460px; }
.progress-note { margin: var(--s3) 0 0; font: 700 12px/1.4 var(--f-mono); text-transform: uppercase; }

.trust { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); padding: 0; margin: var(--s5) 0 0; }
.trust li { display: flex; align-items: flex-start; gap: var(--s2); flex: 1 1 200px; padding: 10px 12px; font-size: 14px; line-height: 1.35; background: var(--white); border: var(--border-2); border-radius: var(--r-sm); }
.trust .icon { width: 22px; height: 22px; padding: 2px; margin-top: 1px; color: var(--ink); }
.trust li:nth-child(1) .icon { background: var(--lime); border-radius: 6px; }
.trust li:nth-child(2) .icon { background: var(--cyan); border-radius: 6px; }
.trust li:nth-child(3) .icon { background: var(--yellow); border-radius: 6px; }
.trust--stack { flex-direction: column; }
.trust--stack li { flex: none; }
.trust--compact li { font-size: 13px; padding: 8px 10px; flex-basis: 100%; }

.pm-card {
  position: relative; display: grid; justify-items: center; gap: var(--s3); text-align: center; text-decoration: none;
  padding: var(--s7) var(--s5) var(--s6); background: var(--white); border: var(--border); border-radius: var(--r); box-shadow: var(--sh-lg);
  background-image: repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 33px); background-position: 0 14px;
  transition: transform .12s, box-shadow .12s;
}
.pm-card:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.pm-card__label { position: absolute; top: -15px; left: 50%; transform: translateX(-50%) rotate(-2deg); white-space: nowrap; font: 700 12px/1 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; background: var(--yellow); border: var(--border); padding: 7px 12px; border-radius: var(--r-sm); }
.pm-card__name { font: clamp(26px, 4vw, 32px)/1.05 var(--f-display); letter-spacing: -.02em; }
.pm-card__meta { font: 700 12px/1.3 var(--f-mono); text-transform: uppercase; }
.pm-card__mine { font: 700 12px/1 var(--f-mono); text-transform: uppercase; background: var(--lime); border: var(--border-2); padding: 6px 9px; border-radius: 6px; }

/* ---------- how it works ---------- */
.steps { list-style: none; margin: 0 0 var(--s8); padding: 0; display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: none; }
.step { position: relative; display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s4); background: var(--white); border: var(--border); border-radius: var(--r); box-shadow: var(--sh-sm); }
.step__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; background: var(--yellow); border: var(--border-2); border-radius: var(--r-sm); }
.step:nth-child(2) .step__icon { background: var(--cyan); }
.step:nth-child(3) .step__icon { background: var(--pink); }
.step:nth-child(4) .step__icon { background: var(--lime); }
.step__icon .icon { width: 26px; height: 26px; }
.step__n { position: absolute; top: -10px; right: 12px; font: 13px/1 var(--f-display); background: var(--ink); color: var(--yellow); padding: 4px 8px; border-radius: 6px; }
.step__body { display: grid; gap: 2px; font-size: 14px; line-height: 1.4; }
.step__body b { font: 17px/1.15 var(--f-display); }

/* ---------- avatars, party badges, stamps ---------- */
.avatar {
  --c: var(--pink);
  display: grid; place-items: center; flex: none; width: 56px; height: 56px; overflow: hidden;
  font: 20px/1 var(--f-display); background: var(--c); border: var(--border); border-radius: 12px;
}
.avatar .icon { width: 28px; height: 28px; }
.avatar--pink { --c: var(--pink); } .avatar--cyan { --c: var(--cyan); } .avatar--lime { --c: var(--lime); }
.avatar--orange { --c: var(--orange); } .avatar--purple { --c: var(--purple); } .avatar--yellow { --c: var(--yellow); }
.avatar--xl { width: 112px; height: 112px; font-size: 40px; border-radius: 20px; box-shadow: var(--sh); }
.avatar--photo { padding: 0; background: var(--white); }
.avatar--photo img { width: 100%; height: 100%; object-fit: cover; }

.party {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 30px; padding: 0 12px 0 5px; vertical-align: middle;
  background: var(--pc, var(--white)); color: var(--pt, var(--ink)); border: var(--border); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink);
  font: 700 13px/1 var(--f-mono); letter-spacing: .02em; white-space: nowrap;
}
.party b { font-weight: 700; padding-left: 5px; }
.party img { width: 22px; height: 22px; object-fit: contain; background: var(--white); border-radius: 50%; border: var(--border-2); padding: 1px; }
.party:not(:has(img)) { padding-left: 10px; }
.party:not(:has(img)) b { padding-left: 0; }
.party--sm { height: 24px; font-size: 11px; border-width: var(--bw-2); box-shadow: none; padding-right: 9px; }
.party--sm img { width: 18px; height: 18px; }
.party--lg { height: 40px; padding: 0 16px 0 6px; font-size: 16px; box-shadow: var(--sh-sm); }
.party--lg img { width: 30px; height: 30px; }
.party--lg:not(:has(img)) { padding-left: 16px; }
.partyline { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); margin: var(--s3) 0 0; }
.partyline__name { font-weight: 700; font-size: 15px; }
.pm-card .party { margin-top: 2px; }

.stamp {
  position: relative; display: inline-grid; place-items: center; flex: none; width: 54px; height: 54px;
  font: 30px/1 var(--f-display); color: var(--red); background: var(--g, var(--white));
  border: var(--border); border-radius: 50%; box-shadow: var(--sh-sm); transform: rotate(-6deg);
}
.stamp::after { content: ""; position: absolute; inset: 4px; border: 3px solid var(--red); border-radius: 48% 52% 46% 54%; transform: rotate(14deg); }
.stamp--lg { width: 96px; height: 96px; font-size: 54px; }
.stamp--lg::after { inset: 6px; border-width: 4px; }
.stamp--xl { width: 140px; height: 140px; font-size: 78px; box-shadow: var(--sh); }
.stamp--xl::after { inset: 8px; border-width: 5px; }
.stamp--sm { width: 34px; height: 34px; font-size: 17px; box-shadow: 2px 2px 0 var(--ink); vertical-align: middle; }
.stamp--sm::after { inset: 3px; border-width: 2px; }
.stamp--locked { color: var(--ink); background: var(--paper-2); transform: none; }
.stamp--locked::after { display: none; }
.stamp--locked .icon { width: 44%; height: 44%; }

.meter { display: grid; gap: 5px; width: 100%; max-width: 220px; }
.meter__bar { height: 10px; background: var(--white); border: var(--border-2); border-radius: 99px; overflow: hidden; }
.meter__bar > span { display: block; height: 100%; width: var(--p); min-width: 4px; background: repeating-linear-gradient(-45deg, var(--ink) 0 5px, #444 5px 10px); }
.meter__txt { display: inline-flex; align-items: center; gap: 5px; font: 700 11px/1 var(--f-mono); text-transform: uppercase; }
.meter__txt .icon { width: 13px; height: 13px; }
.meter--center { justify-items: center; justify-self: stretch; margin-inline: auto; }
.meter__bar { width: 100%; }
.meter--lg { max-width: 320px; margin: var(--s2) 0 var(--s3); }
.meter--lg .meter__bar { height: 16px; }
.meter--lg .meter__txt { font-size: 13px; }

/* ---------- tabs + filters ---------- */
.board { margin-bottom: var(--s8); }
.tabs { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.tab {
  display: inline-flex; align-items: center; gap: var(--s2); padding: 12px 16px; text-decoration: none; cursor: pointer;
  font: 16px/1.1 var(--f-display); background: var(--white); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm);
}
.tab .icon { width: 22px; height: 22px; }
.tab__n { font: 700 12px/1 var(--f-mono); background: var(--paper); border: var(--border-2); border-radius: 999px; padding: 4px 7px; }
.tab.is-on { background: var(--ink); color: var(--yellow); box-shadow: 4px 4px 0 var(--pink); }
.tab.is-on .tab__n { background: var(--yellow); color: var(--ink); }
.tab--link { margin-left: auto; background: transparent; box-shadow: none; border-color: transparent; font-size: 14px; text-decoration: underline; }
@media (max-width: 600px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .tab { justify-content: center; font-size: 13px; padding: 11px 6px; gap: 6px; }
  .tab .icon { width: 18px; height: 18px; }
  .tab__n { padding: 3px 5px; font-size: 11px; }
  .tab--link { grid-column: 1 / -1; margin: 0; justify-content: flex-start; padding: 4px 0; }
}
.panel + .panel { margin-top: var(--s8); }
html.js [data-tabs] ~ .panel { margin-top: 0; }

.filters { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s5); }
.search { position: relative; flex: 1 1 260px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; pointer-events: none; }
.search input[type=search] { width: 100%; height: 48px; padding: 0 14px 0 44px; background: var(--white); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm); font-weight: 600; }
.mystate { position: relative; flex: 0 1 230px; }
.mystate .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; pointer-events: none; }
.mystate select { height: 48px; padding-left: 38px; }
.filters .mystate select { padding-left: 38px; }
.pills { display: flex; gap: var(--s2); flex: 1 1 100%; overflow-x: auto; padding: 2px 4px 6px 2px; scrollbar-width: none; order: 3; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: 8px 13px; font: 700 12px/1 var(--f-mono); text-transform: uppercase; background: var(--white); border: var(--border-2); border-radius: 999px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.pill.is-on { background: var(--yellow); }
.filters__empty, .empty-note { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); background: var(--white); border: var(--border); border-radius: var(--r); }
.empty-note .icon { width: 24px; height: 24px; margin-top: 2px; }

/* ---------- tiles ---------- */
.tiles { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
@media (min-width: 900px) { .tiles { gap: var(--s5); } }
.tile {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3) var(--s4);
  min-height: 100px; padding: var(--s4) var(--s4) var(--s4) calc(var(--s4) + 10px); text-decoration: none;
  background: var(--white); border: var(--border); border-radius: var(--r);
  box-shadow: inset 10px 0 0 var(--pc, transparent), var(--sh-sm);
  transition: transform .1s, box-shadow .1s;
}
a.tile:hover { transform: translate(-2px, -2px); box-shadow: inset 10px 0 0 var(--pc, transparent), var(--sh); }
.tile__rank { position: absolute; top: -12px; left: -6px; font: 13px/1 var(--f-display); background: var(--yellow); border: var(--border-2); border-radius: 7px; padding: 5px 7px; transform: rotate(-5deg); }
.tile__pin { position: absolute; top: -12px; right: 14px; display: inline-flex; align-items: center; gap: 4px; font: 700 11px/1 var(--f-mono); text-transform: uppercase; background: var(--lime); border: var(--border-2); border-radius: 7px; padding: 4px 7px; }
.tile__pin .icon { width: 13px; height: 13px; }
.tile.is-pinned { box-shadow: inset 10px 0 0 var(--pc, transparent), 5px 5px 0 var(--red); }
.tile__body { display: grid; gap: 6px; min-width: 0; }
.tile__name { font: 18px/1.15 var(--f-display); overflow-wrap: anywhere; }
.tile__meta { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.tile__sub { font-size: 14px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__stats { display: block; font: 700 11px/1.45 var(--f-mono); text-transform: uppercase; }
.tile__stats .icon { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
@media (max-width: 380px) { .tile { grid-template-columns: auto minmax(0, 1fr); } .tile > .stamp { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; font-size: 22px; } .tile__name { padding-right: 44px; } }

.vacant { margin-top: var(--s6); border: var(--border-2); border-style: dashed; border-radius: var(--r); background: var(--paper-2); }
.vacant summary { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); cursor: pointer; list-style: none; font-weight: 700; }
.vacant summary::-webkit-details-marker { display: none; }
.vacant summary .icon { width: 20px; height: 20px; }
.vacant__chev { margin-left: auto; transition: transform .2s; }
.vacant[open] .vacant__chev { transform: rotate(180deg); }
.vacant > p, .vacant ul { margin: 0 var(--s4) var(--s3); font-size: 15px; }
.vacant ul { columns: 2 160px; padding-left: var(--s5); margin-bottom: var(--s4); }

.disclaimer { display: flex; gap: var(--s3); align-items: flex-start; margin: var(--s7) 0 0; padding: var(--s3) var(--s4); font-size: 14px; background: var(--paper-2); border: var(--border-2); border-radius: var(--r-sm); }
.disclaimer .icon { width: 20px; height: 20px; margin-top: 1px; }

/* ---------- leader page ---------- */
.report__head { display: flex; align-items: flex-start; gap: var(--s5); flex-wrap: wrap; margin: var(--s2) 0 var(--s6); }
.report__id { flex: 1 1 260px; min-width: 0; }
.report__id .page-title { margin-bottom: var(--s2); }
.report__office { margin: 0; font-weight: 600; }
.photo-credit { display: flex; align-items: center; gap: 6px; margin: var(--s2) 0 0; font: 700 11px/1.3 var(--f-mono); color: var(--muted); }
.photo-credit .icon { width: 14px; height: 14px; }
.report__grid { display: grid; gap: var(--s6); }
@media (min-width: 920px) { .report__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.sheet {
  position: relative; padding: var(--s6) var(--s5) var(--s5) calc(var(--s5) + 18px); background: var(--white); border: var(--border); border-radius: var(--r); box-shadow: var(--sh-lg);
  background-image: linear-gradient(90deg, transparent 22px, #F28B82 22px 24px, transparent 24px), repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 33px);
  background-position: 0 0, 0 16px;
}
@media (min-width: 640px) { .sheet { padding: var(--s7) var(--s7) var(--s6) calc(var(--s7) + 14px); } }
.sheet__label { display: flex; align-items: center; gap: 6px; margin: 0 0 var(--s4); font: 700 12px/1 var(--f-mono); letter-spacing: .07em; color: var(--muted); }
.sheet__label .icon { width: 16px; height: 16px; }
.sheet__top { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; margin-bottom: var(--s5); }
.sheet__nums { flex: 1 1 200px; min-width: 0; }
.sheet__nums p { margin: 0 0 2px; font-weight: 600; }
.sheet__nums .big { font: 54px/1 var(--f-display); letter-spacing: -.03em; margin-bottom: var(--s1); }
.locked-title { font: 24px/1.1 var(--f-display) !important; }
.paused { display: flex; gap: var(--s5); align-items: center; flex-wrap: wrap; }
.paused p { flex: 1; min-width: 220px; }
.prev { display: flex; align-items: center; gap: 6px; margin: var(--s4) 0 0; }

.dist { display: grid; gap: var(--s2); margin: 0 0 var(--s5); }
.dist__row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 46px; align-items: center; gap: var(--s3); }
.dist__letter { display: grid; place-items: center; height: 28px; font: 15px/1 var(--f-display); color: var(--red); background: var(--g, var(--white)); border: var(--border-2); border-radius: 6px; }
.dist__track { height: 18px; background: var(--white); border: var(--border-2); border-radius: 99px; overflow: hidden; }
.dist__fill { display: block; height: 100%; width: var(--pct); background: var(--g, var(--ink)); transition: width .9s cubic-bezier(.2,.9,.25,1.1); }
.dist__pct { font: 700 14px/1 var(--f-mono); text-align: right; }

.split { margin-top: var(--s5); padding-top: var(--s4); border-top: var(--border-2); }
.split__row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s2) 0; font-weight: 600; font-size: 15px; }
.split__row b { display: flex; align-items: center; gap: var(--s2); white-space: nowrap; }

.rate-q { font: clamp(19px, 3vw, 22px)/1.25 var(--f-display); margin: 0 0 var(--s4); }
.grades { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); margin: 0 0 var(--s3); }
@media (min-width: 480px) { .grades { gap: var(--s3); } }
.grade-btn {
  display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 84px; padding: var(--s3) 2px; text-decoration: none; cursor: pointer;
  background: var(--g, var(--white)); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm);
  transition: transform .08s, box-shadow .08s; -webkit-tap-highlight-color: transparent;
}
.grade-btn b { font: clamp(26px, 6vw, 34px)/1 var(--f-display); color: var(--red); }
.grade-btn span { font: 700 clamp(8px, 2vw, 10px)/1 var(--f-mono); text-transform: uppercase; }
.grade-btn:hover { transform: translate(-2px, -2px) rotate(-2deg); box-shadow: 5px 5px 0 var(--ink); }
.grade-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.grade-btn.is-mine { transform: translate(-2px, -3px) rotate(-3deg); box-shadow: 6px 6px 0 var(--ink); outline: 4px solid var(--red); outline-offset: 3px; }
.grade-btn[disabled] { opacity: .6; cursor: wait; }
.sheet--rate .actions .btn { flex: 1 1 140px; }

.banner { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s5); padding: var(--s3) var(--s4); font-weight: 600; background: var(--cyan); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm); }
.banner .icon { width: 22px; height: 22px; }
.banner--ok { background: var(--lime); }
.callout { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s4); padding: var(--s4); font-weight: 600; text-decoration: none; background: var(--lime); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm); }
.callout > span { flex: 1; }
.flash { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border: var(--border); border-radius: var(--r-sm); background: var(--lime); margin-bottom: var(--s4); font-weight: 700; }
.flash .icon { width: 20px; height: 20px; }
.flash--error { background: #FF8A8A; }

/* ---------- bottom sheet (preview-mode verification) ---------- */
.sheet-modal { width: min(560px, 100%); max-height: 92vh; margin: auto auto 0; padding: 0; border: var(--border); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--paper); color: var(--ink); box-shadow: 0 -6px 0 var(--ink); overflow: auto; }
.sheet-modal[open] { animation: sheet-up .28s cubic-bezier(.2,.9,.3,1.1); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-modal::backdrop { background: rgba(17, 17, 17, .55); }
.sheet-modal form { position: relative; padding: var(--s6) var(--s5) var(--s6); }
.sheet-modal__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font: 24px/1.15 var(--f-display); padding-right: 48px; }
.sheet-modal__close { position: absolute; top: var(--s4); right: var(--s4); display: grid; place-items: center; width: 40px; height: 40px; background: var(--white); border: var(--border); border-radius: 50%; cursor: pointer; }
.sheet-modal__close .icon { width: 20px; height: 20px; }
@media (min-width: 640px) { .sheet-modal { margin: auto; border-bottom: var(--border); border-radius: var(--r); box-shadow: var(--sh-lg); } .sheet-modal form { padding: var(--s7); } }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: var(--s4); }
.form-grid label { display: grid; gap: 6px; font-weight: 700; }
.form-grid .hint, .hint { font-weight: 500; font-size: 13px; color: var(--muted); }
input[type=text], input[type=password], input[type=datetime-local], input[type=number], input[type=tel], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; background: var(--white); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm);
}
input:focus, select:focus, textarea:focus { outline: none; background: #FFFBEA; box-shadow: 4px 4px 0 var(--pink); }
.phone-field { display: flex; }
.phone-field span { display: grid; place-items: center; padding: 0 12px; font: 700 16px var(--f-mono); background: var(--yellow); border: var(--border); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.phone-field input { border-radius: 0 var(--r-sm) var(--r-sm) 0; font: 600 18px var(--f-mono); letter-spacing: .04em; }
.otp-input { font: 700 30px/1 var(--f-mono) !important; letter-spacing: .4em; text-align: center; }
.form-grid .check { display: flex; gap: var(--s3); align-items: flex-start; font-weight: 500; font-size: 14px; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--ink); }

.verify-wrap { display: grid; gap: var(--s6); padding-top: var(--s2); }
@media (min-width: 900px) { .verify-wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: start; } }
.card { background: var(--white); border: var(--border); border-radius: var(--r); box-shadow: var(--sh); padding: var(--s6); }
@media (min-width: 640px) { .card { padding: var(--s7); } }
.verify .page-title { font-size: clamp(26px, 5vw, 38px); }
.aside-title { font: 20px/1.2 var(--f-display); margin: var(--s2) 0 var(--s3); }
.pending { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); margin-bottom: var(--s4); background: var(--yellow); border: var(--border); border-radius: var(--r-sm); font-weight: 600; }
.center { text-align: center; max-width: 560px; margin: var(--s8) auto; }

/* ---------- my card / share card / prose ---------- */
.settings { display: grid; gap: var(--s5); margin-top: var(--s8); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.settings h2 { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font: 21px/1.15 var(--f-display); }
.settings form { margin-top: var(--s3); }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-size: 14px; }
.danger { margin-top: var(--s4); }
.danger summary { cursor: pointer; font-weight: 700; color: var(--red); }
.marks { width: 100%; border-collapse: collapse; margin: var(--s4) 0 var(--s6); background: var(--white); border: var(--border); }
.marks th { background: var(--yellow); font: 700 12px/1 var(--f-mono); text-transform: uppercase; }
.marks td, .marks th { border-bottom: var(--border-2); padding: var(--s3); text-align: left; vertical-align: middle; }
.mycard { max-width: 760px; margin: var(--s6) auto; background-image: repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 33px); }
.prose { max-width: 760px; margin: var(--s6) auto; }
.prose h2 { font: 22px/1.2 var(--f-display); margin: var(--s7) 0 var(--s3); }
.prose li { margin-bottom: var(--s2); }
code { font: 700 .9em var(--f-mono); background: var(--yellow); padding: 1px 5px; border: var(--border-2); border-radius: 5px; }

/* ---------- footer with seal divider ---------- */
.seal-divider {
  position: relative; height: 26px; margin-top: var(--s8);
  background: linear-gradient(-45deg, var(--ink) 13px, transparent 0) 0 100% / 26px 26px repeat-x,
              linear-gradient(45deg, var(--ink) 13px, transparent 0) 0 100% / 26px 26px repeat-x;
}
.seal { position: absolute; left: 50%; bottom: -54px; z-index: 2; width: 128px; height: 128px; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(4px 4px 0 var(--ink)); }
.footer { background: var(--ink); color: var(--paper); padding: calc(var(--s9) + 24px) var(--gutter) var(--s8); text-align: center; }
.footer__in { max-width: 720px; margin: 0 auto; display: grid; gap: var(--s3); }
.footer p { margin: 0; font-size: 15px; }
.footer__big { font: clamp(32px, 7vw, 60px)/1 var(--f-display) !important; letter-spacing: -.04em; color: var(--yellow); margin-bottom: var(--s2) !important; }
.footer__big span { color: var(--pink); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s5); margin-top: var(--s3); font: 700 12px/1.6 var(--f-mono); text-transform: uppercase; }
.footer a { color: var(--lime); }

/* ---------- toast + confetti ---------- */
.toast { position: fixed; left: 50%; bottom: var(--s6); z-index: 100; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: var(--s3) var(--s5); font: 16px/1.2 var(--f-display); background: var(--lime); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh); animation: toast-in .25s cubic-bezier(.2,.9,.3,1.3); }
@keyframes toast-in { from { transform: translate(-50%, 30px); opacity: 0; } }
.confetti { position: fixed; z-index: 90; width: 12px; height: 12px; border: var(--border-2); pointer-events: none; }

/* grade colours last so they override component defaults */
.g-a { --g: var(--lime); } .g-b { --g: var(--cyan); } .g-c { --g: var(--yellow); } .g-d { --g: var(--orange); } .g-f { --g: #FF8A8A; }

/* ======================= admin ======================= */
.list-filters { display: grid; gap: var(--s3); margin-bottom: var(--s4); }
.list-filters .chip b { background: var(--ink); color: var(--yellow); border-radius: 99px; padding: 2px 6px; font-size: 11px; }
.list-search { max-width: 460px; }
.list-count { margin: 0; font-size: 14px; }
.who { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.who .admin-thumb { flex: none; margin: 0; }
.who > span { min-width: 0; overflow-wrap: anywhere; }
.table-wrap thead th { position: sticky; top: 0; z-index: 1; }
.table-wrap { max-height: none; }
tr[hidden] { display: none; }
/* Phones: keep admin chrome to one scrollable line each, so the list starts near the top */
@media (max-width: 760px) {
  html { scroll-behavior: auto; }
  .admin-nav, .list-filters .row-actions { flex-wrap: nowrap; overflow-x: auto; padding: 2px 4px 8px 2px; margin-bottom: var(--s2); scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar, .list-filters .row-actions::-webkit-scrollbar { display: none; }
  .admin-nav > *, .list-filters .chip { flex: none; }
  .admin .topbar__in { flex-wrap: nowrap; }
  .admin .nav { width: auto; display: flex; }
  .admin .nav__link span { display: none; }
  .admin .nav__link { padding: 10px 12px; }
}
/* Phones: each row becomes a card so nothing is hidden off-screen to the right */
@media (max-width: 760px) {
  .table-cards { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .table-cards table, .table-cards tbody { display: block; }
  .table-cards thead { display: none; }
  .table-cards tr { display: block; margin-bottom: var(--s4); font-size: 0; background: var(--white); border: var(--border); border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; }
  .table-cards td { display: block; border-bottom: var(--border-2); padding: var(--s3) var(--s4); font-size: 16px; }
  .table-cards td:last-child { border-bottom: 0; }
  .table-cards td::before { content: attr(data-label); display: block; margin-bottom: 4px; font: 700 11px/1.4 var(--f-mono); text-transform: uppercase; color: var(--muted); }
  .table-cards td[data-label="Leader"]::before, .table-cards td[data-label="Office"]::before { display: none; }
  .table-cards td[data-label="Status"], .table-cards td[data-label="Ratings (this Q)"] { display: inline-block; width: 50%; vertical-align: top; border-bottom: var(--border-2); }
  .table-cards td[data-label="Status"] { border-right: var(--border-2); }
  .table-cards td[colspan] { display: block; }
  .table-cards td[colspan]::before { content: none; }
}
.admin .topbar { position: static; }
/* ---------- admin ---------- */
.admin main { max-width: 1180px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.admin-nav a.is-active { background: var(--yellow); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { background: var(--white); border: var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 16px; }
.stat b { display: block; font: 34px/1 var(--f-display); margin: 6px 0; }
.stat span { font: 700 12px/1.3 var(--f-mono); text-transform: uppercase; }
.stat small { display: block; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; background: var(--white); border: var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--ink); vertical-align: top; }
th { font: 700 12px/1 var(--f-mono); text-transform: uppercase; background: var(--yellow); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font: 700 11px/1 var(--f-mono); text-transform: uppercase; padding: 5px 7px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); }
.badge--published { background: var(--lime); } .badge--queued { background: var(--cyan); } .badge--hidden { background: #FF8A8A; } .badge--draft { background: #E5E5E5; }
.badge--open { background: var(--orange); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions form { margin: 0; }
.form-grid { display: grid; gap: 16px; }
.form-grid label { display: grid; gap: 6px; font-weight: 700; }
.form-grid .hint { font-weight: 400; font-size: 14px; color: var(--muted); }
.two-col { display: grid; gap: 16px; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }
.flash { padding: 12px 14px; border: var(--border); border-radius: 10px; background: var(--lime); margin-bottom: 18px; font-weight: 700; }
.flash--error { background: #FF8A8A; }
.login { max-width: 420px; margin: 40px auto; }


/* leader photos */
.avatar--photo { padding: 0; overflow: hidden; }
.avatar--photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-credit { margin: 4px 0 0; font: 600 11px/1.3 var(--f-mono); color: var(--muted); }
.admin-thumb { width: 44px; height: 44px; object-fit: cover; border: 2px solid var(--ink); border-radius: 8px; vertical-align: middle; margin-right: 8px; }
.admin-thumb--none { display: inline-grid; place-items: center; background: var(--paper); font: 700 10px var(--f-mono); color: var(--muted); border-style: dashed; }
.photo-field { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding: 14px; background: var(--paper); border: 2px dashed var(--ink); border-radius: 12px; }
.photo-field img { width: 120px; height: 120px; object-fit: cover; border: var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.photo-field__inputs { flex: 1; min-width: 240px; display: grid; gap: 10px; }
.photo-field input[type=file] { padding: 8px; background: var(--white); border: var(--border); border-radius: 10px; width: 100%; }
.admin-nav .btn .icon, .flash .icon { width: 18px; height: 18px; }
.swatch { display: inline-block; width: 22px; height: 22px; border: var(--border-2); border-radius: 6px; vertical-align: middle; }
input[type=color] { width: 56px; height: 44px; padding: 3px; border: var(--border); border-radius: var(--r-sm); background: var(--white); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- official links ---------- */
.linkrow { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.linkbtn {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 42px; padding: 8px 14px 8px 10px; text-decoration: none;
  font: 700 13px/1 var(--f-mono); text-transform: uppercase; background: var(--white); border: var(--border); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.linkbtn .icon { box-sizing: content-box; width: 16px; height: 16px; padding: 3px; background: var(--yellow); border: var(--border-2); border-radius: 50%; }
.linkbtn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.linkbtn:nth-child(5n+2) .icon { background: var(--cyan); } .linkbtn:nth-child(5n+3) .icon { background: var(--pink); }
.linkbtn:nth-child(5n+4) .icon { background: var(--lime); } .linkbtn:nth-child(5n+5) .icon { background: var(--orange); }

/* ---------- in the news ---------- */
.newsbox { margin-top: var(--s7); padding: var(--s5); background: var(--white); border: var(--border); border-radius: var(--r); box-shadow: var(--sh); }
@media (min-width: 640px) { .newsbox { padding: var(--s6); } }
.newsbox__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.newsbox__title { display: flex; align-items: center; gap: var(--s2); margin: 0; font: clamp(22px, 4vw, 28px)/1.1 var(--f-display); }
.newsbox__title .icon { width: 1.1em; height: 1.1em; }
.newslist { list-style: none; margin: 0; padding: 0; display: grid; }
.newslist li { border-top: var(--border-2); }
.newslist li:first-child { border-top: 0; }
.newslist a { display: grid; gap: 4px; padding: var(--s3) 0; text-decoration: none; }
.newslist a:hover .newslist__title { text-decoration: underline; text-decoration-thickness: 2px; }
.newslist__title { font: 700 17px/1.3 var(--f-body); overflow-wrap: anywhere; }
.newslist__meta { font: 700 11px/1.3 var(--f-mono); text-transform: uppercase; color: var(--muted); }
.newslist__msg { padding: var(--s3) 0; color: var(--muted); }
.newslist__msg a { display: inline; padding: 0; text-decoration: underline; }
.newsbox__note { display: flex; gap: var(--s2); align-items: flex-start; margin: var(--s3) 0 0; font-size: 13px; color: var(--muted); }
.newsbox__note .icon { width: 16px; height: 16px; margin-top: 2px; }
.skeleton { display: block; height: 18px; margin: var(--s3) 0; background: linear-gradient(90deg, var(--paper) 25%, #fff 50%, var(--paper) 75%) 0 0 / 200% 100%; border: var(--border-2); border-radius: 6px; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* admin link fields */
.links-field { display: grid; gap: var(--s3); margin: 0; padding: var(--s4); border: var(--border-2); border-style: dashed; border-radius: 12px; }
.links-field legend { padding: 0 var(--s2); font: 700 14px/1 var(--f-display); }
.links-field label > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.links-field .icon { width: 20px; height: 20px; }

.idfield { position: relative; display: block; }
.idfield .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; pointer-events: none; }
.idfield input[type=email] { padding-left: 46px; font: 600 17px var(--f-body); }
input[type=email] { width: 100%; min-height: 48px; padding: 10px 12px; background: var(--white); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm); }
