/* ─────────────────────────────────────────────
   Wakandi Investor Room — styles.css
   Wakandi Brand Design System
───────────────────────────────────────────── */

:root {
  /* PRIMARY — teal family */
  --teal:               #057573;
  --teal-dark:          #045e5c;
  --teal-light:         #178482;
  --teal-gradient-end:  #41b2b0;

  /* SECONDARY */
  --yellow:             #e6c120;
  --yellow-light:       #f1d131;
  --terracotta:         #c75a43;
  --terracotta-light:   #ef7357;
  --navy:               #364856;
  --navy-dark:          #1f2e3a;

  /* NEUTRALS */
  --cream:              #fbf6f6;
  --cream-dark:         #f0e9e9;
  --gray-light:         #eaeaea;
  --charcoal:           #1a1a1a;
  --body-text:          #3a3a3a;
  --muted:              #6b6b6b;

  /* TYPE */
  --display: "Raleway", sans-serif;
  --body:    "Roboto", sans-serif;

  /* APP SHELL */
  --sidebar-width:           240px;
  --mobile-topbar-height:    56px;
  --sidebar-bg:              #ffffff;
  --active-tint:             rgba(5, 117, 115, 0.055);
  --card-bg:                 #ffffff;
  --transition:              0.18s ease;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--body-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; }

/* ─────────────────────────────────────────────
   APP SHELL
───────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--gray-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  z-index: 10;
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo block */
.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo-symbol {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: 16px;
  color: var(--teal-dark);
  letter-spacing: 0.07em;
  line-height: 1;
}

.logo-sub {
  font-family: var(--body);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-top: 4px;
  opacity: 0.8;
}

/* Nav */
.sidebar-nav {
  padding: 20px 0;
  flex: 1;
  overflow-y: auto;
}

.nav-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 0 20px 12px;
  opacity: 0.6;
}

/* display:flex overrides the UA [hidden] rule (same trap as .section-label
   below), so restate it — setNavItemVisible() relies on the attribute. Latent
   until the buyer role: the first role that shows the Company group while
   needing an item inside it hidden. */
.nav-item[hidden] { display: none; }

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 20px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-left: 3px solid transparent;
  text-align: left;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  outline: none;
}

.nav-item:hover {
  background: var(--active-tint);
  color: var(--navy);
}

.nav-item:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.nav-item.active {
  color: var(--navy);
  font-weight: 700;
  background: var(--active-tint);
  border-left-color: var(--teal);
}

.nav-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cream-dark);
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Raleway's lining figures sit ~1px low in a tight line-box; shift up for true optical centering */
  padding-bottom: 2px;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.nav-item.active .nav-num {
  background: var(--teal);
  color: #ffffff;
}

/* Nav collapsible (details/summary) */
.nav-collapsible {
  display: block;
}

.nav-collapsible summary {
  list-style: none;
  cursor: pointer;
}

.nav-collapsible summary::-webkit-details-marker {
  display: none;
}

.nav-collapsible-summary {
  display: flex;
}

.nav-collapsible-chevron {
  display: flex;
  align-items: center;
  margin-left: auto;
  transition: transform var(--transition);
  flex-shrink: 0;
}

details[open] .nav-collapsible-chevron {
  transform: rotate(180deg);
}

.nav-collapsible-items {
  padding-left: 8px;
}

.nav-item--sub {
  font-size: 14px;
  font-weight: 500;
  padding: 9px 20px 9px 28px;
  color: var(--muted);
}

.nav-item--sub.active {
  color: var(--navy);
  font-weight: 600;
  background: var(--active-tint);
  border-left-color: var(--teal);
}

.nav-item--sub2 {
  font-size: 13px;
  font-weight: 400;
  padding: 7px 20px 7px 44px;
  color: var(--muted);
}

.nav-item--sub2.active {
  color: var(--navy);
  font-weight: 600;
  background: var(--active-tint);
  border-left-color: var(--teal);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-light);
  font-family: var(--body);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

/* Drawer close (mobile only) */
#drawer-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
}

#drawer-close:hover { color: var(--navy); }
#drawer-close:focus-visible { outline: 2px solid var(--teal); }

/* ─────────────────────────────────────────────
   REPORTS PANEL (secondary sidebar)
───────────────────────────────────────────── */
#reports-panel {
  width: 200px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--gray-light);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 0 20px;
  animation: reportsPanelIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: width 0.2s ease;
}

#reports-panel[hidden] { display: none; }

#reports-panel.dataroom-panel {
  width: 280px;
}

@keyframes reportsPanelIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.reports-panel-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 16px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.reports-panel-item:hover {
  background: var(--active-tint);
}

.reports-panel-item:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.reports-panel-item.active {
  background: var(--active-tint);
  border-left-color: var(--teal);
}

.reports-panel-item-quarter {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.reports-panel-item-label {
  font-family: var(--body);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.reports-panel-item.active .reports-panel-item-quarter {
  color: var(--teal-dark);
}

.reports-panel-type-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 4px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Data Room tree inside reports panel */
#reports-panel .dataroom-tree {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}

#reports-panel .dataroom-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: none;
  font-family: var(--body);
  font-size: 13.5px;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

#reports-panel .dataroom-tree-item:hover {
  background: var(--active-tint);
}

#reports-panel .dataroom-tree-item.is-active {
  background: var(--active-tint);
  color: var(--teal-dark);
  font-weight: 600;
}

#reports-panel .dataroom-tree-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#reports-panel .dataroom-tree-count {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--muted);
}

#reports-panel .nav-label {
  padding: 0 16px 12px;
}

/* ─────────────────────────────────────────────
   SHAREHOLDER COMMUNICATION — INDEX PAGE
───────────────────────────────────────────── */
.comm-type-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.comm-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--active-tint);
  border-radius: 10px;
  color: var(--teal);
  margin-top: 2px;
}

.comm-type-label {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.comm-type-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.comm-empty-state {
  font-size: 14px;
  color: var(--muted);
  padding: 12px 0 2rem;
  font-style: italic;
}

.letter-pdf-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  background: rgba(5, 117, 115, 0.1);
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--display);
  letter-spacing: 0.05em;
  border-radius: 4px;
  vertical-align: middle;
}

/* ─────────────────────────────────────────────
   PDF VIEWER
───────────────────────────────────────────── */
.pdf-viewer-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  max-width: 1400px;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-light);
  background: var(--sidebar-bg);
}

