/* ============================================================
   NittanyIQ Shell — assets/shell.css
   Editorial cream + navy + gold palette
   ============================================================ */

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

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --cream:            #FAF7EE;
  --navy:             #041E42;
  --gold:             #C9A961;
  --gold-bright:      #E4B940;

  --text-primary:     #041E42;
  --text-secondary:   rgba(4, 30, 66, 0.55);
  --text-tertiary:    rgba(4, 30, 66, 0.35);

  --surface:          #ffffff;
  --surface-hover:    #F5F1E8;

  --border:           rgba(4, 30, 66, 0.15);
  --border-strong:    rgba(4, 30, 66, 0.25);
  --hairline:         rgba(4, 30, 66, 0.12);

  --banner-h:  32px;
  --topbar-h:  48px;
  --nav-h:     44px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--text-primary);
  font-family: 'Inter Tight', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Amber Concept Banner ───────────────────────────────── */
.concept-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--banner-h);
  background: #FEF3C7;
  border-bottom: 1px solid #FDE68A;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B45309;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Page body offset ───────────────────────────────────── */
.page-body {
  padding-top: var(--banner-h);
}

/* ── First-visit Splash ─────────────────────────────────── */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4, 30, 66, 0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.splash-overlay.hidden { display: none; }

.splash-card {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  max-width: 480px;
  width: 100%;
  padding: 52px 48px;
}

.splash-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 20px;
}

.splash-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

.splash-btn {
  display: inline-block;
  background: var(--navy);
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s;
}

.splash-btn:hover { background: #0a2d5e; }

/* ── Hub Nav ────────────────────────────────────────────── */
.hub-nav {
  position: sticky;
  top: var(--banner-h);
  z-index: 800;
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
  padding: 0 48px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--nav-h);
}

/* ── Brand Lockup ───────────────────────────────────────── */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}

.brand-shield { flex-shrink: 0; display: block; overflow: visible; }

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
  line-height: 1;
}

/* Light variant — for viewer top bar on navy bg */
.brand-lockup--light .brand-name { color: #ffffff; }
.brand-lockup--light .brand-sub  { color: rgba(255, 255, 255, 0.55); }

.hub-nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.hub-nav a:hover { color: var(--navy); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--navy);
  overflow: hidden;
}

/* Chevron pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 8 L32 20 L20 32 L8 20 Z' fill='none' stroke='rgba(201,169,97,0.08)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  opacity: 1;
}

/* Subtle bottom fade */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(4, 30, 66, 0.3));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 120px 48px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.hero-headline {
  font-family: 'Fraunces', serif;
  font-size: clamp(52px, 8vw, 120px);
  font-weight: 700;
  line-height: 1.0;
  color: #F5F1E8;
  margin-bottom: 32px;
  max-width: 900px;
}

/* "decision" — gold italic emphasis */
.hero-headline em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 17px;
  color: rgba(245, 241, 232, 0.70);
  max-width: 620px;
  line-height: 1.65;
  margin-bottom: 48px;
}

.hero-rule {
  border: none;
  border-top: 1px solid rgba(201, 169, 97, 0.25);
  margin-bottom: 36px;
  max-width: 860px;
}

.stat-strip {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 700;
  color: #F5F1E8;
  line-height: 1;
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(245, 241, 232, 0.45);
  text-transform: uppercase;
}

/* ── Section Wrapper ────────────────────────────────────── */
.hub-section {
  padding: 80px 48px;
  border-bottom: 1px solid var(--hairline);
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Ecosystem intro (§02) ──────────────────────────────── */
.section-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section-h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.2;
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.section-blurb {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.65;
  padding-top: 8px;
}

/* ── Department Bands ───────────────────────────────────── */
.dept-band {
  padding: 0;
  border-bottom: 1px solid var(--hairline);
}

.dept-band-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* Accordion trigger */
.dept-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 48px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.dept-header:hover {
  background: rgba(4, 30, 66, 0.03);
}

/* Department icon */
.dept-icon {
  flex-shrink: 0;
  align-self: center;
  display: block;
  margin-top: 2px;
}

/* Chevron */
.dept-chevron {
  font-size: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
  padding-top: 14px;
  transition: transform 0.25s ease, color 0.15s;
  line-height: 1;
}

.dept-band.is-open .dept-chevron {
  transform: rotate(90deg);
  color: var(--navy);
}

/* Collapsible card area */
.dept-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}

.dept-body-inner {
  padding: 0 48px 56px;
}

.dept-header-left {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* Department number — gold italic */
.dept-num {
  font-family: 'Fraunces', serif;
  font-size: 68px;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  margin-top: -6px;
}

.dept-label-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.dept-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}

.dept-name {
  font-family: 'Fraunces', serif;
  font-size: 42px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}

.dept-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  white-space: nowrap;
  padding-top: 14px;
  flex-shrink: 0;
}

