/* ================================================
   Family Haggadah — Shared Design System
   Passover 5786
   ================================================ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@300;400;500;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&display=swap');

/* ── Variables ── */
:root {
  --navy-900: #0d2340;
  --navy-800: #122b50;
  --navy-700: #1a3f7a;
  --navy-600: #1e4d99;
  --navy-100: #e8edf5;
  --gold:     #c9a84c;
  --gold-light: #e8d08a;
  --wine:     #8b1a1a;
  --wine-light: #fdf2f2;
  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-700: #334155;
  --text-body: #1e293b;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-hebrew: 'Frank Ruhl Libre', 'Times New Roman', serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 2px 16px rgba(13, 35, 64, 0.09);
  --shadow-nav:  0 -2px 16px rgba(13, 35, 64, 0.15);

  --header-height: 58px;
  --nav-height: 68px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-serif);
  font-size: 18px;
  background: var(--navy-100);
  color: var(--text-body);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

/* ── Typography ── */
h1 { font-size: 2rem;   font-weight: 600; line-height: 1.2; }
h2 { font-size: 1.6rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { line-height: 1.75; }

.label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
  font-family: var(--font-serif);
}

/* Hebrew text */
.heb {
  display: block;
  direction: rtl;
  font-family: var(--font-hebrew);
  font-size: 1.5rem;
  line-height: 2;
  color: var(--navy-900);
}
.heb-sm { font-size: 1.2rem; }
.heb-lg { font-size: 1.9rem; }

/* Transliteration */
.trans {
  display: block;
  font-style: italic;
  color: var(--navy-700);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* English */
.eng {
  display: block;
  color: var(--gray-700);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ── Layout ── */
#page-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem 0 0.75rem;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Hamburger toggle */
#sidebar-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
#sidebar-toggle:hover, #sidebar-toggle:active {
  background: rgba(255,255,255,0.1);
}
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

.header-center {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

#progress-bar {
  position: fixed;
  top: var(--header-height);
  left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
  z-index: 99;
}
#progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.4s ease;
}

main {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 3px + 1.25rem);
  padding-bottom: calc(var(--nav-height) + 1rem);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  max-width: 680px;
  margin: 0 auto;
}

#page-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
  box-shadow: var(--shadow-nav);
}

.nav-step-count {
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  font-style: italic;
  font-family: var(--font-serif);
  white-space: nowrap;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}
.card-navy {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
}
.card-navy .heb { color: var(--white); }
.card-navy .label { color: var(--gold-light); }
.card-navy h2, .card-navy p { color: rgba(255,255,255,0.9); }

.card-gold-border {
  border: 2px solid var(--gold);
}

/* ── Section divider ── */
.divider {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.3em;
  margin: 1rem 0;
  font-size: 0.9rem;
}

/* ── Blessing block ── */
.blessing {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.blessing:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* ── Leader notes ── */
.leader-note {
  display: none;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  color: #78350f;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
}
body.is-leader .leader-note { display: block; }

/* ── Nav buttons ── */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-btn:hover, .nav-btn:active { background: rgba(255,255,255,0.2); }
.nav-btn:disabled, .nav-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}
.nav-btn-toc {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-900);
  font-weight: 700;
  padding: 0.5rem 0.875rem;
}
.nav-btn-toc:hover { background: var(--gold-light); }

/* ── Header elements ── */
.header-title {
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-sub {
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.role-badge-leader      { background: var(--gold); color: var(--navy-900); }
.role-badge-participant { background: rgba(255,255,255,0.15); color: white; }

/* ── TOC overlay ── */
#toc-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(13, 35, 64, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
#toc-overlay.open { display: flex; }
#toc-drawer {
  background: var(--white);
  width: 100%;
  max-width: 600px;
  max-height: 82vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  padding: 0 0 2rem;
  overscroll-behavior: contain;
}
#toc-header {
  position: sticky;
  top: 0;
  background: var(--white);
  padding: 1.25rem 1.5rem 0.875rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.toc-close-btn {
  background: var(--gray-200);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray-700);
  flex-shrink: 0;
}
.toc-list { padding: 0.75rem 1rem; }
.toc-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-body);
  transition: background 0.15s;
}
.toc-item:hover, .toc-item:active { background: var(--navy-100); }
.toc-item.current { background: var(--navy-100); }
.toc-num {
  width: 28px; height: 28px;
  background: var(--navy-900);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  font-family: var(--font-serif);
}
.toc-item.current .toc-num { background: var(--gold); color: var(--navy-900); }
.toc-title { font-size: 1rem; font-weight: 600; }
.toc-sub   { font-size: 0.8rem; color: var(--gray-400); font-style: italic; }

