/* ════════════════════════════════════════════════════════════
   TRW WEBSITE · funds.css · v1
   Page-specific styles for screener, fund detail, compare, watchlist.
   Inherits all tokens + utilities from main.css.
   ════════════════════════════════════════════════════════════ */

/* ── HEADER ADDITIONS · auth toggle + watchlist + search ─── */
.site-cta { gap: 14px; }
.cta-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  color: var(--ink);
}
.cta-icon-btn:hover { border-color: var(--rule-strong); background: var(--signal-soft); }
.cta-icon-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.cta-icon-btn .badge-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--signal);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  line-height: 1.3;
  display: none;
}
.cta-icon-btn .badge-count.visible { display: inline-block; }

.auth-state {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.auth-state .who { color: var(--signal-deep); font-weight: 600; }
.auth-state.logged-in .signin { display: none; }
.auth-state:not(.logged-in) .who-block,
.auth-state:not(.logged-in) .signout { display: none; }
.auth-state .signin {
  padding: 5px 14px;
  border: 1px solid var(--rule-strong);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: transparent;
  color: var(--ink-soft);
}
.auth-state .signin:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--signal-soft);
}
.auth-state .signin:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* ── NAV DROPDOWN ─────────────────────────────────────────
   Hover-intent panels. js/main.js adds .is-open with a close
   delay, so the cursor can travel into the panel without it
   closing; :focus-within is the keyboard / no-JS fallback. */
.nav-item { position: relative; }

/* trigger caret — a clean chevron that flips when the menu opens */
.nav-item.has-dropdown > a::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 8px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-item.has-dropdown:hover > a::after { opacity: 0.85; }
.nav-item.has-dropdown.is-open > a::after {
  opacity: 0.9;
  transform: translateY(1px) rotate(-135deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -18px;
  background: var(--paper-card);
  border: 1px solid var(--ink);
  min-width: 236px;
  padding: 6px;
  z-index: 110;
  box-shadow: var(--shadow-pop);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-7px);
  transition: opacity 0.18s ease, transform 0.18s ease,
              visibility 0s linear 0.18s;
}
/* transparent bridge over the seam — the hover chain never breaks */
.nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -14px;
  height: 14px;
}
.nav-item.has-dropdown.is-open .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

/* the Tools panel — js tags 7+ item menus .nav-dropdown--wide */
.nav-dropdown--wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 484px;
}

.nav-dropdown a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: none;
  transition: background 0.13s ease, color 0.13s ease;
}
.nav-dropdown a:hover { background: var(--signal-soft); color: var(--signal-deep); }
.nav-dropdown a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
}
.nav-dropdown a .count {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--signal);
  color: var(--paper);
  padding: 1px 7px;
  border-radius: 8px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown,
  .nav-item.has-dropdown.is-open .nav-dropdown,
  .nav-item.has-dropdown:focus-within .nav-dropdown,
  .nav-item.has-dropdown > a::after { transition: none; }
}

@media (max-width: 1320px) {
  .nav-dropdown {
    position: static;
    border: none;
    box-shadow: none;
    padding: 2px 0 6px 2px;
    background: transparent;
    min-width: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
    display: block;
  }
  .nav-dropdown--wide {
    grid-template-columns: 1fr;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .nav-dropdown::before { display: none; }
  .nav-item.has-dropdown > a { padding-bottom: 6px; }
  .nav-dropdown a {
    padding: 11px 24px;
    border-bottom: 1px solid var(--rule);
    white-space: normal;
  }
  .site-nav {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

/* ── AUTH MODAL ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 42, 58, 0.55);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}
.modal-backdrop.open { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--paper);
  border: 1px solid var(--ink);
  max-width: 480px;
  width: 100%;
  padding: 36px 32px 28px;
  position: relative;
  box-shadow: var(--shadow-pop);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--neutral-grey);
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); }

.modal h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "opsz" 80;
  margin-bottom: 8px;
}
.modal p.lede {
  font-size: 14.5px;
  margin-bottom: 24px;
  font-style: italic;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 60;
  line-height: 1.5;
}

.auth-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-option {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-card);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
  width: 100%;
  font-family: var(--sans);
}
.auth-option:hover { border-color: var(--ink); background: var(--paper-warm); }
.auth-option-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  font-variation-settings: "SOFT" 40, "opsz" 60;
  color: var(--ink);
  margin-bottom: 4px;
}
.auth-option-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ── Auth modal: sign-in form ──────────────────────────── */
.auth-option--signin {
  cursor: default;
}
.auth-option--signin:hover {
  border-color: var(--rule-strong);
  background: var(--paper-card);
}
.auth-signin-field {
  margin-top: 10px;
}
.auth-email-input,
.auth-password-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.auth-email-input::placeholder,
.auth-password-input::placeholder {
  color: var(--neutral-grey);
  font-style: italic;
}
.auth-email-input:focus,
.auth-password-input:focus {
  border-color: var(--ink);
}
.auth-signin-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  align-items: center;
}
.auth-send-btn {
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.auth-send-btn:hover {
  opacity: 0.85;
}
.auth-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.auth-forgot-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color 0.15s;
}
.auth-forgot-btn:hover {
  color: var(--ink);
}
.auth-forgot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.auth-signin-status {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  line-height: 1.5;
  margin-top: 8px;
  min-height: 1.5em;
}
.auth-signin-status--success {
  color: var(--signal-deep);
}
.auth-signin-status--error {
  color: #9e2a2b;
}

/* ── SCREENER · /funds.html ───────────────────────────── */
.screener-hero {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--ink);
  padding: clamp(24px, 3.5vw, 36px) 0 clamp(20px, 3vw, 28px);
}
.screener-hero-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
@media (max-width: 720px) {
  .screener-hero-row { grid-template-columns: 1fr; gap: 16px; }
}
.screener-hero h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin-bottom: 4px;
  line-height: 1.05;
}
.screener-hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 1.1vw, 16px);
  color: var(--ink-soft);
  font-variation-settings: "SOFT" 60;
  margin: 0;
}
.screener-hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-grey);
}
@media (max-width: 480px) {
  .screener-hero-meta { gap: 12px 18px; font-size: 10px; }
  .screener-hero-meta strong { font-size: 17px; }
}
.screener-hero-meta strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-right: 4px;
}

.screener-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0 80px;
}
@media (max-width: 1024px) {
  .screener-shell { grid-template-columns: 1fr; }
}

.screener-filters {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  padding: 18px 16px;
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}
.screener-filters .filter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}
.screener-filters .filter-head h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.screener-filters .filter-reset {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal-deep);
  cursor: pointer;
  background: none;
  border: none;
}
.filter-group {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--rule);
}
.filter-group:last-child { border-bottom: none; }
.filter-group-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 10px;
}
.filter-group label.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.3;
}
.filter-group label.check:hover { color: var(--ink); }
.filter-group input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--signal-deep);
  margin: 0;
  flex-shrink: 0;
}
.filter-group label.check .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--neutral-grey);
}
.filter-range {
  display: flex;
  gap: 8px;
  align-items: center;
}
.filter-range input {
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 10px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-card);
}
.filter-range span { font-size: 11px; color: var(--neutral-grey); }

@media (max-width: 1024px) {
  .screener-filters { position: static; max-height: none; }
  .screener-filters[data-collapsed="true"] .filter-group,
  .screener-filters[data-collapsed="true"] .filter-head .filter-reset { display: none; }
  .filter-toggle-mobile {
    display: block;
    width: 100%;
    text-align: left;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 14px 18px;
    border: 1px solid var(--ink);
    background: var(--paper-card);
    margin-bottom: 16px;
    cursor: pointer;
  }
}
.filter-toggle-mobile { display: none; }

/* ── ACTIVE FILTER CHIPS ──────────────────────────────── */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--signal-soft);
  color: var(--signal-deep);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.filter-chip .x {
  cursor: pointer;
  opacity: 0.6;
  font-size: 14px;
  line-height: 1;
}
.filter-chip .x:hover { opacity: 1; }

.screener-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--neutral-grey);
  letter-spacing: 0.06em;
}
.screener-toolbar .results-count strong { color: var(--ink); font-weight: 600; }
.screener-toolbar select {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 10px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-card);
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.06em;
}

