/* ============================================================
   SECTION 1 — RESET & CSS VARIABLES
   Brand colors used throughout. Edit values here to change
   colors globally. All other rules reference these variables.
============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --plum:           #5C2D6E;
  --plum-dark:      #3A1A45;
  --plum-light:     #FBF6FF;
  --plum-mid:       #7B4A91;
  --text-primary:   #1A1A1A;
  --text-secondary: #555555;
  --white:          #FFFFFF;
  --border:         #E8DFF0;

  --wing-sci:   #2D6E5C;
  --wing-tech:  #2D4E6E;
  --wing-cons:  #6E5C2D;
  --wing-about: #5C6E2D;
  --wing-obl:   #6E2D4E;

  --nav-height:     60px;
  --breadcrumb-height: 32px;
  --controls-height:   38px;
  --frozen-height:     calc(var(--nav-height) + var(--breadcrumb-height) + var(--controls-height)); 
  --footer-height: 64px;

  --rolodex-collapsed-height: 32px;
  --rolodex-expanded-height: 332px;

}

html {
  font-size: 16px;
}

/* ============================================================
   SECTION 2 — BASE BODY & MAIN
============================================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--white);
  padding-bottom: var(--rolodex-expanded-height);
}

main {
  min-height: calc(100vh - var(--nav-height) - 80px);
}


/* ============================================================
   SECTION 3 — NAVIGATION
   Desktop: brand left, links center, controls right.
   All nav text is fixed px — never scales with font controls.
   Controls use flex-shrink: 0 so they never get pushed off.
   Mobile (≤950px): brand + mobile-bar (controls + hamburger).
   Dropdown: full width, positioned by JS.
============================================================ */