.pdf-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-family: var(--body);
  font-weight: 500;
  color: var(--teal-dark);
  background: none;
  border: 1px solid var(--teal-light);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.pdf-toolbar-btn:hover {
  background: var(--active-tint);
  border-color: var(--teal);
}

.pdf-viewer {
  width: 100%;
  height: 80vh;
  min-height: 500px;
  border: none;
  display: block;
}

/* ─────────────────────────────────────────────
   SHAREHOLDER LETTER (email body + attachment)
───────────────────────────────────────────── */
.letter {
  max-width: 1400px;
}

.letter-meta {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.25rem;
}

.letter-prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text, #2E3D3D);
}

.letter-prose p {
  margin: 0 0 1.1rem;
}

.letter-prose strong {
  color: var(--teal-dark);
}

.letter-prose a {
  color: var(--teal);
  text-decoration: underline;
}

.letter-prose ul {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
}

.letter-prose li {
  margin-bottom: 0.4rem;
}

.letter-sign {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--teal-dark);
}

.letter-attachment {
  margin-top: 2.5rem;
}

.letter-attachment-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

/* Letter list (inbox-style message rows on the Communication index) */
.letter-list {
  display: flex;
  flex-direction: column;
  max-width: 880px;
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  overflow: hidden;
}

.letter-msg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0 16px;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--gray-light);
  text-align: left;
  cursor: pointer;
  font-family: var(--body);
  color: var(--body-text);
  transition: background var(--transition);
}

.letter-msg:last-child {
  border-bottom: none;
}

.letter-msg:hover {
  background: var(--active-tint);
}

.letter-msg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  flex-shrink: 0;
}

.letter-msg-main {
  min-width: 0;
}

.letter-msg-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.letter-msg-subject {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
}

.letter-msg-date {
  flex-shrink: 0;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
}

.letter-msg-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.letter-msg-arrow {
  align-self: center;
  color: var(--teal);
  opacity: 0.5;
  transition: opacity var(--transition);
}

.letter-msg:hover .letter-msg-arrow {
  opacity: 1;
}

@media (max-width: 560px) {
  .letter-msg-top {
    flex-direction: column;
    gap: 2px;
  }
  .letter-msg-arrow {
    display: none;
  }
}

/* ─────────────────────────────────────────────
   MAIN CONTENT AREA
───────────────────────────────────────────── */
#main {
  flex: 1;
  overflow-y: auto;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ─────────────────────────────────────────────
   MOBILE TOPBAR
───────────────────────────────────────────── */
#mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--gray-light);
  height: var(--mobile-topbar-height);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 1px 0 var(--gray-light);
}

.mobile-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 15px;
  color: var(--teal-dark);
  letter-spacing: 0.06em;
}

.mobile-logo-wrap img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

#hamburger {
  background: none;
  border: none;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4.5px;
  border-radius: 6px;
}

#hamburger:focus-visible { outline: 2px solid var(--teal); }

.ham-line {
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
  display: block;
  transition: all 0.2s;
}

.ham-line:nth-child(2) { width: 14px; }

/* ─────────────────────────────────────────────
   DRAWER BACKDROP
───────────────────────────────────────────── */
#drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(31, 46, 58, 0.45);
  z-index: 9;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

body.drawer-open #drawer-backdrop { display: block; }
body.drawer-open #sidebar { transform: translateX(0); }

/* ─────────────────────────────────────────────
   VIEWS (data-view)
───────────────────────────────────────────── */
[data-view] {
  flex: 1;
  display: flex;
  flex-direction: column;
}

[data-view][hidden] { display: none; }

/* Fill mode must be backwards, not both: a forwards fill keeps the transform
   applied after the animation, making the section a containing block that
   traps position:fixed overlays (the data-room full-screen viewer) inside it.
   The end keyframe equals the natural state, so releasing it changes nothing
   visually. */
[data-view]:not([hidden]) {
  animation: viewFadeIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────────
   WELCOME VIEW
───────────────────────────────────────────── */
#view-welcome {
  align-items: center;
  justify-content: center;
  padding: 52px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#view-welcome::before {
  content: "";
  position: absolute;
  top: -240px; right: -240px;
  width: 680px; height: 680px;
  background: radial-gradient(circle, var(--teal) 0%, transparent 65%);
  opacity: 0.05;
  filter: blur(60px);
  pointer-events: none;
}

#view-welcome::after {
  content: "";
  position: absolute;
  bottom: -120px; left: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--yellow) 0%, transparent 65%);
  opacity: 0.04;
  filter: blur(60px);
  pointer-events: none;
}

.welcome-eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(5, 117, 115, 0.07);
  border: 1px solid rgba(5, 117, 115, 0.18);
  padding: 6px 16px 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.welcome-eyebrow::before {
  content: "✦";
  font-size: 0.65rem;
}

.welcome-title {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 6px;
}

.welcome-divider {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-light));
  border-radius: 2px;
  margin: 20px auto 22px;
}

.welcome-subtitle {
  position: relative;
  z-index: 1;
  font-family: var(--body);
  font-size: 17px;
  color: var(--muted);
  max-width: 380px;
  line-height: 1.75;
  margin-bottom: 40px;
  font-weight: 300;
}

.welcome-cards {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 620px;
}

.welcome-card {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-bottom: 3px solid var(--gray-light);
  border-radius: 10px;
  padding: 20px 20px 18px;
  width: 136px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-bottom-color 0.2s ease;
  outline: none;
}

.welcome-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(5, 117, 115, 0.12);
  border-bottom-color: var(--teal);
}

.welcome-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.welcome-card-num {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 9px;
}

.welcome-card-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.welcome-card-line {
  width: 22px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-light));
  border-radius: 2px;
  margin-top: 12px;
}

/* ─────────────────────────────────────────────
   PAGE HEADER (content views)
───────────────────────────────────────────── */
.page-header {
  padding: 28px 36px 24px;
  border-bottom: 1px solid var(--gray-light);
  background: var(--sidebar-bg);
  position: sticky;
  top: 0;
  z-index: 5;
  flex-shrink: 0;
}

.page-header > * {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* Pill navigation */
.pill-nav {
  display: flex;
  gap: 7px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;            /* Firefox: hide scrollbar */
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}
.pill-nav::-webkit-scrollbar { display: none; }   /* WebKit: hide scrollbar */

.pill {
  height: 28px;
  padding: 0 14px;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--cream-dark);
  color: var(--muted);
  border: 1px solid var(--gray-light);
  transition: all var(--transition);
  outline: none;
}

.pill:hover { background: var(--gray-light); color: var(--navy); }
.pill:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.pill.active {
  background: var(--teal);
  color: #ffffff;
  border-color: var(--teal);
}