/* ── SCREENER TABLE ──────────────────────────────────── */
.fund-table {
  width: 100%;
  border-collapse: collapse;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.fund-table thead th {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 13px 9px;
  text-align: right;
  border-bottom: 1.5px solid var(--ink);
  border-right: 1px solid var(--rule-strong);
  white-space: nowrap;
  background: var(--paper-shade);
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 10;
}
.fund-table thead th:last-child { border-right: none; }
.fund-table thead th.th-actions { cursor: default; }
.fund-table thead th:first-child,
.fund-table thead th.left { text-align: left; }
.fund-table thead th .sort-arrow {
  margin-left: 4px;
  opacity: 0;
  font-size: 9px;
  transition: opacity 0.15s;
}
.fund-table thead th[data-sorted] .sort-arrow { opacity: 1; color: var(--signal-deep); }
.fund-table thead th:hover .sort-arrow { opacity: 0.5; }

.fund-table tbody tr {
  border-bottom: 1px solid var(--rule);
  transition: background 0.12s;
  cursor: pointer;
}
.fund-table tbody tr:hover {
  background: var(--signal-soft);
}
.fund-table tbody tr:hover .row-actions .watchlist-btn {
  opacity: 1;
}

.fund-table tbody td {
  padding: 10px 9px;
  font-size: 13.5px;
  color: var(--ink);
  text-align: right;
  vertical-align: middle;
  font-family: var(--mono);
  border-right: 1px solid var(--rule-fine);
}
.fund-table tbody td:last-child { border-right: none; }
.fund-table tbody td.left {
  text-align: left;
  font-family: var(--serif);
  font-size: 16px;
  font-variation-settings: "SOFT" 40, "opsz" 36;
}
.fund-table tbody td.left .fund-name {
  display: block;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}
.fund-table tbody td.left .fund-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--neutral-grey);
  letter-spacing: 0.04em;
  margin-top: 2px;
  text-transform: uppercase;
}

.fund-table .row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.fund-table .row-actions .watchlist-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fund-table .row-actions .watchlist-btn:hover {
  background: var(--signal);
  color: var(--paper);
  border-color: var(--signal);
}
.fund-table .row-actions .watchlist-btn.added {
  background: var(--signal);
  color: var(--paper);
  border-color: var(--signal);
  opacity: 1;
}
.fund-table .row-actions .plan-btn {
  border-color: var(--signal);
  color: var(--signal-deep);
  background: var(--signal-soft);
  opacity: 0.85;
}
.fund-table .row-actions .plan-btn:hover {
  background: var(--signal);
  color: var(--paper);
  border-color: var(--signal);
}
.fund-table .row-actions .plan-btn.in-plan {
  background: var(--signal);
  color: var(--paper);
  border-color: var(--signal);
  opacity: 1;
}
.fund-table .row-actions .report-btn {
  color: var(--ink);
  border-color: var(--rule-strong);
}
.fund-table .row-actions .report-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Active filter chip — for the Buy/Plan distinction */
.plan-toggle button.active {
  background: var(--ink);
  color: var(--paper);
}
.fund-table .row-actions .compare-check {
  width: 16px;
  height: 16px;
  accent-color: var(--signal-deep);
  cursor: pointer;
}

/* External rating chip — single chip, not 5 emojis */
.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  background: var(--paper-warm);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.rating-chip .stars { color: var(--signal-deep); letter-spacing: 0.04em; font-size: 9px; }
.rating-chip.r5 { background: var(--signal-soft); color: var(--signal-deep); border-color: var(--signal); }
.rating-chip.r4 { background: var(--signal-soft); color: var(--signal-deep); border-color: var(--rule-strong); }
.rating-chip.r3 { background: var(--paper-warm); }
.rating-chip.r2 { background: var(--paper-deep); color: var(--neutral-grey); }
.rating-chip.r1 { background: var(--monitor-soft); color: var(--monitor); border-color: var(--monitor); }

/* Return cell up/down */
.ret-pos { color: var(--strong); font-weight: 500; }
.ret-neg { color: var(--monitor); font-weight: 500; }

/* Compare floating bar */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 24px;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
}
.compare-bar.visible { display: flex; }
.compare-bar-list {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .compare-bar {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }
  .compare-bar .right { width: 100%; justify-content: space-between; }
}
.compare-bar-chip {
  background: rgba(255,252,249,0.1);
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.compare-bar-chip .x { margin-left: 6px; cursor: pointer; opacity: 0.6; }
.compare-bar-chip .x:hover { opacity: 1; }
.compare-bar .right { display: flex; gap: 12px; align-items: center; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 32px;
  padding: 16px 0;
}
.pagination button {
  font-family: var(--mono);
  font-size: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-card);
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.04em;
}
.pagination button.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.pagination button:hover:not(.active) { border-color: var(--ink); }

/* ════════════════════════════════════════════════════════════
   FUND DETAIL PAGES — shared components for all 3 mockups
   ════════════════════════════════════════════════════════════ */

/* Fund crumb */
.fund-crumb {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 14px;
  padding-top: 28px;
}
.fund-crumb a { color: var(--neutral-grey); text-decoration: none; transition: color 0.15s; }
.fund-crumb a:hover { color: var(--signal-deep); }
.fund-crumb .sep { margin: 0 6px; opacity: 0.5; }

.fund-name-h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 50, "opsz" 144;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 10px;
}
.fund-name-h1 .plan-suffix {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--ink-soft);
  font-size: 0.7em;
}

.fund-quick-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}
.fund-quick-meta > span {
  padding: 0 14px;
  border-right: 1px solid var(--rule);
}
.fund-quick-meta > span:first-child { padding-left: 0; }
.fund-quick-meta > span:last-child { border-right: none; }
.fund-quick-meta strong { color: var(--ink); font-weight: 600; }

/* Plan toggle */
.plan-toggle {
  display: inline-flex;
  border: 1px solid var(--ink);
  margin-top: 14px;
}
.plan-toggle button {
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  border: none;
  border-right: 1px solid var(--ink);
}
.plan-toggle button:last-child { border-right: none; }
.plan-toggle button.active { background: var(--ink); color: var(--paper); }

/* NAV display */
.nav-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.nav-display .nav-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 4px;
}
.nav-display .nav-value {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 60, "opsz" 144;
  line-height: 1;
  color: var(--ink);
}
.nav-display .nav-change {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-top: 4px;
  font-weight: 500;
}
.nav-display .nav-change.pos { color: var(--strong); }
.nav-display .nav-change.neg { color: var(--monitor); }

/* Key metric tiles (used in hero strips and sidebars) */
.metric-grid {
  display: grid;
  gap: 0;
  border: 1px solid var(--rule-strong);
}
.metric-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.metric-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.metric-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.metric-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 720px) {
  .metric-grid.cols-4, .metric-grid.cols-6 { grid-template-columns: repeat(2, 1fr); }
}
.metric-tile {
  padding: 14px 16px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.metric-tile:nth-last-child(-n+0):last-child { border-right: none; }
.metric-tile-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 4px;
}
.metric-tile-value {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 50, "opsz" 60;
  line-height: 1;
  color: var(--ink);
}
.metric-tile-value .unit {
  font-family: var(--mono);
  font-size: 0.45em;
  font-weight: 500;
  color: var(--neutral-grey);
  letter-spacing: 0.06em;
  margin-left: 3px;
}
.metric-tile-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--neutral-grey);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Section heading inside fund pages */
.fsec {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
/* Subtle hairline divider between sections — editorial pacing rest */
.fsec + .fsec {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.fsec-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding-bottom: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}
.fsec-num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 300;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--signal-deep);
  font-variation-settings: "SOFT" 80, "opsz" 80;
}
.fsec-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 40, "opsz" 60;
}
.fsec-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  text-align: right;
}

