:root{
  --bg0:#070912;
  --bg1:#0b0f1d;

  --panel:#0f172a;
  --panel2:#0b1224;

  --border:#24304d;
  --border2:#2b3a61;

  --text:#e9ecf1;
  --muted:rgba(233,236,241,.74);
  --muted2:rgba(233,236,241,.58);

  --radius:16px;
  --radius2:12px;

  --shadow:0 12px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;

  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(108,124,255,.18), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(14,165,233,.10), transparent 60%),
    linear-gradient(180deg,var(--bg0),var(--bg1));
}

/* ================= HEADER ================= */

.header{
  position:sticky;
  top:0;
  z-index:10;

  background:linear-gradient(180deg,rgba(7,9,18,.92),rgba(7,9,18,.78));
  backdrop-filter:blur(10px);

  border-bottom:1px solid rgba(36,48,77,.75);
}

.headerBar{
  max-width:1800px;
  margin:0 auto;
  padding:18px 28px 8px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
}

.brand img{
  height:90px;
  width:auto;
  display:block;
}

/* NAV */

.nav a{
  color:var(--text);
  text-decoration:none;

  border:1px solid rgba(42,49,80,.9);
  background:rgba(15,23,42,.45);

  padding:8px 14px;
  border-radius:12px;

  font-weight:600;
}

.nav a:hover{
  border-color:rgba(108,124,255,.55);
}

/* ================= TAGLINE ================= */

.tagline{
  max-width:1800px;
  margin:0 auto;
  padding:2px 28px 6px;

  text-align:center;
  font-size:13px;
  letter-spacing:.05em;
  color:var(--muted2);
}

/* ================= UPDATE LINE ================= */

.updateLine{
  max-width:1800px;
  margin:0 auto;
  padding:0 28px 18px;

  text-align:center;
  font-size:13px;
  color:var(--muted2);
}

.updateLine a{
  color:var(--text);
  text-decoration:none;
  border-bottom:1px solid rgba(108,124,255,.45);
  padding-bottom:1px;
}

.updateLine a:hover{
  border-bottom-color:rgba(108,124,255,.75);
}

/* ================= CONTROLS ================= */

.controls{
  max-width:1800px;
  margin:0 auto;

  padding:0 28px 18px;

  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

#search{
  width:min(640px,100%);
  flex:1 1 420px;

  padding:11px 12px;

  border-radius:12px;
  border:1px solid var(--border);

  background:rgba(15,23,42,.78);
  color:var(--text);
}

#search:focus{
  border-color:rgba(108,124,255,.75);
  box-shadow:0 0 0 3px rgba(108,124,255,.18);
  outline:none;
}

select{
  padding:11px 12px;

  border-radius:12px;
  border:1px solid var(--border);

  background:rgba(15,23,42,.78);
  color:var(--text);
}

.seg{
  display:inline-flex;

  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;

  background:rgba(15,23,42,.78);
}

.segBtn{
  padding:10px 14px;

  border:0;
  background:transparent;
  color:var(--text);

  cursor:pointer;
  font-weight:700;
}

.segBtn[aria-pressed="true"]{
  background:rgba(108,124,255,.16);
}

/* ================= GRID ================= */

.grid{
  max-width:1800px;
  margin:0 auto;

  padding:18px 28px 50px;

  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}

/* ================= TIER HEADERS ================= */

.tierHeader{
  grid-column: 1 / -1;
  margin:22px 0 10px;

  display:flex;
  align-items:baseline;
  gap:14px;

  border-left:6px solid rgba(108,124,255,.55);
  padding-left:12px;

  cursor:pointer;
  user-select:none;
}

.tierHeader .title{
  font-weight:950;
  letter-spacing:.22em;
  text-transform:uppercase;
  font-size:13px;
  color:rgba(233,236,241,.92);
}

.tierHeader .title::before{
  content:"▼";
  display:inline-block;
  width:18px;
  margin-right:6px;
  opacity:.8;
  transform:translateY(-1px);
}

.tierHeader.isCollapsed .title::before{
  content:"▶";
}

.tierHeader .sub{
  font-weight:700;
  font-size:12px;
  color:rgba(233,236,241,.55);
}

.tierHeader::after{
  content:"";
  height:1px;
  flex:1;
  margin-left:10px;
  background:linear-gradient(
    90deg,
    rgba(108,124,255,.45),
    rgba(36,48,77,.15),
    transparent
  );
}

.tierHeader[data-tier="1"]{border-left-color:rgba(239,68,68,.70)}
.tierHeader[data-tier="2"]{border-left-color:rgba(245,158,11,.70)}
.tierHeader[data-tier="3"]{border-left-color:rgba(59,130,246,.70)}
.tierHeader[data-tier="4"]{border-left-color:rgba(148,163,184,.60)}

.isHiddenByTier{
  display:none !important;
}

/* ================= CARDS ================= */

.card{
  border:1px solid rgba(36,48,77,.8);
  border-radius:var(--radius);

  overflow:hidden;

  background:linear-gradient(
    180deg,
    rgba(15,23,42,.92),
    rgba(11,18,36,.92)
  );

  box-shadow:0 8px 22px rgba(0,0,0,.22);

  cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease;
}

.card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
}

.top{
  position:relative;
  aspect-ratio:3/4;

  background:linear-gradient(
    180deg,
    rgba(7,9,18,.1),
    rgba(7,9,18,.55)
  );
}

