/* ============================================================================
 * Creekside Internship — Styles
 * ========================================================================== */

:root {
  /* Creekside brand: charcoal-slate, signature dusty blue, cool whites.
     (Kept the old variable NAMES so the rest of the CSS didn't need rewriting —
      --navy is now charcoal, --gold is now the slate-blue accent.) */
  --navy: #3c4a58;          /* charcoal slate — bars, primary buttons, headings */
  --navy-deep: #2c3742;
  --gold: #7e97b2;          /* Creekside signature dusty blue — accents */
  --gold-soft: #a9bacd;
  --cream: #eef1f5;         /* cool light page background */
  --ink: #2f3a44;
  --muted: #6b7682;
  --line: #dde3ea;
  --green: #2e7d52;
  --red: #b3433a;
  --card: #ffffff;
  --shadow: 0 6px 24px rgba(44, 55, 66, 0.10);
  --radius: 14px;
  --serif: "Georgia", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --script: "Snell Roundhand", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.25; }
a { color: var(--navy); }

.hidden { display: none !important; }

/* ---- Top bar ------------------------------------------------------------- */
.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 14px; }
.app-back { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; padding: 6px 12px; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; }
.app-back:hover { background: rgba(255,255,255,.24); }
.topbar .logo { height: 44px; display: block; }
.topbar .brand-tag {
  font-family: var(--serif); color: #fff; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; opacity: .9;
  border-left: 1px solid rgba(255,255,255,.3); padding-left: 14px;
}
.topbar nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar nav button {
  background: transparent; color: #fff; border: 1px solid transparent;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.topbar nav button:hover { background: rgba(255,255,255,.1); }
.topbar nav button.active { background: var(--gold); color: var(--navy-deep); font-weight: 600; }
.topbar .who { font-size: 13px; color: var(--gold-soft); margin-right: 4px; }

/* Grouped nav (dropdowns) */
#nav-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-group { position: relative; }
.nav-group .caret { font-size: 10px; opacity: .8; }
.nav-group.active > .nav-group-btn { background: rgba(255,255,255,.16); }
.nav-submenu { display: none; position: absolute; top: 100%; left: 0; margin-top: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.22); min-width: 200px; padding: 8px; z-index: 60; }
/* invisible bridge so moving the mouse from the button to the menu doesn't close it */
.nav-group::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; display: none; }
.nav-group:hover::after { display: block; }
.nav-group.open .nav-submenu, .nav-group:hover .nav-submenu { display: block; }
.nav-submenu button { display: block; width: 100%; text-align: left; color: var(--navy) !important; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.nav-submenu button:hover { background: var(--cream); }
.nav-submenu button.active { background: var(--gold); color: var(--navy-deep) !important; font-weight: 600; }

.nav-toggle { display: none; position: relative; background: transparent; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 10px; border-radius: 8px; }
.nav-toggle:hover { background: rgba(255,255,255,.12); }
/* Red dot on the ☰ menu button when there are unread messages/alerts. */
.nav-toggle.has-alert::after {
  content: ""; position: absolute; top: 2px; right: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #d8453b; border: 2px solid var(--slate, #3c4a58);
}

/* ---- Layout -------------------------------------------------------------- */
.container { max-width: 1080px; margin: 0 auto; padding: 28px 22px 80px; }
.page-title { margin: 6px 0 4px; font-size: 30px; }
.page-sub { color: var(--muted); margin: 0 0 26px; }

.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}