/* Data table inside fund pages */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.data-table th {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  text-align: right;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ink);
}
.data-table th.left { text-align: left; }
.data-table td {
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--ink);
  text-align: right;
  border-bottom: 1px dotted var(--rule);
  font-family: var(--mono);
}
.data-table td.left {
  text-align: left;
  font-family: var(--serif);
  font-size: 14.5px;
  font-variation-settings: "SOFT" 40, "opsz" 36;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table .total-row td {
  border-top: 1.5px solid var(--ink);
  border-bottom: none;
  background: var(--paper-warm);
  font-weight: 600;
}

/* Performance returns table — colour-coded */
.data-table td.col-fund { color: var(--ink); font-weight: 500; }
.data-table td.col-bm { color: var(--neutral-grey); }
.data-table td.col-alpha.pos { color: var(--strong); font-weight: 500; }
.data-table td.col-alpha.neg { color: var(--monitor); font-weight: 500; }

/* Holdings & sector horizontal bars */
.bar-row {
  display: grid;
  grid-template-columns: 1fr 60px 80px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 13px;
}
.bar-row:last-child { border-bottom: none; }
.bar-row .bar-label {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 40, "opsz" 36;
}
.bar-row .bar-label small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--neutral-grey);
  letter-spacing: 0.04em;
  margin-top: 1px;
  text-transform: uppercase;
}
.bar-row .bar-track {
  height: 4px;
  background: var(--rule);
  position: relative;
}
.bar-row .bar-track > div {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ink);
}
.bar-row .bar-track > div.bm { background: var(--lavender-deep); }
.bar-row .bar-pct {
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* Comparison bar — fund vs benchmark, side-by-side */
.cmp-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 50px;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  font-size: 12.5px;
}
.cmp-bar-row .lbl {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 40, "opsz" 36;
  font-size: 13px;
}
.cmp-bar-row .pct {
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
}
.cmp-double-bar {
  position: relative;
  height: 22px;
  background: var(--paper-deep);
}
.cmp-double-bar .fund-bar {
  position: absolute;
  top: 0;
  bottom: 50%;
  left: 0;
  background: var(--signal);
}
.cmp-double-bar .bm-bar {
  position: absolute;
  top: 50%;
  bottom: 0;
  left: 0;
  background: var(--lavender-deep);
}

.legend-strip {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--neutral-grey);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.legend-strip .swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  vertical-align: middle;
}
.legend-strip .swatch.fund { background: var(--signal); }
.legend-strip .swatch.bm { background: var(--lavender-deep); }

/* Asset-quality matrix */
.aq-matrix {
  display: grid;
  grid-template-columns: 60px repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.aq-matrix > div {
  background: var(--paper-card);
  padding: 12px 8px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.aq-matrix .lbl {
  background: var(--paper-warm);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  padding: 12px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aq-matrix .col-h { background: var(--paper-warm); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--neutral-grey); padding: 10px 4px; }
.aq-matrix .cell-strong { color: var(--strong); font-weight: 600; }
.aq-matrix .cell-monitor { color: var(--monitor); }
.aq-matrix .cell-zero { color: var(--muted-grey); }

/* Rolling returns / drawdown chart placeholder */
.chart-placeholder {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--neutral-grey);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.chart-svg-bars {
  position: absolute;
  inset: 12px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.chart-svg-bars > div {
  flex: 1;
  background: var(--ink-mid);
  opacity: 0.7;
  min-height: 8px;
}
.chart-svg-bars > div.peak { background: var(--signal); opacity: 1; }
.chart-svg-bars > div.bm { background: var(--lavender-deep); opacity: 0.5; }

/* ════════════════════════════════════════════════════════════
   GATED CONTENT — TRW IP behind login
   ════════════════════════════════════════════════════════════ */
.gated {
  position: relative;
  min-height: 200px;
}
/* Phase 4.1: gated columns (verdict band, role tag, PCI) now unlock at the
   FINALISED layer — KYC + first transaction on Optimum. The intermediate
   is-client state (KYC alone) no longer reveals these columns. */
body:not(.is-finalised) .gated .gated-content {
  filter: blur(8px) saturate(0.6);
  user-select: none;
  pointer-events: none;
  opacity: 0.7;
}
body.is-finalised .gated .gated-overlay { display: none; }

.gated-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,252,249,0) 0%, rgba(255,252,249,0.92) 35%, rgba(255,252,249,0.98) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  z-index: 2;
}
.gated-overlay .lock-icon {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 16px;
}
.gated-overlay h4 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "opsz" 60;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.gated-overlay p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  font-variation-settings: "SOFT" 60;
  max-width: 380px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.gated-overlay .gated-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Verdict card — gated */
.verdict-card {
  background: var(--ink);
  color: var(--paper);
  padding: 24px;
  position: relative;
}
.verdict-band {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal-light);
  margin-bottom: 8px;
}
.verdict-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "opsz" 80;
  letter-spacing: -0.015em;
  color: var(--paper);
  margin-bottom: 4px;
  line-height: 1.1;
}
.verdict-role {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  font-variation-settings: "SOFT" 80;
  color: rgba(255,252,249,0.72);
  margin-bottom: 18px;
}
.verdict-rationale {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255,252,249,0.85);
  margin-bottom: 16px;
}
.verdict-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255,252,249,0.55);
  padding-top: 14px;
  border-top: 1px solid rgba(255,252,249,0.18);
  display: flex;
  justify-content: space-between;
}

/* 5-Gate Scorecard */
.scorecard {
  display: grid;
  gap: 0;
  border: 1px solid var(--rule-strong);
}
.scorecard-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
}
.scorecard-row:last-child { border-bottom: none; }
.scorecard-gate {
  display: flex;
  flex-direction: column;
}
.scorecard-gate-name {
  font-family: var(--serif);
  font-size: 14px;
  font-variation-settings: "SOFT" 40, "opsz" 36;
  color: var(--ink);
}
.scorecard-gate-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--neutral-grey);
  letter-spacing: 0.04em;
  margin-top: 2px;
  text-transform: uppercase;
}
.scorecard-status {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  white-space: nowrap;
}
.scorecard-status.pass    { background: var(--strong-soft);  color: var(--strong); }
.scorecard-status.concern { background: var(--satellite-soft); color: var(--satellite); }
.scorecard-status.fail    { background: var(--monitor-soft); color: var(--monitor); }

/* PCI display */
.pci-card {
  background: var(--paper-warm);
  border: 1px solid var(--rule-strong);
  padding: 18px;
  text-align: center;
}
.pci-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 6px;
}
.pci-value {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 350;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 60, "opsz" 144;
  line-height: 1;
  color: var(--ink);
}
.pci-percentile {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 6px;
  letter-spacing: 0.06em;
}

/* CTAs cluster */
.cta-cluster {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cta-cluster .btn { justify-content: center; }

/* ── ACTIVE SHARE PANEL · client-only ─────────────────── */
.active-share-panel {
  margin-top: 32px;
  border: 2px solid var(--ink);
  background: var(--paper-card);
  position: relative;
  overflow: hidden;
}
.as-head {
  background: var(--ink);
  color: var(--paper);
  padding: 18px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
}
.as-head .label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--signal-light);
}
.as-head h3 {
  font-family: var(--serif);
  color: var(--paper);
  font-size: 22px;
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "opsz" 80;
  margin: 4px 0 0;
}
.as-head .sub {
  font-family: var(--serif);
  font-style: italic;
  color: rgba(255,252,249,0.7);
  font-variation-settings: "SOFT" 60;
  font-size: 13.5px;
  margin-top: 4px;
}
.as-head .access {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,252,249,0.55);
  text-align: right;
}

.as-body { padding: 28px 26px; }

.as-headline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}
.as-bignum {
  font-family: var(--serif);
  font-size: clamp(64px, 8vw, 96px);
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variation-settings: "SOFT" 80, "opsz" 144;
  color: var(--signal-deep);
}
.as-bignum .pct { font-size: 0.45em; color: var(--ink-soft); margin-left: -2px; }
.as-headline .interpret h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 6px;
}
.as-headline .interpret p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  font-variation-settings: "SOFT" 60;
  font-style: italic;
}
.as-headline .interpret p strong { color: var(--ink); font-style: normal; }

.as-bands {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  margin-top: 12px;
}
.as-bands > div {
  padding: 6px 8px;
  background: var(--paper-warm);
  text-align: center;
  text-transform: uppercase;
  color: var(--neutral-grey);
}
.as-bands > div.active {
  background: var(--signal-deep);
  color: var(--paper);
  font-weight: 600;
}

