/* ==========================================================
   Miss Nebo: shared styles (public site + portal)
   Palette & type from the Miss America State & Local Branding Guidelines:
   Dark Grey #3C3C3C · White #FFFFFF · Gold #B49B57
   Complementary greys #757575, #DFDFDF · Logotype face: Konnect Bold
   ========================================================== */
:root {
  /* Official brand colors */
  --brand-grey: #3c3c3c;
  --brand-white: #ffffff;
  --brand-gold: #b49b57;
  --brand-grey-md: #757575;
  --brand-grey-lt: #dfdfdf;

  /* Working tokens (derived from the brand colors) */
  --noir-900: var(--brand-grey);
  --noir-800: var(--brand-grey);
  --noir-700: #4a4a4a;          /* hover/depth tint of Dark Grey */
  --noir-100: #efefef;          /* tint of Light Grey */
  --gold-500: var(--brand-gold);
  --gold-400: var(--brand-gold);
  --gold-hover: #c2ab6b;        /* hover tint of Gold */
  --gold-ink: #7d6b3a;          /* Gold shade for small text on gold tints */
  --gold-100: #f4efe2;          /* tint of Gold */
  --champ-400: #d6c79e;
  --champ-100: #f6f6f6;
  --ink: var(--brand-grey);
  --muted: var(--brand-grey-md);
  --line: var(--brand-grey-lt);
  --bg: var(--brand-white);
  --card: var(--brand-white);
  --surface: #f7f7f7;           /* off-white section ground */
  --ok: #2f7d55;
  --warn: #a8741c;
  --danger: #a8443c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 60, 60, .06), 0 8px 24px rgba(60, 60, 60, .07);
  --display: "Konnect", "Avenir Next", "Figtree", system-ui, sans-serif;
  --sans: "Avenir Next", "Avenir", "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.eyebrow {
  font-size: .75rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-500); font-weight: 600; margin-bottom: .8rem; display: block;
}
.section-head .eyebrow::after { content: ""; display: block; width: 36px; height: 1px; background: var(--gold-500); margin-top: .7rem; }
.section-head.center .eyebrow::after { margin-inline: auto; }
.hero h1 em { font-style: normal; color: var(--brand-gold); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .92rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
  font-family: var(--sans);
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--brand-gold); color: #fff; }
.btn-gold:hover { background: var(--gold-hover); }
.btn-outline { border-color: currentColor; color: inherit; background: transparent; }
.btn-noir { background: var(--noir-800); color: #fff; }
.btn-noir:hover { background: var(--noir-700); }
.btn-ghost { background: transparent; color: var(--noir-800); border-color: var(--line); }
.btn-sm { padding: .45rem .9rem; font-size: .8rem; }

/* ---------- Public header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(60, 60, 60, .97); backdrop-filter: blur(10px);
  color: #fff; border-bottom: 1px solid rgba(180, 155, 87, .25);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; color: var(--gold-500); }
.brand-name { font-family: var(--display); font-size: 1.55rem; font-weight: 600; letter-spacing: .02em; }
.brand-sub { display: block; font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-400); margin-top: -4px; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { text-decoration: none; font-size: .88rem; opacity: .85; }
.nav a:hover { opacity: 1; color: var(--gold-400); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--noir-900); padding: 1rem 16px 1.5rem; gap: .2rem; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav .btn { margin-top: .8rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(180, 155, 87, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(180, 155, 87, .12), transparent 60%),
    linear-gradient(160deg, var(--noir-900), var(--noir-700));
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(5rem, 10vw, 8rem);
}
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero p.lead { font-size: 1.15rem; opacity: .85; max-width: 34rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.mountains { position: absolute; bottom: -1px; left: 0; width: 100%; height: 120px; color: var(--bg); }
.countdown { display: flex; gap: 1rem; margin-top: 2.2rem; }
.countdown div { text-align: center; min-width: 64px; }
.countdown strong { display: block; font-family: var(--display); font-size: 2.2rem; color: var(--gold-400); line-height: 1; }
.countdown span { font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; opacity: .7; }

.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(180, 155, 87, .35);
  border-radius: 22px; padding: 1.2rem; backdrop-filter: blur(6px);
}
.portrait {
  aspect-ratio: 4 / 5; border-radius: 16px; position: relative; overflow: hidden;
  background: linear-gradient(170deg, #ffffff, #f2f2f2 55%, var(--brand-grey-lt));
  display: grid; place-items: center; color: var(--noir-800);
}
.portrait .initials { font-family: var(--display); font-size: 5rem; opacity: .35; }
.portrait .ph-label {
  position: absolute; bottom: .8rem; left: .8rem; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; background: rgba(255,255,255,.75); padding: .25rem .6rem; border-radius: 999px;
}
.hero-card .caption { padding: 1rem .4rem .3rem; }
.hero-card .caption strong { font-family: var(--display); font-size: 1.5rem; display: block; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-card { max-width: 380px; }
}

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 640px; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
}
.pillar .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-100); color: var(--gold-500); margin-bottom: 1rem;
}
.pillar .icon svg { width: 24px; height: 24px; }

.titleholder { display: grid; grid-template-columns: 240px 1fr; gap: 1.8rem; align-items: center; }
.titleholder .portrait { border-radius: 12px; }
.titleholder .role { color: var(--gold-500); font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.titleholder .csi {
  background: var(--champ-100); border-radius: 10px; padding: .8rem 1rem; font-size: .9rem; margin: 1rem 0;
}
@media (max-width: 640px) { .titleholder { grid-template-columns: 1fr; } .titleholder .portrait { max-width: 260px; } }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--gold-100); }
.timeline li { position: relative; padding: 0 0 1.6rem 1.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 0 4px var(--gold-100);
}
.timeline .date { font-size: .78rem; font-weight: 600; color: var(--gold-500); letter-spacing: .08em; text-transform: uppercase; }

.stat-band {
  background: var(--noir-900); color: #fff; border-radius: 22px; padding: 2.4rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center;
}
.stat-band strong { font-family: var(--display); font-size: 2.6rem; color: var(--gold-400); display: block; line-height: 1.1; }
.stat-band span { font-size: .82rem; opacity: .75; }
@media (max-width: 640px) { .stat-band { grid-template-columns: repeat(2, 1fr); } }

.sponsor-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.sponsor {
  height: 84px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center;
  font-size: .8rem; color: var(--muted); text-align: center; padding: .5rem; background: #fff;
}
@media (max-width: 900px) { .sponsor-row { grid-template-columns: repeat(3, 1fr); } }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: .8rem; }
.gallery div { border-radius: 12px; background: linear-gradient(135deg, var(--noir-100), var(--gold-100)); }
.gallery div:nth-child(1) { grid-row: span 2; background: linear-gradient(160deg, var(--champ-100), var(--gold-100)); }
.gallery div:nth-child(4) { grid-column: span 2; background: linear-gradient(135deg, var(--gold-100), var(--champ-100)); }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

form .field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
label { font-size: .82rem; font-weight: 600; }
input, select, textarea {
  font: inherit; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-400); border-color: transparent; }

.cta {
  background: linear-gradient(140deg, var(--noir-800), var(--noir-700)); color: #fff; border-radius: 22px;
  padding: clamp(2rem, 5vw, 3.5rem); display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap;
}

.site-footer { background: var(--noir-900); color: rgba(255,255,255,.75); padding: 3.5rem 0 2rem; font-size: .88rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 1rem; }
.site-footer a { text-decoration: none; display: block; padding: .2rem 0; }
.site-footer a:hover { color: var(--gold-400); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .78rem; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art {
  background:
    radial-gradient(700px 400px at 90% 0%, rgba(180, 155, 87, .35), transparent 60%),
    linear-gradient(160deg, var(--noir-900), var(--noir-700));
  color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-form { display: grid; place-items: center; padding: 2rem 16px; }
.auth-form .box { width: min(420px, 100%); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.4rem; }
.role-pick button {
  font: inherit; text-align: left; padding: 1rem; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer;
}
.role-pick button strong { display: block; font-size: .95rem; }
.role-pick button span { font-size: .78rem; color: var(--muted); }
.role-pick button.active { border-color: var(--gold-500); background: var(--gold-100); }
.demo-note { font-size: .8rem; background: var(--champ-100); padding: .8rem 1rem; border-radius: 10px; margin-top: 1.2rem; }
@media (max-width: 820px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- Portal ---------- */
.portal { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--noir-900); color: rgba(255,255,255,.8); padding: 1.4rem 1rem;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
}
.sidebar .brand { color: #fff; padding: 0 .5rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 1rem; }
.side-label { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; opacity: .45; padding: 1rem .7rem .4rem; }
.side-link {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 9px;
  text-decoration: none; font-size: .9rem; cursor: pointer;
}
.side-link svg { width: 18px; height: 18px; opacity: .8; flex-shrink: 0; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.active { background: rgba(180, 155, 87, .16); color: var(--gold-400); }
.side-link .count { margin-left: auto; background: var(--champ-400); color: var(--noir-900); font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 0 .45rem; }
.sidebar .me { margin-top: auto; padding: 1rem .5rem 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .7rem; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-400), var(--champ-400)); color: var(--noir-900); font-weight: 700; font-size: .85rem;
}
.me small { display: block; opacity: .55; font-size: .74rem; }