.site-nav {
  background: linear-gradient(to right, #5C2D6E, #2D6E4E);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid rgba(255,255,255,0.4);
  min-height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1.5rem;
}

/* Brand — fixed size, never shrinks */
.nav-brand {
  color: var(--white);
  text-decoration: none;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  justify-content: flex-end;
  padding-top: 3px;
  min-width: 0;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

/* Two-line nav item */
.nav-obligations {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.nav-obligations-sub {
  font-size: 11px;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.02em;
}

/* External subdomain buttons */
.nav-external {
  border: 1.5px solid #ffffff !important;
  border-radius: 4px;
  padding: 0.25rem 0.75rem !important;
  font-size: 15px !important;
}
.nav-external:hover {
  background: rgba(255,255,255,0.15) !important;
}

/* Divider between internal and external links */
.nav-divider {
  display: inline-block;
  width: 1px;
  height: 1.2rem;
  background: rgba(255,255,255,0.3);
  margin: 0 0.25rem;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Font size controls — inline in nav, never shrink or collapse */
.font-size-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.font-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  min-width: 32px;
  min-height: 32px;
  padding: 0.4rem 0.5rem;
}
.font-btn:nth-child(1) { font-size: 11px; }
.font-btn:nth-child(2) { font-size: 14px; }
.font-btn:nth-child(3) { font-size: 17px; }
.font-btn:hover { background: rgba(255,255,255,0.15); border-color: #ffffff; }
.font-btn-active { background: rgba(255,255,255,0.2) !important; border-color: #ffffff !important; }

/* Contrast toggle */
.contrast-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  min-width: 32px;
  min-height: 32px;
  padding: 0.4rem 0.5rem;
  margin-left: 0.25rem;
}
.contrast-btn:hover { background: rgba(255,255,255,0.15); border-color: #ffffff; }
.contrast-btn-active { background: rgba(255,255,255,0.2) !important; border-color: #ffffff !important; }

/* Mobile bar — hidden on desktop */
.nav-mobile-bar { display: none; }

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
}
.nav-hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Mobile dropdown — hidden by default, JS controls top position */
.nav-dropdown {
  display: none;
  flex-direction: column;
  background: #3A1A45;
  padding: 0.5rem 0;
  position: absolute;
  width: 100%;
  left: 0;
  right: 0;
  border-radius: 0;
  box-shadow: none;
  z-index: 99;
}
.nav-dropdown.nav-dropdown-open { display: flex; }
.nav-dropdown a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { background: rgba(255,255,255,0.1); }
.nav-dropdown .nav-external {
  border: 1px solid rgba(255,255,255,0.4) !important;
  margin: 0.35rem 1rem;
  border-radius: 4px;
  text-align: center;
  padding: 0.4rem 1rem !important;
}

/* Mobile breakpoint — 950px covers mid-size windows */
@media (max-width: 950px) {
  .nav-links      { display: none; }
  .nav-mobile-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
  }
  .nav-hamburger  { display: flex; }
  .nav-divider    { display: none; }
  .site-nav       { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 600px) {
  .nav-inner {
    padding: 0.75rem 0;
    height: auto;
  }
  .nav-brand {
    font-size: 18px;
  }
}

/* ============================================================
   SECTION 4 — SKIP LINK (WCAG 2.4.1)
============================================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--plum-dark);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  border-radius: 0 0 4px 0;
}
.skip-link:focus { top: 0; }


/* ============================================================
   SECTION 5 — BREADCRUMB
============================================================ */

.breadcrumb {
  padding: 0.5rem 2rem 0 2rem;
  font-size: 0.875rem;
  color: #666666;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
  position: sticky;
  top: var(--nav-height);
  z-index: 99;
  background: var(--white);
}

.breadcrumb-left {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.breadcrumb a {
  color: var(--plum);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-current {
  color: var(--plum-dark);
  font-weight: 500;
}
.site-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-controls-label {
  color: #666666;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.breadcrumb-hint {
  font-size: 0.7rem;
  font-style: italic;
  color: var(--text-secondary);
  position: absolute;
  top: 4px;
  right: 185px;
  white-space: nowrap;
}

/* ============================================================
   SECTION 6 — BUTTONS
============================================================ */

.btn {
  display: inline-block;
  background: var(--plum);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.btn:hover {
  background: linear-gradient(to right, #5C2D6E, #2D6E4E);
}


/* ============================================================
   SECTION 7 — FOOTER
============================================================ */

.site-footer {
  background: linear-gradient(to right, #5C2D6E, #2D6E4E);
  color: #ffffff;
  padding: 1.5rem 2rem;
  margin-top: 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  z-index: 96;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}
.site-footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.site-footer a:hover { color: var(--white); }
.site-footer a {
  display: inline-block;
  padding: 0.25rem 0;
  min-height: 24px;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ============================================================
   SECTION 8 — HERO BANNER
   Used on standalone pages (Home, Privacy, single pages).
============================================================ */

.hero {
  background: var(--plum-dark);
  padding: 1rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 640px;
  margin: 0 auto 2rem;
  font-style: italic;
}


/* ============================================================
   SECTION 9 — SECTION HERO
   Sits above .page-with-sidebar, full width.
   No negative margins needed — it's outside the content area.
============================================================ */

.section-hero {
  background: var(--plum-dark);
  padding: 0.5rem 2rem;
  border-bottom: 2px solid rgba(255,255,255,0.3);
}
.section-wing-name {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}
.section-hero-text {
  margin-left: 2rem;

}
.section-hero-tagline {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 400;
  flex: 0 0 35%;
  margin: 0;
}
.section-hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
  font-style: italic;
  flex: 0 0 25%;
  margin: 0;
}
   
/* ============================================================
   SECTION 10 — PAGE WITH SIDEBAR
   Two-column: sidebar left, content right.
   Used by About, Technology, Science Institute, article pages.
============================================================ */

.page-with-sidebar {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1rem 2rem 4rem 2rem;
  width: 100%;
  box-sizing: border-box;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
}

.sidebar-nav {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-nav a {
  display: block;
  padding: 0.75rem 1rem 0.75rem 2rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.sidebar-nav a:last-child { border-bottom: none; }
.sidebar-nav a:hover {
  background: var(--plum-light);
  color: var(--plum);
}
.sidebar-nav a.active {
  background: var(--plum-light);
  color: var(--plum);
  font-weight: 500;
  border-left: 3px solid var(--plum);
  padding-left: calc(2rem - 3px);
}
.sidebar-nav a.sidebar-parent {
  display: block;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.95rem;
  background: var(--plum-dark);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

.page-content.solo {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
}

@media (max-width: 480px) {
  .page-with-sidebar {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1rem;
  }
  .sidebar { width: 100%; }
  .page-content { padding: 0; }
}


/* ============================================================
   SECTION 11 — PAGE CONTENT TYPOGRAPHY
============================================================ */

.page-content h1 {
  margin-bottom: 2rem;
  color: var(--plum-dark);
  font-size: 2rem;
  font-weight: 500;
  border-bottom: 3px solid var(--plum);
  padding-bottom: 0.75rem;
  display: inline-block;
  width: 100%;
}
.page-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--plum-dark);
  font-size: 1.5rem;
  font-weight: 500;
  border-bottom: 2px solid var(--plum);
  padding-bottom: 0.5rem;
  display: inline-block;
  width: 100%;
}
.page-content p {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}
.page-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.page-content ul li { margin-bottom: 0.5rem; }

.article-tagline {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.article-meta-id {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.article-meta-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--plum);
  color: var(--plum);
}

.article-meta-sciencebacked { border-color: #2D6E5C; color: #2D6E5C; }
.article-meta-evidencebased { border-color: #2D4E6E; color: #2D4E6E; }
.article-meta-lived { border-color: #6E5C2D; color: #6E5C2D; }
.article-meta-community { border-color: #5C6E2D; color: #5C6E2D; }
.article-meta-umnpolicy { border-color: var(--plum); color: var(--plum); }

/* ============================================================
   SECTION 12 — TABLES
============================================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
th {
  background-color: var(--plum);
  color: var(--white);
  text-align: left;
  padding: 12px 15px;
  text-transform: uppercase;
  font-weight: bold;
}
td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-primary);
}
td:first-child {
  white-space: nowrap;
  color: var(--plum);
  font-weight: 500;
  width: 200px;
}
tbody tr:nth-child(even) { background-color: var(--plum-light); }
tbody tr:hover { background-color: var(--border); }


/* ============================================================
   SECTION 13 — CONTENT SECTIONS & CARDS
============================================================ */

.section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section h2 {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--plum-dark);
  margin-bottom: 1rem;
}
.section p {
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  background: var(--white);
}
.card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--plum);
  margin-bottom: 0.5rem;
}
.card p { font-size: 0.95rem; color: var(--text-secondary); }
.card a {
  display: inline-block;
  padding: 0.25rem 0;
  min-height: 24px;
}

/* ============================================================
   SECTION 14 — FOCUS INDICATORS (WCAG 2.4.7)
   White outline + dark plum shadow works on all backgrounds.
   High contrast: yellow outline + black shadow.
============================================================ */

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #3A1A45;
}
.btn:focus,
a.btn:focus,
.nav-links a:focus,
.nav-dropdown a:focus,
.nav-brand:focus,
.nav-hamburger:focus {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.3);
}


/* ============================================================
   SECTION 15 — PROGRESSIVE REVEAL
============================================================ */

.reveal-section {
  display: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-section.animating { display: block; }
.reveal-section.visible { display: block; opacity: 1; transform: translateY(0); }
.reveal-btn {
  display: inline-block;
  margin-top: 2rem;
  background: transparent;
  border: 2px solid var(--plum);
  color: var(--plum);
  padding: 0.65rem 1.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.reveal-btn:hover { background: var(--plum); color: var(--white); }


/* ============================================================
   SECTION 16 — HOME HERO SLIDER
   Used by: layouts/_default/index.html
   4 slides. Mascot circle left, text right.
============================================================ */

.hero-slider-section {
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.slider { max-width: 1100px; margin: 0 auto; }
.slide { display: none; align-items: center; gap: 3rem; min-height: 260px; }
.slide.active { display: flex; animation: slideIn 0.5s ease; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) { .slide.active { animation: none; } }

.slide-mascot {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--plum-light);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum);
  font-size: 0.9rem;
}
.slide-text { flex: 1; }
.slide-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum-mid);
  margin-bottom: 0.5rem;
}
.slide-title {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--plum-dark);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--plum);
  display: inline-block;
}
.slide-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0.75rem 0 1.25rem;
  max-width: 580px;
}

.slider-controls {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.slider-dots { display: flex; gap: 10px; align-items: center; }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  min-width: 10px;
  min-height: 10px;
  transition: background 0.2s, transform 0.2s;
}
.dot.active { background: var(--plum); transform: scale(1.3); }
.slider-arrow {
  background: transparent;
  border: 1.5px solid var(--plum);
  color: var(--plum);
  border-radius: 4px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.slider-arrow:hover { background: var(--plum); color: var(--white); }

@media (max-width: 768px) {
  .slide { flex-direction: column; align-items: flex-start; gap: 1.5rem; min-height: auto; }
  .slide-mascot { width: 120px; height: 120px; align-self: center; }
  .slide-title { font-size: 1.2rem; }
}


/* ============================================================
   SECTION 17 — SECTION SLIDERS
   Used by Science Institute, Technology, About, Obligations.
   All share .sci-slider-controls for controls container.
============================================================ */

.sci-slider { margin-bottom: 1.5rem; }
.sci-slide { display: none; animation: slideIn 0.5s ease; }
.sci-slide.active { display: block; }
.sci-slide h2 { margin-top: 0; }
.sci-slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}
@media (prefers-reduced-motion: reduce) { .sci-slide { animation: none; } }


/* ============================================================
   SECTION 18 — ARTICLE FORMAT TOGGLE
   Three modes: Standard / ND-Friendly / Focus
============================================================ */

.article-format-toggle {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0 0 0;
}
.article-format-hint {
  font-size: 0.85rem;
  color: var(--plum);
  margin: 0.4rem 0 1.5rem 0;
  font-style: italic;
}
.format-btn {
  background: var(--white);
  color: var(--plum-dark);
  border: 1.5px solid var(--plum);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
  position: relative;
}
.format-btn:hover { background: var(--plum-light); }
.format-btn.active {
  background: var(--plum-dark);
  color: var(--white);
  border-color: var(--plum-dark);
}
.format-btn .tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--plum-dark);
  color: var(--white);
  font-size: 0.8rem;
  font-style: italic;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
}
.format-btn:hover .tooltip { display: block; }

.article-content.nd-friendly { line-height: 2; }
.article-content.nd-friendly p { line-height: 2.5; margin-bottom: 1.5rem; }
.article-content.nd-friendly h2,
.article-content.nd-friendly h3 { margin-top: 2.5rem; }

.focus-slider { margin: 1rem 0; }
.focus-section { padding: 1rem 0; }
.focus-controls { margin-top: 1rem; }
.focus-progress {
  font-size: 0.85rem;
  color: var(--white);
  margin-bottom: 0.5rem;
  font-weight: 500;
}


/* ============================================================
   SECTION 19 — HIGH CONTRAST MODE (WCAG 1.4.6)
============================================================ */

html.high-contrast body { background: #000000; color: #ffffff; }
html.high-contrast .page-content,
html.high-contrast .page-content p,
html.high-contrast .page-content h1,
html.high-contrast .page-content h2,
html.high-contrast .page-content h3 { color: #ffffff; letter-spacing: 0.03em; }
html.high-contrast .hero,
html.high-contrast .section { background: #000000; }
html.high-contrast .hero h1,
html.high-contrast .hero p { color: #ffffff; }

html.high-contrast h1,
html.high-contrast h2,
html.high-contrast h3,
html.high-contrast h4,
html.high-contrast p,
html.high-contrast li,
html.high-contrast span,
html.high-contrast td,
html.high-contrast th { color: #ffffff !important; letter-spacing: 0.03em; }

html.high-contrast .card { background: #1a1a1a; border: 1px solid #ffffff; }
html.high-contrast .card h3,
html.high-contrast .card p,
html.high-contrast .card a { color: #ffffff; }
html.high-contrast a { color: #ffffff; text-decoration: underline; }
html.high-contrast .breadcrumb a { color: #ffffff; text-decoration: underline; }
html.high-contrast .breadcrumb-current { color: #ffffff; }
html.high-contrast .sidebar { background: #1a1a1a; border: 1px solid #ffffff; border-radius: 0; }
html.high-contrast .sidebar-nav { border-radius: 0; }
html.high-contrast .sidebar-nav a { color: #ffffff !important; border-color: #ffffff !important; }
html.high-contrast .sidebar-nav a.active,
html.high-contrast .sidebar-nav a:hover { background: #ffffff !important; color: #000000 !important; }
html.high-contrast .sidebar-parent { background: #333333 !important; color: #ffffff !important; }
html.high-contrast .site-footer { background: #1a1a1a; border-top: 1px solid #ffffff; }
html.high-contrast .site-footer a { color: #ffffff; text-decoration: underline; }
html.high-contrast .btn { background: #ffffff !important; color: #000000 !important; border: 2px solid #ffffff !important; }
html.high-contrast .privacy-lead { color: #ffffff; }

html.high-contrast .slide-label,
html.high-contrast .slide-title,
html.high-contrast .slide-tagline { color: #ffffff !important; }
html.high-contrast .slide-title { border-bottom-color: #ffffff !important; }
html.high-contrast .slider-arrow { border-color: #ffffff !important; color: #ffffff !important; }
html.high-contrast .slider-arrow:hover { background: #ffffff !important; color: #000000 !important; }
html.high-contrast .dot { background: #666666 !important; }
html.high-contrast .dot.active { background: #ffffff !important; }
html.high-contrast .reveal-btn { border-color: #ffffff; color: #ffffff; }
html.high-contrast .reveal-btn:hover { background: #ffffff; color: #000000; }
html.high-contrast .focus-progress { color: #ffffff !important; }
html.high-contrast tbody tr:nth-child(even) { background-color: #1a1a1a !important; }
html.high-contrast tbody tr:hover { background-color: #333333 !important; }
html.high-contrast td, html.high-contrast th { border-bottom-color: #444444 !important; }

html.high-contrast a:focus,
html.high-contrast button:focus {
  outline: 3px solid #ffff00 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px #000000 !important;
}


/* ============================================================
   SECTION 20 — PAGE CONTROLS BAR
   Sits below section-hero, above page content.
   Dark plum background matching section-hero.
   Two regions: slider controls (left) and format toggle (right).
   .controls-hidden removes a region when not relevant to page.
============================================================ */

.page-controls {
  background: var(--plum-dark);
  padding: 0.3rem 2rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  position: sticky;
  top: calc(var(--nav-height) + var(--breadcrumb-height));
  z-index: 98;
}

.page-controls-label {
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.page-controls-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.controls-slider {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.controls-format {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.controls-hidden {
  display: none;
}

.page-controls .slider-arrow {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.page-controls .slider-arrow:hover {
  background: rgba(255,255,255,0.15);
}

.page-controls .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  min-width: 8px;
  min-height: 8px;
  transition: background 0.2s, transform 0.2s;
}
.page-controls .dot.active {
  background: #ffffff;
  transform: scale(1.3);
}

.page-controls .format-btn {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.page-controls .format-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
}
.page-controls .format-btn.active {
  background: rgba(255,255,255,0.2);
  color: #ffffff;
  border-color: #ffffff;
}

/* Privacy banner — home page */
.privacy-banner {
  background: var(--plum-light);
  max-width: 100%;
  padding: 4rem 2rem;
}
.privacy-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.slider-arrow-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
/* Utility */
.is-hidden { display: none; }

/* Site controls — light background overrides */
.site-controls .font-btn {
  background: transparent;
  border: 1px solid var(--plum);
  color: var(--plum);
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  min-width: 24px;
  min-height: 24px;
  padding: 0.2rem 0.4rem;
}
.site-controls .font-btn:nth-child(2) { font-size: 11px; }
.site-controls .font-btn:nth-child(3) { font-size: 14px; }
.site-controls .font-btn:nth-child(4) { font-size: 17px; }
.site-controls .font-btn:hover { background: var(--plum-light); }
.site-controls .font-btn-active { background: var(--plum-light) !important; border-color: var(--plum) !important; }
.site-controls .contrast-btn {
  background: transparent;
  border: 1px solid var(--plum);
  color: var(--plum);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  min-width: 24px;
  min-height: 24px;
  padding: 0.2rem 0.4rem;
}
.site-controls .contrast-btn:hover { background: var(--plum-light); }
.site-controls .contrast-btn-active { background: var(--plum-light) !important; border-color: var(--plum) !important; }

/* ============================================================
   SECTION 21 — ROLODEX
   Fixed bottom, horizontal scroll, collapse toggle.
   Loads open. Wing accent color via --card-accent CSS variable.
   Collapse toggle labeled "Explore ∧" / "Explore ∨".
============================================================ */

.rolodex {
  position: fixed;
  bottom: var(--footer-height);
  left: 0;
  right: 0;
  z-index: 97;
  background: var(--plum-dark);
  border-top: 2px solid rgba(255,255,255,0.2);
}

.rolodex-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 1.5rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.rolodex-toggle:hover { color: var(--white); }

.rolodex-toggle-icon {
  font-size: 10px;
  transition: transform 0.2s;
}

.rolodex.collapsed .rolodex-toggle-icon {
  transform: rotate(180deg);
}

.rolodex-inner {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 300px;
}

.rolodex.collapsed .rolodex-inner {
  max-height: 0;
}

.rolodex-track {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 1.5rem 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.rolodex-card {
  flex-shrink: 0;
  width: calc(25% - 0.75rem);
  background: var(--plum-light);
  border: 2px solid var(--card-accent, var(--plum));
  border-radius: 6px;
  padding: 0.5rem;
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.rolodex-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.rolodex-card-wing {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--card-accent, var(--plum));
  padding-right: 3rem;
}

.rolodex-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--plum-dark);
  padding-bottom: 0.4rem;
  margin-bottom: 0.1rem;
  border-bottom: 2px solid var(--card-accent, var(--plum));
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.rolodex-card-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.rolodex-card-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--card-accent, var(--plum));
  border: 1px solid var(--card-accent, var(--plum));
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.rolodex-toggle-label-closed { display: none; }
.rolodex.collapsed .rolodex-toggle-label-open { display: none; }
.rolodex.collapsed .rolodex-toggle-label-closed { display: inline; }

/* High contrast overrides */
html.high-contrast .rolodex { background: #000000; border-top-color: #ffffff; }
html.high-contrast .rolodex-toggle { color: #ffffff; }
html.high-contrast .rolodex-card { background: #1a1a1a; border-color: #ffffff; }
html.high-contrast .rolodex-card-wing,
html.high-contrast .rolodex-card-title,
html.high-contrast .rolodex-card-desc { color: #ffffff; }
html.high-contrast .rolodex-card-badge { color: #ffffff; border-color: #ffffff; }


/* ============================================================
    SECTION 22 — MOBILE FINAL OVERRIDES
============================================================ */

@media (max-width: 768px) {
  .rolodex-track {
    flex-direction: column;
    overflow-x: visible;
    gap: 0;
  }
  .rolodex-card {
    width: 100%;
    min-height: unset;
    padding: 0.6rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: none;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
  .rolodex-card-wing {
    padding-right: 0;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 9px;
  }
  .rolodex-card-title {
    font-size: 0.8rem;
    border-bottom: none;
    padding-bottom: 0;
    margin: 0;
    flex: 1;
  }
  .rolodex-card-desc,
  .rolodex-card-badge {
    display: none;
  }
}