.as-overlap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
  margin-bottom: 24px;
}
.as-overlap-col {
  background: var(--paper-card);
  padding: 16px 18px;
}
.as-overlap-col h5 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.as-overlap-col h5 .count {
  float: right;
  color: var(--ink);
  font-weight: 700;
}
.as-overlap-col.shared h5 { color: var(--signal-deep); border-bottom-color: var(--signal); }
.as-overlap-list { list-style: none; padding: 0; margin: 0; }
.as-overlap-list li {
  padding: 7px 0;
  border-bottom: 1px dotted var(--rule);
  font-family: var(--serif);
  font-size: 13.5px;
  font-variation-settings: "SOFT" 40, "opsz" 36;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.as-overlap-list li:last-child { border-bottom: none; }
.as-overlap-list li .pcts {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--neutral-grey);
  letter-spacing: 0.04em;
}
.as-overlap-col.shared .as-overlap-list li .pcts { color: var(--signal-deep); }

.as-sector-compare {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.as-sector-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  gap: 14px;
  align-items: center;
  padding: 7px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.as-sector-row .lbl { font-family: var(--serif); font-size: 13.5px; font-variation-settings: "SOFT" 40, "opsz" 36; }
.as-sector-row .pcts { text-align: right; }

.as-cta-row {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--paper-warm);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.as-cta-row p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink-soft);
  font-variation-settings: "SOFT" 60;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

@media (max-width: 900px) {
  .as-headline { grid-template-columns: 1fr; gap: 16px; }
  .as-overlap-grid { grid-template-columns: 1fr; }
  .as-sector-row { grid-template-columns: 1fr; gap: 4px; }
  .as-sector-row .pcts { text-align: left; }
}

/* ── COMPARE PAGE ─────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}
.compare-table th, .compare-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}
.compare-table th.metric-col {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  font-weight: 500;
  width: 200px;
  background: var(--paper);
  position: sticky;
  left: 0;
  z-index: 5;
}
.compare-table td.fund-col {
  font-family: var(--mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.compare-table thead th.fund-col {
  font-family: var(--serif);
  font-size: 16px;
  font-variation-settings: "SOFT" 40, "opsz" 60;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-weight: 400;
  border-bottom: 1.5px solid var(--ink);
}
.compare-table .row-section {
  background: var(--paper-warm);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ── WATCHLIST PAGE ───────────────────────────────────── */
.watchlist-empty {
  padding: 80px 20px;
  text-align: center;
  border: 1px dashed var(--rule-strong);
}
.watchlist-empty h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-variation-settings: "SOFT" 40, "opsz" 80;
  font-weight: 400;
  margin-bottom: 8px;
}
.watchlist-empty p {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-variation-settings: "SOFT" 60;
  max-width: 420px;
  margin: 0 auto 20px;
}

.wl-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-card);
  margin-bottom: 12px;
  align-items: center;
}
.wl-card-name {
  font-family: var(--serif);
  font-size: 20px;
  font-variation-settings: "SOFT" 40, "opsz" 60;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.wl-card-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--neutral-grey);
  text-transform: uppercase;
}
.wl-card-stats {
  display: flex;
  gap: 24px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
}
.wl-card-stats .stat-block {
  text-align: right;
}
.wl-card-stats .stat-block .lbl {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-grey);
}
.wl-card-stats .stat-block .val {
  font-family: var(--serif);
  font-size: 18px;
  font-variation-settings: "SOFT" 50, "opsz" 60;
  color: var(--ink);
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.wl-card-actions {
  display: flex;
  gap: 6px;
}
.wl-card-actions button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.wl-card-actions button:hover { border-color: var(--ink); color: var(--ink); }
.wl-card-actions button.remove { color: var(--monitor); }
.wl-card-actions button.remove:hover { border-color: var(--monitor); }

@media (max-width: 720px) {
  .wl-card { grid-template-columns: 1fr; gap: 14px; }
  .wl-card-stats { justify-content: flex-start; flex-wrap: wrap; }
}

/* ── SEARCH MODAL ─────────────────────────────────────── */
.search-modal {
  background: var(--paper);
  border: 1px solid var(--ink);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-pop);
  animation: modalIn 0.2s ease;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink);
}
.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--serif);
  font-size: 22px;
  font-variation-settings: "SOFT" 40, "opsz" 80;
  background: transparent;
  color: var(--ink);
}
.search-input-wrap input::placeholder { color: var(--muted-grey); font-style: italic; font-variation-settings: "SOFT" 60; }
.search-input-wrap .kbd {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  background: var(--paper-warm);
  border: 1px solid var(--rule-strong);
  padding: 3px 7px;
  color: var(--neutral-grey);
}
.search-results {
  overflow-y: auto;
  flex: 1;
}
.search-group {
  padding: 14px 22px;
  border-bottom: 1px solid var(--rule);
}
.search-group:last-child { border-bottom: none; }
.search-group-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 8px;
}
.search-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin: 0 -14px;
  cursor: pointer;
  transition: background 0.1s;
  text-decoration: none;
  color: var(--ink);
}
.search-result:hover, .search-result.active { background: var(--signal-soft); }
.search-result .sr-name {
  font-family: var(--serif);
  font-size: 15px;
  font-variation-settings: "SOFT" 40, "opsz" 36;
}
.search-result .sr-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--neutral-grey);
}
.search-empty {
  padding: 32px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--neutral-grey);
  font-variation-settings: "SOFT" 60;
}

/* Phone: stack the fund name + meta vertically so the mono category
   line doesn't collide with the serif name. */
@media (max-width: 720px) {
  .search-modal { max-height: 88vh; }
  .search-input-wrap { padding: 14px 16px; gap: 10px; }
  .search-input-wrap input { font-size: 18px; }
  .search-group { padding: 12px 16px; }
  .search-result {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
  }
  .search-result .sr-name { font-size: 15px; line-height: 1.25; }
  .search-result .sr-meta { font-size: 9.5px; }
}

/* ════════════════════════════════════════════════════════════
   MOCKUP-1 SPECIFIC · two-column sticky sidebar
   ════════════════════════════════════════════════════════════ */
.f1-shell {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  padding: 8px 0 80px;
}
@media (max-width: 1024px) {
  .f1-shell { grid-template-columns: 1fr; gap: 0; }
}
.f1-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 1024px) {
  .f1-aside {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    background: var(--paper);
    border-top: 1px solid var(--ink);
    padding: 12px 16px;
    z-index: 50;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    box-shadow: var(--shadow-pop);
  }
  .f1-aside .verdict-card,
  .f1-aside .metric-grid,
  .f1-aside .pci-card,
  .f1-aside .scorecard { display: none; }
  .f1-aside .cta-cluster { flex-direction: row; flex: 1; gap: 8px; }
  .f1-aside .cta-cluster .btn { flex: 1; padding: 10px 14px; font-size: 9.5px; }
}

/* ════════════════════════════════════════════════════════════
   MOCKUP-2 SPECIFIC · tabbed
   ════════════════════════════════════════════════════════════ */
.f2-hero {
  background: var(--paper-warm);
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--ink);
}
.f2-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 24px;
}
.f2-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--ink);
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.f2-tab {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.f2-tab:hover { color: var(--ink); }
.f2-tab.active { color: var(--signal-deep); border-bottom-color: var(--signal); }
.f2-tab .lock { margin-left: 6px; opacity: 0.6; font-size: 10px; }

.f2-panel {
  display: none;
  padding: 32px 0 80px;
}
.f2-panel.active { display: block; }

.f2-panel-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .f2-panel-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   LAYOUT 4 · v4 — inline verdict chip + sticky TOC + dense scroll
   No more sticky banner. Verdict lives next to the H1.
   ════════════════════════════════════════════════════════════ */

/* Layout 4 main shell — TOC narrowed, no border */
.f4-shell {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 36px;
  padding: 12px 0 56px;
}
@media (max-width: 1024px) { .f4-shell { grid-template-columns: 1fr; gap: 0; } }

.f4-toc {
  position: sticky;
  top: calc(var(--header-h) + var(--verdict-strip-h, 0px) + 12px);
  align-self: start;
  font-family: var(--mono);
}
@media (max-width: 1024px) { .f4-toc { display: none; } }

.f4-toc-head {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.f4-toc a {
  display: block;
  padding: 6px 0 6px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -12px;
  transition: color 0.15s, border-left-color 0.15s, padding-left 0.15s;
}
.f4-toc a.active {
  color: var(--signal-deep);
  border-left-color: var(--signal);
  font-weight: 500;
  padding-left: 12px;
}
.f4-toc a:hover { color: var(--ink); }
.f4-toc a .lock { margin-left: 4px; opacity: 0.6; font-size: 9px; }

/* ── Identification block · v4.1 — flexbox, single baseline ── */
.f4-ident {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}

/* Top row · H1 + verdict chip + actions all on the same baseline */
.f4-ident-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
}
.f4-ident-main {
  flex: 1 1 auto;
  min-width: 280px;
}
.f4-ident-main h1 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.f4-ident-main h1 .plan-suffix {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 60;
  color: var(--ink-soft);
  font-size: 0.7em;
  font-weight: 400;
}

/* Meta strip · second row, full-width */
.f4-ident-meta {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--neutral-grey);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}
.f4-ident-meta > span {
  padding: 0 12px;
  border-right: 1px solid var(--rule);
  white-space: nowrap;
}
.f4-ident-meta > span:first-child { padding-left: 0; }
.f4-ident-meta > span:last-child { border-right: none; }
.f4-ident-meta strong { color: var(--ink); font-weight: 600; }