/* ── Card Grid ──────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ── Module Card ────────────────────────────────────────── */
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease;
}

/* Top stripe reveal on hover */
.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 169, 97, 0.50);
  box-shadow: 0 6px 24px rgba(201, 169, 97, 0.18);
}

.module-card:hover::before {
  transform: scaleX(1);
}

.module-card-body {
  padding: 24px 24px 16px;
  flex: 1;
}

.module-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.module-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.module-name {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 10px;
}

.module-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.module-card-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.module-footer-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.module-open {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--navy);
  font-weight: 500;
}

/* ── Featured card — Master Hub ─────────────────────────── */
.module-card.featured {
  grid-column: span 2;
  background: #F5F1E8;
  border-color: rgba(201, 169, 97, 0.40);
}

.module-card.featured::before {
  background: var(--gold);
}

.module-card.featured .module-name        { color: var(--navy); }
.module-card.featured .module-desc        { color: var(--text-secondary); }
.module-card.featured .module-tag         { color: var(--text-tertiary); }
.module-card.featured .module-card-footer { border-color: var(--hairline); }
.module-card.featured .module-footer-label{ color: var(--text-tertiary); }
.module-card.featured .module-open        { color: var(--gold); }
.module-card.featured:hover {
  background: #EDE9DF;
  border-color: rgba(201, 169, 97, 0.65);
}

/* ── Closer ─────────────────────────────────────────────── */
.closer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 100px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.closer-quote {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 2.5vw, 34px);
  font-style: italic;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.45;
}

.closer-quote em { color: var(--gold); }

.closer-meta { text-align: right; }

.closer-meta p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  line-height: 2.2;
}

.closer-meta .meta-accent { color: var(--gold); margin-top: 12px; }

/* ── Hub Footer ─────────────────────────────────────────── */
.hub-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-footer p,
.hub-footer a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-decoration: none;
}

.hub-footer a:hover { color: var(--navy); }

/* ── Viewer top bar ─────────────────────────────────────── */
.viewer-bar {
  position: fixed;
  top: var(--banner-h);
  left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 900;
  border-bottom: 1px solid rgba(201, 169, 97, 0.25);
}

.viewer-bar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.viewer-back {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.60);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s;
}

.viewer-back:hover { color: #ffffff; }

.viewer-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.viewer-meta { min-width: 0; }

.viewer-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 3px;
}

.viewer-title {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

/* "CONCEPT" badge — gold pill on viewer bar */
.concept-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--navy);
  background: var(--gold);
  border: none;
  border-radius: 2px;
  padding: 5px 12px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ── Viewer iframe ──────────────────────────────────────── */
.viewer-frame {
  position: fixed;
  top: calc(var(--banner-h) + var(--topbar-h));
  left: 0; right: 0; bottom: 0;
  border: none;
  width: 100%;
  height: calc(100vh - var(--banner-h) - var(--topbar-h));
}

/* ── About page ─────────────────────────────────────────── */
.about-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 48px 120px;
}

.about-h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 40px;
}

.about-h2 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 48px;
  margin-bottom: 12px;
}

.about-p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-rule {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 44px 0;
}

.about-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  line-height: 2.2;
}

/* ── Role Modal ─────────────────────────────────────────── */
.role-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: rgba(4, 30, 66, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.role-modal-overlay.hidden { display: none; }

.role-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  max-width: 600px;
  width: 100%;
  padding: 48px 44px 40px;
}

.role-modal-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 8px;
}

.role-modal-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.role-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.role-card:hover {
  background: #F5F1E8;
  border-color: var(--gold);
  transform: translateY(-2px);
}

.role-card-name {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  display: block;
}

.role-card-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  display: block;
  line-height: 1.4;
}

/* ── Nav Controls (hub only) ────────────────────────────── */
.nav-controls {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ── Note Button ────────────────────────────────────────── */
.note-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.note-btn:hover {
  border-color: var(--gold);
  color: var(--navy);
}

/* ── Bell Button ────────────────────────────────────────── */
.bell-wrap { position: relative; }

.bell-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: var(--navy);
  display: flex;
  align-items: center;
  line-height: 1;
}

.bell-badge {
  position: absolute;
  top: 0; right: 0;
  min-width: 16px;
  height: 16px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.bell-badge.hidden { display: none; }

/* ── Notification Panel ─────────────────────────────────── */
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(4, 30, 66, 0.15);
  z-index: 850;
  overflow: hidden;
}

.notif-panel.hidden { display: none; }

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--hairline);
}

.notif-panel-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--navy);
}

.notif-mark-all {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.notif-mark-all:hover { color: var(--gold); }

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  align-items: flex-start;
}

.notif-item:last-child { border-bottom: none; }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 4px;
}

.notif-item.is-read .notif-dot {
  background: var(--hairline);
}

.notif-body { flex: 1; min-width: 0; }

.notif-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.notif-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.notif-category--note { color: var(--gold); }