.page-title {
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.8vw, 2.3rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.title-accent {
  display: none;
}

.page-title::after {
  content: '';
  display: block;
  width: 38px;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-light));
  border-radius: 2px;
  margin-top: 12px;
}

/* ─────────────────────────────────────────────
   PAGE BODY
───────────────────────────────────────────── */
.page-body {
  padding: 28px 36px 48px;
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.wip-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #b91c1c;
  color: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 28px;
  font-family: var(--body);
  font-size: 13.5px;
  line-height: 1.55;
}

.wip-banner-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.wip-banner strong {
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

/* Section label */
.section-label {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
/* The `display: flex` above overrides the UA [hidden] rule, so toggling the
   `hidden` attribute in JS wouldn't hide the label without this. */
.section-label[hidden] { display: none; }

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-light);
  max-width: 100%;
}

/* ─────────────────────────────────────────────
   STAT CARDS
───────────────────────────────────────────── */
.stat-row {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  flex: 1;
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  padding: 18px 20px;
  transition: box-shadow 0.2s;
}

.stat-card:hover { box-shadow: 0 4px 18px rgba(5, 117, 115, 0.08); }

.stat-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 7px;
}

.stat-value {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 5px;
}

.stat-sub {
  font-family: var(--body);
  font-size: 13px;
  color: var(--muted);
}

/* ─────────────────────────────────────────────
   TEXT BLOCK
───────────────────────────────────────────── */
.text-block {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 24px;
}

.text-block p {
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--body-text);
  margin-bottom: 14px;
}

.text-block p:last-child { margin-bottom: 0; }

.placeholder-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--cream-dark);
  border: 1px dashed var(--gray-light);
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* ─────────────────────────────────────────────
   TIMELINE
───────────────────────────────────────────── */
.timeline {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  padding: 18px 22px;
  gap: 18px;
  border-bottom: 1px solid var(--cream);
  transition: background 0.15s;
}

.timeline-item:last-child { border-bottom: none; }
.timeline-item:hover { background: var(--active-tint); }

.timeline-year {
  background: var(--teal-dark);
  color: var(--yellow);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.timeline-body { flex: 1; }

.timeline-heading {
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 5px;
}

.timeline-text {
  font-family: var(--body);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─────────────────────────────────────────────
   PROBLEM ITEMS
───────────────────────────────────────────── */
.problem-list { margin-bottom: 24px; }

.problem-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--gray-light);
  align-items: start;
}

.problem-item:last-child { border-bottom: 1px solid var(--gray-light); }

.problem-number {
  font-family: var(--display);
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1;
}

.problem-item:nth-child(1) .problem-number { color: var(--teal); }
.problem-item:nth-child(2) .problem-number { color: var(--terracotta); }
.problem-item:nth-child(3) .problem-number { color: var(--yellow); }

.problem-content h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 9px;
}

.problem-content p {
  font-family: var(--body);
  font-size: 16px;
  color: var(--muted);
  line-height: 1.72;
}

/* ─────────────────────────────────────────────
   SOLUTION CARDS
───────────────────────────────────────────── */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.solution-card {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-top: 3px solid var(--teal);
  border-radius: 10px;
  padding: 22px 22px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.solution-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(5, 117, 115, 0.1);
}

.solution-icon {
  width: 42px;
  height: 42px;
  background: rgba(5, 117, 115, 0.08);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.solution-card h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 9px;
}

.solution-card p {
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.68;
}

/* ─────────────────────────────────────────────
   REVENUE ITEMS
───────────────────────────────────────────── */
.revenue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.revenue-item {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: background 0.15s, box-shadow 0.2s;
}

.revenue-item:hover {
  background: var(--active-tint);
  box-shadow: 0 2px 12px rgba(5, 117, 115, 0.06);
}

.revenue-icon {
  width: 40px;
  height: 40px;
  background: rgba(230, 193, 32, 0.12);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.revenue-content h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 7px;
}

.revenue-content p {
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.68;
}

/* ─────────────────────────────────────────────
   RESPONSIVE — MOBILE
───────────────────────────────────────────── */
@media (max-width: 900px) {

  #reports-panel { display: none !important; }

  #sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(-100%);
    z-index: 10;
    box-shadow: 4px 0 28px rgba(31, 46, 58, 0.18);
  }

  #drawer-close { display: block; }
  #mobile-topbar { display: flex; }

  /* Welcome */
  #view-welcome { padding: 36px 24px 48px; }
  .welcome-cards { gap: 10px; }
  .welcome-card { width: calc(50% - 5px); min-width: 130px; }

  /* Content pages */
  .page-header {
    padding: 18px 20px 16px;
    position: static;
  }

  .page-body { padding: 20px 20px 40px; }

  .stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card:nth-child(3) {
    grid-column: span 2;
  }

  .problem-item {
    grid-template-columns: 56px 1fr;
    gap: 16px;
  }

  .problem-number { font-size: 3.2rem; }
  .solution-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .welcome-card { width: 100%; }
  .welcome-cards { flex-direction: column; align-items: stretch; max-width: 300px; }
  .stat-card:nth-child(3) { grid-column: span 1; }
  .stat-row { grid-template-columns: 1fr; }
  .pill-nav { gap: 5px; }
  .pill { font-size: 10px; height: 26px; padding: 0 11px; }
}

/* ─────────────────────────────────────────────
   LOGIN OVERLAY
───────────────────────────────────────────── */
#view-login {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

#view-login[hidden] { display: none; }

/* Ambient glow — mirrors welcome view */
#view-login::before {
  content: "";
  position: fixed;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--teal) 0%, transparent 65%);
  opacity: 0.06;
  filter: blur(60px);
  pointer-events: none;
}

#view-login::after {
  content: "";
  position: fixed;
  bottom: -150px; left: -150px;
  width: 450px; height: 450px;
  background: radial-gradient(circle, var(--yellow) 0%, transparent 65%);
  opacity: 0.05;
  filter: blur(60px);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-radius: 16px;
  padding: 40px 44px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(31, 46, 58, 0.10), 0 4px 16px rgba(31, 46, 58, 0.06);
  animation: viewFadeIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Login logo block ── */
.login-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--gray-light);
}

.login-logo-symbol {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.login-wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: 16px;
  color: var(--teal-dark);
  letter-spacing: 0.07em;
  line-height: 1;
}

.login-sub {
  font-family: var(--body);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-top: 4px;
  opacity: 0.8;
}