/* ── Verdict chip · compact pill, inline with H1 ── */
.verdict-chip {
  flex: 0 0 auto;
  width: 240px;
  padding: 8px 12px 8px 14px;
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--signal);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.verdict-chip:hover { border-color: var(--ink); border-left-color: var(--signal); box-shadow: var(--shadow-card); }
.verdict-chip-band {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--signal-deep);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}
.verdict-chip-band .lock-mini {
  font-size: 9px;
  opacity: 0.55;
}
body.is-finalised .verdict-chip-band .lock-mini { display: none; }
.verdict-chip-role {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  font-variation-settings: "SOFT" 80, "opsz" 36;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.verdict-chip-role.gated {
  filter: blur(4px);
  user-select: none;
  /* Override .gated's global min-height: 200px so the chip stays compact */
  min-height: 0;
}
body.is-finalised .verdict-chip-role.gated {
  filter: none;
  user-select: auto;
}
/* Belt + braces: ensure chip itself never inflates from inner content */
.verdict-chip { min-height: 0 !important; }
.verdict-chip > * { min-height: 0; }
/* Removed verdict-chip-foot — keep chip compact */
.verdict-chip-foot { display: none; }

/* Quick-action cluster · inline horizontal with H1 + chip */
.f4-quickactions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.f4-quickactions .btn {
  padding: 9px 14px;
  font-size: 10px;
  letter-spacing: 0.14em;
}
.f4-quickactions .pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 10px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.f4-quickactions .pill-btn:hover { border-color: var(--ink); color: var(--ink); }
.f4-quickactions .pill-btn .ico { font-size: 11px; line-height: 1; }

@media (max-width: 900px) {
  .verdict-chip { width: 100%; }
  .f4-quickactions { width: 100%; }
  .f4-quickactions .btn { flex: 1; justify-content: center; }
}

/* ── Section rhythm — tighter, with rule separators ── */
.f4-content > .fsec {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: calc(var(--header-h) + var(--verdict-strip-h, 0px) + 16px);
}
.f4-content > .fsec:last-child { border-bottom: none; }
.f4-content .fsec-head { margin-bottom: 12px; padding-bottom: 6px; }
.f4-content .fsec-num { font-size: 22px; }
.f4-content .fsec-title { font-size: 18px; }

/* Dense data tables on Layout 4 */
.f4-content .data-table th { padding: 6px 10px; font-size: 10px; }
.f4-content .data-table td { padding: 7px 10px; font-size: 13.5px; }

/* ── Overview block · v4 — riskometer+ratings+quickread ── */
.f4-overview {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 900px) { .f4-overview { grid-template-columns: 1fr; } }

.f4-overview-left { display: flex; flex-direction: column; gap: 14px; }
.f4-overview-right {
  background: var(--paper-warm);
  border-left: 3px solid var(--ink);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.f4-overview-right .qr-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}
.f4-overview-right .qr-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  font-variation-settings: "SOFT" 60;
  margin: 0;
}

/* Horizontal ratings strip (replaces stacked rating-block list) */
.ratings-strip {
  display: flex;
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--paper-card);
}
.ratings-strip .rs-cell {
  flex: 1;
  padding: 10px 12px;
  border-right: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.ratings-strip .rs-cell:last-child { border-right: none; }
.ratings-strip .rs-source {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  white-space: nowrap;
}
.ratings-strip .rs-stars {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--signal-deep);
}

/* ── Section 05 (Implied investor returns) · 2-col ── */
.f4-investor {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .f4-investor { grid-template-columns: 1fr; } }
.f4-investor .lede-block {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-variation-settings: "SOFT" 60;
  padding: 12px 14px;
  background: var(--paper-warm);
  border-left: 3px solid var(--monitor);
}
.f4-investor .lede-block strong { color: var(--ink); font-style: normal; }

/* ── Section 06 (Manager) · combined fact table ── */
.f4-manager-block {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .f4-manager-block { grid-template-columns: 1fr; } }
.f4-mandate-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--paper-card);
}
.f4-mandate-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px dotted var(--rule);
  font-size: 12.5px;
}
.f4-mandate-row:last-child { border-bottom: none; }
.f4-mandate-row .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  align-self: center;
}
.f4-mandate-row .v {
  font-family: var(--serif);
  font-size: 13.5px;
  font-variation-settings: "SOFT" 40, "opsz" 36;
  color: var(--ink);
  text-align: right;
}

/* ── Layout 4 utilities (replace inline styles) ── */
.col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.col-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.col-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.col-2-1 { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; }
.col-1-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
@media (max-width: 900px) {
  .col-2, .col-3, .col-4, .col-2-1, .col-1-2 { grid-template-columns: 1fr; gap: 14px; }
}
.h4-mono {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin: 0 0 8px;
}
.callout-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-variation-settings: "SOFT" 60;
  padding: 12px 14px;
  background: var(--paper-warm);
  border-left: 3px solid var(--ink);
  margin: 0;
}

/* GSAP animation initial states (only when animations active) */
html.has-anim .f4-overview-left > *,
html.has-anim .f4-overview-right { opacity: 0; transform: translateY(8px); }

@media (prefers-reduced-motion: reduce) {
  html.has-anim .f4-overview-left > *,
  html.has-anim .f4-overview-right { opacity: 1; transform: none; }
}

/* ════════════════════════════════════════════════════════════
   v5 — EDITORIAL × INSTITUTIONAL RESEARCH DOSSIER
   Bolder typography, dossier-cover identification, chapter-opener
   sections, marginalia on charts, inline mini-bars, FM timeline.
   ════════════════════════════════════════════════════════════ */

/* ── Fund cover · v7 slim layout (no aside, no bottom row) ── */
.f5-cover {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 10px 0 10px;
  margin: 6px 0 0;
  position: relative;
}
.f5-cover::before {
  content: 'TRW · FUND DOSSIER';
  position: absolute;
  top: -8px;
  left: 0;
  background: var(--paper);
  padding: 0 10px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
}
.f5-cover::after {
  content: attr(data-cover-meta);
  position: absolute;
  top: -8px;
  right: 0;
  background: var(--paper);
  padding: 0 0 0 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-grey);
}

/* v7 — single-column masthead (verdict moved to sticky strip, actions to row below) */
.f5-masthead {
  display: block;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}
.f5-masthead-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
/* Legacy v6 aside — hidden in v7 (kept selector to avoid breaking other mockups if reused) */
.f5-masthead-aside { display: none; }
.f5-masthead-cat {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal-deep);
  margin: 0;
}
.f5-masthead h1 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 350;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  font-variation-settings: "SOFT" 60, "opsz" 144;
}
.f5-masthead h1 em {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--ink-soft);
}

.f5-masthead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--neutral-grey);
  align-items: baseline;
  margin-top: 4px;
}
.f5-masthead-meta > span {
  padding: 0 10px;
  border-right: 1px solid var(--rule);
  white-space: nowrap;
}
.f5-masthead-meta > span:first-child { padding-left: 0; }
.f5-masthead-meta > span:last-child { border-right: none; }
.f5-masthead-meta strong {
  color: var(--ink);
  font-weight: 600;
  font-family: var(--serif);
  font-size: 13.5px;
  font-variation-settings: "SOFT" 50, "opsz" 36;
  letter-spacing: -0.005em;
}

/* ════════════════════════════════════════════════════════════
   v7 — STICKY VERDICT STRIP + HORIZONTAL ACTION ROW
   One verdict box, dark aesthetic, sticky under site nav.
   Locked completely for non-clients (verdict text never rendered visibly).
   ════════════════════════════════════════════════════════════ */

