/* INSEAD 11J Reunion — design system.
   Brand cues from insead.edu: forest green (Fontainebleau forest) primary,
   Sherpa Blue #004A59 secondary, warm cream paper. Mobile-first. */

:root {
  --forest:   #1b6e49;   /* 15SEAD brand green (from the logo) — primary */
  --forest-deep: #0f4d33;/* deeper green — header gradient base */
  --forest-2: #2a9468;   /* lighter green for hovers/accents */
  --sherpa:   #004A59;   /* INSEAD Sherpa Blue — secondary */
  --cream:    #F6F3EB;   /* warm paper background */
  --paper:    #FFFFFF;   /* cards */
  --ink:      #19211C;   /* near-black text */
  --muted:    #5d6b60;   /* secondary text */
  --mist:     #E4DFD1;   /* borders / dividers */
  --gold:     #B5852F;   /* accent — used for ✨ AI-imagined content */
  --high:     #1c6644;
  --med:      #B5852F;
  --low:      #9a9486;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 1px 3px rgba(17,67,47,.08), 0 6px 20px rgba(17,67,47,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sherpa); }
img { display: block; max-width: 100%; }

/* ---- header ---- */
header.site {
  background: linear-gradient(135deg, var(--forest-2) 0%, var(--forest) 45%, var(--forest-deep) 100%);
  color: var(--cream);
  padding: 12px 16px;
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
header.site .brand { flex: 0 0 auto; display: flex; align-items: center; line-height: 1; }
header.site .brand img { height: 40px; width: auto; display: block; }
header.site .header-center {
  flex: 1 1 auto; text-align: center; font-size: .62rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--cream); opacity: .74;
}
@media (min-width: 720px) {
  header.site { display: grid; grid-template-columns: 1fr auto 1fr; }
  header.site .brand { justify-self: start; }
  header.site .header-center { justify-self: center; font-size: .76rem; }
  header.site nav.tabs { justify-self: end; }
  header.site .brand img { height: 68px; }
}
nav.tabs { flex: 0 0 auto; display: flex; gap: 4px; }
nav.tabs a {
  color: var(--cream); text-decoration: none;
  font-size: .82rem; padding: 6px 12px; border-radius: 999px;
  opacity: .72;
}
nav.tabs a.active { background: rgba(246,243,235,.16); opacity: 1; }

main { max-width: 1080px; margin: 0 auto; padding: 18px 16px 64px; }

/* ---- controls ---- */
.controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.controls input, .controls select {
  font-family: var(--sans); font-size: .9rem;
  padding: 9px 12px; border: 1px solid var(--mist);
  border-radius: 9px; background: var(--paper); color: var(--ink);
}
.controls input { flex: 1; min-width: 180px; }
.count { color: var(--muted); font-size: .82rem; align-self: center; }

/* ---- people grid ---- */
.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.card {
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.card:hover { transform: translateY(-2px); }
.card .ph { aspect-ratio: 1/1; background: var(--forest); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-family: var(--serif); font-size: 2rem; opacity: .9;
}
.card .body { padding: 9px 10px 11px; }
.card .nm { font-weight: 600; font-size: .9rem; line-height: 1.25; }
.card .ro { color: var(--muted); font-size: .76rem; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.badge {
  display: inline-block; font-size: .62rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; vertical-align: middle;
}
.badge.high { background: #e3efe7; color: var(--high); }
.badge.med  { background: #f4ecd9; color: var(--med); }
.badge.low  { background: #ecebe5; color: var(--low); }

/* ---- profile page ---- */
.back { display: inline-block; margin-bottom: 14px; font-size: .85rem; }
.profile-hero {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 14px; padding: 16px; box-shadow: var(--shadow);
}
.profile-hero .ph {
  width: 110px; height: 110px; border-radius: 12px; overflow: hidden;
  background: var(--forest); flex: none;
}
.profile-hero .ph img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.profile-hero .meta { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.profile-hero .role { margin-top: 8px; font-size: .95rem; }

.section {
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 14px; padding: 16px; margin-top: 14px; box-shadow: var(--shadow);
}
.section > h3 {
  font-family: var(--serif); font-size: 1.05rem; color: var(--forest);
  margin-bottom: 4px;
}
.section > .desc { color: var(--muted); font-size: .8rem; margin-bottom: 12px; }
.field { padding: 10px 0; border-top: 1px solid var(--mist); }
.field:first-of-type { border-top: none; }
.field .lbl {
  font-size: .73rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 3px;
}
.field .val { font-size: .92rem; }
.field .val.empty { color: var(--low); font-style: italic; }
.src {
  font-size: .62rem; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  margin-left: 6px; vertical-align: middle;
}
.src.evi { background: #e3efe7; color: var(--forest); }
.src.imag { background: #f4ecd9; color: var(--gold); }
.src.self { background: #ecebe5; color: var(--low); }
.chip {
  display: inline-block; background: var(--cream); border: 1px solid var(--mist);
  border-radius: 999px; padding: 3px 10px; font-size: .8rem; margin: 3px 4px 0 0;
}

/* ---- rankings ---- */
.rank-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.rank-tabs button {
  font-family: var(--sans); font-size: .8rem; cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--mist); background: var(--paper); color: var(--ink);
}
.rank-tabs button.active { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.weights { background: var(--paper); border: 1px solid var(--mist);
  border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.weights h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 10px; }
.wrow { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.wrow label { flex: 1; font-size: .85rem; }
.wrow input[type=range] { flex: 1; accent-color: var(--forest); }
.wrow .wv { width: 28px; text-align: right; font-size: .8rem; color: var(--muted); }
.rank-row {
  display: flex; gap: 12px; align-items: center;
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 11px; padding: 10px 12px; margin-bottom: 8px;
  text-decoration: none; color: inherit;
}
.rank-row .pos { font-family: var(--serif); font-size: 1.3rem; color: var(--forest);
  width: 34px; text-align: center; flex: none; }
.rank-row .ph { width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
  background: var(--forest); flex: none; }
.rank-row .ph img { width: 100%; height: 100%; object-fit: cover; }
.rank-row .nm { font-weight: 600; font-size: .92rem; }
.rank-row .wh { color: var(--muted); font-size: .78rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-row .sc { margin-left: auto; font-family: var(--serif); font-size: 1.2rem;
  color: var(--sherpa); flex: none; }

.empty-state { text-align: center; color: var(--muted); padding: 48px 16px;
  font-size: .9rem; }
.note { background: #f4ecd9; border: 1px solid #e6d4a8; color: #6b551f;
  font-size: .8rem; padding: 9px 12px; border-radius: 9px; margin-bottom: 14px; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .profile-hero .ph { width: 140px; height: 140px; }
}

/* ============ HOME ============ */
.hero {
  background: linear-gradient(150deg, var(--forest-2), var(--forest) 55%, var(--forest-deep));
  color: var(--cream); border-radius: 16px;
  padding: 26px 20px; margin-bottom: 18px;
}
.hero h2 { font-family: var(--serif); font-size: 1.7rem; font-weight: 600;
  line-height: 1.2; }
.hero p { opacity: .82; font-size: .9rem; margin-top: 6px; }
.statline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stat {
  background: rgba(246,243,235,.12); border-radius: 11px;
  padding: 9px 13px; flex: 1; min-width: 78px;
}
.stat .n { font-family: var(--serif); font-size: 1.45rem; line-height: 1; }
.stat .l { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em;
  opacity: .8; margin-top: 4px; }

.home-section { margin: 22px 0; }
.home-section > h3 {
  font-family: var(--serif); font-size: 1.15rem; color: var(--forest);
  margin-bottom: 3px;
}
.home-section > .sub { color: var(--muted); font-size: .8rem; margin-bottom: 12px; }
.see-all { float: right; font-size: .8rem; font-weight: 600; }

/* theme cards */
.theme-grid { display: grid; gap: 11px; grid-template-columns: 1fr; }
.theme-card {
  display: flex; gap: 12px; align-items: center; text-decoration: none;
  color: inherit; background: var(--paper); border: 1px solid var(--mist);
  border-radius: 13px; padding: 13px; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-card .leader-ph {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden;
  background: var(--forest); flex: none;
}
.theme-card .leader-ph img { width: 100%; height: 100%; object-fit: cover; }
.theme-card .tc-body { flex: 1; min-width: 0; }
.theme-card .tc-q {
  font-size: .67rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gold); font-weight: 700;
}
.theme-card .tc-name { font-weight: 600; font-size: .98rem; margin-top: 2px; }
.theme-card .tc-why { color: var(--muted); font-size: .78rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.theme-card .tc-score {
  font-family: var(--serif); font-size: 1.5rem; color: var(--sherpa);
  flex: none;
}

/* superlatives */
.super { display: grid; gap: 9px; grid-template-columns: 1fr; }
.super .item {
  background: var(--paper); border: 1px solid var(--mist);
  border-left: 3px solid var(--gold); border-radius: 9px; padding: 10px 13px;
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: inherit;
  transition: transform .12s ease;
}
.super .item:hover { transform: translateY(-2px); }
.super .sup-ph {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  overflow: hidden; background: var(--forest);
}
.super .sup-ph img { width: 100%; height: 100%; object-fit: cover; }
.super .sup-ph.empty { display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-weight: 600; }
.super .sup-text { min-width: 0; }
.super .item .t { font-size: .67rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--gold); font-weight: 700; }
.super .item .p { font-weight: 600; font-size: .92rem; margin-top: 1px; }
.super .item .d { color: var(--muted); font-size: .78rem; }

/* big call-to-action tiles (game, browse) */
.tile {
  display: block; text-decoration: none; border-radius: 14px;
  padding: 18px; box-shadow: var(--shadow);
}
.tile.game { background: linear-gradient(135deg, var(--sherpa), #07313b);
  color: var(--cream); }
.tile.browse { background: var(--paper); border: 1px solid var(--mist);
  color: var(--ink); }
.tile.rumour { background: linear-gradient(135deg, var(--gold), #7c5a20);
  color: var(--cream); }
.tile .tk {
  font-size: .67rem; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 700; opacity: .8;
}
.tile h4 { font-family: var(--serif); font-size: 1.25rem; margin: 3px 0; }
.tile p { font-size: .82rem; opacity: .85; }
.cta-row { display: grid; gap: 11px; grid-template-columns: 1fr; }

/* ============ THEME PAGE ============ */
.theme-head {
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 14px; padding: 16px; box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.theme-head .q { font-family: var(--serif); font-size: 1.3rem; color: var(--forest); }
.theme-head .d { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.podium { display: flex; gap: 8px; margin: 14px 0; }
.podium a {
  flex: 1; text-decoration: none; color: inherit; text-align: center;
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 12px; padding: 12px 6px; box-shadow: var(--shadow);
}
.podium a.p1 { border-color: var(--gold); border-width: 2px; }
.podium .medal { font-size: 1.1rem; }
.podium .pph { width: 60px; height: 60px; border-radius: 50%; overflow: hidden;
  margin: 6px auto 5px; background: var(--forest); }
.podium .pph img { width: 100%; height: 100%; object-fit: cover; }
.podium .pph.empty { display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-family: var(--serif); font-size: 1.4rem; }
.podium .pn { font-weight: 600; font-size: .8rem; line-height: 1.2; }
.podium .ps { font-family: var(--serif); font-size: 1.25rem; color: var(--sherpa); }

/* ============ GAME ============ */
.game-wrap { text-align: center; }
.game-q { font-family: var(--serif); font-size: 1.15rem; color: var(--forest);
  margin: 6px 0 4px; }
.game-meta { color: var(--muted); font-size: .82rem; margin-bottom: 14px; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px;
  align-items: center; }
.vs-card {
  background: var(--paper); border: 2px solid var(--mist); border-radius: 14px;
  padding: 14px 10px; cursor: pointer; box-shadow: var(--shadow);
}
.vs-card:hover { border-color: var(--forest-2); }
.vs-card.win { border-color: var(--forest); background: #e8f1ec; }
.vs-card.lose { border-color: #d8b4b4; opacity: .7; }
.vs-card .vph { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 8px;
  overflow: hidden; background: var(--forest); }
.vs-card .vph img { width: 100%; height: 100%; object-fit: cover; }
.vs-card .vph.empty { display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-family: var(--serif); font-size: 2rem; }
.vs-card .vn { font-weight: 600; font-size: .92rem; }
.vs-card .vr { color: var(--muted); font-size: .75rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vs-card .vscore { font-family: var(--serif); font-size: 1.8rem;
  color: var(--sherpa); margin-top: 6px; min-height: 1.1em; }
.vs-mid { display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); color: var(--muted); }
.scorebar { display: flex; justify-content: center; gap: 18px; margin: 14px 0;
  font-size: .9rem; }
.scorebar b { font-family: var(--serif); font-size: 1.3rem; color: var(--forest); }
.btn {
  display: inline-block; font-family: var(--sans); font-size: .9rem;
  cursor: pointer; border: none; border-radius: 999px;
  padding: 11px 26px; background: var(--forest); color: var(--cream);
  margin-top: 12px;
}

@media (min-width: 640px) {
  .theme-grid { grid-template-columns: 1fr 1fr; }
  .super { grid-template-columns: 1fr 1fr; }
  .cta-row { grid-template-columns: 1fr 1fr 1fr; }
  .hero h2 { font-size: 2.1rem; }
}

/* ============ THEN / NOW PHOTOS ============ */
.photoblock { flex: none; }
.photoblock .ph, .photoblock .ph.empty {
  width: 110px; height: 110px; border-radius: 12px; overflow: hidden;
  background: var(--forest);
}
.photoblock .ph img { width: 100%; height: 100%; object-fit: cover; }

.compare {
  position: relative; width: 110px; height: 110px; border-radius: 12px;
  overflow: hidden; background: var(--forest); touch-action: none;
  cursor: ew-resize; user-select: none;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; }
.compare .now { clip-path: inset(0 0 0 50%); }
.compare .divider {
  position: absolute; top: 0; bottom: 0; width: 2px; left: 50%;
  background: var(--cream); box-shadow: 0 0 4px rgba(0,0,0,.4);
}
.compare .knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--forest);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: var(--forest);
}
.compare .tnlabel {
  position: absolute; bottom: 5px; font-size: .56rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--cream);
  background: rgba(17,67,47,.6); padding: 1px 6px; border-radius: 4px;
}
.compare .tnlabel.then { left: 5px; }
.compare .tnlabel.now  { right: 5px; }

.photo-actions { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.photo-actions button {
  font-family: var(--sans); font-size: .72rem; cursor: pointer;
  border: 1px solid var(--mist); background: var(--paper); color: var(--muted);
  border-radius: 999px; padding: 5px 11px;
}
.photo-actions button:hover { border-color: var(--forest-2); color: var(--forest); }
.photo-actions .uploading { color: var(--gold); border-color: var(--gold); }
.found-note { font-size: .62rem; color: var(--gold); margin-top: 6px;
  max-width: 150px; line-height: 1.35; }

@media (min-width: 640px) {
  .photoblock .ph, .photoblock .ph.empty, .compare { width: 140px; height: 140px; }
}

/* ============ PASSCODE GATE ============ */
.gate {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(150deg, var(--forest-2), var(--forest) 55%, var(--forest-deep));
  color: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px; gap: 5px;
}
.gate .gate-logo { height: 58px; width: auto; margin-bottom: 14px; }
.gate p { opacity: .8; font-size: .85rem; }
.gate .gate-hint { margin-top: 18px; opacity: 1; font-size: .92rem; }
.gate input {
  font-family: var(--sans); font-size: 1rem; text-align: center;
  padding: 12px 16px; border-radius: 10px; border: none;
  width: min(280px, 78vw); margin-top: 8px; color: var(--ink);
}
.gate button {
  font-family: var(--sans); font-size: .92rem; font-weight: 600; cursor: pointer;
  border: none; border-radius: 999px; padding: 11px 30px; margin-top: 12px;
  background: var(--cream); color: var(--forest);
}
.gate #gate-err { color: #ffdba6; font-size: .82rem; min-height: 1.1em; margin-top: 8px; }

/* ---- Photo gallery (Phase B) ---- */
.gallery-intro { color: var(--muted); font-size: .82rem; margin-bottom: 14px; }

.ev-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.ev-card {
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: transform .12s ease;
}
.ev-card:hover { transform: translateY(-2px); }
.ev-cover { aspect-ratio: 3/2; background: var(--forest); overflow: hidden; }
.ev-cover img { width: 100%; height: 100%; object-fit: cover; }
.ev-body { padding: 10px 11px 12px; }
.ev-name { font-weight: 600; font-size: .88rem; line-height: 1.3; }
.ev-meta { color: var(--muted); font-size: .76rem; margin-top: 4px; }

.ph-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}
.ph-thumb {
  position: relative; aspect-ratio: 1/1; border-radius: 10px;
  overflow: hidden; background: var(--forest); display: block;
}
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ph-tagcount {
  position: absolute; left: 6px; bottom: 6px;
  background: rgba(15,77,51,.86); color: var(--cream);
  font-size: .68rem; padding: 2px 7px; border-radius: 999px;
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,33,28,.92); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 24px;
}
.lb-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--cream);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.lb-imgwrap { position: relative; max-width: min(92vw, 1000px); max-height: 74vh; }
.lb-imgwrap img {
  display: block; max-width: 100%; max-height: 74vh;
  border-radius: 8px; object-fit: contain;
}
.fb {
  position: absolute; border: 2px solid var(--forest-2);
  border-radius: 4px; cursor: pointer;
}
.fb.unknown { border-color: rgba(246,243,235,.5); border-style: dashed; cursor: default; }
.fb-label {
  position: absolute; left: -2px; top: 100%; white-space: nowrap;
  background: var(--forest); color: var(--cream);
  font-size: .68rem; padding: 1px 6px; border-radius: 0 0 4px 4px;
  opacity: 0; transition: opacity .1s ease;
}
.fb:hover .fb-label { opacity: 1; }
.fb.unknown .fb-label { background: rgba(15,33,28,.9); }
.lb-info { max-width: min(92vw, 1000px); text-align: center; }
.lb-event { color: var(--cream); font-size: .9rem; font-weight: 600; }
.lb-people { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.lb-chip {
  background: var(--paper); color: var(--ink); text-decoration: none;
  font-size: .76rem; padding: 3px 10px; border-radius: 999px;
}
.lb-people .muted { color: rgba(246,243,235,.6); font-size: .8rem; }

/* "In event photos" strip on profiles */
.tagged-strip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.tagged-thumb {
  flex: 0 0 auto; width: 92px; height: 92px;
  border-radius: 9px; overflow: hidden; background: var(--forest);
}
.tagged-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* confirm/retag panel in the lightbox */
.fb.sel { border-color: var(--gold); border-width: 3px; }
.fb { transition: border-color .1s ease; }
.lb-hint { color: rgba(246,243,235,.6); font-size: .76rem; margin-top: 8px; }
.tagpanel {
  background: var(--paper); border-radius: 12px; padding: 12px;
  max-width: 340px; margin: 4px auto 0; text-align: left;
}
.tp-back {
  background: none; border: none; color: var(--muted);
  font-size: .78rem; cursor: pointer; padding: 0 0 6px;
}
.tp-head { font-size: .9rem; margin-bottom: 8px; }
.tp-status {
  font-size: .66rem; text-transform: uppercase; color: var(--forest);
  border: 1px solid var(--mist); border-radius: 999px; padding: 1px 7px; margin-left: 4px;
}
.tp-sub {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin: 10px 0 4px;
}
.tp-opt {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--cream); border: 1px solid var(--mist); color: var(--ink);
  border-radius: 8px; padding: 8px 10px; font-size: .82rem; margin-bottom: 5px;
}
.tp-opt:hover { border-color: var(--forest-2); }
.tp-opt.confirm { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.tp-opt.reject { background: none; color: var(--muted); margin-top: 6px; }
.tp-sc { color: var(--muted); font-size: .74rem; }
.tp-opt.confirm .tp-sc { color: var(--cream); }
.tp-search {
  width: 100%; box-sizing: border-box; font-family: var(--sans); font-size: .82rem;
  padding: 8px 10px; border: 1px solid var(--mist); border-radius: 8px;
}
.tp-results { margin-top: 5px; }

/* ---- hero stats as links ---- */
.statline a.stat { text-decoration: none; color: var(--cream);
  transition: background .12s ease; }
.statline a.stat:hover { background: rgba(246,243,235,.24); }

/* founders-only checkbox */
.controls .check {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--muted); cursor: pointer;
}
.controls .check input { accent-color: var(--forest); }

/* ---- Map — classmates by country ---- */
.map-group { margin-bottom: 24px; }
.map-head {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
  border-bottom: 1px solid var(--mist); padding-bottom: 5px;
}
.map-country { font-family: var(--serif); font-size: 1.1rem; color: var(--forest); }
.map-n {
  font-size: .72rem; color: var(--muted);
  background: var(--cream); border: 1px solid var(--mist);
  border-radius: 999px; padding: 1px 8px;
}

/* ---- Companies — top employers ---- */
.comp-row {
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 11px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.comp-row summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; list-style: none;
}
.comp-row summary::-webkit-details-marker { display: none; }
.comp-rank {
  font-family: var(--serif); color: var(--muted); font-size: .9rem; min-width: 1.4em;
}
.comp-name { font-weight: 600; font-size: .92rem; flex: 1; }
.comp-n {
  font-size: .74rem; color: var(--cream); background: var(--forest);
  border-radius: 999px; padding: 2px 9px;
}
.comp-row .grid { padding: 0 14px 14px; }
#compmore { text-align: center; margin-top: 6px; }

/* ---- nominations: "embodies all" card ---- */
.theme-card.all { border-left: 3px solid var(--gold); }

/* ---- Rumour Mill game ---- */
.rg-rumour {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.4;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--mist); border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 18px 20px; margin: 14px 0;
}
.rg-q { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.rg-grid {
  display: grid; gap: 10px; grid-template-columns: 1fr 1fr;
}
.rg-opt {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 11px; padding: 9px 11px; font: inherit; text-align: left;
  transition: border-color .1s ease, transform .1s ease;
}
.rg-opt:hover { transform: translateY(-2px); }
.rg-opt.win { border-color: var(--forest); background: #eaf3ee; }
.rg-opt.lose { border-color: var(--gold); background: #f6efdd; }
.rg-ph { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  overflow: hidden; background: var(--forest); }
.rg-ph img { width: 100%; height: 100%; object-fit: cover; }
.rg-ph.empty { display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-weight: 600; }
.rg-nm { font-weight: 600; font-size: .88rem; }
.rg-link { display: block; text-align: center; font-size: .82rem; margin: 8px 0; }

/* ---- wrong-photo flag + admin review ---- */
.flag-photo {
  background: none; border: 1px solid var(--mist); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: .76rem; cursor: pointer;
}
.flag-photo:hover { border-color: var(--gold); color: var(--gold); }
.flag-photo:disabled { opacity: .6; cursor: default; }
.admin-gate {
  max-width: 320px; margin: 48px auto; text-align: center;
  background: var(--paper); border: 1px solid var(--mist);
  border-radius: 14px; padding: 24px; box-shadow: var(--shadow);
}
.admin-gate h3 { font-family: var(--serif); color: var(--forest); }
.admin-gate p { color: var(--muted); font-size: .82rem; margin: 6px 0 14px; }
.admin-gate input {
  width: 100%; box-sizing: border-box; font-family: var(--sans);
  padding: 9px 12px; border: 1px solid var(--mist); border-radius: 9px;
}
.admin-gate .btn { margin-top: 10px; }
.admin-gate #admin-err { color: var(--gold); font-size: .8rem; min-height: 1.1em; margin-top: 8px; }
.admin-card { position: relative; }
.admin-card.flagged { opacity: .45; }
.admin-flag {
  width: 100%; margin-top: 6px; cursor: pointer;
  background: var(--cream); border: 1px solid var(--mist); color: var(--muted);
  border-radius: 7px; padding: 5px; font-size: .74rem;
}
.admin-flag:hover { border-color: var(--gold); color: var(--gold); }
.admin-flag:disabled { cursor: default; }

/* ---- world map (Leaflet) ---- */
#worldmap {
  height: 340px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--mist); margin-bottom: 18px;
}
.leaflet-container { background: #cfe6f5; font: inherit; }

/* ---- company logos ---- */
.co-logo {
  position: relative; width: 36px; height: 36px; flex: none;
  border-radius: 8px; overflow: hidden;
}
.co-mono {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 700; color: #fff;
  background: hsl(var(--co-h, 150), 44%, 42%);
}
.co-logo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #fff; display: none;
}
.co-logo img.ok { display: block; }

/* ---- filter chips (founders etc.) ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.chips:empty { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--forest); color: var(--cream);
  border-radius: 999px; padding: 5px 7px 5px 13px;
  font-size: .8rem; font-weight: 600;
}
.chip-x {
  border: none; background: rgba(255,255,255,.22); color: var(--cream);
  width: 19px; height: 19px; border-radius: 50%; cursor: pointer;
  font-size: .8rem; line-height: 1; padding: 0;
}
.chip-x:hover { background: rgba(255,255,255,.42); }

/* ---- superlative examples ---- */
.sup-ex { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.sup-chip {
  background: var(--cream); border: 1px solid var(--mist);
  color: var(--forest); border-radius: 6px; padding: 3px 8px; font-size: .72rem;
}

/* ---- nomination cards (clearly a category, not a person) ---- */
.tc-kicker {
  font-size: .63rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--gold); margin-bottom: 4px;
}
.tc-leadlabel { color: var(--muted); font-weight: 600; font-size: .75rem; }
.tc-cta {
  margin-top: 8px; font-size: .77rem; font-weight: 600; color: var(--forest);
}
.nom-card:hover .tc-cta { text-decoration: underline; }

/* ---- photo wall (Bookface-style) ---- */
.ph-filter-btn {
  display: block; width: 100%; margin-bottom: 14px; padding: 11px;
  border: 1px solid var(--mist); background: var(--paper);
  border-radius: 10px; font-weight: 600; font-family: var(--sans); cursor: pointer;
}
.ph-filters {
  position: fixed; inset: 0; z-index: 60; background: var(--paper);
  padding: 20px 18px 80px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .2s ease;
}
.ph-filters.open { transform: translateX(0); }
.phf-done {
  position: sticky; top: 0; width: 100%; margin-bottom: 14px; padding: 10px;
  border: none; background: var(--forest); color: var(--cream);
  border-radius: 9px; font-weight: 700; cursor: pointer;
}
.phf-group { margin-bottom: 20px; }
.phf-title {
  font-family: var(--serif); color: var(--forest);
  font-size: 1rem; font-weight: 600; margin-bottom: 8px;
}
.phf-search {
  width: 100%; box-sizing: border-box; font-family: var(--sans);
  padding: 8px 11px; border: 1px solid var(--mist); border-radius: 8px;
  margin-bottom: 8px;
}
.phf-list {
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--mist); border-radius: 9px; padding: 5px;
}
.phf-row {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: .83rem;
}
.phf-row:hover { background: var(--cream); }
.phf-row input { accent-color: var(--forest); flex: none; }
.phf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.phf-n {
  color: var(--muted); font-size: .71rem; background: var(--cream);
  border: 1px solid var(--mist); border-radius: 5px; padding: 1px 6px;
}
.phf-empty { color: var(--muted); font-size: .8rem; padding: 8px; }
.ph-count {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 12px; font-size: .87rem;
}
.ph-showing { font-weight: 600; }
.ph-clear {
  border: 1px solid var(--mist); background: var(--paper); color: var(--muted);
  border-radius: 999px; padding: 4px 11px; font-size: .76rem; cursor: pointer;
}
.ph-clear:hover { border-color: var(--gold); color: var(--gold); }
.ph-more { text-align: center; margin-top: 18px; }

@media (min-width: 880px) {
  .ph-filter-btn, .phf-done { display: none; }
  .ph-layout {
    display: grid; grid-template-columns: 235px 1fr;
    gap: 24px; align-items: start;
  }
  .ph-filters {
    position: sticky; top: 12px; inset: auto; z-index: auto;
    transform: none; background: none; padding: 0; overflow: visible;
  }
}

/* ---- mobile: show the full "why" text on nomination cards ---- */
@media (max-width: 639px) {
  .theme-card .tc-why, .rank-row .wh {
    -webkit-line-clamp: unset; display: block; overflow: visible;
  }
}