/* ── Page title card ── */
.page-title-card {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-card);
}
.page-title-card .step-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.page-title-card h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: 0.25rem;
}
.page-title-card .subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  font-style: italic;
}

/* ── Ten Plagues interactive ── */
.plague-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.plague-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-user-select: none;
  user-select: none;
}
.plague-card.spilled {
  background: var(--wine-light);
  border-color: var(--wine);
}
.plague-drop {
  width: 36px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plague-drop svg {
  width: 28px;
  height: 36px;
}
.plague-drop svg path {
  fill: none;
  stroke: var(--wine);
  stroke-width: 2;
  transition: fill 0.35s ease;
}
.plague-card.spilled .plague-drop svg path {
  fill: var(--wine);
}
.plague-text .name-en {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-900);
}
.plague-text .name-heb {
  direction: rtl;
  font-family: var(--font-hebrew);
  font-size: 1rem;
  color: var(--navy-700);
  line-height: 1.3;
}
.plague-text .name-trans {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--gray-400);
}
.plague-instructions {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 0.875rem;
}

/* ── Dayenu ── */
.dayenu-verse {
  border-left: 3px solid var(--gray-200);
  padding: 0.25rem 0 0.25rem 1rem;
  margin-bottom: 0.75rem;
}
.dayenu-chorus {
  text-align: center;
  color: var(--wine);
  font-family: var(--font-hebrew);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.25rem 0 1rem;
  direction: rtl;
}
.dayenu-chorus-en {
  text-align: center;
  color: var(--wine);
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 1.25rem;
}

/* ── Seder plate ── */
.plate-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.plate-item:last-child { border-bottom: none; }
.plate-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 0.1rem;
}
.plate-item h3 { margin-bottom: 0.25rem; }
.plate-item p  { font-size: 0.95rem; color: var(--gray-700); }

/* ── Song verses ── */
.verse-block {
  margin-bottom: 1.75rem;
}
.verse-num {
  display: inline-block;
  background: var(--navy-900);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 22px; height: 22px;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}

/* ── Afikomen ── */
.afikomen-fun {
  text-align: center;
  padding: 2rem 1rem;
}
.afikomen-fun .big-icon { font-size: 5rem; margin-bottom: 1rem; display: block; }
.afikomen-fun h2 { margin-bottom: 1rem; }
.afikomen-fun p { color: var(--gray-700); margin-bottom: 1rem; }

/* ── Wine cup indicator ── */
.cup-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.75rem;
  margin: 0.75rem 0;
}

/* ── Seder order list ── */
.seder-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-body);
  transition: background 0.15s;
}
.seder-step:hover { background: var(--navy-100); }
.seder-step.highlight { background: var(--navy-100); }
.step-num-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy-900);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-serif);
}
.step-name { font-weight: 600; font-size: 1rem; }
.step-heb  { font-family: var(--font-hebrew); font-size: 0.95rem; color: var(--navy-700); direction: rtl; }