/* ── Form state ── */
.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(5, 117, 115, 0.07);
  border: 1px solid rgba(5, 117, 115, 0.15);
  padding: 5px 13px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.login-title {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 10px;
}

.login-body {
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 22px;
  font-weight: 300;
}

.login-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--navy);
  background: var(--cream);
  border: 1.5px solid var(--gray-light);
  border-radius: 9px;
  outline: none;
  display: block;
  margin-bottom: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(5, 117, 115, 0.1);
}

.login-input::placeholder { color: var(--muted); opacity: 0.6; }

.login-input--code {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
}

.login-btn {
  width: 100%;
  height: 46px;
  background: var(--teal);
  color: #ffffff;
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform 0.12s;
}

.login-btn:hover:not(:disabled) { background: var(--teal-dark); }
.login-btn:active:not(:disabled) { transform: scale(0.985); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.login-error {
  margin-top: 10px;
  font-family: var(--body);
  font-size: 13.5px;
  color: var(--terracotta);
  padding: 8px 12px;
  background: rgba(199, 90, 67, 0.07);
  border: 1px solid rgba(199, 90, 67, 0.2);
  border-radius: 7px;
}

/* ── Site-wide banner: admin-managed message line on top of every page ── */
.site-notice {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--terracotta);
  color: #fff;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  padding: 8px 18px;
}

.site-notice--terracotta { background: var(--terracotta); color: #fff; }
.site-notice--navy       { background: var(--navy);       color: #fff; }
.site-notice--teal       { background: var(--teal);       color: #fff; }
.site-notice--yellow     { background: var(--yellow);     color: var(--navy-dark); }

/* ── Sent state ── */
.login-sent-icon {
  display: flex;
  justify-content: center;
  color: var(--teal);
  margin-bottom: 14px;
}

.login-sent-title {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.login-sent-body {
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 22px;
  font-weight: 300;
}

.login-sent-body strong {
  color: var(--navy);
  font-weight: 500;
}

.login-resend {
  background: none;
  border: none;
  color: var(--teal);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-resend:hover { color: var(--teal-dark); }

.login-spam-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 4px;
  text-align: center;
}

/* ── Sidebar footer (with user + logout) ── */
.sidebar-user-name {
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}

.sidebar-user-email {
  font-family: var(--body);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 5px;
  opacity: 0.75;
}

.sidebar-logout {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.65;
  transition: color var(--transition), opacity var(--transition);
  margin-bottom: 8px;
}

.sidebar-logout:hover { color: var(--navy); opacity: 1; }
.sidebar-logout:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.sidebar-copyright {
  font-family: var(--body);
  font-size: 11px;
  color: var(--muted);
  opacity: 0.45;
}

/* ── Login mobile ── */
@media (max-width: 520px) {
  .login-card {
    padding: 28px 24px 32px;
    border-radius: 12px;
  }

  .login-title { font-size: 1.7rem; }
}

/* ─────────────────────────────────────────────
   SIDEBAR — MY ACCOUNT GROUP
───────────────────────────────────────────── */
.nav-divider {
  height: 1px;
  background: var(--gray-light);
  margin: 10px 20px 14px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
  transition: color var(--transition);
}

.nav-item.active .nav-icon {
  color: var(--teal);
}

/* ─────────────────────────────────────────────
   ADMIN SIMULATION PAGE
───────────────────────────────────────────── */
.round-card {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-top: 3px solid var(--yellow);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.round-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.round-card-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.round-card-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(5, 117, 115, 0.08);
  border: 1px solid rgba(5, 117, 115, 0.18);
  padding: 4px 12px;
  border-radius: 20px;
}

.round-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}

.round-card-description {
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
  font-weight: 300;
}

.round-card-metrics {
  display: flex;
  gap: 40px;
}

.round-metric-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 5px;
}

.round-metric-value {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

/* ─────────────────────────────────────────────
   IMPERSONATION BANNER
───────────────────────────────────────────── */
#impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--teal-dark);
  padding: 10px 20px;
  flex-shrink: 0;
}

#impersonation-banner[hidden] { display: none; }

.impersonation-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 13.5px;
  color: rgba(251, 246, 246, 0.85);
}

.impersonation-label strong {
  color: var(--cream);
  font-weight: 600;
}

.impersonation-label svg {
  opacity: 0.75;
  flex-shrink: 0;
  color: var(--cream);
}

.impersonation-exit {
  background: rgba(251, 246, 246, 0.12);
  border: 1px solid rgba(251, 246, 246, 0.25);
  color: var(--cream);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}

.impersonation-exit:hover {
  background: rgba(251, 246, 246, 0.2);
}

/* Impersonate icon button in table */
.th-action {
  width: 36px;
  padding: 12px 8px 12px 14px !important;
}

.td-action {
  padding: 8px 8px 8px 14px !important;
}

.impersonate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--gray-light);
  background: var(--cream);
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.impersonate-btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.impersonate-btn--active {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.impersonate-btn--disabled {
  display: inline-block;
  width: 28px;
  height: 28px;
}

.row-impersonating td {
  background: rgba(5, 117, 115, 0.06) !important;
}

.admin-search-wrap {
  margin-bottom: 20px;
}

.admin-search-input {
  width: 100%;
  max-width: 420px;
  height: 40px;
  padding: 0 14px 0 38px;
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--navy);
  background: var(--card-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 12px center;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(5, 117, 115, 0.1);
}

.admin-search-input::placeholder { color: var(--muted); opacity: 0.6; }

.admin-kpi-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-top: 3px solid var(--teal);
  border-radius: 8px;
  padding: 12px 18px;
  min-width: 140px;
  flex: 1;
}

.admin-kpi-label {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 5px;
}

