/* ==========================================================================
   GOOD BROTHERS — SHARED STYLESHEET
   Palette, type, and components are locked per spec. Do not substitute.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=Great+Vibes&display=swap');

:root {
  --navy: #0A0A0A;
  --navy-panel: #161616;
  --bronze: #B8863C;
  --bronze-light: #D4A857;
  --light: #F5F3EF;
  --ink: #2B2B28;
  --on-navy: #F5F3EF;
  /* Not part of the locked brand palette above — added specifically for
     the password strength meter's red/amber low-score end, which the
     bronze/ink palette has no equivalent for. */
  --red: #C0392B;
  --amber: #D4762C;

  --serif: 'Fraunces', 'Source Serif 4', serif;
  --sans: 'Inter', 'Source Sans 3', -apple-system, sans-serif;
  --script: 'Great Vibes', cursive;

  --nav-height: 76px;
  --sidebar-width: 240px;
  --max-w: 1180px;
  --radius: 2px;
}

/* ---- Reset ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.2em; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
:focus-visible {
  outline: 2px solid var(--bronze-light);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(184,134,60,0.25);
}
.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--on-navy);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 2.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--on-navy);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { color: var(--bronze-light); }
.nav-links a[aria-current="page"] {
  color: var(--bronze-light);
  border-bottom-color: var(--bronze);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--on-navy);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    padding: 12px 32px 32px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid rgba(245,243,239,0.1);
    font-size: 1.05rem;
  }
  .nav-toggle { display: block; }
}

/* ==========================================================================
   INTERNAL LAYOUT — minimal fixed top bar + persistent left sidebar
   (aesthetics phase 1: structural shell only, no color/spacing polish)
   ========================================================================== */
.internal-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-menu { position: relative; }
.profile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 16px;
  border-radius: 19px;
  border: 1px solid rgba(245,243,239,0.25);
  color: var(--on-navy);
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.profile-menu-toggle::-webkit-details-marker { display: none; }
.profile-menu-toggle:hover { border-color: var(--bronze-light); color: var(--bronze-light); }
.profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  background: var(--navy);
  border: 1px solid rgba(184,134,60,0.3);
  border-radius: 4px;
  padding: 6px;
  z-index: 250;
}
.profile-menu-dropdown a,
.profile-menu-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  color: var(--on-navy);
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.profile-menu-dropdown a:hover,
.profile-menu-dropdown button:hover {
  background: rgba(184,134,60,0.12);
  color: var(--bronze-light);
}

/* Sidebar reuses the .nav-links class (same element carries both) so the
   existing mobile-toggle JS in script.js needs zero changes — it already
   does document.querySelector('.nav-toggle') / '.nav-links', and only one
   of each exists on any given page. Compound .sidebar.nav-links selectors
   below are deliberate — same specificity family as the base .nav-links
   rules above, so overrides are guaranteed rather than order-dependent. */
.sidebar.nav-links {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: auto;
  bottom: 0;
  inset: var(--nav-height) auto 0 0;
  width: var(--sidebar-width);
  background: var(--navy);
  border-right: 1px solid rgba(184,134,60,0.25);
  overflow-y: auto;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px 14px;
  margin: 0;
  list-style: none;
  transform: none;
  transition: none;
}
.sidebar.nav-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: none;
  border-radius: 4px;
  color: var(--on-navy);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar.nav-links a:hover { background: rgba(245,243,239,0.06); color: var(--bronze-light); }
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bronze);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.sidebar.nav-links a[aria-current="page"] {
  background: rgba(184,134,60,0.14);
  color: var(--bronze-light);
}
/* Lightning Chat — deliberately off the bronze/navy palette every other
   nav item uses, so it reads as its own thing. Colors lifted directly
   from raj-chat-sync/raj-chat.html's own --accent/--accent-dim/--accent-text. */
.sidebar.nav-links a.nav-link-accent {
  background: #c1791d;
  color: #fbf3e6;
}
.sidebar.nav-links a.nav-link-accent:hover {
  filter: brightness(0.92);
  color: #fbf3e6;
}
.sidebar.nav-links a.nav-link-accent[aria-current="page"] {
  background: #c1791d;
  color: #fbf3e6;
  box-shadow: inset 0 0 0 2px #fbf3e6;
}
.sidebar-rank {
  display: flex;
  justify-content: flex-start;
  padding: 0 14px 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(184,134,60,0.25);
}