.main { padding: 1.6rem clamp(16px, 3vw, 2.4rem) 3rem; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.topbar h1 { font-size: 2.1rem; margin: 0; }
.topbar .search { max-width: 280px; }
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 260px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(40, 40, 40, .4); }
  .mobile-menu { display: inline-flex; }
  .search-wrap, .hide-sm { display: none; }
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; }
.kpi span { font-size: .78rem; color: var(--muted); }
.kpi strong { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.2; }
.kpi em { font-style: normal; font-size: .75rem; color: var(--ok); }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.4rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 1.3rem; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 1.2rem; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 1rem; align-items: flex-start; padding: .85rem 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.date-chip {
  flex-shrink: 0; width: 52px; text-align: center; border-radius: 10px; background: var(--gold-100); padding: .35rem 0;
}
.date-chip b { display: block; font-family: var(--display); font-size: 1.4rem; line-height: 1; }
.date-chip small { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.list .grow { flex: 1; min-width: 0; }
.list .grow strong { display: block; font-size: .94rem; }
.list .grow span { font-size: .82rem; color: var(--muted); }

.tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.tag-gold { background: var(--gold-100); color: var(--gold-ink); }
.tag-noir { background: var(--noir-100); color: var(--noir-700); }
.tag-champ { background: var(--noir-900); color: var(--gold-400); }
.tag-ok { background: #e3f3ea; color: var(--ok); }
.tag-warn { background: #fbf0dc; color: var(--warn); }
.tag-danger { background: #f8e3e1; color: var(--danger); }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
td { padding: .8rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.progress { height: 8px; background: var(--noir-100); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--champ-400)); }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.calendar .dow { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .5rem; background: var(--bg); border-bottom: 1px solid var(--line); text-align: center; }
.calendar .day { min-height: 96px; padding: .4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .78rem; }
.calendar .day:nth-child(7n) { border-right: 0; }
.calendar .day.other { background: #fafafa; color: #b5b5b5; }
.calendar .day.today .num { background: var(--noir-800); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-grid; place-items: center; }
.calendar .ev { display: block; margin-top: .25rem; padding: .15rem .35rem; border-radius: 5px; font-size: .7rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-appearance { background: var(--noir-900); color: var(--gold-400); }
.ev-board { background: var(--noir-100); color: var(--noir-700); }
.ev-prep { background: var(--gold-100); color: var(--gold-ink); }
@media (max-width: 700px) { .calendar .day { min-height: 60px; } .calendar .ev { font-size: 0; height: 6px; padding: 0; } }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.doc { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #fff; display: flex; gap: .8rem; align-items: flex-start; }
.doc .ficon { width: 38px; height: 46px; border-radius: 6px; display: grid; place-items: center; font-size: .6rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.ficon.pdf { background: var(--brand-grey); } .ficon.doc { background: var(--brand-grey-md); } .ficon.xls { background: var(--brand-gold); } .ficon.img { background: var(--gold-ink); }
.doc strong { font-size: .88rem; display: block; line-height: 1.3; }
.doc span { font-size: .75rem; color: var(--muted); }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; overflow-x: auto; }
.tabs button { font: inherit; font-size: .86rem; background: none; border: 0; padding: .6rem .9rem; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--noir-800); border-color: var(--gold-500); font-weight: 600; }

.thread { display: grid; grid-template-columns: 280px 1fr; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; min-height: 480px; }
.thread-list { border-right: 1px solid var(--line); }
.thread-item { padding: .9rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.thread-item.active { background: var(--gold-100); }
.thread-item strong { font-size: .88rem; display: block; }
.thread-item span { font-size: .78rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat { display: flex; flex-direction: column; }
.chat-body { flex: 1; padding: 1.2rem; display: flex; flex-direction: column; gap: .8rem; overflow-y: auto; }
.bubble { max-width: 75%; padding: .7rem .95rem; border-radius: 14px; font-size: .88rem; background: var(--bg); border: 1px solid var(--line); }
.bubble small { display: block; font-size: .7rem; color: var(--muted); margin-bottom: .2rem; font-weight: 600; }
.bubble.me { align-self: flex-end; background: var(--noir-800); color: #fff; border-color: transparent; }
.bubble.me small { color: var(--gold-400); }
.chat-input { display: flex; gap: .6rem; padding: .9rem; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .thread { grid-template-columns: 1fr; } .thread-list { display: none; } }

.checklist li { align-items: center; }
.checkbox { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); flex-shrink: 0; display: grid; place-items: center; cursor: pointer; }
.checkbox.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.done strong { text-decoration: line-through; color: var(--muted); }


.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--noir-900); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; font-size: .85rem; opacity: 0; transition: all .25s ease; z-index: 100; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ==========================================================
   Portal refinements (v2)
   ========================================================== */
.main { background: var(--surface); }
.topbar { padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.tb-left { display: flex; align-items: center; gap: .8rem; }
.tb-right { display: flex; align-items: center; gap: .6rem; }
.tb-date { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-500); font-weight: 600; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); position: relative; font-size: 1rem;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--gold-400); }
.bell-dot {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 999px; padding: 0 5px;
  background: var(--gold-500); color: var(--noir-900); font-size: .66rem; font-weight: 700; display: grid; place-items: center;
}
.bell-dot:empty { display: none; }
.search-wrap, .bell-wrap { position: relative; }
.search { width: 280px; padding: .55rem .9rem; font-size: .85rem; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; width: 340px; max-height: 420px; overflow-y: auto; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(40, 40, 40, .12); padding: .4rem;
}
.dropdown-right { left: auto; right: 0; }
.dd-head { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: .6rem .7rem .3rem; }
.dd-item { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; border-radius: 8px; cursor: pointer; font-size: .85rem; text-decoration: none; }
.dd-item:hover { background: var(--gold-100); }
.dd-item small { display: block; color: var(--muted); font-size: .75rem; }
.dd-item .dd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); margin-top: .4rem; flex-shrink: 0; }
.dd-empty { padding: 1rem .7rem; color: var(--muted); font-size: .85rem; }

.banner {
  position: relative; overflow: hidden; color: #fff; border-radius: 16px; padding: 1.7rem 1.9rem; margin-bottom: 1.5rem;
  background:
    radial-gradient(500px 220px at 95% 0%, rgba(180, 155, 87, .38), transparent 70%),
    linear-gradient(120deg, var(--noir-900), var(--noir-700));
  border: 1px solid rgba(180, 155, 87, .35);
  display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap;
}
.banner h2 { font-size: 2rem; margin: 0 0 .2rem; }
.banner p { margin: 0; opacity: .75; font-size: .9rem; }
.banner .eyebrow { margin-bottom: .4rem; }
.banner-crown { position: absolute; right: 22%; bottom: -18px; width: 150px; color: rgba(180, 155, 87, .12); pointer-events: none; }
.banner > div { position: relative; }

.kpi { position: relative; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; }
.kpi-top i { width: 30px; height: 30px; border-radius: 8px; background: var(--gold-100); color: var(--gold-500); display: grid; place-items: center; }
.kpi-top i svg { width: 16px; height: 16px; }
.kpi strong { font-variant-numeric: tabular-nums; }

.panel-head h3 { display: flex; align-items: center; gap: .6rem; }
.link-more { color: var(--muted); font-size: .82rem; text-decoration: none; }
.link-more:hover { color: var(--gold-500); }

.list li.clickable { cursor: pointer; border-radius: 10px; transition: background .12s ease; margin-inline: -.6rem; padding-inline: .6rem; }
.list li.clickable:hover { background: var(--gold-100); }
.calendar .ev { cursor: pointer; }
.rsvp { font-size: .7rem; font-weight: 600; color: var(--ok); white-space: nowrap; }

/* Next-up spotlight card */
.spotlight { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; }
.spotlight .big-date { text-align: center; border: 1px solid var(--gold-400); border-radius: 12px; padding: .6rem 1rem; }
.spotlight .big-date b { display: block; font-family: var(--display); font-size: 2.4rem; line-height: 1; }
.spotlight .big-date small { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-500); }
@media (max-width: 640px) { .spotlight { grid-template-columns: auto 1fr; } .spotlight > :last-child { grid-column: 1 / -1; } }

/* Titleholder cards (board view) */
.th-card { display: grid; grid-template-columns: 96px 1fr; gap: 1.2rem; }
.th-photo { width: 96px; aspect-ratio: 4/5; border-radius: 10px; background: linear-gradient(170deg, #ffffff, #f2f2f2 55%, var(--brand-grey-lt)); display: grid; place-items: center; font-family: var(--display); font-size: 2rem; color: rgba(60,60,60,.3); }
.th-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .8rem 0; }
.th-stats div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; }
.th-stats b { display: block; font-family: var(--display); font-size: 1.4rem; line-height: 1.1; }
.th-stats span { font-size: .7rem; color: var(--muted); }
@media (max-width: 520px) { .th-card { grid-template-columns: 1fr; } }

/* Profile */
.profile-grid { display: grid; grid-template-columns: 260px 1fr; gap: 1.2rem; align-items: start; }
.profile-grid .portrait { border-radius: 12px; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } .profile-grid .portrait { max-width: 260px; } }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.fieldset-title { font-family: var(--display); font-size: 1.15rem; margin: .6rem 0 .6rem; padding-top: .8rem; border-top: 1px solid var(--line); }