.admin-kpi-value {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

/* ── Role toggle buttons (admin-users page) ── */

.td-roles {
  white-space: nowrap;
}

.role-btn {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  margin-right: 4px;
  border-radius: 12px;
  border: 1.5px solid var(--gray-light);
  background: var(--cream);
  color: var(--muted);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.role-btn:last-child {
  margin-right: 0;
}

.role-btn:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

.role-btn--active {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.role-btn--active:hover:not(:disabled) {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
}

.role-btn--disabled {
  opacity: 0.4;
  cursor: default;
}

.td-row-status {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 70px;
}

.td-row-status--error {
  color: #e74c3c;
}

/* ── Invite users (Admin Settings → Users) ────────────────────────────────
   Reuses the existing admin vocabulary: .role-btn geometry for the pills,
   .admin-search-input for the email field. No new component language. */

.invite-card {
  padding: 18px 20px;
  margin-bottom: 20px;
  background: var(--cream);
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
}

.invite-card-title {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.invite-card-intro {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  max-width: 60ch;
}

.invite-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.invite-email-input {
  max-width: 280px;
  padding-left: 14px;
  background-image: none;
}

.invite-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.invite-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1.5px solid var(--gray-light);
  background: var(--card-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.invite-role:hover { border-color: var(--teal); color: var(--teal); }
.invite-role input { accent-color: var(--teal); cursor: pointer; }

.invite-btn {
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.invite-btn:hover:not(:disabled) { background: var(--teal-dark); }
.invite-btn:disabled { opacity: 0.5; cursor: default; }

.invite-result {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.invite-result--ok    { color: var(--teal); }
.invite-result--error { color: var(--terracotta); }

.td-invite-status {
  font-size: 12px;
  white-space: nowrap;
  min-width: 90px;
}

.invite-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 11px;
  background: rgba(199, 90, 67, 0.12);
  color: var(--terracotta);
  font-size: 11.5px;
  font-weight: 600;
}

.invite-badge--active {
  background: rgba(5, 117, 115, 0.1);
  color: var(--teal);
}

.invite-row-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.invite-mini-btn {
  height: 22px;
  padding: 0 8px;
  border: 1.5px solid var(--gray-light);
  border-radius: 11px;
  background: var(--card-bg);
  color: var(--muted);
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.invite-mini-btn:hover { border-color: var(--teal); color: var(--teal); }
.invite-mini-btn--danger:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* ── Access requests (Admin Settings → Users) ─────────────────────────────
   Same vocabulary as the invite card: .invite-role pills, .invite-btn,
   .invite-mini-btn. Only the per-request layout is new. */

.areq {
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--card-bg);
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
}

.areq-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.areq-name { font-weight: 700; color: var(--navy); font-size: 14px; }
.areq-email, .areq-when { font-size: 12.5px; color: var(--muted); }
.areq-field { font-size: 13px; margin-top: 6px; overflow-wrap: anywhere; }
.areq-field span { color: var(--muted); }

.areq-label {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.areq-search { max-width: 280px; padding-left: 14px; background-image: none; margin-bottom: 6px; }
.areq-holdings { display: flex; flex-wrap: wrap; gap: 4px; }
.areq-hint { font-size: 11px; color: var(--teal); margin-left: 4px; }
.areq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.areq-empty { font-size: 13px; color: var(--muted); font-style: italic; }
.areq-recent-row { font-size: 12.5px; color: var(--muted); padding: 3px 0; }

/* Access-pending gate on the login card */
.pending-input { margin-bottom: 10px; }
.pending-textarea { height: auto; min-height: 72px; resize: vertical; font-family: var(--body); line-height: 1.4; }
#login-pending-state .login-resend { margin-top: 14px; }

/* ── Data room ─────────────────────────────────────────────────────────────
   Buyer-facing browser + admin panel. Same vocabulary as the invite card and
   admin tables — rows, mini buttons, teal accents. */

.dataroom-intro {
  font-size: 14px;
  color: var(--muted);
  max-width: 64ch;
  margin: 0 0 20px;
}

.dataroom-layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

/* Left-hand expandable folder tree (also used inside #reports-panel) */
.dataroom-tree {
  flex: 0 0 240px;
  min-width: 0;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
  background: var(--card-bg);
}

.dataroom-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: none;
  font-family: var(--body);
  font-size: 13.5px;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.dataroom-tree-item:hover { background: var(--cream); }

.dataroom-tree-item.is-active {
  background: var(--active-tint);
  color: var(--teal-dark);
  font-weight: 600;
}

.dataroom-tree-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataroom-tree-count {
  flex-shrink: 0;
  min-width: 20px;
  text-align: right;
  font-size: 11.5px;
  color: var(--muted);
}

.dataroom-tree-item.is-active .dataroom-tree-count { color: var(--teal-dark); }

/* Collapsible tree nodes — chevron toggles children, label navigates */
.dataroom-node-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.dataroom-node-row .dataroom-tree-item {
  flex: 1;
  width: auto;
  min-width: 0;
}

.dataroom-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 24px;
  padding: 0;
  margin-left: 6px;
  border: none;
  border-radius: 5px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.dataroom-chevron:hover { color: var(--teal-dark); background: var(--cream); }

.dataroom-chevron svg { transition: transform var(--transition); }

.dataroom-chevron.is-expanded svg { transform: rotate(90deg); }

.dataroom-chevron--spacer { cursor: default; }

.dataroom-tree-children { padding-left: 14px; }

.dataroom-tree-children.is-collapsed { display: none; }

.dataroom-main {
  flex: 1;
  min-width: 0;
}

.dataroom-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.dataroom-crumb {
  border: none;
  background: none;
  padding: 2px 4px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
}

.dataroom-crumb:hover { text-decoration: underline; }
.dataroom-crumb-sep { color: var(--muted); font-size: 13px; }

/* File-browser list: header and rows share one column grid */
.dataroom-list {
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
  background: var(--card-bg);
  overflow: hidden;
}

.dataroom-list-head,
.dataroom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 110px 150px auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.dataroom-list-head {
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 1.5px solid var(--gray-light);
  background: var(--sidebar-bg);
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.dataroom-col { min-width: 0; }

.dataroom-col--name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dataroom-row {
  border: none;
  border-bottom: 1px solid var(--gray-light);
  background: none;
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  font-family: var(--body);
  font-size: 14px;
  color: var(--navy);
  cursor: pointer;
  transition: background var(--transition);
}

.dataroom-row:hover { background: var(--cream); }
.dataroom-row--selected,
.dataroom-row--selected:hover { background: var(--active-tint); }

.dataroom-list > .dataroom-row:last-child,
.dataroom-list > .dataroom-empty:last-child,
.dataroom-list > .dataroom-row:last-of-type { border-bottom: none; }

.dataroom-row-icon { color: var(--teal); display: inline-flex; flex-shrink: 0; }

.dataroom-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataroom-col-muted {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dataroom-open-hint {
  display: inline-flex;
  color: var(--muted);
  opacity: 0;
  transition: opacity var(--transition);
}

.dataroom-row--folder:hover .dataroom-open-hint { opacity: 1; color: var(--teal); }

.dataroom-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.dataroom-action {
  height: 28px;
  padding: 0 12px;
  border: 1.5px solid var(--gray-light);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--teal);
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.dataroom-action:hover { border-color: var(--teal); background: var(--cream); }

/* Right-hand details panel — mirrors the list columns for the selected file */
.dataroom-details {
  flex: 0 0 260px;
  min-width: 0;
  position: sticky;
  top: 16px;
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
  background: var(--card-bg);
  padding: 18px 16px;
}

.dataroom-details-title {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.dataroom-details-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 4px;
}

.dataroom-details-icon {
  display: inline-flex;
  color: var(--teal-light);
  margin-bottom: 12px;
}

.dataroom-details-empty p { margin: 0; }

.dataroom-details-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 14px;
}

.dataroom-details-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--active-tint);
  color: var(--teal);
  margin-bottom: 4px;
}

.dataroom-details-file-icon svg { width: 22px; height: 22px; }

.dataroom-details-file-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
  word-break: break-word;
}

.dataroom-details-file-type {
  font-size: 12px;
  color: var(--muted);
}

.dataroom-details-meta {
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dataroom-details-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.dataroom-details-meta-row dt { color: var(--muted); }

.dataroom-details-meta-row dd {
  margin: 0;
  color: var(--navy);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataroom-details-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dataroom-action--block {
  width: 100%;
  height: 34px;
}

.dataroom-empty,
.dataroom-loading {
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* In-page PDF viewer — same vocabulary as .pdf-viewer-wrap, plus a
   fixed-overlay full-screen mode toggled by class alone so the iframe
   never reloads (its signed URL expires 60s after minting). */

.dataroom-viewer {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
}

.dataroom-viewer[hidden] { display: none; }

.dataroom-viewer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-light);
  background: var(--sidebar-bg);
}

.dataroom-viewer-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.dataroom-viewer-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dataroom-viewer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--teal-light);
  border-radius: 6px;
  background: none;
  color: var(--teal-dark);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.dataroom-viewer-btn:hover {
  background: var(--active-tint);
  border-color: var(--teal);
}

.dataroom-viewer-frame {
  width: 100%;
  height: 78vh;
  min-height: 480px;
  border: none;
  display: block;
}

.dataroom-viewer--fs {
  position: fixed;
  inset: 0;
  z-index: 300;
  margin: 0;
  border: none;
  border-radius: 0;
}

.dataroom-viewer--fs .dataroom-viewer-frame {
  flex: 1;
  height: auto;
  min-height: 0;
}

/* #main is the app's scroll container; body never scrolls */
body.dataroom-viewer-open #main { overflow: hidden; }

/* Admin panel */

.dataroom-admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dataroom-select,
.dataroom-date-input {
  height: 40px;
  padding: 0 10px;
  font-family: var(--body);
  font-size: 13.5px;
  color: var(--navy);
  background: var(--card-bg);
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  outline: none;
}

.dataroom-select:focus,
.dataroom-date-input:focus { border-color: var(--teal); }

.dataroom-file-input { font-size: 13px; max-width: 240px; }

.dra-contents {
  margin: 16px 0 24px;
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
  background: var(--card-bg);
  padding: 8px 0;
}

.dra-folder-row,
.dra-doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  font-size: 13.5px;
  color: var(--navy);
}

.dra-folder-row { font-weight: 700; }
.dra-doc-row:hover, .dra-folder-row:hover { background: var(--cream); }

.dra-version { color: var(--muted); font-weight: 400; }

.dra-log { margin-top: 8px; }

/* Right panel needs a little more room than the browser on wide screens */
@media (max-width: 1180px) {
  .dataroom-details { flex-basis: 224px; }
}

@media (max-width: 900px) {
  .dataroom-layout { flex-direction: column; }
  .dataroom-details {
    position: static;
    flex: none;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .dataroom-list-head,
  .dataroom-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dataroom-col--type,
  .dataroom-col--size,
  .dataroom-col--mod { display: none; }
  .dataroom-row { padding: 10px 12px; }
}

#view-data-room .page-body {
  max-width: 1500px;
}

#view-cap-table .page-body {
  max-width: 1800px;
}

/* Admin tables need room for the role pills + metadata columns */
#view-admin-users .page-body,
#view-access .page-body {
  max-width: 1400px;
}

.page-body:has(.pdf-viewer-wrap) {
  max-width: 1400px;
}

.holdings-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  box-shadow: 0 1px 4px rgba(31, 46, 58, 0.04);
}

.holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--body);
  font-size: 13.5px;
  white-space: nowrap;
}