.internal-nav ~ main,
.internal-nav ~ .site-footer {
  margin-left: var(--sidebar-width);
}
.internal-nav ~ main {
  padding-top: var(--nav-height);
}

@media (max-width: 768px) {
  .sidebar.nav-links {
    width: 280px;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.nav-links.is-open { transform: translateX(0); }
  .sidebar.nav-links a {
    padding: 16px 4px;
    border-bottom: 1px solid rgba(245,243,239,0.1);
    border-radius: 0;
    font-size: 1.05rem;
  }
  .sidebar-rank {
    padding-left: 4px;
  }
  .internal-nav ~ main,
  .internal-nav ~ .site-footer {
    margin-left: 0;
  }
}

/* ==========================================================================
   HERO — abstract navy-graded geometric treatment
   (stands in for full-bleed photography; swap the .hero-art svg for an
   <img src="/images/..."> at 2560x1440 when real photography is ready)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  background: var(--navy);
  overflow: hidden;
  color: var(--on-navy);
}
.hero.hero--short { min-height: 42vh; }
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.15) 0%, rgba(10,10,10,0.92) 88%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 32px 64px;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-light);
  font-weight: 600;
  margin-bottom: 14px;
  display: block;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  max-width: 15ch;
  margin-bottom: 0.4em;
}
.hero-sub {
  font-size: 1.08rem;
  max-width: 56ch;
  color: rgba(245,243,239,0.85);
  margin-bottom: 1.6em;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid var(--bronze);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-primary {
  background: var(--bronze);
  color: var(--navy);
}
.btn-primary:hover { background: var(--bronze-light); border-color: var(--bronze-light); }
.btn-ghost {
  background: transparent;
  color: var(--on-navy);
  border-color: rgba(245,243,239,0.4);
}
.btn-ghost:hover { border-color: var(--bronze-light); color: var(--bronze-light); }
.btn-dark {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-dark:hover { background: var(--navy); color: var(--on-navy); }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--panel { background: var(--navy-panel); color: var(--on-navy); }
.section--panel h2, .section--panel h3 { color: var(--on-navy); }
.section-head { max-width: 62ch; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head .eyebrow { color: var(--bronze); }
.section--panel .section-head .eyebrow { color: var(--bronze-light); }
.lede { font-size: 1.08rem; color: #52514c; }
.section--panel .lede { color: rgba(245,243,239,0.82); }

hr.divider {
  border: none;
  border-top: 1px solid rgba(43,43,40,0.12);
  margin: 3.5rem 0;
}
.section--panel hr.divider { border-top-color: rgba(245,243,239,0.15); }

/* three-slash divider mark, used as the site's structural signature */
.slash-mark {
  display: flex;
  gap: 6px;
  margin-bottom: 1.4rem;
}
.slash-mark span {
  width: 3px;
  height: 26px;
  background: var(--bronze);
  transform: skewX(-18deg);
}
.section--panel .slash-mark span,
.on-navy .slash-mark span { background: var(--bronze-light); }

/* ==========================================================================
   GRIDS / CARDS
   ========================================================================== */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid rgba(43,43,40,0.08);
  padding: 32px 28px;
  border-radius: var(--radius);
}
.section--panel .card {
  background: rgba(245,243,239,0.04);
  border-color: rgba(245,243,239,0.12);
}
.card-icon { width: 42px; height: 42px; margin-bottom: 18px; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.5em; }
.card p { font-size: 0.95rem; color: #52514c; margin-bottom: 0; }
.section--panel .card p { color: rgba(245,243,239,0.78); }

/* Requirement-status rows (src/views/partials/progressStatusRow.ejs) —
   green check / red X / amber partial-fill ring, clearly distinct at a
   glance without relying on color alone (check vs X vs empty ring). */
.progress-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(43,43,40,0.07);
}
.progress-status-row:last-child { border-bottom: none; }
.progress-status-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.progress-status-icon svg { width: 13px; height: 13px; }
.progress-status-icon--met { background: #2f8f4e; color: #fff; }
.progress-status-icon--none { background: #c23b3b; color: #fff; }
.progress-status-icon--partial {
  background: conic-gradient(var(--bronze) calc(var(--pct, 0) * 1%), rgba(184,134,60,0.18) 0);
}
/* Toggleable status rows (Leadership Sign-Off, Central Chair Approval)
   render as a real on/off slider switch instead of the static badge
   above — a slider unambiguously reads as interactive at rest (unlike a
   colored circle that only differs on hover), which is the whole point:
   nothing here should be discoverable only by accident. */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  background: rgba(43,43,40,0.18);
  transition: background 0.15s ease;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: left 0.15s ease;
}
.toggle-switch--on { background: var(--bronze); }
.toggle-switch--on::after { left: 22px; }
.toggle-switch:hover { filter: brightness(0.93); }
.toggle-switch:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.progress-status-label { flex: 1; font-size: 0.92rem; }
.progress-status-value { font-size: 0.83rem; font-weight: 600; color: #52514c; white-space: nowrap; }

/* Inline "Manage X"/"View X" links directly under a progress-status-row
   (progression-chart.ejs only — Task 2 #3) — indented to align with the
   row's label text (24px icon + 12px gap above), sitting close beneath
   its own row rather than reading as a new, separate line item. No
   font-size here (Task 4 #2) — .link-classic below now owns that
   directly, so it renders identically regardless of what wraps it. */
.inline-link-row { padding-left: 36px; margin-top: -6px; }

.card-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 700;
  margin-bottom: 10px;
}

/* ==========================================================================
   PROFILE HEADER (Dashboard — aesthetics phase 3)
   ========================================================================== */
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
}
.profile-header .rank-mark { flex-shrink: 0; }
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(43,43,40,0.06);
}
.profile-header-info h1 { margin-bottom: 4px; }
.profile-header-id {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--bronze);
  font-weight: 700;
  margin-bottom: 2px;
}
.profile-header-rank {
  font-size: 0.92rem;
  color: #6b6a63;
}
@media (max-width: 600px) {
  .profile-header { gap: 16px; }
  .profile-header .rank-mark { width: 64px; height: 64px; }
  .profile-header .profile-avatar { width: 64px; height: 64px; }
}