/* Drawer + modal */
.scrim { position: fixed; inset: 0; background: rgba(40, 40, 40, .4); z-index: 75; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: #fff; z-index: 76;
  transform: translateX(105%); transition: transform .22s ease; box-shadow: -12px 0 40px rgba(40, 40, 40, .15);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { background: var(--noir-900); color: #fff; padding: 1.4rem 1.5rem; border-bottom: 2px solid var(--gold-500); }
.drawer-head h2 { font-size: 1.7rem; margin: .5rem 0 0; }
.drawer-body { padding: 1.3rem 1.5rem; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--line); display: flex; gap: .6rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: .5rem 1rem; font-size: .88rem; margin: 0 0 1.2rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.close-x { float: right; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; opacity: .7; line-height: 1; }
.close-x:hover { opacity: 1; }

.modal-back { position: fixed; inset: 0; background: rgba(40, 40, 40, .45); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 16px; width: min(540px, 100%); max-height: 90vh; overflow-y: auto; border-top: 3px solid var(--gold-500); }
.modal-head { padding: 1.3rem 1.5rem .4rem; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 1.6rem; margin: 0; }
.modal-head .close-x { color: var(--ink); }
.modal form { padding: .6rem 1.5rem 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .6rem; }

:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .drawer, .toast, .btn { transition: none; } }
.icon-btn.mobile-menu { display: none; }
.sidebar .brand-sub { letter-spacing: .16em; white-space: nowrap; }
@media (max-width: 900px) { .icon-btn.mobile-menu { display: inline-grid; } }

/* ==========================================================
   Official brand elements (v3)
   ========================================================== */
/* Logotype: Konnect Bold, title case, stacked, tracking -35 */
.logotype {
  font-family: "Konnect", "Avenir Next", system-ui, sans-serif; font-weight: 700;
  letter-spacing: -.035em; line-height: .86; display: inline-flex; flex-direction: column;
  text-transform: none; white-space: nowrap;
}
.logotype.gold { color: var(--brand-gold); }
.logotype.white { color: #fff; }
.logotype.grey { color: var(--brand-grey); }

/* Local crown icons, recolored via mask so they only ever render in brand colors */
.crown {
  display: inline-block; aspect-ratio: 3190 / 1388; background-color: var(--brand-gold);
  -webkit-mask: url("brand/crown-icon-miss.png") center / contain no-repeat;
          mask: url("brand/crown-icon-miss.png") center / contain no-repeat;
}
.crown.teen { aspect-ratio: 3190 / 1132; -webkit-mask-image: url("brand/crown-icon-teen.png"); mask-image: url("brand/crown-icon-teen.png"); }
.crown.white { background-color: #fff; }
.crown.grey { background-color: var(--brand-grey); }
.crown.current { background-color: currentColor; }

/* Header / sidebar lockup */
.brand { gap: .75rem; }
.brand .crown { width: 46px; }
.brand .logotype { font-size: 1.28rem; }
.brand-sub { font-family: var(--sans); letter-spacing: .2em; margin-top: 4px; }
.lockup { display: inline-flex; align-items: center; gap: .75rem; }
.lockup-text { display: flex; flex-direction: column; }

/* Eyebrows & section heads echo the guideline headers: gold caps + dark rule */
.eyebrow { font-family: var(--display); letter-spacing: .12em; font-weight: 700; }
.section-head .eyebrow::after { width: 44px; height: 2px; background: var(--brand-grey); }
.hero .eyebrow, .banner .eyebrow, .auth-art .eyebrow { color: var(--brand-gold); }

/* Hero: crown image, dark grey ground, gold glow */
.hero {
  background:
    radial-gradient(700px 380px at 76% 40%, rgba(180,155,87,.30), transparent 65%),
    radial-gradient(900px 500px at -10% 110%, rgba(180,155,87,.10), transparent 60%),
    var(--brand-grey);
}
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); }
.hero-crown { position: relative; display: grid; place-items: center; }
.hero-crown img { width: 100%; max-width: 560px; filter: drop-shadow(0 18px 40px rgba(0,0,0,.35)); }
.hero-lockups { display: flex; gap: 2.2rem; justify-content: center; align-items: flex-end; margin-top: 1.4rem; flex-wrap: wrap; }
.hero-lockups .logotype { font-size: 1.6rem; }
.countdown strong { font-weight: 700; letter-spacing: -.02em; color: var(--brand-gold); }

/* Titleholder cards: gold logotype + crown on white */
.titleholder .th-mark { display: flex; align-items: flex-end; gap: .8rem; margin-bottom: .9rem; }
.titleholder .th-mark .crown { width: 64px; }
.titleholder .th-mark .logotype { font-size: 1.35rem; }
.titleholder .portrait .crown { width: 55%; opacity: .16; }
.division .crown { width: 70px; margin-bottom: .9rem; }
.division h3 { margin-bottom: .3rem; }

.stat-band strong { font-weight: 700; letter-spacing: -.02em; color: var(--brand-gold); }
.site-footer { background: var(--brand-grey); }
.site-footer .lockup .crown { width: 54px; }
.site-footer .lockup .logotype { font-size: 1.5rem; }
.cta { background: var(--brand-grey); }

/* Login art panel */
.auth-art { background: radial-gradient(700px 420px at 60% 45%, rgba(180,155,87,.26), transparent 65%), var(--brand-grey); }
.auth-lockup { display: flex; flex-direction: column; gap: 1.2rem; }
.auth-lockup .crown { width: 120px; }
.auth-lockup .logotype { font-size: clamp(3rem, 6vw, 4.6rem); }

/* Portal */
.sidebar { background: var(--brand-grey); }
.sidebar .brand .crown { width: 40px; }
.sidebar .brand .logotype { font-size: 1.15rem; }
.banner { background: radial-gradient(500px 240px at 88% 20%, rgba(180,155,87,.30), transparent 70%), var(--brand-grey); }
.banner .banner-crown { position: absolute; right: 20%; bottom: -14px; width: 190px; opacity: .14; }
.side-link .crown { width: 18px; opacity: .85; }
.kpi-top i .crown { width: 18px; }
.th-photo .crown { width: 70%; opacity: .35; }
.drawer-head { background: var(--brand-grey); }
.kpi strong, .date-chip b, .th-stats b, .spotlight .big-date b { font-weight: 700; letter-spacing: -.02em; }

/* ==========================================================
   Auth gate (v4)
   ========================================================== */
body.gating .portal { visibility: hidden; }
.gate-screen { display: none; }
body.gating .gate-screen {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: .8rem;
  background: var(--brand-grey); color: rgba(255,255,255,.75); font-size: .9rem; z-index: 200;
}
.gate-screen .crown { width: 90px; animation: gate-pulse 1.4s ease-in-out infinite; }
@keyframes gate-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .gate-screen .crown { animation: none; } }