.holdings-table thead {
  background: var(--navy);
}

.holdings-table th {
  padding: 12px 16px;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(251, 246, 246, 0.65);
  text-align: left;
  border-bottom: none;
}

.holdings-table th.num,
.holdings-table td.num {
  text-align: right;
}

.holdings-table th.col-invest {
  color: var(--yellow);
}

.holdings-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.holdings-table th.sortable:hover {
  color: rgba(251, 246, 246, 0.9);
}

.holdings-table th.sort-active {
  color: #ffffff;
}

.holdings-table th.col-invest.sort-active {
  color: var(--yellow-light);
}

.sort-arrow {
  font-size: 10px;
  opacity: 0.8;
}

.holdings-table td {
  padding: 11px 16px;
  color: var(--body-text);
  border-bottom: 1px solid var(--gray-light);
}

.holdings-table td.col-invest {
  font-family: var(--display);
  font-weight: 700;
  color: var(--teal-dark);
  background: rgba(5, 117, 115, 0.04);
}

.td-contact {
  font-weight: 400;
  color: var(--muted);
  font-family: var(--body);
}

.holdings-table td.td-email {
  color: var(--muted);
  font-size: 13px;
}

.holdings-table tbody tr:last-child td {
  border-bottom: none;
}

.holdings-table tbody tr:hover td {
  background: var(--active-tint);
}

.holdings-table tbody tr:hover td.col-invest {
  background: rgba(5, 117, 115, 0.09);
}

.holdings-table tfoot tr {
  background: var(--navy);
  border-top: 2px solid var(--teal);
}

.holdings-table tfoot td {
  padding: 11px 16px;
  border-bottom: none;
}

.holdings-table tfoot td.tfoot-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.holdings-table tfoot td.tfoot-value {
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cream);
}

.holdings-table tfoot td.col-invest.tfoot-value {
  color: var(--yellow);
  background: rgba(5, 117, 115, 0.15);
}

/* ─────────────────────────────────────────────
   SHAREHOLDER PAGE — HOLDINGS CARDS
───────────────────────────────────────────── */
#view-shareholder .round-card {
  border-top-color: var(--teal);
}