/* Two-column field grid: a fixed marker-column width shared by every
   .field-grid instance (Contact and Professional both use it) is what
   makes the marker/value boundary land at the same x-coordinate across
   separate .card elements — grid's own max-content sizing is per-instance
   and would NOT stay aligned between two independent grids on its own. */
.field-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  column-gap: 16px;
}
.field-marker {
  grid-column: 1;
  justify-self: end;
  align-self: center;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 10px 0;
  border-bottom: 1px solid rgba(43,43,40,0.07);
  border-right: 1px solid rgba(43,43,40,0.1);
  padding-right: 16px;
  margin-right: -16px;
}
.field-marker-label {
  color: var(--bronze);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: right;
}
.field-icon { width: 20px; height: 20px; flex-shrink: 0; margin-bottom: 0; }
.field-value {
  grid-column: 2;
  justify-self: stretch;
  align-self: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(43,43,40,0.07);
  font-size: 0.95rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.field-grid > .field-marker:nth-last-child(2),
.field-grid > .field-value:last-child {
  border-bottom: none;
}
@media (max-width: 500px) {
  .field-grid { grid-template-columns: 90px 1fr; column-gap: 10px; }
  .field-marker-label { font-size: 0.64rem; }
}

/* ==========================================================================
   TABLES (Governance page — information-dense treatment)
   ========================================================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  background: #fff;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(43,43,40,0.1);
  vertical-align: top;
}
.data-table th {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 700;
  border-bottom: 2px solid var(--bronze);
}
.data-table tr:last-child td { border-bottom: none; }

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.step-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(43,43,40,0.1);
}
.section--panel .step-list li { border-bottom-color: rgba(245,243,239,0.12); }
.step-list li:last-child { border-bottom: none; }
.step-list li::before {
  content: counter(step);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--bronze);
  line-height: 1.4;
}

.info-block {
  background: var(--light);
  border-left: 3px solid var(--bronze);
  padding: 22px 26px;
  font-size: 0.95rem;
}
.section--panel .info-block { background: rgba(245,243,239,0.05); }

/* ==========================================================================
   COMPACT ROW LIST (aesthetics phase 2 — Chapters, Meetings, Resources, Admin)
   Each item is a single 1-2 line row instead of a full .card. A row is
   either a plain div (kebab menu supplies its action) or an <a> (whole row
   links to a detail page) — same list/item classes either way.
   ========================================================================== */
.row-list {
  border: 1px solid rgba(43,43,40,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.row-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(43,43,40,0.08);
  text-decoration: none;
  color: inherit;
}
.row-list-item:last-child { border-bottom: none; }
a.row-list-item:hover { background: rgba(184,134,60,0.06); }
.row-list-thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(43,43,40,0.06);
}
/* Profile photos in a row-list (Directory, Admin Roster) — same thumb
   sizing, circular crop to distinguish a person from a resource cover. */
.row-list-thumb-round { border-radius: 50%; }
.row-list-main {
  flex: 1;
  min-width: 0;
}
.row-list-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-list-sub {
  display: block;
  font-size: 0.82rem;
  color: #6b6a63;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-list-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bronze);
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}
.row-list-empty { padding: 16px; color: #6b6a63; font-size: 0.9rem; }

/* Kebab (⋮) menu — same <details>/<summary> mechanism as .profile-menu,
   applied per-row for destructive/administrative actions. */
.row-kebab { position: relative; flex-shrink: 0; }
.row-kebab-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  list-style: none;
  color: #6b6a63;
  font-size: 1.2rem;
  line-height: 1;
  user-select: none;
}
.row-kebab-toggle::-webkit-details-marker { display: none; }
.row-kebab-toggle:hover { background: rgba(43,43,40,0.07); color: var(--ink); }
.row-kebab-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid rgba(43,43,40,0.12);
  border-radius: 4px;
  min-width: 210px;
  padding: 8px;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.row-kebab-dropdown form + form,
.row-kebab-dropdown form + a,
.row-kebab-dropdown a + form { margin-top: 2px; }
.row-kebab-dropdown button,
.row-kebab-dropdown > a {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.88rem;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
}
.row-kebab-dropdown button:hover,
.row-kebab-dropdown > a:hover { background: rgba(184,134,60,0.09); color: var(--bronze); }
.row-kebab-dropdown .row-kebab-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9a988f;
  padding: 6px 10px 2px;
}
.row-kebab-dropdown input[type="text"] {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 8px;
  font-size: 0.85rem;
  border: 1px solid rgba(43,43,40,0.15);
  border-radius: 4px;
  font-family: inherit;
}
.row-kebab-dropdown .field-form { padding: 6px 10px 8px; }
.row-kebab-dropdown .field-form button { padding: 6px 10px; margin-top: 2px; }
.row-kebab-dropdown .field-form select {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 8px;
  font-size: 0.85rem;
  border: 1px solid rgba(43,43,40,0.15);
  border-radius: 4px;
  font-family: inherit;
}