/* Pages that include .verdict-strip declare its height so sticky offsets cascade. */
:root { --verdict-strip-h: 0px; }
body:has(.verdict-strip) { --verdict-strip-h: 56px; }

/* ── Sticky verdict strip (dark, full-bleed) ──────────────── */
.verdict-strip {
  position: sticky;
  top: var(--header-h);
  z-index: 35;            /* below site-header (which sits above), above page content */
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(255,252,249,0.08);
}
.verdict-strip > .container { padding-top: 0; padding-bottom: 0; }
.verdict-strip-inner {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  gap: 18px;
}

/* Common eyebrow used in both states */
.verdict-strip .vs-eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255,252,249,0.55);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.verdict-strip .vs-lock { font-size: 10px; opacity: 0.85; }

/* ── LOCKED STATE (default, shown to non-clients) ── */
.verdict-strip .vs-locked {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}
.verdict-strip .vs-locked-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  font-variation-settings: "SOFT" 80, "opsz" 36;
  color: rgba(255,252,249,0.78);
  line-height: 1.35;
  flex: 1 1 auto;
  letter-spacing: -0.005em;
}
.verdict-strip .vs-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--signal);
  color: var(--paper);
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.verdict-strip .vs-cta:hover { background: var(--signal-deep); }
.verdict-strip .vs-cta .arr { font-size: 12px; transform: translateY(-0.5px); }

/* ── UNLOCKED STATE (only when body.is-finalised · Phase 4.1) ── */
.verdict-strip .vs-unlocked {
  display: none;             /* hidden until is-finalised */
  align-items: center;
  gap: 14px;
  width: 100%;
  flex-wrap: wrap;
}
body.is-finalised .verdict-strip .vs-locked { display: none; }
body.is-finalised .verdict-strip .vs-unlocked { display: flex; }

.verdict-strip .vs-band {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal-light);
  flex-shrink: 0;
}
.verdict-strip .vs-role {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  font-variation-settings: "SOFT" 90, "opsz" 36;
  color: var(--paper);
  letter-spacing: -0.005em;
  flex: 0 1 auto;
}
.verdict-strip .vs-divider {
  width: 1px;
  height: 18px;
  background: rgba(255,252,249,0.18);
  margin: 0 4px;
}
.verdict-strip .vs-pci,
.verdict-strip .vs-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  color: rgba(255,252,249,0.62);
  text-transform: uppercase;
  flex-shrink: 0;
}
.verdict-strip .vs-pci strong {
  color: var(--paper);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.verdict-strip .vs-link {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal-light);
  text-decoration: none;
  border-bottom: 1px dotted rgba(95, 165, 122, 0.5);
  padding-bottom: 1px;
  flex-shrink: 0;
}
.verdict-strip .vs-link:hover { color: var(--paper); border-bottom-color: var(--paper); }

/* ── Action row · buttons left, risk + ratings right ── */
.f5-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--rule);
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.f5-actions-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.f5-actions-buttons .btn {
  padding: 9px 14px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
}
.f5-actions-buttons .btn-ghost {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.f5-actions-buttons .btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.f5-actions-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.riskometer-inline { display: flex; align-items: center; }
.f5-action-row .riskometer { gap: 4px; }
.f5-action-row .riskometer-label { font-size: 9.5px; letter-spacing: 0.18em; }
.f5-action-row .riskometer-bar { gap: 1px; }
.f5-action-row .riskometer-bar > div { height: 6px; }
.f5-action-row .riskometer-scale { font-size: 8px; gap: 1px; margin-top: 2px; }

.ratings-strip-inline {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ratings-strip-inline .rs-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.ratings-strip-inline .rs-source { color: var(--neutral-grey); }
.ratings-strip-inline .rs-stars { color: var(--signal-deep); letter-spacing: 0; font-size: 11px; }

/* ── Analyst-note (Section 07 supporting evidence — replaces duplicate verdict-card) ── */
.analyst-note {
  background: var(--paper-warm);
  border-left: 3px solid var(--ink);
  padding: 14px 18px 12px;
  margin-bottom: 14px;
}
.analyst-note-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 8px;
}
.analyst-note-eyebrow .rule { flex: 0 0 18px; height: 1px; background: var(--rule-strong); }
.analyst-note-eyebrow .band { color: var(--signal-deep); font-weight: 700; letter-spacing: 0.20em; }
.analyst-note-eyebrow .role {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  font-variation-settings: "SOFT" 80, "opsz" 36;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  text-transform: none;
}
.analyst-note .verdict-rationale {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 10px;
}
.analyst-note-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  color: var(--neutral-grey);
  text-transform: uppercase;
  padding-top: 8px;
  border-top: 1px dotted var(--rule);
  display: flex;
  justify-content: space-between;
}

@media (max-width: 1024px) {
  .f5-action-row { gap: 12px; }
  .f5-actions-meta { gap: 12px; }
}
@media (max-width: 720px) {
  .verdict-strip-inner { gap: 12px; flex-wrap: wrap; padding: 8px 0; }
  .verdict-strip .vs-locked { gap: 10px; flex-wrap: wrap; }
  .verdict-strip .vs-locked-text { font-size: 12.5px; }
  .verdict-strip .vs-link { margin-left: 0; }
  .f5-action-row { flex-direction: column; align-items: flex-start; }
  .f5-actions-meta { width: 100%; justify-content: space-between; }
}

/* ── Chapter-opener section heads · v6 dense ─────────── */
.fsec-chapter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding-bottom: 4px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 10px;
}
.fsec-chapter .chap-num {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variation-settings: "SOFT" 60, "opsz" 80;
  color: var(--signal-deep);
}
.fsec-chapter .chap-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 50, "opsz" 60;
  color: var(--ink);
  padding-bottom: 0;
}
.fsec-chapter .chap-title em {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 80;
  color: var(--ink-soft);
}
.fsec-chapter .chap-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  text-align: right;
  white-space: nowrap;
  padding-bottom: 6px;
}

/* When .fsec-chapter is used, hide the old fsec-head defaults */
.f4-content .fsec.has-chapter > .fsec-head { display: none; }

/* ── Performance period table — typographic upgrade ─────── */
.perf-period-table { width: 100%; border-collapse: collapse; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.perf-period-table thead th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  padding: 6px 10px;
  text-align: right;
  border-bottom: 1px solid var(--ink);
}
.perf-period-table thead th.left { text-align: left; }
.perf-period-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px dotted var(--rule);
  text-align: right;
}
.perf-period-table tbody tr:last-child td { border-bottom: 2px solid var(--ink); }
.perf-period-table tbody td.left {
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.perf-period-table tbody td.fund-num {
  font-family: var(--serif);
  font-size: 16px;
  font-variation-settings: "SOFT" 50, "opsz" 60;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.perf-period-table tbody td.bm-num {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--neutral-grey);
}
.perf-period-table tbody td.alpha-num {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.perf-period-table tbody td.alpha-num.pos { color: var(--strong); }
.perf-period-table tbody td.alpha-num.neg { color: var(--monitor); }

/* ── Specs sheet (Risk metrics) ─────────────────────────── */
.specs-sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
@media (max-width: 720px) { .specs-sheet { grid-template-columns: repeat(2, 1fr); } }
.spec-cell {
  padding: 14px 18px 14px 0;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spec-cell:nth-child(3n) { border-right: none; }
.spec-cell:nth-last-child(-n+3) { border-bottom: none; }
@media (max-width: 720px) {
  .spec-cell:nth-child(3n) { border-right: 1px solid var(--rule); }
  .spec-cell:nth-child(2n) { border-right: none; }
  .spec-cell { padding-left: 14px; padding-right: 14px; }
}
.spec-cell .spec-lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
}
.spec-cell .spec-val {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-variation-settings: "SOFT" 60, "opsz" 80;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  margin-top: 2px;
}
.spec-cell .spec-val .unit {
  font-family: var(--mono);
  font-size: 0.4em;
  font-weight: 500;
  color: var(--neutral-grey);
  letter-spacing: 0.05em;
  margin-left: 3px;
  vertical-align: middle;
}
.spec-cell .spec-val.neg { color: var(--monitor); }
.spec-cell .spec-val.pos { color: var(--strong); }
.spec-cell .spec-note {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--neutral-grey);
  margin-top: 4px;
}

/* ── Investor returns table with inline timing-bars ───── */
.returns-table { width: 100%; border-collapse: collapse; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.returns-table thead th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  padding: 6px 10px;
  text-align: right;
  border-bottom: 1.5px solid var(--ink);
}
.returns-table thead th:first-child { text-align: left; }
.returns-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px dotted var(--rule);
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
}
.returns-table tbody td:first-child {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--neutral-grey);
}
.returns-table .gap-cell {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.timing-bar {
  display: inline-block;
  height: 6px;
  background: var(--monitor);
  opacity: 0.85;
  flex-shrink: 0;
  /* width set inline via style attribute (calculated proportionally) */
}
.timing-bar.pos { background: var(--strong); }
.timing-bar-track {
  width: 80px;
  height: 6px;
  background: var(--paper-warm);
  position: relative;
  flex-shrink: 0;
}
.timing-bar-track > .timing-bar { height: 6px; position: absolute; top: 0; right: 50%; }
.timing-bar-track > .timing-bar.pos { right: auto; left: 50%; }

/* Vertical zero rule on track */
.timing-bar-track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--neutral-grey);
}
.returns-table tbody td .gap-num {
  font-weight: 600;
  min-width: 48px;
  text-align: right;
}
.returns-table tbody td .gap-num.neg { color: var(--monitor); }
.returns-table tbody td .gap-num.pos { color: var(--strong); }