.holdings-note {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  background: var(--cream-dark);
  border-left: 3px solid var(--yellow);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 20px;
}

/* ─────────────────────────────────────────────
   PAYMENT TERMS BANNER (My Information)
───────────────────────────────────────────── */

.payment-terms {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-top: 3px solid var(--teal);
  border-radius: 10px;
  padding: 20px 24px 22px;
  margin-bottom: 28px;
}

.payment-terms-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.payment-terms-kicker {
  font-family: var(--body);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: var(--active-tint);
  border-radius: 20px;
  padding: 4px 10px;
}

.payment-terms-title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}

.payment-terms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.payment-term {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream);
  border-radius: 8px;
  padding: 14px 16px;
}

/* Mini calendar chip: big day over month abbreviation */
.pay-date {
  flex: 0 0 auto;
  width: 52px;
  padding: 7px 0 6px;
  text-align: center;
  background: var(--teal);
  border-radius: 8px;
  color: #fff;
}

.pay-date--late { background: var(--navy); }

.pay-date-day {
  display: block;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.pay-date-month {
  display: block;
  font-family: var(--body);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-top: 3px;
}

.pay-text-title {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 3px;
}

.pay-text-body {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--body-text);
}

.pay-text-body strong { color: var(--navy); }

@media (max-width: 720px) {
  .payment-terms-grid { grid-template-columns: 1fr; }
}

.holdings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.holding-card {
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-top: 3px solid var(--teal);
  border-radius: 10px;
  padding: 22px 24px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.holding-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(5, 117, 115, 0.1);
}

.holding-card-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 8px;
}

/* ─────────────────────────────────────────────
   HOLDING CARD
───────────────────────────────────────────── */

.hcv2-meta {
  font-family: var(--body);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.hcv2-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--gray-light);
  border-radius: 8px;
  overflow: hidden;
}

.hcv2-metric {
  background: var(--cream);
  padding: 11px 12px 9px;
}

.hcv2-metric--full {
  grid-column: span 2;
}

/* Equity holding cards show Shares / Ownership / Invested on one line. */
#shareholder-cards .hcv2-metrics {
  grid-template-columns: repeat(3, 1fr);
}

.hcv2-metric-value {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.hcv2-metric-label {
  font-family: var(--body);
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}

.hcv2-round {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-light);
}

/* Convertible-loan card (Series 1/2) — status row + signing badge */
.cl-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-light);
}

/* Convertible-loan cards always read as yellow (distinct from teal equity cards) */
.holding-card--loan { border-top-color: var(--yellow); }

.cl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  flex: 0 0 auto;
}

.cl-status-text {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}


/* Convertible loans listed at the bottom of an equity holding card */
.hcv2-loans {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-light);
}
.hcv2-loan-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-light);
}
.hcv2-loan-item:last-child { border-bottom: none; padding-bottom: 0; }
.hcv2-loan-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.hcv2-loan-series {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
}
.hcv2-loan-amount {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  color: var(--navy);
  white-space: nowrap;
}
.hcv2-loan-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}
.hcv2-loan-status {
  font-family: var(--body);
  font-size: 12px;
  color: var(--muted);
}
.hcv2-loan-date {
  font-family: var(--body);
  font-size: 11.5px;
  color: var(--muted);
  margin-left: auto;
}

.cl-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 13px;
  color: var(--muted);
  padding: 10px 2px 2px;
}
.cl-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid var(--gray-light);
  border-top-color: var(--yellow);
  border-radius: 50%;
  flex: 0 0 auto;
  animation: cl-spin 0.7s linear infinite;
}
@keyframes cl-spin { to { transform: rotate(360deg); } }

.hcv2-round-header {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 10px;
}

.hcv2-defend-sub {
  font-family: var(--body);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.hcv2-defend-label {
  font-family: var(--body);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 4px;
}

.hcv2-defend {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}

/* ─────────────────────────────────────────────
   HOLDING CARD — ROUND SCENARIO STRIP
───────────────────────────────────────────── */
.hcv2-scenarios .scn-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 6px;
}

/* Single-column layout when the "Do nothing" milestone is hidden. */
.hcv2-scenarios .scn-track--1 { grid-template-columns: 1fr; }

.scn-node {
  position: relative;
  padding: 0;
  text-align: center;
}

/* Each milestone's text sits in its own colour-tinted tile. */
.scn-body {
  position: relative;
  border-radius: 10px;
  padding: 12px 14px 14px;
  border-top: 3px solid var(--gray-light);
}
/* A small stem rising from the tile up to the timeline dot above it. */
.scn-body::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 13px;
  border-radius: 2px 2px 0 0;
  background: var(--gray-light);
}
.scn-node--danger .scn-body { background: rgba(199, 90, 67, 0.04); border-top-color: var(--terracotta); }
.scn-node--good   .scn-body { background: rgba(5, 117, 115, 0.04); border-top-color: var(--teal); }
.scn-node--danger .scn-body::before { background: var(--terracotta); }
.scn-node--good   .scn-body::before { background: var(--teal); }

/* Connector line running through the dot centres. */
.scn-node::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--gray-light);
  z-index: 0;
}
.scn-node:last-child::before { display: none; }

.scn-dot {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 1px var(--gray-light);
}
.scn-node--danger .scn-dot { background: var(--terracotta); }
.scn-node--good   .scn-dot { background: var(--teal); }

.scn-title {
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 8px;
  min-height: 2.4em; /* keep the three figures on one baseline */
}

.scn-figure { margin-bottom: 8px; }

.scn-amount {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.05;
}
.scn-node--good .scn-amount { color: var(--teal); }

.scn-pct-bad {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--terracotta);
  line-height: 1.05;
}

.scn-amount-sub {
  display: block;
  font-family: var(--body);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-top: 3px;
}

.scn-caption {
  font-family: var(--body);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* Equity holding cards are wider than loan cards to fit the scenario strip. */
@media (min-width: 901px) {
  #shareholder-cards.holdings-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(600px, 100%), 1fr));
  }
}