/* A row-list-item can wrap an <a class="row-list-main"> (click target for
   the row's primary action) alongside a sibling .row-kebab (secondary
   actions) — used where a row both navigates AND has per-row actions
   (Messages inbox/archived). Plain .row-list-main divs (no navigation,
   e.g. group members) are unaffected. */
a.row-list-main {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.row-list-main:hover .row-list-title { color: var(--bronze); }

/* Same "row navigates, sibling holds per-row actions" idea as
   a.row-list-main above, but for rows that also need a thumbnail inside
   the clickable area (Resources) — a.row-list-main alone only wraps
   text, so this variant lays out thumb + text-stack together as the link. */
a.row-list-link {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
a.row-list-link:hover .row-list-title { color: var(--bronze); }

.row-list-inline-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Condensed row density (Resources) — this list is expected to grow to
   hundreds of entries, so it gets tighter padding/thumb size than the
   default .row-list-item everywhere else; scoped to #resource-list only,
   no effect on Directory/Roster/Messages/etc. */
#resource-list .row-list-item { padding: 7px 14px; }
#resource-list .row-list-thumb { width: 30px; height: 30px; }

/* Unread indicator (Messages inbox) — bold title text + small dot, standard
   inbox convention. */
.row-list-title.is-unread { font-weight: 700; }
.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bronze);
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Small read-only tag chips inside a row-list row (Journal list) — reuses
   .filter-pill's look at a more compact size since they sit inside a
   single-line row rather than a filter bar. */
.row-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.row-list-tags .filter-pill {
  padding: 2px 10px;
  font-size: 0.7rem;
  cursor: default;
}

/* ==========================================================================
   TABS (aesthetics phase 4 — Messages Inbox/Archived/Sent)
   ========================================================================== */
.tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid rgba(43,43,40,0.12);
}
.tabs { display: flex; gap: 28px; }
.tab-link {
  padding: 10px 2px;
  margin-bottom: -1px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: #6b6a63;
  border-bottom: 2px solid transparent;
}
.tab-link:hover { color: var(--bronze); }
.tab-link.is-active { color: var(--ink); border-bottom-color: var(--bronze); }