/* ---- Login --------------------------------------------------------------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(126,151,178,.30), transparent),
    linear-gradient(160deg, var(--navy-deep), var(--navy));
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: 18px;
  padding: 38px 34px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.login-card .logo { display: block; height: 66px; margin: 0 auto 12px; }
.login-card h1 { text-align: center; margin: 0 0 2px; font-size: 24px; }
.login-card .tagline { text-align: center; color: var(--muted); margin: 0 0 8px; font-size: 14px; }
.login-card .brand-line {
  text-align: center; margin: 0 0 24px; font-size: 19px; color: var(--navy);
}
.login-card .brand-line .script { font-family: var(--script); font-style: italic; font-size: 24px; color: var(--gold); }
.login-card .mission {
  text-align: center; font-style: italic; color: var(--muted); font-size: 12.5px;
  line-height: 1.5; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
}
.login-card .verse { text-align: center; font-family: var(--serif); font-style: italic; color: var(--navy); margin: 14px 0 0; font-size: 13px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin: 14px 0 6px; }
input, textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; font-family: var(--sans); background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
textarea { resize: vertical; min-height: 90px; }

.btn {
  display: inline-block; border: none; cursor: pointer; font-size: 15px; font-weight: 600;
  padding: 12px 18px; border-radius: 10px; background: var(--navy); color: #fff;
}
.btn:hover { background: var(--navy-deep); }
.btn.gold { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: var(--navy-deep); }
.btn.gold:hover { filter: brightness(1.04); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f4f1e8; }
.btn.full { width: 100%; margin-top: 22px; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.err { color: var(--red); font-size: 13px; margin-top: 12px; text-align: center; min-height: 18px; }

.hint {
  margin-top: 22px; font-size: 12px; color: var(--muted); text-align: center;
  background: #f6f3ea; border: 1px dashed var(--line); border-radius: 10px; padding: 10px;
}

/* ---- Progress ------------------------------------------------------------ */
.progress-track { background: #ece7da; border-radius: 999px; height: 12px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--gold), var(--green)); height: 100%; border-radius: 999px; transition: width .4s; }

.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.stat {
  flex: 1; min-width: 150px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.stat .num { font-family: var(--serif); font-size: 30px; color: var(--navy); line-height: 1.15; }
.stat .num.status { font-size: 21px; }
.stat .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.mission-banner {
  background: var(--gold); color: #fff; border-radius: var(--radius);
  padding: 16px 22px; margin: 0 0 22px; text-align: center;
  box-shadow: var(--shadow);
}
.mission-banner .label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: 1; }
/* 19px + bold qualifies as WCAG "large text" (3:1 bar), so white-on-dusty-blue passes
   AA while keeping the brand color. */
.mission-banner .text { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.5; margin-top: 4px; }

/* ---- Module cards -------------------------------------------------------- */
.module-card { display: flex; flex-direction: column; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.module-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20,33,61,.14); }
.module-card .mod-order {
  display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--navy); color: var(--gold-soft);
  font-family: var(--serif); font-weight: 700; font-size: 14px; line-height: 1.1; margin-bottom: 12px;
  align-self: flex-start;
}
.module-card h3 { margin: 0 0 2px; font-size: 18px; }
.module-card .mod-sub { color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: .03em; margin-bottom: 8px; }
.module-card p { color: var(--muted); font-size: 14px; margin: 0 0 14px; flex: 1; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.badge.done { background: #e4f3ea; color: var(--green); }
.badge.todo { background: #f4f1e8; color: var(--muted); }
.badge.score { background: var(--navy); color: var(--gold-soft); }

/* ---- Module detail ------------------------------------------------------- */
.back-link { background: none; border: none; color: var(--navy); cursor: pointer; font-size: 14px; padding: 0; margin-bottom: 14px; }
.lesson-body p { margin: 0 0 14px; }
.lesson-subhead { font-size: 16px; color: var(--navy); margin: 20px 0 8px; }
.lesson-subhead::before { content: "§ "; color: var(--gold); font-weight: 700; }
.section-head { margin: 26px 0 10px; font-size: 19px; border-bottom: 2px solid var(--gold-soft); padding-bottom: 6px; }
.key-terms { margin: 0; }
.key-terms dt { font-weight: 700; color: var(--navy); margin-top: 12px; }
.key-terms dd { margin: 2px 0 0; color: var(--ink); }

.reading-card {
  background: #fbfaf6; border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 16px 18px;
}
.reading-book { font-family: var(--serif); font-size: 18px; color: var(--navy); font-weight: 700; }
.reading-book .reading-author { font-weight: 400; font-style: italic; color: var(--muted); font-size: 15px; }
.reading-pub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.reading-assign { margin-top: 10px; }
.reading-pages { margin-top: 6px; font-weight: 600; color: var(--navy); }
.reading-pages .reading-pages-note { font-weight: 400; font-size: 12px; color: var(--muted); }
.reading-focus { margin-top: 10px; font-size: 13.5px; color: var(--ink); font-style: italic; border-top: 1px dashed var(--line); padding-top: 10px; }
ul.clean { padding-left: 20px; }
ul.clean li { margin: 6px 0; }
.scripture-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.scripture-chips span { background: #f4f1e8; border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; font-family: var(--serif); font-size: 14px; color: var(--navy); }

.quiz-q { background: #fbfaf6; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.quiz-q .qtext { font-weight: 600; margin-bottom: 10px; }
.quiz-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; margin: 6px 0; cursor: pointer; background: #fff; }
.quiz-opt:hover { border-color: var(--gold); }
.quiz-opt.correct { border-color: var(--green); background: #e9f6ee; }
.quiz-opt.wrong { border-color: var(--red); background: #fbeceb; }
.quiz-opt input { width: auto; }

/* ---- Tables -------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { background: var(--navy); color: #fff; font-family: var(--serif); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: center; }

/* ---- Certificate --------------------------------------------------------- */
.cert-page { background: var(--cream); }
.certificate {
  background: #fffdf8; border: 2px solid var(--gold); border-radius: 6px;
  padding: 54px 60px; max-width: 900px; margin: 0 auto; position: relative;
  box-shadow: var(--shadow); text-align: center;
}
.certificate::before {
  content: ""; position: absolute; inset: 14px; border: 1px solid var(--gold-soft); border-radius: 4px; pointer-events: none;
}
.cert-logo { display: block; height: 72px; margin: 0 auto 10px; }
.cert-mission { font-style: italic; color: var(--muted); font-size: 12.5px; max-width: 560px; margin: 14px auto 0; }
.cert-church { letter-spacing: .25em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
.cert-title { font-size: 38px; margin: 10px 0 4px; color: var(--navy); }
.cert-sub { font-family: var(--serif); font-style: italic; color: var(--muted); margin-bottom: 26px; }
.cert-name { font-family: var(--serif); font-size: 34px; color: var(--navy); border-bottom: 2px solid var(--gold-soft); display: inline-block; padding: 0 30px 6px; margin: 6px 0 18px; }
.cert-body { max-width: 640px; margin: 0 auto 22px; color: var(--ink); }
.cert-topics { columns: 2; max-width: 640px; margin: 0 auto 26px; text-align: left; font-size: 13px; color: var(--navy); }
.cert-topics div { break-inside: avoid; margin: 3px 0; }
.cert-topics div::before { content: "✦ "; color: var(--gold); }
.cert-sign-row { display: flex; justify-content: space-around; margin-top: 30px; gap: 30px; }
.cert-sign { flex: 1; }
.cert-sign .line { border-top: 1px solid var(--navy); margin-bottom: 6px; }
.cert-sign .role { font-size: 12px; color: var(--muted); }
.cert-verse { font-family: var(--serif); font-style: italic; color: var(--navy); margin-top: 26px; font-size: 14px; }

/* ---- Resume preview ------------------------------------------------------ */
.resume {
  background: #fff; max-width: 760px; margin: 0 auto; padding: 44px 50px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.resume h2.name { font-size: 30px; margin: 0; }
.resume .headline { color: var(--gold); font-weight: 600; margin: 2px 0 6px; }
.resume .contact { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.resume .r-section-title { font-family: var(--serif); color: var(--navy); border-bottom: 2px solid var(--gold-soft); padding-bottom: 4px; margin: 20px 0 10px; font-size: 17px; }
.resume p { margin: 6px 0; font-size: 14px; }
.resume ul { margin: 6px 0; padding-left: 20px; font-size: 14px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }

/* ---- Messaging ----------------------------------------------------------- */
.nav-badge {
  display: none; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 999px; background: #d8453b; color: #fff; font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center; vertical-align: middle;
}
.nav-badge.show { display: inline-block; }

#people-wrap { padding: 6px; }
.people-group { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.person-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; border-radius: 10px; padding: 10px 12px; cursor: pointer;
  font-family: var(--sans);
}
.person-row:hover { background: #f1f4f7; }
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #fff; font-weight: 700; font-size: 15px; font-family: var(--serif);
}
.avatar.staff { background: var(--navy); }
.person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-name { font-weight: 600; color: var(--ink); }
.role-chip { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--navy); color: #fff; padding: 1px 6px; border-radius: 6px; vertical-align: middle; margin-left: 4px; }
.person-preview { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.person-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.person-time { font-size: 11px; color: var(--muted); }
.unread-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #d8453b; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

.thread-head { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.thread-name { font-family: var(--serif); font-size: 19px; color: var(--navy); font-weight: 700; }
.thread-role { font-size: 12px; color: var(--muted); }
.thread-msgs {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; height: 52vh; min-height: 300px; overflow-y: auto; box-shadow: var(--shadow);
}
.bubble-row { display: flex; flex-direction: column; margin: 8px 0; max-width: 78%; }
.bubble-row.them { align-items: flex-start; margin-right: auto; }
.bubble-row.mine { align-items: flex-end; margin-left: auto; }
.bubble { padding: 9px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.bubble-row.them .bubble { background: #eef1f5; color: var(--ink); border-bottom-left-radius: 4px; }
.bubble-row.mine .bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.bubble-time { font-size: 10.5px; color: var(--muted); margin: 3px 4px 0; }
.thread-input { display: flex; gap: 10px; margin-top: 14px; }
.thread-input input { flex: 1; }

/* ---- Resources ----------------------------------------------------------- */
.resource-card { display: flex; gap: 0; padding: 0; overflow: hidden; }
.book-spine { flex: none; width: 8px; background: linear-gradient(var(--gold), var(--navy)); }
.resource-body { padding: 18px 20px; }
.resource-card h3 { margin: 0 0 2px; font-size: 18px; }
.resource-author { color: var(--gold); font-weight: 600; font-size: 14px; }
.resource-pub { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.resource-note { font-size: 13.5px; font-style: italic; color: var(--ink); margin: 8px 0; }
.resource-covers { font-size: 12.5px; color: var(--muted); margin: 8px 0 14px; }
.materials { margin: 0; padding-left: 20px; }
.materials li { margin: 8px 0; }

/* ---- Assignments / Quiz -------------------------------------------------- */
.due-line { display: inline-block; background: #fbf3df; border: 1px solid var(--gold-soft); color: var(--navy); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; margin-bottom: 14px; }
.due-mini { font-size: 11.5px; color: var(--muted); margin: 6px 0 8px; }
.assign-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .assign-grid { grid-template-columns: 1fr; } }
.assign-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fbfaf6; }
.assign-item h3 { margin: 0 0 6px; font-size: 17px; }
.assign-item p { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.assign-item .badge { display: inline-block; margin-bottom: 12px; }
.assign-item .btn { display: block; width: 100%; text-align: center; }
.quiz-q .qtext { font-weight: 600; margin-bottom: 10px; }
.opt-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-left: 6px; }
.opt-tag.ok { color: var(--green); }

/* ---- Discussions --------------------------------------------------------- */
.word-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.word-count.ok { color: var(--green); }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.disc-post { margin-bottom: 16px; }
.disc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.disc-meta strong { color: var(--navy); }
.disc-time { color: var(--muted); font-size: 12px; }
.disc-wc { color: var(--muted); font-size: 11px; background: #f1f4f7; padding: 1px 7px; border-radius: 999px; }
.disc-body { white-space: pre-wrap; line-height: 1.6; color: var(--ink); }
.disc-del { background: none; border: none; color: var(--red); font-size: 12px; cursor: pointer; padding: 0; margin-left: auto; }
.disc-del:hover { text-decoration: underline; }
.disc-replies { margin: 12px 0 4px; padding-left: 16px; border-left: 2px solid var(--line); }
.disc-reply { margin: 10px 0; }
.disc-reply .disc-body { font-size: 14px; }
.disc-replybar { margin-top: 12px; }
.disc-replyform { display: flex; gap: 8px; margin-top: 10px; }
.disc-replyform input { flex: 1; }

/* ---- Admin moderation ---------------------------------------------------- */
.mod-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.mod-row:last-child { border-bottom: none; }
.mod-parties { font-weight: 600; color: var(--ink); }
.mod-last { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mod-actions { flex: none; display: flex; gap: 8px; }
.mod-msg { padding: 7px 4px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.mod-from { font-weight: 700; color: var(--navy); }

/* ---- Assignments --------------------------------------------------------- */
.asn-card { margin-bottom: 16px; }
.asn-card.overdue { border-left: 4px solid var(--red); }
.asn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.asn-mod { font-family: var(--serif); font-size: 18px; color: var(--navy); font-weight: 700; }
.asn-due { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.asn-late { color: var(--red); font-weight: 700; }
.asn-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .asn-actions { grid-template-columns: 1fr; } }
.asn-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: #fbfaf6; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-family: var(--sans); transition: border-color .12s, background .12s, transform .12s;
}
.asn-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.asn-btn.is-done { background: #f4faf6; border-color: #cfe6d8; }
.asn-ic { font-size: 22px; flex: none; }
.asn-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.asn-txt strong { color: var(--navy); font-size: 15px; }
.asn-txt small { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.asn-go { flex: none; font-weight: 700; color: var(--gold); font-size: 13px; }
.asn-btn.is-done .asn-go { color: var(--green); }

/* ---- Calendar ------------------------------------------------------------ */
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; font-size: 12.5px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.cal-dot.done { background: var(--green); }
.cal-dot.late { background: var(--red); }
.cal-dot.soon { background: var(--gold); }
.cal-dot.up { background: var(--slate, #a9bacd); border: 1px solid var(--line); }
.cal-month { font-size: 16px; color: var(--navy); margin: 22px 0 10px; border-bottom: 2px solid var(--gold-soft); padding-bottom: 6px; }
.cal-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s; }
.cal-row:hover { transform: translateX(2px); }
.cal-row.done { border-left-color: var(--green); background: #f4faf6; }
.cal-row.late { border-left-color: var(--red); background: #fdf4f3; }
.cal-row.soon { border-left-color: var(--gold); }
.cal-date { flex: none; width: 54px; text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.cal-wd { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cal-day { font-family: var(--serif); font-size: 26px; color: var(--navy); line-height: 1; }
.cal-body { flex: 1; min-width: 0; }
.cal-title { font-weight: 600; color: var(--ink); }
.cal-title.struck { text-decoration: line-through; color: var(--muted); }
.cal-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.cal-meta .ok { color: var(--green); font-weight: 600; }
.cal-latetag { color: var(--red); font-weight: 600; }
.cal-status { flex: none; }
.cal-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.cal-pill.done { background: #e4f3ea; color: var(--green); }
.cal-pill.late { background: #fbeceb; color: var(--red); }
.cal-pill.soon { background: #fbf3df; color: #9a7b2e; }
.cal-pill.up { background: #eef1f5; color: var(--muted); }

/* ---- Responsive tables --------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 460px; }

/* ---- Mobile (phones) ----------------------------------------------------- */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar .brand-tag { display: none; }
  .topbar .logo { height: 38px; }
  .nav-toggle { display: block; }
  #main-nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: 4px; margin-top: 10px; order: 3;
  }
  #main-nav.open { display: flex; }
  #nav-tabs { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .topbar nav button { width: 100%; text-align: left; padding: 12px 14px; font-size: 15px; }
  .nav-group { width: 100%; }
  .nav-submenu { position: static; display: none; background: transparent; border: none; box-shadow: none; padding: 0 0 0 14px; min-width: 0; }
  .nav-group:hover .nav-submenu { display: none; }
  .nav-group.open .nav-submenu { display: block; }
  .nav-submenu button { color: #fff !important; }
  .nav-submenu button:hover { background: rgba(255,255,255,.1); }
  .nav-submenu button.active { color: var(--navy-deep) !important; }
  .topbar .who { margin: 8px 4px 4px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.15); }
  .nav-badge { float: right; }

  .container { padding: 20px 15px 70px; }
  .page-title { font-size: 23px; }
  .page-sub { font-size: 14px; }
  .section-head { font-size: 17px; }
  .card { padding: 16px; }
  .stat { min-width: 120px; }
  .stat .num { font-size: 24px; }
  .stat .num.status { font-size: 18px; }

  /* Messaging on phones */
  .thread-msgs { height: 56vh; }
  .bubble-row { max-width: 88%; }
  .person-preview { max-width: 60vw; }

  /* Calendar on phones */
  .cal-date { width: 46px; padding-right: 10px; }
  .cal-day { font-size: 22px; }
  .cal-row { gap: 10px; padding: 10px 12px; }
  .cal-status { align-self: flex-start; }
}

/* ---- Landing page -------------------------------------------------------- */
#landing { background: #fff; color: var(--ink); }
.btn.ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn.ghost-light:hover { background: rgba(255,255,255,.14); }
.lp-back { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; margin-bottom: 12px; }
.lp-back:hover { color: var(--navy); }

.lp-nav { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.lp-nav-inner { max-width: 1100px; margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lp-logo { height: 40px; }
.lp-links { display: flex; align-items: center; gap: 18px; }
.lp-links a { color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 600; }
.lp-links a:hover { color: var(--gold); }

.lp-hero {
  background: radial-gradient(1200px 500px at 50% -10%, rgba(126,151,178,.35), transparent),
    linear-gradient(160deg, var(--navy-deep), var(--navy));
  color: #fff; text-align: center; padding: 80px 22px 88px;
}
.lp-hero-inner { max-width: 760px; margin: 0 auto; }
.lp-eyebrow { letter-spacing: .2em; text-transform: uppercase; font-size: 12px; color: var(--gold-soft); margin-bottom: 14px; }
.lp-hero h1 { color: #fff; font-size: 56px; margin: 0 0 16px; line-height: 1.05; }
.lp-hero-sub { font-size: 19px; color: #e7ecf2; line-height: 1.55; margin: 0 auto 16px; max-width: 640px; }
.lp-script { font-size: 22px; color: #fff; margin: 0 0 28px; font-family: var(--serif); }
.lp-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.lp-hero-cta .btn { font-size: 16px; padding: 13px 24px; }
.lp-hero-note { margin-top: 26px; font-size: 13px; color: var(--gold-soft); }

.lp-section { padding: 64px 22px; }
.lp-section.alt { background: var(--cream); }
.lp-wrap { max-width: 1000px; margin: 0 auto; }
.lp-narrow { max-width: 720px; }
.lp-h2 { font-size: 32px; color: var(--navy); margin: 0 0 16px; text-align: center; }
.lp-lead { font-size: 17px; line-height: 1.65; color: var(--ink); text-align: center; margin: 0 auto 24px; max-width: 760px; }

.lp-stats { display: flex; justify-content: center; gap: 44px; flex-wrap: wrap; margin-top: 24px; }
.lp-stats > div { text-align: center; }
.lp-stats strong { display: block; font-family: var(--serif); font-size: 44px; color: var(--gold); }
.lp-stats span { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lp-grid span { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 16px; font-family: var(--serif); color: var(--navy); font-size: 15px; }

.lp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.lp-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; text-align: center; box-shadow: var(--shadow); }
.lp-ic { font-size: 34px; }
.lp-card h3 { margin: 10px 0 8px; font-size: 18px; }
.lp-card p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.55; }

.lp-apply { padding: 64px 22px 40px; background: linear-gradient(180deg, #fff, var(--cream)); }
.lp-form { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.lp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-form label { margin-top: 14px; }
.lp-form-status { margin-top: 12px; font-size: 14px; min-height: 18px; }
.lp-form-status.lp-err { color: var(--red); }
.lp-thanks { text-align: center; background: #fff; border: 1px solid #cfe6d8; border-radius: 16px; padding: 40px 26px; box-shadow: var(--shadow); }
.lp-check { width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: #fff; font-size: 32px; display: grid; place-items: center; margin: 0 auto 14px; }
.lp-thanks h3 { font-size: 24px; margin: 0 0 8px; }
.lp-thanks p { color: var(--muted); max-width: 460px; margin: 0 auto; }

.lp-footer { background: var(--navy); color: #fff; text-align: center; padding: 40px 22px; }
.lp-foot-logo { height: 48px; margin-bottom: 12px; }
.lp-footer p { margin: 4px 0; font-size: 13px; color: var(--gold-soft); }
.lp-verse { font-family: var(--serif); font-style: italic; margin-top: 10px !important; }
.lp-footer .btn { margin-top: 16px; }

/* Landing: value checklist */
.lp-checklist { list-style: none; padding: 0; margin: 0 auto; max-width: 720px; }
.lp-checklist li { position: relative; padding: 12px 12px 12px 40px; font-size: 16px; line-height: 1.55; color: var(--ink); border-bottom: 1px solid var(--line); }
.lp-checklist li:last-child { border-bottom: none; }
.lp-checklist li::before { content: "✓"; position: absolute; left: 8px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }

/* Landing: tuition / cost card */
.lp-cost-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); max-width: 640px; margin: 0 auto; }
.lp-cost-price { text-align: center; margin-bottom: 18px; }
.lp-cost-amt { display: block; font-family: var(--serif); font-size: 56px; color: var(--gold); line-height: 1; }
.lp-cost-per { display: block; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.lp-cost-list { list-style: none; padding: 0; margin: 0; }
.lp-cost-list li { position: relative; padding: 12px 0 12px 28px; font-size: 15px; line-height: 1.55; color: var(--ink); border-top: 1px solid var(--line); }
.lp-cost-list li::before { content: "✦"; position: absolute; left: 4px; top: 12px; color: var(--gold); }
.lp-cost-list b { color: var(--navy); }
.lp-cost-note { margin: 18px 0 0; font-size: 14px; color: var(--muted); line-height: 1.6; font-style: italic; }

/* Landing: application form sections */
.lp-form-sec { margin: 26px 0 6px; padding-bottom: 8px; border-bottom: 2px solid var(--gold); color: var(--navy); font-size: 18px; }
.lp-form-sec:first-child { margin-top: 4px; }
.lp-form-help { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; line-height: 1.5; }
.lp-form select, .lp-form textarea, .lp-form input { width: 100%; }
.lp-form textarea { min-height: 90px; }
.lp-agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.55; cursor: pointer; }
.lp-agree input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.lp-agree b { color: var(--navy); }

/* Admin: applications */
.app-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.app-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.app-name { font-weight: 700; color: var(--navy); }
.app-status-new { color: var(--red); font-weight: 700; font-size: 11px; background: #fbeceb; padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.app-contact { font-size: 13px; color: var(--muted); }
.app-field { margin-top: 8px; font-size: 14px; line-height: 1.5; }
.app-field b { color: var(--navy); }
.app-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.app-actions select { width: auto; padding: 6px 10px; }

@media (max-width: 680px) {
  .lp-links a { display: none; }
  .lp-hero { padding: 56px 18px 60px; }
  .lp-hero h1 { font-size: 38px; }
  .lp-hero-sub { font-size: 16px; }
  .lp-script { font-size: 18px; }
  .lp-h2 { font-size: 26px; }
  .lp-section { padding: 44px 18px; }
  .lp-form-row { grid-template-columns: 1fr; }
  .lp-stats { gap: 26px; }
  .lp-stats strong { font-size: 36px; }
}

/* ---- 28-week curriculum: phases, pairing, journal, program -------------- */
.phase-head { display: flex; align-items: center; gap: 14px; margin: 30px 0 14px; }
.phase-head .phase-n { background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .05em; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.phase-head h2 { margin: 0; font-size: 20px; color: var(--navy); }
.phase-head .phase-sub { font-size: 13px; color: var(--muted); }
.module-card.review-card { border-left: 3px solid var(--gold); background: linear-gradient(180deg, #fff, var(--cream)); }

.pairing-banner { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 18px 0; box-shadow: var(--shadow); }
.pairing-side { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.pairing-side:first-child { background: var(--cream); }
.pairing-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pairing-val { font-family: var(--serif); font-size: 17px; color: var(--navy); }
.pairing-x { display: grid; place-items: center; padding: 0 14px; background: var(--navy); color: var(--gold-soft); font-size: 20px; }

.watch-for { background: #fbf6e9; border-left: 3px solid var(--gold); border-radius: 8px; padding: 12px 14px; margin-top: 14px; font-size: 14px; line-height: 1.55; }
.supervisor-note { background: #eef2f7; border-left: 3px solid var(--navy); border-radius: 8px; padding: 12px 14px; margin-top: 10px; font-size: 14px; line-height: 1.55; }
.watch-for strong, .supervisor-note strong { color: var(--navy); }

.journal-card { border-left: 4px solid var(--navy); }
.journal-private { font-size: 12px; color: var(--muted); font-weight: 500; }
.reflection-prompt { font-family: var(--serif); font-size: 16px; color: var(--navy); font-style: italic; margin: 0 0 12px; }
.journal-card textarea { width: 100%; min-height: 130px; }
.journal-actions { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.journal-status { font-size: 13px; color: var(--muted); }

.prog-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.prog-stat { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 12px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.prog-num { font-family: var(--serif); font-size: 18px; color: var(--navy); }
.prog-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.prog-hours { width: 100%; border-collapse: collapse; }
.prog-hours th, .prog-hours td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.prog-hours th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.prog-hours td.num, .prog-hours th.num { text-align: right; white-space: nowrap; }
.prog-when { color: var(--muted); font-size: 13px; }
.prog-total td { border-top: 2px solid var(--navy); border-bottom: none; }
.rotation-areas { display: flex; flex-wrap: wrap; gap: 8px; }
.rot-area { background: var(--navy); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 999px; }

.reading-link { font-size: 12.5px; font-weight: 600; color: #54718e; text-decoration: none; white-space: nowrap; margin-left: 6px; }
.reading-link:hover { text-decoration: underline; }
.podcast-player { margin-top: 12px; }
.podcast-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.audio-embed { width: 100%; border: 0; border-radius: 12px; background: #f5f6f8; display: block; }

/* ---- Community: avatars, feed, profiles (Phase D) ----------------------- */
.avatar-img, .avatar-init { display: inline-grid; place-items: center; border-radius: 50%; background-size: cover; background-position: center; background-color: var(--navy); color: #fff; font-weight: 700; font-family: var(--serif); flex: 0 0 auto; overflow: hidden; }
.av-sm { width: 30px; height: 30px; font-size: 12px; }
.av-md { width: 44px; height: 44px; font-size: 16px; }
.av-lg { width: 64px; height: 64px; font-size: 22px; }
.av-xl { width: 92px; height: 92px; font-size: 32px; }

.status-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; }
.badge-intern { background: #e7eef6; color: var(--navy); }
.badge-alumni { background: #efe6d2; color: #8a6d1f; }
.badge-staff { background: var(--navy); color: #fff; }

.composer { padding: 16px; }
.composer-type { width: auto; margin-bottom: 10px; }
.composer textarea { width: 100%; min-height: 80px; }
.composer-video { width: 100%; margin-top: 10px; }
.composer-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.composer-status { font-size: 13px; color: var(--muted); }
.composer-preview { margin-top: 10px; }
.composer-photo { max-width: 100%; max-height: 240px; border-radius: 10px; display: block; margin-bottom: 8px; }

.post-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-av { cursor: pointer; }
.post-meta { flex: 1; min-width: 0; }
.post-author-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-author { color: var(--navy); cursor: pointer; }
.post-author:hover { text-decoration: underline; }
.post-time { font-size: 12.5px; color: var(--muted); }
.post-del, .cmt-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 6px; }
.post-del:hover, .cmt-del:hover { color: var(--red); background: #fbeceb; }
.post-text { margin: 12px 0 0; line-height: 1.55; white-space: normal; }
.post-photo { width: 100%; border-radius: 12px; margin-top: 12px; }
.post-video { position: relative; padding-bottom: 56.25%; height: 0; margin-top: 12px; border-radius: 12px; overflow: hidden; }
.post-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.post-rx { display: flex; gap: 8px; margin-top: 12px; }
.rx { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
.rx:hover { border-color: var(--gold); }
.rx.on { background: #fbf6e9; border-color: var(--gold); }
.rx span { font-size: 12px; font-weight: 700; color: var(--muted); }

.post-comments { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cmt { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.cmt-body { flex: 1; background: var(--cream); border-radius: 10px; padding: 7px 11px; font-size: 14px; line-height: 1.5; }
.cmt-name { color: var(--navy); cursor: pointer; }
.cmt-time { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cmt-add { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.cmt-input { flex: 1; }

.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 200px; }
.profile-name { margin: 0 0 6px; font-size: 26px; }
.profile-bio { margin: 10px 0 0; color: var(--ink); line-height: 1.55; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; }
.account-photo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 12px; }
.person-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 12px; text-align: center; cursor: pointer; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .08s, border-color .08s; }
.person-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.person-name { font-weight: 700; color: var(--navy); font-size: 15px; }
.person-bio { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.person-title { font-size: 12.5px; color: var(--gold); font-weight: 600; }

/* People directory: collapsible leadership groups */
.team-group { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.team-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--cream); border: none; cursor: pointer; text-align: left; }
.team-head:hover { background: #eef2f7; }
.team-caret { color: var(--gold); transition: transform .15s; font-size: 13px; }
.team-group.open .team-caret { transform: rotate(90deg); }
.team-name { font-family: var(--serif); font-size: 19px; color: var(--navy); font-weight: 700; }
.team-count { background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px; }
.team-blurb { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.team-body { display: none; padding: 16px; }
.team-group.open .team-body { display: block; }
@media (max-width: 680px) { .team-blurb { display: none; } }

.field-with-vis { display: flex; gap: 8px; align-items: center; }
.field-with-vis input { flex: 1; }
.vis-select { width: auto; flex: 0 0 auto; }
.profile-contact { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--ink); }
.profile-contact a { color: var(--navy); }
.profile-priv { margin-top: 8px; font-size: 12px; color: var(--muted); }
.linkbtn { background: none; border: none; color: #54718e; cursor: pointer; font-size: 12px; padding: 0; text-decoration: underline; }

/* ---- Photo cropper modal ----------------------------------------------- */
.crop-overlay { position: fixed; inset: 0; background: rgba(15,20,28,.7); z-index: 200; display: grid; place-items: center; padding: 16px; }
.crop-box { background: #fff; border-radius: 16px; padding: 22px; width: min(360px, 92vw); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.crop-title { font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.crop-stage { position: relative; margin: 0 auto 14px; border-radius: 12px; overflow: hidden; touch-action: none; cursor: grab; background: #000; }
.crop-stage canvas { display: block; }
.crop-circle { position: absolute; inset: 0; box-shadow: 0 0 0 2000px rgba(255,255,255,.55); border-radius: 50%; pointer-events: none; }
#crop-zoom { width: 100%; margin-bottom: 14px; }
.crop-actions { display: flex; gap: 10px; justify-content: center; }

/* ---- Instagram-style feed ---------------------------------------------- */
.ig-feed-wrap { max-width: 560px; margin: 0 auto; }
.people-strip-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.people-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
.pchip { flex: 0 0 auto; width: 120px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pchip-av { cursor: pointer; }
.pchip-name { font-weight: 700; font-size: 13.5px; color: var(--navy); cursor: pointer; line-height: 1.2; }
.pchip-msg { width: 100%; }
.bubble.pending { opacity: .6; }
.ig-post { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 20px; box-shadow: var(--shadow); overflow: hidden; }
.ig-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.ig-head-meta { flex: 1; min-width: 0; }
.ig-photo { width: 100%; display: block; background: #f0f0f0; }
.ig-textpost { padding: 26px 20px; font-size: 18px; line-height: 1.55; color: var(--navy); font-family: var(--serif); }
.ig-textpost.type-praise { background: linear-gradient(135deg,#fff6e6,#fdeccd); }
.ig-textpost.type-prayer { background: linear-gradient(135deg,#eef3f8,#e3ecf5); }
.ig-textpost.type-testimony { background: linear-gradient(135deg,#eef7f0,#ddeede); }
.ig-actions { display: flex; gap: 8px; padding: 10px 14px 4px; }
.ig-rx { border: none; background: none; cursor: pointer; font-size: 18px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; }
.ig-rx span { font-size: 13px; font-weight: 700; color: var(--muted); }
.ig-rx.on { background: #fbf6e9; }
.ig-caption { padding: 4px 14px 6px; line-height: 1.5; }
.ig-caption .post-author { margin-right: 6px; }
.ig-comments { padding: 4px 14px 14px; }
.ig-cmt { font-size: 14px; line-height: 1.5; margin-bottom: 4px; }
.ig-cmt .cmt-name { margin-right: 5px; color: var(--navy); }
.ig-cmt-add { display: flex; align-items: center; gap: 8px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.ig-cmt-add .cmt-input { flex: 1; }
.ig-cmt-btn { white-space: nowrap; }
.post-author { color: var(--navy); cursor: pointer; }
.post-author:hover { text-decoration: underline; }
.post-av { cursor: pointer; }
.post-time { font-size: 12.5px; color: var(--muted); }
.post-author-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 2px 6px; border-radius: 6px; }
.post-del:hover { color: var(--red); background: #fbeceb; }
.type-chip { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #eef2f7; color: var(--navy); }
.type-chip.type-praise { background: #fdeccd; color: #8a6d1f; }
.type-chip.type-prayer { background: #e3ecf5; color: var(--navy); }
.type-chip.type-testimony { background: #ddeede; color: #2f6b43; }
.cmt-time { font-size: 11px; color: var(--muted); }
.cmt-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.cmt-del:hover { color: var(--red); }

.mention { color: var(--gold); font-weight: 700; }
/* Wrap long unbroken tokens (pasted URLs/emails) so they don't force horizontal
   page scroll on phones. .bubble already wraps; these are the other text holders. */
.disc-body, .post-text, .ig-textpost, .ann-body, .prayer-body, .cmt-body, .ig-caption, .profile-bio {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.post-text blockquote, .ig-caption blockquote, .ann-body blockquote, .disc-body blockquote, .ig-textpost blockquote, .prayer-body blockquote { border-left: 3px solid var(--gold); margin: 6px 0; padding: 2px 0 2px 12px; color: var(--ink); font-style: italic; }

/* ---- Alerts / notifications -------------------------------------------- */
.notif { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.notif.unread { border-left: 3px solid var(--gold); background: #fbf9f2; }
.notif-time { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---- Announcements ----------------------------------------------------- */
.ann-card { border-left: 4px solid var(--gold); }
.ann-head { display: flex; justify-content: space-between; align-items: center; }
.ann-head b { color: var(--navy); font-size: 17px; }
.ann-body { margin: 8px 0; line-height: 1.55; }

/* ---- Prayer board ------------------------------------------------------ */
.prayer-card { }
.prayer-head { display: flex; align-items: center; gap: 8px; }
.prayer-head b { color: var(--navy); }
.prayer-body { margin: 10px 0; line-height: 1.55; }
.pray-btn { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.pray-btn.on { background: #eef3f8; border-color: var(--navy); }
.pr-anon { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pr-anon input { width: auto; }

/* ---- Discussion pinned post ------------------------------------------- */
.disc-post.pinned { border: 1px solid var(--gold); }
.pinned-tag { font-size: 12px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }

/* ---- Print (certificate fits ONE landscape page) ------------------------- */
@media print {
  @page { size: landscape; margin: 0.3in; }
  .topbar, .toolbar, .no-print, .nav-toggle { display: none !important; }
  html, body { height: auto; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body, .container { background: #fff; padding: 0; margin: 0; max-width: none; }
  .cert-page { padding: 0; background: #fff; }
  .certificate {
    box-shadow: none; border: 2px solid var(--gold); margin: 0 auto; max-width: 100%;
    padding: 22px 46px; page-break-inside: avoid; break-inside: avoid;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .certificate::before { inset: 9px; }
  .cert-logo { height: 52px; margin-bottom: 6px; }
  .cert-church { font-size: 11px; }
  .cert-title { font-size: 30px; margin: 4px 0 2px; }
  .cert-sub { font-size: 12.5px; margin-bottom: 12px; }
  .cert-body { font-size: 13px; margin-bottom: 10px; }
  .cert-name { font-size: 26px; margin: 4px 0 10px; padding-bottom: 4px; }
  .cert-topics { font-size: 11px; margin-bottom: 12px; }
  .cert-rotations { margin-bottom: 12px; padding-top: 8px; }
  .cert-rot-list { font-size: 11px; }
  .cert-rot-note { font-size: 9px; }
  .cert-topics div { margin: 1px 0; }
  .cert-sign-row { margin-top: 16px; }
  .cert-mission { font-size: 10.5px; margin-top: 8px; }
  .cert-verse { font-size: 11.5px; margin-top: 10px; }
}

/* ---- Presence (online / last seen) ------------------------------------- */
.person-av-wrap { position: relative; display: inline-block; }
.presence-dot { position: absolute; bottom: 2px; right: 2px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; background: #c4c9d4; box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
.presence-dot.online { background: #21bf73; }
.person-row .person-av-wrap .presence-dot { width: 11px; height: 11px; }
.person-seen { font-size: 12px; color: var(--muted); }
.person-seen.online { color: #1a9c5e; font-weight: 600; }
.online-text { color: #1a9c5e; font-size: 12px; font-weight: 600; }

/* ---- Peer progress bar -------------------------------------------------- */
.peer-prog { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 220px; }
.peer-prog-bar { flex: 1; height: 7px; background: #eceef3; border-radius: 99px; overflow: hidden; }
.peer-prog-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #e0b64d); border-radius: 99px; }
.peer-prog-num { font-size: 11px; color: var(--muted); white-space: nowrap; }
.profile-id .peer-prog { margin: 10px 0; }

/* ---- Discussions: track toggle + list buttons -------------------------- */
.disc-toggle { display: flex; gap: 8px; margin: 14px 0 16px; }
.disc-tab { flex: 1; padding: 11px 12px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); transition: all .1s; }
.disc-tab:hover { border-color: var(--gold); }
.disc-tab.active { background: var(--gold); border-color: var(--gold); color: #1d1a12; }
.disc-track-row { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; width: 100%; }
.disc-track-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: #fbfbfd; border-radius: 10px; cursor: pointer; text-align: left; transition: all .1s; }
.disc-track-btn:hover { border-color: var(--gold); background: #fff; }
.disc-track-top { font-weight: 700; font-size: 14px; }
.disc-track-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---- Attachments (images + documents) ---------------------------------- */
.attach-img { max-width: 100%; max-height: 320px; border-radius: 10px; display: block; margin: 6px 0; }
.attach-file { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfbfd; text-decoration: none; color: var(--ink); font-size: 13px; margin: 6px 0; max-width: 100%; }
.attach-file:hover { border-color: var(--gold); background: #fff; }
.attach-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.attach-dl { color: var(--gold); font-size: 12px; }
.ig-attach, .disc-attach { padding: 0 14px 4px; }
.disc-attach { padding: 0; margin-top: 8px; }
.bubble-attach .attach-img { max-height: 220px; }
.bubble-attach .attach-file { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: inherit; }
.bubble-row.mine .bubble-attach .attach-file { color: #1d1a12; }
.thread-attach-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 0 8px; line-height: 1; }
.thread-attach-btn:hover { transform: scale(1.1); }

/* Unread-messages section at the top of the Messages list */
.people-group.unread-group { color: #d8453b; }

/* Edit/Delete controls on your own chat messages */
.bubble-act { background: none; border: none; padding: 0; font-size: 11px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.bubble-act:hover { color: #d8453b; }
.msg-edit-text { width: 100%; min-width: 200px; min-height: 60px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.msg-edit-actions { margin-top: 6px; display: flex; gap: 6px; }

/* Admin-only "who submitted this anonymous prayer" note */
.prayer-reveal { font-size: 12px; color: #b07a1e; font-style: italic; }

/* Plain-terms definition under a week's title */
.week-define { background: #f4f1e8; border-left: 3px solid var(--gold); border-radius: 8px; padding: 8px 12px; margin: 4px 0 12px; font-size: 14px; color: var(--ink); }

/* Full ESV scripture text on the week page */
.scripture-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 8px; }
.scripture-item { border-left: 3px solid var(--gold); background: #fbfbfd; border-radius: 8px; padding: 10px 14px; }
.scripture-ref { font-weight: 700; color: var(--navy); font-size: 14px; margin-bottom: 3px; }
.scripture-text { white-space: pre-line; font-family: var(--serif); color: var(--ink); font-size: 15px; line-height: 1.6; }
.esv-credit { font-size: 11px; color: var(--muted); font-style: italic; margin: 2px 0 10px; }

/* Men/Women separate-session split on a week */
.session-split { margin: 18px 0; border: 1px solid var(--gold); }
.session-tab.active { background: var(--gold); border-color: var(--gold); color: #1d1a12; }
.session-body { font-size: 15px; line-height: 1.6; }

/* UI-audit polish: readable link contrast + comfier tap targets on chat actions */
.attach-dl { color: #54718e; }
.bubble-act { font-size: 12.5px; padding: 4px 2px; }

/* Landing: doctrine → ministry-skill pairings ("What you'll study") */
.lp-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.lp-pair { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.lp-pair b { color: var(--navy); font-size: 14.5px; }
.lp-pair span { color: var(--muted); font-size: 13px; }
.lp-pair span::before { content: "→ "; color: var(--gold); font-weight: 700; }

/* Weekly time-budget strip on each week page */
.time-budget { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 16px; }
.tb-total { font-weight: 700; color: var(--navy); background: #f4f1e8; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.tb-chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 12px; color: var(--muted); }

/* Certificate: the practical ministry skill alongside each doctrine */
.cert-skill { color: var(--muted); font-style: italic; }

/* Ministry Rotation tab */
.rot-card { position: relative; }
.rot-card.mine { border: 2px solid var(--gold); }
.rot-mine-tag { display: inline-block; background: var(--gold); color: #1d1a12; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }
.rot-poc { background: #f4f1e8; border-left: 3px solid var(--gold); border-radius: 8px; padding: 8px 12px; font-size: 14px; margin: 8px 0; }
.rot-h4 { margin: 14px 0 6px; font-size: 15px; color: var(--navy); }
.rot-list { margin: 0; padding-left: 20px; }
.rot-list li { margin: 3px 0; font-size: 14px; }
.rot-tasks li::marker { color: var(--gold); }
.rot-poc-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 2px; }
.rot-poc-edit input { flex: 1; min-width: 140px; max-width: 240px; padding: 8px 10px; font-size: 13px; }

/* Certificate: ministry rotations section */
.cert-rotations { max-width: 640px; margin: 0 auto 26px; text-align: center; border-top: 1px solid var(--line); padding-top: 14px; }
.cert-rot-label { font-family: var(--serif); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); margin-bottom: 6px; }
.cert-rot-list { font-size: 14px; font-weight: 600; color: var(--navy); }
.cert-rot-note { font-size: 11.5px; color: var(--muted); font-style: italic; margin-top: 4px; }

/* Rotation checklist (interns tick items; admins see the counts) */
.rot-checklist { display: flex; flex-direction: column; gap: 4px; }
.rot-check { display: flex; align-items: flex-start; gap: 9px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfbfd; cursor: pointer; font-size: 14px; font-weight: 400; color: var(--ink); margin: 0; }
.rot-check input { width: auto; margin-top: 3px; accent-color: var(--green); }
.rot-check.done { background: #f0f6f1; border-color: #cfe3d4; }
.rot-check.done span { color: var(--muted); text-decoration: line-through; }
.rot-partners { background: #eef3f8; border-left: 3px solid var(--navy); border-radius: 8px; padding: 8px 12px; font-size: 14px; margin: 8px 0; }
.rot-progress { font-size: 13px; margin: 8px 0 2px; }

/* Admin: item-by-item checklist detail under each intern */
.rot-detail-row.hidden { display: none; }
.rot-detail-row > td { background: #fbfbfd; border-radius: 8px; padding: 10px 14px; }
.rot-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rot-detail h5 { margin: 0 0 6px; font-size: 13px; color: var(--navy); }
.rd-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 3px; }
.rd-item { font-size: 13px; padding: 2px 0; color: var(--ink); }
.rd-item .rd-mark { color: var(--muted); }
.rd-item.done { color: var(--muted); }
.rd-item.done .rd-mark { color: var(--green); font-weight: 700; }
@media (max-width: 700px) { .rot-detail { grid-template-columns: 1fr; } }

/* ---- Memory verse (one per week, replaces the scripture list) ---- */
.memory-verse { border-left: 4px solid var(--gold); background: #fbfbfd; border-radius: 10px; padding: 16px 18px 14px; }
.memory-verse .scripture-text { font-size: 16.5px; line-height: 1.65; }
.memory-verse .mv-ref { margin-top: 10px; margin-bottom: 0; font-size: 14.5px; }
.mv-badge { display: inline-block; background: var(--gold); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.mv-app { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* ---- Multi-video week list (e.g. Week 1's BibleProject videos) ---- */
.video-list { margin: 10px 0 8px; }
.video-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.vl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vl-play { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--gold); background: #fff; color: var(--gold); font-size: 13px; cursor: pointer; }
.vl-play:hover { background: var(--gold); color: #fff; }
.vl-n { color: var(--muted); font-size: 13px; min-width: 20px; }
.vl-title { font-weight: 600; flex: 1 1 180px; }
.vl-min { color: var(--muted); font-size: 12.5px; }
.vl-player { margin-top: 8px; }
.vl-player:empty { display: none; }

/* ---- Admin month locks ---- */
.month-locked { text-align: center; color: var(--muted); border: 1px dashed var(--line); background: #fbfbfd; }
.month-locked .ml-ic { font-size: 30px; margin-bottom: 4px; }
.month-locked h3 { color: var(--ink); margin: 0 0 4px; }
.locked-tag { display: inline-block; vertical-align: middle; background: #fbeceb; color: var(--red); font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 6px; }
.ml-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ml-row:last-child { border-bottom: none; }
.ml-info { flex: 1 1 220px; display: flex; flex-direction: column; }
.ml-info span { color: var(--muted); font-size: 12.5px; }
.ml-state { font-size: 12.5px; font-weight: 700; color: var(--green); }
.ml-state.locked { color: var(--red); }

/* Direct-file practical video (e.g. Riverside recordings): plain HTML5 player. */
.file-video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; display: block; }

/* Calendar: the "what you're doing this week" detail line. */
.cal-doing { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }

/* Benchmark section on the week page */
.bench-card { border-left: 4px solid var(--navy); }
.bench-hint { color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* Month-1 audience callout: who each intern is preparing to preach/teach to. */
.audience-note { margin: 10px 0 4px; padding: 10px 14px; border-left: 4px solid var(--gold); background: #fbfbfd; border-radius: 8px; font-size: 14px; line-height: 1.55; }

/* Month-1 assigned sermon passage callout */
.passage-note { margin: 10px 0 4px; padding: 10px 14px; border-left: 4px solid var(--navy); background: #fbfbfd; border-radius: 8px; font-size: 14px; line-height: 1.55; }