/* ── FM tenure timeline ─────────────────────────────────── */
.fm-timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 6px;
  font-family: var(--mono);
}
.fm-timeline-row {
  display: grid;
  grid-template-columns: 130px 1fr 50px;
  gap: 10px;
  align-items: center;
  padding: 5px 0;
  font-size: 11.5px;
}
.fm-timeline-row .fm-name {
  font-family: var(--serif);
  font-size: 13.5px;
  font-variation-settings: "SOFT" 40, "opsz" 36;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-timeline-row .fm-name small {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--neutral-grey);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 1px;
}
.fm-timeline-track {
  position: relative;
  height: 14px;
  background: var(--paper-warm);
}
.fm-timeline-track .fm-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--ink);
  /* left + width set inline */
}
.fm-timeline-track .fm-bar.cio { background: var(--signal); }
.fm-timeline-track .fm-bar.equity { background: var(--ink); }
.fm-timeline-track .fm-bar.overseas { background: var(--oxford); }
.fm-timeline-row .fm-tenure {
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.fm-timeline-axis {
  display: grid;
  grid-template-columns: 130px 1fr 50px;
  gap: 10px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--neutral-grey);
  letter-spacing: 0.06em;
}
.fm-timeline-axis-ticks {
  display: flex;
  justify-content: space-between;
  position: relative;
}

/* ── Drop cap for analyst rationale ───────────────────── */
.dropcap-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255,252,249,0.92);
}
.dropcap-text::first-letter,
.dropcap-text .dropcap {
  font-family: var(--serif);
  font-size: 56px;
  font-variation-settings: "SOFT" 80, "opsz" 144;
  font-weight: 350;
  line-height: 0.85;
  float: left;
  margin: 4px 8px 0 0;
  color: var(--signal-light);
}

/* ── Chart annotation marginalia (dot + label) ────────── */
.chart svg .annot-tick { stroke: var(--ink); stroke-width: 0.75; opacity: 0.4; }
.chart svg .annot-dot { fill: var(--signal); }
.chart svg .annot-dot-bm { fill: var(--lavender-deep); }
.chart svg .annot-label {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--ink);
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: uppercase;
}
.chart svg .annot-label.neg { fill: var(--monitor); }
.chart svg .annot-value {
  font-family: var(--mono);
  font-size: 9.5px;
  fill: var(--ink);
  letter-spacing: 0.02em;
  font-weight: 600;
}

/* ── Override f4 verdict-chip to fall back to seal style ─── */
.verdict-chip { display: none; } /* deprecated by .verdict-seal in v5 */

/* ── v6 — DRAMATICALLY tighter section rhythm ─── */
.f4-content > .fsec.has-chapter {
  margin-bottom: 14px;
  padding-bottom: 14px;
}
.f4-content > .fsec.has-chapter:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
/* Tighten internal grid gaps within Layout 4 sections */
.f4-content .col-2,
.f4-content .col-3,
.f4-content .col-2-1,
.f4-content .col-1-2 { gap: 12px; }
.f4-content .col-4 { gap: 10px; }
.f4-content .chart-frame { padding: 12px 14px; }
.f4-content .chart-title { padding-bottom: 6px; margin-bottom: 6px; }
.f4-shell { gap: 28px; padding: 8px 0 36px; }

/* GSAP initial states for v5 */
/* v7 — entry animation for verdict strip + action row done in pure CSS so it
   isn't affected by background-tab rAF throttling. Falls back to instant-on
   if reduced-motion is preferred. */
@keyframes trw-fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.verdict-strip .vs-locked,
.verdict-strip .vs-unlocked,
.f5-action-row > * {
  animation: trw-fadeUp 0.55s ease-out both;
}
.verdict-strip .vs-locked,
.verdict-strip .vs-unlocked   { animation-delay: 0.10s; }
.f5-action-row > *:nth-child(1) { animation-delay: 0.16s; }
.f5-action-row > *:nth-child(2) { animation-delay: 0.22s; }
@media (prefers-reduced-motion: reduce) {
  .verdict-strip .vs-locked,
  .verdict-strip .vs-unlocked,
  .f5-action-row > * { animation: none; }
}

/* ── FAQ section (Layout 4) · two-column dense accordion ─── */
.f4-faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
  border-top: 1px solid var(--ink);
}
@media (max-width: 720px) { .f4-faq { grid-template-columns: 1fr; gap: 0; } }
.f4-faq .accordion-item {
  border-bottom: 1px solid var(--rule);
}
.f4-faq .accordion-trigger {
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 400;
  font-variation-settings: "SOFT" 40, "opsz" 36;
  letter-spacing: -0.005em;
  padding: 10px 0;
  color: var(--ink);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
}
.f4-faq .accordion-trigger:hover { color: var(--signal-deep); }
.f4-faq .accordion-icon {
  width: 14px;
  height: 14px;
  position: relative;
  flex-shrink: 0;
}
.f4-faq .accordion-icon::before, .f4-faq .accordion-icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.2s ease;
}
.f4-faq .accordion-icon::before { top: 6.5px; left: 0; right: 0; height: 1px; }
.f4-faq .accordion-icon::after { left: 6.5px; top: 0; bottom: 0; width: 1px; }
.f4-faq .accordion-item.open .accordion-icon::after { transform: rotate(90deg); }
.f4-faq .accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.f4-faq .accordion-item.open .accordion-content { max-height: 320px; }
.f4-faq .accordion-body {
  padding: 0 0 12px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  font-family: var(--sans);
}
.f4-faq .accordion-body strong { color: var(--ink); font-weight: 600; }

/* ── Welcome / log-out tweak in header (less cramped) ── */
.auth-state .who-block { font-size: 10.5px; }
.auth-state.logged-in .signin { display: none; }
.auth-state .signout { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--neutral-grey); padding: 4px 6px; cursor: pointer; }
.auth-state .signout:hover { color: var(--ink); }

/* Ace MF report card preview tooltip */
.report-preview {
  position: absolute;
  z-index: 100;
  background: var(--paper-card);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-pop);
  padding: 14px 16px;
  width: 280px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-soft);
  display: none;
  pointer-events: none;
}
.report-preview.visible { display: block; }
.report-preview h6 {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  font-variation-settings: "SOFT" 60;
  color: var(--ink);
  margin-bottom: 6px;
}
.report-preview ul { list-style: none; padding: 0; margin: 6px 0 0; }
.report-preview ul li { padding: 2px 0; display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--rule); }
.report-preview ul li:last-child { border-bottom: none; }
.report-preview ul li strong { color: var(--ink); }
.report-preview .footer-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--neutral-grey);
  text-transform: uppercase;
}

/* Old Layout 3 (kept for reference but unused going forward) */
.f3-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 56px;
  padding: 24px 0 80px;
}
@media (max-width: 1024px) {
  .f3-shell { grid-template-columns: 1fr; gap: 0; }
}
.f3-toc {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  font-family: var(--mono);
  border-right: 1px solid var(--rule);
  padding-right: 16px;
}
@media (max-width: 1024px) { .f3-toc { display: none; } }