/* ── Conclusion ── */
.conclusion-banner {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: white;
}
.conclusion-banner .heb {
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

/* ── Role selection screen (index.html) ── */
#role-screen {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 60%, var(--navy-600) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.role-screen-logo { font-size: 3.5rem; margin-bottom: 0.75rem; }
.role-screen-title {
  font-family: var(--font-hebrew);
  font-size: 2.6rem;
  font-weight: 700;
  color: white;
  text-align: center;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.role-screen-subtitle {
  color: var(--gold);
  font-family: var(--font-hebrew);
  font-size: 1.3rem;
  direction: rtl;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 0.5rem;
}
.role-screen-year {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  font-style: italic;
  text-align: center;
  margin-bottom: 2.5rem;
}
.role-prompt {
  color: rgba(255,255,255,0.75);
  text-align: center;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  font-style: italic;
}
.role-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
}
.role-btn-leader {
  background: var(--gold);
  border: none;
  border-radius: var(--radius-md);
  padding: 1.1rem 2rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}
.role-btn-leader:hover { background: var(--gold-light); }
.role-btn-participant {
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  padding: 1.1rem 2rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}
.role-btn-participant:hover { background: rgba(255,255,255,0.22); }
.role-hint {
  margin-top: 1.75rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  text-align: center;
  font-style: italic;
  max-width: 280px;
}

/* ── TOC page (index.html) ── */
.toc-page-header {
  background: var(--navy-900);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}
.toc-page-header h1 { color: white; margin-bottom: 0.25rem; }
.toc-page-header p  { color: rgba(255,255,255,0.6); font-style: italic; }
.toc-page-list { padding: 1rem; max-width: 680px; margin: 0 auto; }
.toc-page-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: 0.625rem;
  text-decoration: none;
  color: var(--text-body);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, transform 0.15s;
}
.toc-page-item:hover, .toc-page-item:active {
  box-shadow: 0 4px 20px rgba(13,35,64,0.15);
  transform: translateY(-1px);
}
.toc-page-num {
  width: 36px; height: 36px;
  background: var(--navy-900);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  font-family: var(--font-serif);
}
.toc-page-info { flex: 1; }
.toc-page-title { font-size: 1.05rem; font-weight: 600; }
.toc-page-desc  { font-size: 0.85rem; color: var(--gray-400); font-style: italic; }
.toc-chevron { color: var(--gray-400); font-size: 1rem; }

/* ── Utility ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ════════════════════════════════════════════════
   SIDEBAR NAVIGATION
   ════════════════════════════════════════════════ */

:root {
  --sidebar-width: 300px;
  --sidebar-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wrapper holds backdrop + sidebar panel */
#sidebar-wrap {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none; /* transparent when closed */
}
#sidebar-wrap.open {
  pointer-events: auto;
}

/* Semi-transparent backdrop */
#sidebar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 35, 64, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--sidebar-transition);
}
#sidebar-wrap.open #sidebar-backdrop {
  opacity: 1;
}

/* Sidebar panel */
#sidebar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--navy-900) 0%, #0f2d55 100%);
  display: flex;
  flex-direction: column;
  transform: translateX(calc(-1 * var(--sidebar-width)));
  transition: transform var(--sidebar-transition);
  box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  overscroll-behavior: contain;
}
#sidebar-wrap.open #sidebar {
  transform: translateX(0);
}

/* Sidebar header */
#sidebar-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
#sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: white;
}
#sidebar-close {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
#sidebar-close:hover { background: rgba(255,255,255,0.2); }

/* Sidebar progress bar */
#sidebar-progress-bar {
  flex-shrink: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
}
#sidebar-progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.4s ease;
}

/* Scrollable nav list */
#sidebar-nav-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem 0;
}
#sidebar-nav-list::-webkit-scrollbar { width: 4px; }
#sidebar-nav-list::-webkit-scrollbar-track { background: transparent; }
#sidebar-nav-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* Individual nav items */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-item:hover, .sidebar-item:active {
  background: rgba(255,255,255,0.08);
  color: white;
}
.sidebar-item.current {
  background: rgba(201, 168, 76, 0.15);
  border-left-color: var(--gold);
  color: white;
}

.sidebar-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: rgba(255,255,255,0.6);
  transition: background 0.15s, color 0.15s;
}
.sidebar-item.current .sidebar-num {
  background: var(--gold);
  color: var(--navy-900);
}
.sidebar-item:hover .sidebar-num {
  background: rgba(255,255,255,0.2);
  color: white;
}

.sidebar-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item-sub {
  font-size: 0.75rem;
  font-style: italic;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.sidebar-item.current .sidebar-item-sub { color: rgba(255,255,255,0.6); }

/* Sidebar footer — role switcher */
#sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
#sidebar-role-line {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  font-family: var(--font-serif);
}
#sidebar-role-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-serif);
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
#sidebar-role-btn:hover { background: rgba(255,255,255,0.2); color: white; }