.notice { border-radius: 10px; padding: .75rem 1rem; font-size: .86rem; margin-bottom: 1rem; border: 1px solid; }
.notice.error { background: #f8e3e1; border-color: #eac3be; color: var(--danger); }
.notice.info { background: var(--gold-100); border-color: #e6dcc0; color: var(--ink); }
.sent-card { text-align: center; border: 1px solid var(--line); border-radius: 14px; padding: 1.8rem 1.4rem; }
.sent-card .crown { width: 72px; margin-bottom: .6rem; }
.sent-card h3 { margin-bottom: .3rem; }
button[disabled] { opacity: .6; cursor: progress; }

/* ==========================================================
   Live data: empty states, onboarding, headshots (v5)
   ========================================================== */
.empty { text-align: center; padding: 2rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.empty .crown { width: 64px; opacity: .22; margin-bottom: .4rem; }
.empty strong { font-family: var(--display); font-size: 1.1rem; letter-spacing: -.01em; }
.empty p { color: var(--muted); font-size: .88rem; max-width: 42ch; margin: 0 0 .6rem; }

.tag-comp { background: var(--brand-gold); color: #fff; }
.calendar .ev-competition { background: var(--brand-gold); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .78rem; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--danger); }
td .link-btn, .doc .link-btn { text-decoration: none; }
td .link-btn:hover { color: inherit; }
.clickable-doc { cursor: pointer; transition: border-color .15s ease; }
.clickable-doc:hover { border-color: var(--brand-gold); }

/* Avatars with headshots */
.avatar.photo { padding: 0; overflow: hidden; background: var(--noir-100); }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: .72rem; }
.avatar.lg { width: 52px; height: 52px; font-size: 1rem; }
.avatar.xl { width: 76px; height: 76px; font-size: 1.3rem; border: 2px solid var(--brand-gold); }
.th-photo { overflow: hidden; }
.th-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Photo picker (onboarding + profile) */
.photo-pick { display: flex; flex-direction: column; align-items: center; gap: .7rem; cursor: pointer; font-weight: 400; }
.photo-frame {
  width: 170px; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(170deg, #ffffff, #f2f2f2 55%, var(--brand-grey-lt)); border: 1px dashed var(--brand-grey-lt);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame .crown { width: 60%; opacity: .25; }
.photo-pick.big .photo-frame { width: 100%; border-style: solid; }
.photo-pick:hover .photo-frame { border-color: var(--brand-gold); }
.photo-pick:focus-within .photo-frame { outline: 2px solid var(--brand-gold); outline-offset: 2px; }

/* First-sign-in onboarding: full-width, no sidebar */
body.onboarding .portal { grid-template-columns: 1fr; }
body.onboarding .sidebar, body.onboarding .topbar { display: none; }
body.onboarding .main { display: grid; place-items: start center; padding-top: clamp(1.5rem, 5vw, 4rem); }
.onboard { width: min(860px, 100%); }
.onboard-head { text-align: center; margin-bottom: 1.6rem; display: flex; flex-direction: column; align-items: center; }
.onboard-head .crown { width: 110px; margin-bottom: .9rem; }
.onboard-head h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-bottom: .4rem; }
.onboard-head p { max-width: 54ch; margin: 0; }
.onboard-form { display: grid; grid-template-columns: 200px 1fr; gap: 1.8rem; align-items: start; border-top: 3px solid var(--brand-gold); }
@media (max-width: 680px) { .onboard-form { grid-template-columns: 1fr; } }
input:disabled { background: var(--surface); color: var(--muted); }
.public-empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.public-empty .crown { width: 70px; }
.public-empty .crown.grey { opacity: .22; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.site-check { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; font-size: .84rem; display: grid; gap: .25rem; margin-bottom: 1rem; }
.hof-empty { background: var(--surface); }
.hof-empty .crown { width: 70%; opacity: .5; }
.paste-example { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; font-size: .82rem; margin: 0 0 .8rem; }

/* ==========================================================
   Hall of Fame (public)
   ========================================================== */
.hof-hero { padding: clamp(3rem, 7vw, 5rem) 0; text-align: center; }
.hof-hero-inner { display: flex; flex-direction: column; align-items: center; }
.hof-hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); }
.hof-hero .lead { max-width: 40rem; margin-inline: auto; opacity: .85; }
.hof-crowns { display: flex; gap: 1.2rem; align-items: flex-end; margin-bottom: 1rem; }
.hof-crowns .crown { width: 84px; }
.hof-crowns .crown.teen { width: 72px; }
.hof-stats { font-family: var(--display); color: var(--brand-gold); letter-spacing: .04em; margin: .4rem 0 0; }
.hof-section { padding-top: 2.5rem; }
.hof-tabs { justify-content: center; margin-bottom: 2rem; }
.hof-year { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.hof-year:first-child { border-top: 0; padding-top: 0; }
.hof-year-label { font-family: var(--display); font-weight: 800; font-size: 2.6rem; letter-spacing: -.03em; color: var(--brand-gold); line-height: 1; position: sticky; top: 90px; align-self: start; }
.hof-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.hof-card { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.hof-card.miss { border-top: 3px solid var(--brand-gold); }
.hof-card.teen { border-top: 3px solid var(--brand-grey); }
.hof-photo { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(170deg, #ffffff, #f2f2f2 55%, var(--brand-grey-lt)); }
.hof-photo img { width: 100%; height: 100%; object-fit: cover; }
.hof-photo .crown { width: 62%; opacity: .25; }
.hof-body h3 { font-size: 1.25rem; margin: .35rem 0 .3rem; }
.hof-body p { font-size: .86rem; margin: 0 0 .4rem; }
.hof-title { display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.hof-title .crown { width: 22px; flex-shrink: 0; }
.hof-csi { color: var(--ink); }
@media (max-width: 640px) {
  .hof-year { grid-template-columns: 1fr; gap: .8rem; }
  .hof-year-label { position: static; font-size: 2rem; }
  .hof-card { grid-template-columns: 90px 1fr; }
}

/* Calendar invites */
.form-grid.three { grid-template-columns: 1.3fr 1fr 1fr; }
@media (max-width: 560px) { .form-grid.three { grid-template-columns: 1fr 1fr; } .form-grid.three > :first-child { grid-column: 1 / -1; } }
.add-cal { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.2rem; }
.modal-body { padding: .6rem 1.5rem 1.5rem; }
.sub-options { display: grid; gap: .6rem; }
.sub-options .btn { width: 100%; }
.event-cal { display: flex; gap: .5rem; align-items: center; font-size: .82rem; flex-wrap: wrap; }
.event-cal a, .event-cal .link-btn { color: var(--gold-ink); font-size: .82rem; }
.event-cal .link-btn:hover { color: var(--ink); }

/* Three titles */
.titleholder.stacked { grid-template-columns: 1fr; align-items: start; gap: 1.2rem; }
.titleholder.stacked .portrait { aspect-ratio: 4 / 5; max-height: 360px; width: 100%; }
.titleholder.stacked .th-mark .logotype { font-size: 1.25rem; }
.th-grid { align-items: stretch; }
.hero-lockups.three { gap: 1.6rem; }
.hero-lockups.three .logotype { font-size: 1.35rem; }
@media (max-width: 900px) and (min-width: 641px) { .th-grid { grid-template-columns: repeat(2, 1fr); } }

.th-group-label { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; margin: 2.2rem 0 1rem; }
.th-group-label:first-of-type { margin-top: 0; }
.th-group-label .crown { width: 34px; }
.grid-4.th-grid .titleholder.stacked .portrait { max-height: 300px; }
.grid-4.th-grid .titleholder.stacked .th-mark .logotype { font-size: 1.1rem; }
/* Keep the hero logotypes clear of the mountain edge on narrow screens */
@media (max-width: 900px) {
  .hero:not(.hof-hero) { padding-bottom: 9rem; }
  .hero-lockups.three { gap: 1rem 1.4rem; }
  .hero-lockups.three .logotype { font-size: 1.15rem; }
}