.f3-toc-head {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.f3-toc a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 8px 0;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -12px;
  transition: color 0.15s, border-left-color 0.15s;
}
.f3-toc a .num { color: var(--neutral-grey); font-size: 10px; }
.f3-toc a.active { color: var(--signal-deep); border-left-color: var(--signal); font-weight: 500; }
.f3-toc a.active .num { color: var(--signal-deep); }
.f3-toc a:hover { color: var(--ink); }
.f3-toc a .lock { margin-left: 4px; opacity: 0.6; }

.f3-content > .fsec { margin-bottom: 56px; }
.f3-meta-strip {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--neutral-grey);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 36px;
}
.f3-meta-strip strong { color: var(--ink); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   v8 · DOM-gated Analyst Note (Section 07)
   Visitor / logged-in / intake-done / client: only .analyst-locked-card
   visible. Mount stays empty.
   Finalised client (body.is-finalised, Phase 4.1): mount holds the full
   payload, locked card hidden.
   ════════════════════════════════════════════════════════════ */

/* Visitor-only locked CTA card */
.analyst-locked-card {
  background: var(--paper-warm);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--ink);
  padding: 22px 26px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.analyst-locked-card .alc-icon {
  font-size: 26px;
  line-height: 1;
  color: var(--neutral-grey);
  flex-shrink: 0;
}
.analyst-locked-card .alc-text { flex: 1 1 320px; min-width: 0; }
.analyst-locked-card h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "opsz" 60;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.2;
}
.analyst-locked-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}
.analyst-locked-card .alc-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.analyst-locked-card .alc-actions .btn { padding: 9px 14px; font-size: 10.5px; }
body.is-finalised .analyst-locked-card { display: none; }
body:not(.is-finalised) #analyst-note-mount { display: none; }

/* Phase 4.1 · Deep-metrics gate (section 04b on fund-detail) — unlocks at the
   logged-in layer, NOT at finalised. Uses .deep-metrics-locked-card as a
   modifier so the parent .analyst-locked-card visual styles still apply, but
   the gate is at the looser logged-in tier. */
body.is-logged-in .deep-metrics-locked-card { display: none; }
body:not(.is-logged-in) #deep-metrics-mount { display: none; }
/* Override: when logged-in but NOT finalised, the parent .analyst-locked-card
   rule (which would hide ALL such cards only when is-finalised) doesn't apply
   to deep-metrics-locked-card — the looser gate above hides it sooner. */
@media (max-width: 720px) {
  .analyst-locked-card { padding: 20px; gap: 14px; }
  .analyst-locked-card .alc-text { flex-basis: 100%; }
  .analyst-locked-card .alc-actions { width: 100%; }
}

/* ── Analyst Note v8 (rendered by scorecard.js for clients only) ── */
.analyst-note-v8 {
  background: var(--paper-warm);
  border-left: 3px solid var(--ink);
  padding: 22px 24px 20px;
  margin-bottom: 18px;
}
.an-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.an-eb-rule { flex: 0 0 18px; height: 1px; background: var(--rule-strong); }
.an-eb-band {
  font-weight: 700;
  letter-spacing: 0.20em;
  padding: 2px 8px;
  font-size: 10px;
}
.an-eb-band.v-strong    { color: var(--strong);    background: var(--strong-soft); }
.an-eb-band.v-selective { color: var(--selective); background: var(--selective-soft); }
.an-eb-band.v-satellite { color: var(--satellite); background: var(--satellite-soft); }
.an-eb-band.v-fallback  { color: var(--fallback);  background: var(--fallback-soft); }
.an-eb-band.v-monitor   { color: var(--monitor);   background: var(--monitor-soft); }
.an-eb-role {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  font-variation-settings: "SOFT" 80, "opsz" 36;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  text-transform: none;
}

.an-rationale {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.an-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  color: var(--neutral-grey);
  text-transform: uppercase;
  padding-top: 10px;
  border-top: 1px dotted var(--rule);
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

/* Two-column grid: scorecard (1.4fr) + medallion (1fr) */
.an-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 900px) { .an-grid { grid-template-columns: 1fr; gap: 22px; } }

.an-h {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.an-h-mt { margin-top: 22px; }

/* Scorecard rows with animated bars */
.sc-rows { display: grid; gap: 0; border: 1px solid var(--rule-strong); }
.sc-row {
  padding: 10px 14px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-card);
}
.sc-row:last-child { border-bottom: none; }
.sc-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
}
.sc-row-name {
  font-family: var(--serif);
  font-size: 14.5px;
  font-variation-settings: "SOFT" 40, "opsz" 36;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.sc-row-status {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 2px 8px;
}
.sc-row.sc-pass    .sc-row-status { color: var(--strong);    background: var(--strong-soft); }
.sc-row.sc-concern .sc-row-status { color: var(--satellite); background: var(--satellite-soft); }
.sc-row.sc-fail    .sc-row-status { color: var(--monitor);   background: var(--monitor-soft); }
.sc-row-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--neutral-grey);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sc-bar-track {
  height: 4px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}
.sc-bar-fill {
  height: 100%;
  background: var(--signal);
  width: 0%;
  transition: width 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sc-row.sc-concern .sc-bar-fill { background: var(--satellite); }
.sc-row.sc-fail    .sc-bar-fill { background: var(--monitor); }

/* Exit triggers list */
.an-triggers { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.an-triggers li {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}
.an-triggers li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--monitor);
  font-family: var(--mono);
  font-weight: 700;
}

/* PCI Medallion */
.an-pci-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 0;
}
.pci-medallion {
  position: relative;
  width: 168px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* no fixed height — the SVG is 168px, the caption sits below as a natural flow child */
}
.pci-medallion-center {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 168px;
  /* matches SVG dimensions; the caption is a separate sibling that flows below */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 0 22px;
  /* horizontal padding keeps long inside-circle labels inside the safe area */
}
.pci-medallion-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  margin-bottom: 4px;
}
.pci-medallion-score {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 350;
  font-variation-settings: "SOFT" 50, "opsz" 144;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.pci-medallion-pct {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--signal-deep);
  text-align: center;
  white-space: nowrap;
  /* short label form ("Top 1%"); never wraps */
}
.pci-medallion-caption {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-grey);
  text-align: center;
  margin-top: 12px;
  /* category caption lives outside the circle so it can't overflow */
}


/* ════════════════════════════════════════════════════════════
   SCREENER REFINEMENT — overflow, sorting, filters, cells, actions
   ════════════════════════════════════════════════════════════ */

/* The table is a self-contained scroll panel. Vertical scrolling is
   the panel's own, so the sticky header pins to the panel top (it
   was being mis-offset by the page-header height, which dropped the
   header onto the first row). Horizontal overflow keeps a wide table
   from ever running off the page margin. */
.fund-table-wrap {
  max-height: calc(100vh - 220px);
  overflow: auto;
  border: 1px solid var(--rule-strong);
}

/* Toolbar hint replacing the old sort dropdown. */
.screener-sort-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neutral);
}

/* Sortable column headings — the arrow sits steady at the end. */
.fund-table thead th[data-col] .sort-arrow {
  display: inline-block;
  width: 9px;
  margin-left: 3px;
  font-size: 8px;
}
.fund-table thead th[data-col]:hover { color: var(--ink); }
.fund-table thead th[data-sorted] { color: var(--ink); }

/* Filters · cap the long Category / AMC lists so the panel stays
   compact instead of running hundreds of checkboxes tall. */
#filter-cat,
#filter-amc {
  max-height: 188px;
  overflow-y: auto;
  padding-right: 4px;
}
.filter-group { border-bottom-style: solid; border-bottom-color: var(--rule-fine); }
.filter-group label.check { padding: 4px 0; font-size: 12.5px; }

/* Row actions · a tidy, consistent cluster — uniform square
   buttons, quiet by default and full-strength on row hover. */
.fund-table .row-actions { gap: 5px; }
.fund-table .row-actions .watchlist-btn {
  width: 26px;
  height: 26px;
  font-size: 13px;
  opacity: 0.6;
}
.fund-table tbody tr:hover .row-actions .watchlist-btn { opacity: 1; }
.fund-table .row-actions .compare-check { margin-left: 2px; }