/* ==========================================================================
   ICON BUTTON (message detail Archive/Delete — a deliberate exception to
   the row-kebab pattern: once a message is open, its actions are primary,
   not secondary, so they're visible icon buttons, same circular sizing as
   .profile-menu-toggle)
   ========================================================================== */
.message-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.message-detail-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(43,43,40,0.15);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--bronze); color: var(--bronze); background: rgba(184,134,60,0.06); }

/* ==========================================================================
   PILL PICKER (checkbox-driven toggle pills — Journal entry-creation form's
   life-area tag picker. Pure CSS: the checkbox is visually hidden but stays
   in the DOM/tab order, the sibling .filter-pill span shows the toggle
   state via :checked, and the wrapping <label> keeps native click-to-toggle
   behavior with no JS required.)
   ========================================================================== */
.pill-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-picker label {
  position: relative;
  display: inline-flex;
  margin: 0;
}
.pill-picker input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.pill-picker input:checked + .filter-pill {
  background: var(--bronze);
  border-color: var(--bronze);
  color: var(--navy);
}
.pill-picker input:focus-visible + .filter-pill {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}

/* Bigger minimum height for the Journal entry content field — the previous
   130px default read as a single-line box. */
.journal-textarea { min-height: 220px; }

/* Journal addendum — append-only editing. Each addition after the original
   entry gets its own visually distinct block (left accent + indent) so the
   append-only structure is obvious to the author and to anyone the entry
   is shared with. */
.journal-addendum {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--bronze);
  background: rgba(184, 134, 60, 0.06);
}
.journal-addendum p:last-child { margin-bottom: 0; }

/* Member-share picker — type-ahead used by both the New Entry and Journal
   Entry pages to share with a member (see initMemberSharePicker in
   script.js). Positioned relative so the dropdown can sit directly under
   the input. */
.member-picker { position: relative; }
.member-picker-dropdown {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: var(--paper, #fff);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  max-height: 220px;
  overflow-y: auto;
}
.member-picker-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
}
.member-picker-option:hover,
.member-picker-option:focus-visible { background: rgba(184, 134, 60, 0.12); }
.member-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.member-picker-chip { display: inline-flex; align-items: center; }
.member-picker-remove,
.member-picker-unshare {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  margin-left: 4px;
  padding: 0;
  color: inherit;
}

/* Service Log running total — a prominent stat callout above the list
   rather than a plain sentence. */
.stat-callout {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 8px;
}
.stat-callout-value {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--bronze);
  line-height: 1;
}
.stat-callout-label { font-size: 0.9rem; color: #6b6a63; }

/* ==========================================================================
   PLACEHOLDER BLOCK (Chapter locator)
   ========================================================================== */
.placeholder-block {
  border: 1.5px dashed rgba(184,134,60,0.5);
  background: rgba(184,134,60,0.05);
  padding: 40px 32px;
  text-align: center;
  border-radius: var(--radius);
}
.placeholder-block .card-label { display: block; margin-bottom: 8px; }
.placeholder-block p { color: #52514c; font-size: 0.92rem; margin: 0; }

/* ==========================================================================
   FORM (Contact page)
   ========================================================================== */
.form-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
input, select, textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid rgba(43,43,40,0.2);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--bronze);
  outline: none;
}
textarea { resize: vertical; min-height: 130px; }

.attendance-row,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: normal;
  margin-bottom: 8px;
}
.attendance-row input[type="checkbox"],
.checkbox-row input[type="checkbox"] {
  width: auto;
  flex: none;
  padding: 0;
}

.hidden { display: none !important; }