.notif-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.notif-text {
  font-size: 12.5px;
  color: var(--navy);
  line-height: 1.45;
}

.notif-item.is-read .notif-text { color: var(--text-secondary); }

/* Notes — subtle warm tint */
.notif-note-item { background: #FFFBF0; }

.notif-empty {
  padding: 20px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Role Pill ──────────────────────────────────────────── */
.role-wrap { position: relative; }

.role-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.role-pill:hover {
  background: var(--surface-hover);
  border-color: var(--gold);
}

/* ── Role Dropdown ──────────────────────────────────────── */
.role-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(4, 30, 66, 0.15);
  z-index: 850;
  overflow: hidden;
}

.role-dropdown.hidden { display: none; }

.role-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s;
}

.role-option:last-child { border-bottom: none; }
.role-option:hover { background: var(--surface-hover); }

.role-option.is-active {
  background: #FFFBF0;
  border-left: 2px solid var(--gold);
}

.role-option-name {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

.role-option-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* ── Note Compose Panel ─────────────────────────────────── */
.note-compose {
  position: fixed;
  top: calc(var(--banner-h) + var(--nav-h) + 10px);
  right: 16px;
  width: 300px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(4, 30, 66, 0.15);
  z-index: 850;
  overflow: hidden;
}

.note-compose.hidden { display: none; }

.note-compose-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px 9px;
  border-bottom: 1px solid var(--hairline);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--navy);
}

.note-char-count {
  font-size: 9px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.note-textarea {
  width: 100%;
  height: 100px;
  padding: 12px 14px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px;
  color: var(--navy);
  background: var(--cream);
  border: none;
  border-bottom: 1px solid var(--hairline);
  resize: none;
  outline: none;
  line-height: 1.5;
}

.note-textarea::placeholder { color: var(--text-tertiary); }

.note-compose-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
}

.note-visibility {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 6px;
  cursor: pointer;
  outline: none;
}

.note-post-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: var(--navy);
  border: none;
  border-radius: 2px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.note-post-btn:hover { background: #0a2d5e; }

/* ── Live Ticker ────────────────────────────────────────── */
.ticker-wrap {
  overflow: hidden;
  background: var(--navy);
  border-top: 1px solid var(--gold);
  height: 36px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}

.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(250, 247, 238, 0.80);
  padding: 0 20px;
}

.ticker-item strong {
  color: var(--gold);
  font-weight: 500;
}

.ticker-sep {
  color: var(--gold);
  font-size: 10px;
  flex-shrink: 0;
  opacity: 0.6;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── About: directory-only variant ─────────────────────── */
.about-wrap--directory {
  padding-top: 72px;
  padding-bottom: 120px;
}

.about-back-link {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.about-back-link a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--navy);
  text-decoration: none;
  transition: color 0.15s;
}

.about-back-link a:hover { color: var(--gold); }

/* ── About: Module Directory ────────────────────────────── */
.about-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.about-directory {
  margin-top: 0;
}

.dir-dept {
  margin-top: 44px;
}

.dir-dept-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.dir-dept-num {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.dir-dept-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dir-dept-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1;
}

.dir-dept-name {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  margin: 0;
}

.dir-list {
  list-style: none;
  border-top: 1px solid rgba(4, 30, 66, 0.10);
}

.dir-item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 6px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(4, 30, 66, 0.10);
  line-height: 1.5;
}

.dir-module-name {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s;
}

.dir-module-name:hover {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.dir-module-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hub-nav        { padding: 0 20px; gap: 20px; }
  .hero-inner     { padding: 60px 20px 48px; }
  .hub-section    { padding: 48px 20px; }
  .dept-name      { font-size: 28px; }
  .dept-num       { font-size: 48px; }
  .dept-header    { padding: 28px 20px; flex-direction: column; gap: 8px; }
  .dept-body-inner{ padding: 0 20px 40px; }
  .card-grid      { grid-template-columns: 1fr; }
  .module-card.featured { grid-column: span 1; }
  .closer         { grid-template-columns: 1fr; gap: 40px; padding: 60px 20px; }
  .closer-meta    { text-align: left; }
  .hub-footer     { padding: 24px 20px; flex-direction: column; text-align: center; }
  .about-wrap     { padding: 48px 20px 80px; }
  .viewer-bar     { padding: 0 16px; }
  .viewer-title   { font-size: 14px; }
  .section-row    { flex-direction: column; }
  .concept-banner { font-size: 8.5px; }
}

@media (max-width: 600px) {
  .role-grid      { grid-template-columns: 1fr 1fr; }
  .nav-controls   { gap: 6px; }
  .role-pill      { font-size: 8.5px; padding: 4px 8px; }
  .brand-sub      { display: none; }
  .hub-nav .nav-about  { display: none; }
  .hub-nav .nav-dept   { display: none; }
  .concept-banner { font-size: 8px; letter-spacing: 0.06em; }
}