.photo{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* DECEASED RIBBON */

.ribbon{
  position:absolute;
  top:14px;
  right:-54px;

  transform:rotate(35deg);

  width:180px;
  text-align:center;

  font-weight:900;
  font-size:12px;
  letter-spacing:.1em;

  padding:6px 0;

  background:rgba(220,38,38,.25);
  border:1px solid rgba(220,38,38,.35);

  color:white;
  opacity:0;
}

.card.deceased .ribbon{
  opacity:1;
}

.card.deceased .photo{
  filter:grayscale(1);
  opacity:.82;
}

/* ================= CARD BODY ================= */

.body{
  padding:12px 12px 14px;
}

.name{
  margin:0 0 6px;
  font-size:16px;
  font-weight:800;
}

.role{
  font-size:13px;
  color:var(--muted);
  min-height:38px;
}

.row,.row2{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:10px;
}

/* BADGES */

.badge{
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid var(--border2);
}

.badge.alive{
  border-color:rgba(16,185,129,.40);
  background:rgba(16,185,129,.10);
  color:rgb(110,231,183);
}

.badge.deceased{
  border-color:rgba(239,68,68,.40);
  background:rgba(239,68,68,.10);
  color:rgb(252,165,165);
}

.badge.subtle{
  opacity:.95;
  color:var(--text);
  border:1px solid rgba(108,124,255,.25);
  background:rgba(108,124,255,.06);
}

/* SOURCE LINK */

.miniSource{
  font-size:12px;

  color:rgba(201,210,255,.95);
  text-decoration:none;

  border:1px solid var(--border2);
  border-radius:999px;

  padding:5px 10px;
  background:rgba(108,124,255,.08);
}

.miniSource:hover{
  border-color:rgba(108,124,255,.55);
}

.miniSource[aria-hidden="true"]{
  display:none;
}

/* ================= MODAL ================= */

.modal{
  border:1px solid rgba(36,48,77,.9);
  border-radius:var(--radius);

  background:linear-gradient(
    180deg,
    rgba(15,23,42,.98),
    rgba(11,18,36,.98)
  );

  max-width:760px;
  width:calc(100% - 24px);

  box-shadow:var(--shadow);
}

.modal::backdrop{
  background:rgba(0,0,0,.68);
}

.modalInner{
  padding:16px 16px 18px;
  position:relative;
}

.modalInner h2{
  color:var(--text);
  font-size:24px;
  margin:14px 0 6px;
}

.close{
  position:absolute;
  right:10px;
  top:10px;

  border:1px solid var(--border2);
  background:rgba(7,9,18,.65);
  color:var(--text);

  border-radius:12px;

  padding:7px 10px;
  cursor:pointer;
}

.mImg{
  width:100%;
  max-height:420px;
  object-fit:contain;
  background:#0b1224;
  border-radius:var(--radius2);
  border:1px solid rgba(36,48,77,.8);
}

.mRole{
  color:var(--muted);
  margin-top:6px;
}

.badges{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.imgCredit{
  margin-top:10px;
  font-size:12px;
  color:var(--muted2);
  line-height:1.4;
}

.sourceLink{
  display:inline-block;

  margin-top:12px;

  color:rgba(201,210,255,.95);
  text-decoration:none;

  border:1px solid var(--border2);
  border-radius:12px;

  padding:10px 12px;

  background:rgba(108,124,255,.08);
}

.sourceLink:hover{
  border-color:rgba(108,124,255,.55);
}

/* ================= MOBILE ================= */

@media (max-width:520px){

  .headerBar{padding:14px 16px 6px}
  .controls{padding:0 16px 14px}
  .grid{padding:16px 16px 40px}
  .brand img{height:70px}
  .tagline{padding:2px 16px 8px}
  .updateLine{padding:0 16px 14px}

}

/* ================= ABOUT PAGE ================= */

.aboutContainer{
  max-width:1100px;
  margin:40px auto;
  padding:0 28px;
}

.aboutCard{
  border:1px solid rgba(36,48,77,.85);
  border-radius:16px;
  padding:28px;
  background:rgba(15,23,42,.78);
  line-height:1.6;
  font-size:15px;
  box-shadow:0 10px 30px rgba(0,0,0,.22);
}

.aboutCard p{
  margin:0 0 14px 0;
}

.aboutTitle{
  margin:0 0 18px 0;
  font-size:30px;
  font-weight:800;
  letter-spacing:-0.02em;
}

.aboutCard h2{
  margin:0 0 14px 0;
  font-size:18px;
  font-weight:700;
  letter-spacing:.01em;
}

.contact{
  margin:0;
}

.contact a{
  color:rgba(201,210,255,.95);
  text-decoration:none;
  border-bottom:1px solid rgba(108,124,255,.45);
  padding-bottom:2px;
}

.contact a:hover{
  border-bottom:1px solid rgba(108,124,255,.75);
}

.aboutGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:20px;
  margin-top:20px;
  align-items:start;
}

.aboutGrid .aboutCard{
  height:100%;
}

@media (max-width:900px){
  .aboutGrid{
    grid-template-columns:1fr;
  }
}

/* ================= FOOTER ================= */

.footer{
  max-width:1800px;
  margin:60px auto;
  padding:20px 28px;

  text-align:center;
  font-weight:700;
  font-size:14px;

  color:var(--text);

  border-top:1px solid rgba(36,48,77,.6);
}

.inlineLink{
color:#9db7ff;
text-decoration:none;
border-bottom:1px solid rgba(157,183,255,.5);
padding-bottom:1px;
}

.inlineLink:hover{
border-bottom-color:#9db7ff;
}

.tierHeader .title{
letter-spacing:.12em;
font-weight:600;
font-size:13px;
opacity:.9;
}

.tierHeader{
border-top:1px solid rgba(120,140,180,.35);
padding-top:18px;
margin-top:28px;
}

.tierCount{
opacity:.55;
font-weight:500;
margin-left:6px;
font-size:.9em;
}