/* Below the strip's comfortable width, stack the tiles into a single column. */
@media (max-width: 560px) {
  .hcv2-scenarios .scn-track {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .scn-node::before { display: none; }
  .scn-title { min-height: 0; }
}


/* ─────────────────────────────────────────────
   MOBILE — SHAREHOLDER & ADMIN PAGES
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .holdings-grid { grid-template-columns: 1fr; }

  .round-card-metrics {
    flex-wrap: wrap;
    gap: 20px;
  }

  .admin-kpi-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .holdings-table-wrap {
    border-radius: 8px;
  }
}

@media (max-width: 520px) {
  /* Holdings cards */
  .holdings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .holding-card {
    padding: 18px 18px 16px;
  }

  /* Round card */
  .round-card {
    padding: 16px 18px;
  }

  .round-card-metrics {
    gap: 16px;
  }

  .round-metric-value {
    font-size: 1.2rem;
  }

  /* Admin KPI */
  .admin-kpi-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .admin-kpi-value {
    font-size: 1.1rem;
  }

  /* Admin search */
  .admin-search-input {
    max-width: 100%;
  }
}

/* ─────────────────────────────────────────────
   MEETING CARDS
───────────────────────────────────────────── */
.meeting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.meeting-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
  background: var(--card-bg);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  text-align: left;
  transition: box-shadow var(--transition), border-color var(--transition);
  font-family: var(--body);
  color: var(--body-text);
}

.meeting-card:hover {
  box-shadow: 0 4px 18px rgba(5, 117, 115, 0.1);
  border-color: var(--teal-light);
}

.meeting-card-date {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  grid-column: 1;
  grid-row: 1;
}

.meeting-card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--charcoal);
  grid-column: 1;
  grid-row: 2;
}

.meeting-card-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 18px;
  color: var(--teal);
  align-self: center;
}

/* ─────────────────────────────────────────────
   VIDEO EMBED (16:9 responsive)
───────────────────────────────────────────── */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: min(56.25%, calc(900px * 0.5625));
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.video-embed iframe,
.video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─────────────────────────────────────────────
   NEXT PAGE LINK (bottom-right of investor pages)
───────────────────────────────────────────── */
.next-page {
  display: flex;
  justify-content: flex-end;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--gray-light);
}
.next-page-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--display);
  color: var(--navy);
  transition: color 0.2s ease;
}
.next-page-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.next-page-title {
  font-size: 1.05rem;
  font-weight: 700;
}
.next-page-arrow {
  font-size: 1.15rem;
  line-height: 1;
  color: var(--teal);
  transform: translateX(0);
  transition: transform 0.2s ease;
}
.next-page-link:hover { color: var(--teal); }
.next-page-link:hover .next-page-arrow { transform: translateX(4px); }

/* ─────────────────────────────────────────────
   MEETING SUMMARY
───────────────────────────────────────────── */
.meeting-section-heading {
  max-width: 900px;
  margin: 32px auto 12px;
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.meeting-summary {
  max-width: 900px;
  margin: 28px auto 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meeting-summary p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

/* ─────────────────────────────────────────────
   KNOWLEDGEBASE ARTICLE
───────────────────────────────────────────── */
.kb-hero {
  margin: 20px 0 24px;
  border-radius: 6px;
  overflow: hidden;
  max-width: 720px;
}

.kb-hero-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.kb-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0 24px;
}

.kb-category {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(5, 117, 115, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
}

.kb-updated {
  font-size: 13px;
  color: var(--muted);
}

.kb-pullquote {
  margin: 24px 0 32px;
  padding: 24px 28px;
  border-left: 4px solid var(--teal);
  background: var(--active-tint);
  border-radius: 0 10px 10px 0;
  max-width: 720px;
}

.kb-pullquote-text {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--navy);
  margin: 0 0 12px;
}

.kb-pullquote-text::before { content: '\201C'; }
.kb-pullquote-text::after  { content: '\201D'; }

.kb-pullquote-attribution {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: normal;
}

.kb-pullquote-attribution cite {
  font-style: italic;
}

.kb-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--body-text);
  max-width: 720px;
  margin-bottom: 28px;
}

.kb-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.kb-fact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--gray-light);
  border-radius: 10px;
  padding: 10px 18px;
  min-width: 100px;
}

.kb-fact-label {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.kb-fact-value {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

.kb-body {
  max-width: 720px;
}

.kb-heading {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 40px 0 12px;
  letter-spacing: -0.02em;
  padding-left: 14px;
  border-left: 3px solid var(--teal);
}

.kb-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--body-text);
  margin-bottom: 16px;
}

/* ─────────────────────────────────────────────
   ACCESSIBILITY — reduced motion
───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─────────────────────────────────────────────
   PRINT
───────────────────────────────────────────── */
/* Floating download-as-PDF button on shareholder report pages */
.report-pdf-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: #00796B;
  color: #fff;
  font: 600 0.95rem/1 'Roboto', system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 95, 86, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.report-pdf-btn:hover {
  background: #005F56;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 95, 86, 0.4);
}
.report-pdf-btn:active { transform: translateY(0); }
.report-pdf-btn svg { flex: none; }
@media (max-width: 600px) {
  .report-pdf-btn { right: 16px; bottom: 16px; padding: 11px 16px; }
}

@media print {
  #sidebar, #reports-panel, #drawer-backdrop, #mobile-topbar,
  .pill-nav, .sidebar-logout, #impersonation-banner,
  .report-pdf-btn { display: none !important; }
  /* The SPA constrains height + clips overflow for scroll containers, which makes
     print stop after the first viewport. Unclamp them so the full report flows. */
  html, body, #app, #main, #main-content, [data-view] {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  #app { display: block !important; }
  #main { margin: 0 !important; flex: none !important; }
  #main-content { padding: 0 !important; }
  body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  @page { size: A4; margin: 14mm 12mm; }

  /* Avoid splitting cards/tables awkwardly across pages. Generic selectors so any
     report's card naming (number-card, msr-number-card, …) is covered. */
  #main-content table,
  #main-content tr,
  #main-content [class*="card"] { break-inside: avoid; }
}

/* ─────────────────────────────────────────────
   LANGUAGE SWITCHER (flags, top-right of each page header)
───────────────────────────────────────────── */
#lang-switch {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

/* The welcome view has no page header — pin to its top-right corner instead */
#view-welcome #lang-switch {
  top: 28px;
  right: 28px;
  transform: none;
}

/* Login gate: pin to the top-right of the overlay */
#view-login #lang-switch {
  position: fixed;
  top: 18px;
  right: 20px;
  transform: none;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.lang-btn:hover { opacity: 0.85; }

.lang-btn--active {
  opacity: 1;
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.lang-btn svg { display: block; }

@media (max-width: 900px) {
  /* .page-header is un-stickied (static) on mobile; relative keeps it the
     positioning anchor for the flags without re-enabling sticky. */
  .page-header { position: relative; }
  #lang-switch { right: 16px; }
}

@media print {
  #lang-switch { display: none !important; }
}