/* ==========================================================================
   RESOURCES LIBRARY
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.filter-bar input[type="text"] { width: auto; flex: 1 1 320px; }
.filter-bar select { width: auto; flex: 0 0 auto; }
.filter-pill {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid rgba(43,43,40,0.2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
button.filter-pill:hover { border-color: var(--bronze); }
button.filter-pill.is-active {
  background: var(--bronze);
  border-color: var(--bronze);
  color: var(--navy);
}
.resource-card { display: block; text-decoration: none; }
.resource-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.book-result {
  display: flex;
  align-items: center;
  gap: 14px;
}
.book-result img { width: 48px; height: auto; flex: none; }
.book-result > div { flex: 1; }
.resource-status { color: var(--bronze); font-weight: 600; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--navy);
  color: var(--on-navy);
  padding: 56px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(245,243,239,0.12);
}
.footer-tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.footer-tagline .slash-accent { color: var(--bronze-light); }
.rank-mark { flex-shrink: 0; }

.rank-ladder {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.rank-ladder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 190px;
  padding: 18px 14px 20px;
  border-radius: 12px;
  border: 2px solid rgba(184, 134, 60, 0.18);
  background: rgba(245, 243, 239, 0.03);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.rank-ladder-item.is-current {
  border-color: var(--bronze);
  background: rgba(184, 134, 60, 0.1);
  transform: translateY(-6px);
}
.rank-ladder-item-marks {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}
.rank-ladder-item-marks--pair { gap: 14px; }
.rank-mark-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rank-mark-option-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(43, 43, 40, 0.55);
}
.rank-ladder-item-heading {
  font-size: 1rem;
  margin: 12px 0 6px;
}
.rank-ladder-item-desc {
  margin: 0;
  color: #52514c;
}
.rank-ladder-item-note {
  margin: 6px 0 0;
  font-style: italic;
}

@media (max-width: 640px) {
  .rank-ladder {
    flex-direction: column;
    align-items: stretch;
  }
  .rank-ladder-item {
    width: auto;
  }
  .rank-ladder-item.is-current {
    transform: none;
  }
}
.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.footer-links a { font-size: 0.88rem; color: rgba(245,243,239,0.8); }
.footer-links a:hover { color: var(--bronze-light); }
.footer-social { display: flex; gap: 16px; margin-top: 6px; }
.footer-social a svg { width: 20px; height: 20px; color: rgba(245,243,239,0.7); }
.footer-social a:hover svg { color: var(--bronze-light); }
.footer-bottom {
  padding-top: 24px;
  font-size: 0.8rem;
  color: rgba(245,243,239,0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.85rem; }
.signature-script { font-family: var(--script); color: var(--ink); }

dialog {
  border: none;
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 420px;
  width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
dialog::backdrop { background: rgba(10,10,10,0.55); }
dialog h3 { margin-top: 0; }
dialog form .btn { margin-right: 8px; }
.icon-line { stroke: var(--bronze); }
.section--panel .icon-line { stroke: var(--bronze-light); }

/* spacing / width helpers, used instead of inline style="" per spec */
.mx-auto { margin-left: auto; margin-right: auto; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.mt-tight { margin-top: 1rem; }
.mt-sm { margin-top: 1.2rem; }
.mt-md { margin-top: 1.6rem; }
.mt-lg { margin-top: 2.4rem; }
.mb-tight { margin-bottom: 0.2em; }
.m-0 { margin: 0; }
.p-hero-fallback { padding: 140px 0; }
.p-sm { padding: 24px 20px; }
.p-lg { padding: 48px; }
.form-narrow { max-width: 760px; }
.link-accent { text-decoration: underline; color: var(--bronze); }
.section--panel .link-accent, .on-navy .link-accent { color: var(--bronze-light); }

/* A genuine, classic-looking hyperlink — distinct from the site's default
   `a { color: inherit; text-decoration: none; }` and from .link-accent's
   bronze — used where a link needs to visually read as "this is a real,
   clickable link" rather than blend into surrounding body text (e.g.
   "View Certificate" on /progression/:userId).
   font-size is set here explicitly (Task 4 #2) rather than left to
   inherit — this class gets used inside wrappers with wildly different
   ambient sizes (.field-value at 0.95rem, .small at 0.85rem, a bare <p>
   at the base size), which is exactly what made "View Certificate" on
   the Dashboard render visibly larger than the same link elsewhere.
   Setting it directly on the element beats inheritance regardless of
   which wrapper class is present, so every .link-classic instance now
   matches no matter where it's dropped in. */
.link-classic { color: #2563eb; text-decoration: underline; font-weight: 600; font-size: 0.85rem; }
.link-classic:hover { color: #1d4ed8; }

.max-w-44 { max-width: 44ch; }
.max-w-48 { max-width: 48ch; }
.max-w-56 { max-width: 56ch; }
.max-w-70 { max-width: 70ch; }
.max-w-72 { max-width: 72ch; }

.slash-mark--center { margin: 0 auto 1.4rem; justify-content: center; }
.not-found-title { font-size: 2.2rem; }

/* flexible grid for card sets that don't divide evenly into 3 (e.g. 7 cards) */
.grid-flow { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ==========================================================================
   AUTH PAGES (Sign In) — dummy, no real backend
   ========================================================================== */
.auth-shell {
  min-height: calc(100vh - var(--nav-height) - 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid rgba(43,43,40,0.08);
  border-radius: var(--radius);
  padding: 44px 40px;
}
.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 0.3em;
}
.auth-card .lede { font-size: 0.95rem; margin-bottom: 1.8rem; }
.auth-field { margin-bottom: 18px; }
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 22px;
}
.auth-row a {
  font-size: 0.85rem;
  color: var(--bronze);
  text-decoration: underline;
}
.auth-submit { width: 100%; margin-bottom: 18px; }
.auth-footline {
  text-align: center;
  font-size: 0.88rem;
  color: #52514c;
  padding-top: 18px;
  border-top: 1px solid rgba(43,43,40,0.1);
}
.auth-footline a { color: var(--bronze); font-weight: 600; text-decoration: underline; }

/* ---- Password strength meter (zxcvbn) ---- */
.pw-meter-helper { color: #6b6a63; margin: -6px 0 8px; }
.password-strength-meter { margin-top: 8px; }
.pw-meter-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.pw-meter-segment {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(43,43,40,0.12);
}
.pw-meter-label { font-weight: 600; margin-bottom: 2px; }
.pw-meter-feedback { color: #6b6a63; }
.pw-meter-blocked { color: var(--red); margin: -10px 0 14px; }

/* ==========================================================================
   UNDER CONSTRUCTION placeholder
   ========================================================================== */
.uc-shell {
  min-height: calc(100vh - var(--nav-height) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
  text-align: center;
}

/* ==========================================================================
   VOICE DICTATION
   ========================================================================== */
.dictate-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dictate-row textarea { flex: 1 1 auto; }

.dictate-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: none;
  padding-top: 2px;
}

#mic-btn {
  background: #fff;
  border: 1px solid rgba(43,43,40,0.2);
  border-radius: 7px;
  height: 42px;
  width: 42px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
#mic-btn:hover:not(:disabled) {
  background: rgba(184,134,60,0.08);
  border-color: var(--bronze-light);
}
#mic-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
#mic-btn.recording {
  background: #B8863C;
  border-color: #B8863C;
  color: #fff;
  animation: mic-pulse 1.2s infinite ease-in-out;
}
@keyframes mic-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.dictate-timer,
.dictate-status {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  min-height: 1.1em;
}
.dictate-status { font-weight: 400; color: #52514c; }

.dictate-hint {
  font-size: 0.82rem;
  color: #52514c;
  margin-top: 8px;
  margin-bottom: 0;
}
.dictate-hint a { color: var(--bronze); text-decoration: underline; }

@keyframes dictate-field-wash {
  0% { background-color: #fff; }
  22.5% { background-color: rgba(184,134,60,0.24); }
  77.5% { background-color: rgba(184,134,60,0.24); }
  100% { background-color: #fff; }
}
.dictate-field-arrived {
  animation: dictate-field-wash 4s ease;
}
.uc-icon { width: 64px; height: 64px; margin: 0 auto 24px; }

/* Streak flame badge (streakBadge.ejs) — Dashboard, Journal pages,
   /progression/:userId, and Admin Roster all share this. */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}
.streak-flame { width: 16px; height: 16px; fill: var(--bronze); flex-shrink: 0; }
.streak-badge.is-inline-heading { margin-left: 12px; font-size: 0.85rem; }

/* Mood slider (New Entry + Entry Settings edit form) */
.mood-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.mood-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--bronze);
}
.mood-slider-row output {
  min-width: 2.6em;
  text-align: right;
  font-weight: 600;
  color: var(--bronze);
}

/* Mood trend — compact Dashboard sparkline and the fuller Journal-page
   chart/table share this line color; sizing differs per instance. */
.mood-sparkline { display: block; }
.mood-sparkline polyline { fill: none; stroke: var(--bronze); stroke-width: 2; }
.mood-trend-chart { width: 100%; height: 160px; display: block; }
.mood-trend-chart polyline { fill: none; stroke: var(--bronze); stroke-width: 2; }
.mood-trend-chart circle { fill: var(--bronze); }
.mood-trend-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.mood-trend-table th, .mood-trend-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 0.9rem;
}
