:root {
  /* Light, warm palette — bright olive green + burnt brown */
  --bg: #FAF7F0;          /* Warm cream background */
  --bg-elevated: #F1EBDD; /* Slightly deeper cream */
  --card: #FFFFFF;        /* White card surface */
  --ink: #2B2722;         /* Near-black warm text (≈15:1 on white) */
  --ink-soft: #4C463B;    /* Soft dark text (≈9:1) */
  --muted: #6B6356;       /* Muted text (≈5:1 on white) */
  --line: #E0D9CA;        /* Warm border color */

  /* Brand colors — olive green + burnt brown */
  --brand: #55692B;       /* Deep olive green (white text ≈6:1) */
  --brand-2: #8B4513;     /* Burnt brown / saddle (white text ≈6.4:1) */
  --brand-light: #6B8E23; /* Bright olive for accents/hover */

  /* Accent colors */
  --accent: #6B8E23;      /* Bright olive accent */
  --accent-2: #A0522D;    /* Sienna */

  /* Status colors — readable on light surfaces */
  --danger: #B23A2E;      /* Deep brick red */
  --success: #4F7942;     /* Fern green */
  --warn: #9A6B00;        /* Burnt amber */

  /* Gradient: olive → burnt brown */
  --gradient: #4A5728;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: #8B4513; color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.topbar a { color: rgba(255, 255, 255, 0.85); text-decoration: none; margin-right: 16px;
  transition: color 0.2s ease; font-weight: 500; }
.topbar a:hover { color: #FFFFFF; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: 0.5px; color: #FFFFFF; }
.brand .hex { color: #FFFFFF; margin-right: 6px; font-size: 20px; }
.brand .env { font-weight: 400; font-size: 12px; color: rgba(255, 255, 255, 0.65); margin-left: 8px; }
nav { display: flex; align-items: center; }

/* Avatar dropdown */
.av-wrap { position: relative; margin-left: 8px; }
.av-btn { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45);
  background: #4A5728; color: white;
  font-size: 12px; font-weight: 700; cursor: pointer; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s; padding: 0; }
.av-btn:hover, .av-wrap:focus-within .av-btn { border-color: white; }
.av-drop { position: absolute; right: 0; top: calc(100% + 10px);
  background: white; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.13); min-width: 180px; padding: 8px 0;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .15s, transform .15s; z-index: 200; }
.av-wrap:focus-within .av-drop { opacity: 1; pointer-events: auto; transform: none; }
.av-drop__name { padding: 8px 16px 2px; font-size: 13px; font-weight: 600; color: var(--ink); }
.av-drop__sub { padding: 0 16px 8px; font-size: 11px; color: var(--muted); text-transform: capitalize; }
.av-drop__sep { border-top: 1px solid var(--line); margin: 4px 0; }
.av-drop__item { display: block; padding: 8px 16px; font-size: 13px; color: var(--ink) !important;
  text-decoration: none; transition: background .1s; margin-right: 0; }
.av-drop__item:hover { background: #f5f0e8; color: var(--ink) !important; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }
.foot { color: var(--ink-soft); text-align: center; padding: 32px 24px 12px; font-size: 12px; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.flash-error { background: #F5E8E6; color: var(--danger); border: 1px solid #E0C8C4; }
.flash-success { background: #E8F0E8; color: var(--success); border: 1px solid #C4D0C4; }
.flash-info { background: #F2EDE4; color: var(--brand); border: 1px solid #D4CCBC; }
.flash-warning { background: #F5F0E8; color: var(--warn); border: 1px solid #E0D0B8; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; margin-bottom: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); }
h1 { margin: 0 0 12px; font-size: 24px; color: var(--ink); font-weight: 700; }
h2 { margin: 16px 0 8px; font-size: 18px; color: var(--brand); font-weight: 600; }
h3 { margin: 12px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-soft); }

label { display: block; margin-bottom: 4px; color: var(--ink-soft); font-weight: 500; font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; 
  background: var(--card); color: var(--ink); font: inherit; transition: all 0.2s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(107, 142, 35, 0.25); background: var(--bg-elevated); }
textarea { min-height: 80px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
button, .btn { background: var(--brand); color: #FFFFFF; border: none; border-radius: 8px;
  padding: 12px 20px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block;
  transition: all 0.2s ease; font-weight: 600; box-shadow: 0 2px 8px rgba(85, 105, 43, 0.3); }
button:hover, .btn:hover { background: var(--brand-2); transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 69, 19, 0.35); }
button:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; opacity: 0.6; }
.btn.btn-secondary { background: var(--card); color: var(--brand); border: 1px solid var(--brand); }
.btn.btn-secondary:hover { background: var(--brand); color: #FFFFFF; }
.btn.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn.btn-success { background: var(--success); color: #FFFFFF; }
.btn-tiny { padding: 4px 8px; font-size: 12px; }
.formrow { margin-bottom: 12px; }
.formrow-inline { display: flex; gap: 12px; }
.formrow-inline > * { flex: 1; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
th { background: var(--bg-elevated); color: var(--ink-soft); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.3px; }
.muted { color: var(--ink-soft); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink); }
.tag { display: inline-block; padding: 6px 12px; border-radius: 16px; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; border: 1px solid var(--line); 
  background: var(--bg-elevated); color: var(--ink-soft); }
.tag-accredited { border-color: var(--brand); color: var(--brand); background: rgba(107, 142, 35, 0.15); }
.tag-qualified_client, .tag-qualified { border-color: var(--success); color: var(--success); background: rgba(129, 199, 132, 0.15); }
.tag-qualified_purchaser, .tag-qp { border-color: var(--warn); color: var(--warn); background: rgba(255, 183, 77, 0.15); }
.tag-pending { border-color: var(--line); color: var(--ink-soft); background: var(--bg-elevated); }
.tag-open { background: #E8F0E8; color: var(--success); border-color: #C4D0C4; }
.tag-closed { background: #F5E8E6; color: var(--danger); border-color: #E0C8C4; }
.tag-coming_soon, .tag-watch_list { background: #F5F0E8; color: var(--brand); border-color: #E0D0B8; }
.tag-approved { background: rgba(129, 199, 132, 0.15); color: var(--success); border-color: var(--success); }
.tag-rejected { background: rgba(178, 58, 46, 0.12); color: #98271c; border-color: var(--danger); }
.tag-pending_review, .tag-in_review, .tag-info_requested { background: var(--bg-elevated); color: var(--ink-soft); border-color: var(--line); }
.tag-draft, .tag-cancelled { background: var(--bg-elevated); color: var(--ink-soft); border-color: var(--line); }

.stat { display: inline-block; padding: 20px 24px; margin-right: 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; min-width: 150px; }
.stat .n { font-size: 28px; font-weight: 600; color: var(--brand); }
.stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-soft); }

.banner { padding: 12px 16px; border-left: 4px solid var(--brand); background: #F5F0E8; margin-bottom: 16px;
  color: var(--ink-soft); border-radius: 4px; font-size: 13px; }
.context-panel { background: var(--bg-elevated); border-left: 4px solid var(--brand); padding: 14px 16px;
  border-radius: 4px; margin-bottom: 12px; }
.context-panel .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--ink-soft); margin-bottom: 6px; }
.disclosure-body { max-height: 220px; overflow-y: scroll; border: 1px solid var(--line); padding: 12px;
  background: white; font-size: 13px; border-radius: 6px; }
.disclosure-body .sentinel { height: 1px; }
/* Read-only detail view: full height, no scroll box. */
.disclosure-body--full { max-height: none; overflow-y: visible; }
.step-dots { display: flex; gap: 8px; margin-bottom: 16px; }
.step-dots .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-elevated); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; border: 1px solid var(--line); }
.step-dots .dot.active { background: var(--brand); color: white; border-color: var(--brand); }
.step-dots .dot.done { background: var(--success); color: white; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.grid-2 .k { color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
.grid-2 .v { font-weight: 600; color: var(--ink); }
.fund-card { border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 12px;
  background: white; display: flex; gap: 24px; align-items: center; justify-content: space-between;
  transition: all 0.2s ease; }
.fund-card:hover { background: var(--bg-elevated); border-color: var(--brand); }
.fund-card h3 { margin: 0; font-size: 15px; color: var(--brand); text-transform: none; letter-spacing: 0; }
.fund-meta { display: flex; gap: 20px; font-size: 12px; color: var(--ink-soft); }
.fund-meta b { color: var(--ink); }
.login-box { max-width: 360px; margin: 60px auto; }
.hint { color: var(--ink-soft); font-size: 12px; margin-top: 4px; }
.err { color: var(--danger); font-size: 12px; }
.ok { color: var(--success); font-size: 12px; }
.sequence-step { display: none; }
.sequence-step.active { display: block; }

/* ─── Dashboard ──────────────────────────────────────────────── */
.dash { margin: -24px; display: flex; flex-direction: column; }

/* Hero */
.dash-hero { background: var(--gradient); padding: 28px 32px 30px;
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px; }
.dash-hero__left h1 { font-size: 28px; font-weight: 300;
  color: rgba(255,255,255,.75); line-height: 1.15; margin: 0; }
.dash-hero__left h1 strong { font-weight: 700; color: #fff; }
.dash-hero__sub { margin-top: 6px; font-size: 14px; color: rgba(255,255,255,.65); }
.dash-hero__sub--clear { color: rgba(255,255,255,.85); }
.dash-hero__right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.dash-hero__tier { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; padding: 5px 14px; border-radius: 20px; }
.dash-hero__status { display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,.75); font-weight: 500; }
.dash-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dash-dot--approved { background: #6FCF97; box-shadow: 0 0 0 2px rgba(111,207,151,.3); }
.dash-dot--pending  { background: #F2C94C; box-shadow: 0 0 0 2px rgba(242,201,76,.3); }
.dash-dot--rejected { background: #EB5757; box-shadow: 0 0 0 2px rgba(235,87,87,.3); }
.dash-hero__review { font-size: 12px; color: rgba(255,255,255,.5); }

.dash-hero__link { font-size: 12px; color: rgba(255,255,255,.8); text-decoration: none; }
.dash-hero__link:hover { text-decoration: underline; }

/* Main grid: content + right rail */
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; flex: 1; min-height: 480px; }
@media (max-width: 860px) { .dash-main { grid-template-columns: 1fr; } }

/* Main-action card ("Your next step") */
.dash-next { background: #f5f8f0; border-color: #cfd9b8; }
.dash-next__eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--brand); margin-bottom: 8px; }
.dash-next__title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.dash-next__desc { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

/* Right rail */
.dash-rail { background: var(--card); border-left: 1px solid var(--line);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.dash-rail > .card { margin-bottom: 0; }
.dash-rail__name { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }

/* Grey "No action needed" pill + blocked-prerequisite note */
.dash-pill { background: var(--bg-elevated); color: var(--muted); border-radius: 20px;
  padding: 6px 12px; font-size: 12px; white-space: nowrap; }
.dash-block { font-size: 12px; color: var(--muted); font-style: italic; max-width: 260px;
  line-height: 1.4; text-align: right; }
.dash-block a { color: var(--brand-2); font-style: normal; font-weight: 600; }

/* Small dashboard button (used by error.html) */
.dash-btn { display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 6px;
  text-decoration: none; border: 1px solid var(--line); color: var(--ink-soft);
  background: var(--bg); transition: .15s; text-align: center; }
.dash-btn:hover { background: #ede6d8; border-color: var(--ink-soft); color: var(--ink); }
.dash-btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.dash-btn--primary:hover { background: #44561f; color: #fff; }

/* Content column */
.dash-content { padding: 18px 22px; display: flex; flex-direction: column;
  gap: 14px; background: var(--bg); }
.dash-content > .card { margin-bottom: 0; }

/* Card head used in content cards */
.dash-ch { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; }
.dash-ch__label { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--muted); }
.dash-ch__action { font-size: 12px; color: var(--brand-2); text-decoration: none; font-weight: 600; }
.dash-ch__action:hover { text-decoration: underline; }

/* Order / transaction rows (share the billing-row layout) */
a.dash-bill { text-decoration: none; color: inherit; margin: 0 -8px;
  padding-left: 8px; padding-right: 8px; border-radius: 4px; transition: background .1s; }
a.dash-bill:hover { background: #f5f0e8; }
.dash-bill__type { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dash-bill__date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dash-ch__count { font-size: 12px; color: var(--muted); margin-right: 10px; }

/* Filter links (orders / transactions list pages) */
.filter-links { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-links a { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 16px;
  text-decoration: none; border: 1px solid var(--line); color: var(--ink-soft); background: white; }
.filter-links a.active { background: var(--brand); color: white; border-color: var(--brand); }

/* Billing rows */
.dash-bill { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13px; }
.dash-bill + .dash-bill { border-top: 1px solid var(--line); }
.dash-bill__period { flex: 1; font-weight: 500; color: var(--ink); }
.dash-bill__amount { font-weight: 600; color: var(--ink); }
.dash-bill__badge { font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; padding: 3px 9px; border-radius: 10px; }
.dash-bill__badge--paid { background: #e6f0e4; color: var(--success); }
.dash-bill__badge--due  { background: #fff0d2; color: var(--warn); }
.dash-bill__link { font-size: 12px; color: var(--brand-2); text-decoration: none; }
.dash-bill__link:hover { text-decoration: underline; }

/* Document rows (new style) */
.dash-doc-list { list-style: none; margin: 0; padding: 0; }
.dash-doc-item { display: flex; align-items: center; gap: 10px; padding: 9px 8px;
  border-radius: 7px; font-size: 13px; transition: .1s; }
.dash-doc-item:hover { background: var(--bg); }
.dash-doc-icon { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; }
.dash-doc-icon--ok  { background: #e6f0e4; color: var(--success); }
.dash-doc-icon--pnd { background: #fff0d2; color: var(--warn); }
.dash-doc__name { flex: 1; font-weight: 500; color: var(--ink); }
.dash-doc__ver  { font-size: 11px; color: var(--muted); }
.dash-doc__review { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 5px;
  background: var(--warn); color: #fff; text-decoration: none; white-space: nowrap; }
.dash-doc__review:hover { background: #7a5000; }

/* Profile definition list (used on profile.html) */
.profile-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.profile-dl dt { color: var(--muted); font-weight: 500; white-space: nowrap; padding-top: 1px; }
.profile-dl dd { margin: 0; color: var(--ink); word-break: break-word; }

/* Pills */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; }
.badge--in-progress, .badge--pending { background: var(--warn); color: white; }
.badge--success, .badge--paid { background: var(--success); color: white; }
.badge--overdue { background: var(--danger); color: white; }


.btn { padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: white; cursor: pointer; text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: #f1ebdd; }
.btn-primary { background: var(--brand-2); color: white; border-color: var(--brand-2); }
.btn-primary:hover { background: #73380F; color: white; }
.btn-link { background: transparent; border: 1px solid var(--line); }


/* ─── Funds library + detail ──────────────────────────────────── */
.funds-page__head { display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.funds-page__head h1 { margin: 0; font-size: 24px; color: var(--brand); }
.funds-page__head .muted { font-size: 13px; margin: 4px 0 0; }

.funds-search { display: flex; align-items: center; gap: 6px; width: 100%;
  flex-wrap: wrap; margin-bottom: 18px; }
.funds-search input { flex: 1 1 220px; min-width: 220px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 14px; background: white; color: var(--ink); }
.funds-filter-select { max-width: 280px; text-overflow: ellipsis; }
.funds-search button { padding: 10px 14px; background: var(--brand); color: white;
  border: 0; border-radius: 6px; cursor: pointer; font-size: 14px; }

.funds-filters__clear { font-size: 12px; color: var(--brand-2); text-decoration: none; }

/* Status sections */
.funds-section__title { font-size: 18px; font-weight: 700; color: var(--ink);
  margin: 20px 0 12px; }
.funds-section__title:first-of-type { margin-top: 4px; }

/* "What is fund structure?" explainer */
.funds-explainer { margin: 0 0 14px; font-size: 13px; }
.funds-explainer summary { cursor: pointer; text-decoration: underline;
  color: var(--ink); display: inline-block; }
.funds-explainer dl { margin: 10px 0 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.funds-explainer dt { font-weight: 700; margin-top: 6px; }
.funds-explainer dt:first-child { margin-top: 0; }
.funds-explainer dd { margin: 2px 0 0; color: var(--muted); }

/* Result count line */
.funds-count { font-size: 13px; color: var(--muted); margin: 0 0 4px; }

/* Pagination */
.funds-pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 24px 0 8px; flex-wrap: wrap; }
.funds-pagination__link { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--ink); text-decoration: none; background: var(--card); }
.funds-pagination__link:hover { border-color: var(--brand-2); }
.funds-pagination__link--current { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.funds-pagination__link--disabled { color: var(--muted); background: var(--bg-elevated); cursor: default; }

/* Fund tile grid */
.funds-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; align-content: start; }
.fund-tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.15s, transform 0.15s; }
.fund-tile:hover { border-color: var(--brand-2); transform: translateY(-1px); }
.fund-tile__head { display: flex; justify-content: space-between; gap: 8px; }
.fund-tile__name { margin: 0; font-size: 17px; line-height: 1.3; }
.fund-tile__name a { color: var(--ink); text-decoration: none; }
.fund-tile__name a:hover { color: var(--brand-2); }
.fund-tile__sponsor { color: var(--muted); font-size: 12px; }
.fund-tile__rows { display: flex; flex-direction: column;
  padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fund-tile__row { display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 5px 0; font-size: 13px; }
.fund-tile__row span { color: var(--muted); }
.fund-tile__row strong { font-weight: 600; color: var(--ink); text-align: right; }
.fund-tile__desc { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.fund-tile__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fund-tile__tier { color: var(--muted); font-size: 11px; padding-top: 6px; border-top: 1px dashed var(--line); }

/* ─── Portfolio ──────────────────────────────────────────────── */
.portfolio-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
@media (max-width: 880px) { .portfolio-grid { grid-template-columns: 1fr; } }
.portfolio-donut { text-align: center; }
.portfolio-legend { list-style: none; margin: 12px 0 0; padding: 0; text-align: left;
  font-size: 13px; }
.portfolio-legend li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.portfolio-legend__swatch { width: 12px; height: 12px; border-radius: 3px;
  display: inline-block; flex-shrink: 0; }

/* Portfolio stat cards (v2 layout) + holdings table */
.portfolio-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 16px; }
@media (max-width: 640px) { .portfolio-stats { grid-template-columns: 1fr; } }
.portfolio-stat__label { font-size: 13.5px; color: var(--muted); }
.portfolio-stat__value { font-size: 26px; font-weight: 700; font-family: Georgia, serif; }
.portfolio-stat__sub { font-size: 13.5px; color: var(--muted); }
.portfolio-table th, .portfolio-table td { text-align: left; padding: 8px 4px;
  border-bottom: 1px solid var(--line); font-size: 14px; }
.portfolio-table th.num, .portfolio-table td.num { text-align: right; }
.portfolio-table tbody tr:last-child td { border-bottom: 0; }
.portfolio-table__more { margin-top: 12px; font-size: 14px; }

/* Chips — asset class + status + risk */
.chip { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; line-height: 1.4;
  background: #ece7dc; color: var(--ink); }
.chip--asset { background: #ece7dc; color: var(--brand); }
.chip--asset.chip--real_estate     { background: #efe7d4; color: #856220; }
.chip--asset.chip--private_equity  { background: #f1e4d8; color: #8b4513; }
.chip--asset.chip--private_credit  { background: #e2ecdd; color: #3f6234; }
.chip--asset.chip--venture_capital { background: #e7ecdd; color: #55692b; }
.chip--asset.chip--infrastructure  { background: #f1ddc4; color: #964d10; }
.chip--asset.chip--hedge_fund      { background: #f3ddd9; color: #8a2031; }
.chip--asset.chip--secondaries     { background: #f3e8cf; color: #7d5600; }
.chip--asset.chip--other           { background: #ece7dc; color: var(--muted); }
.chip--status.chip--open         { background: #dde7d8; color: #3f6234; }
.chip--status.chip--coming_soon  { background: #ece7dc; color: var(--muted); }
.chip--status.chip--watch_list   { background: #fff0d2; color: var(--warn); }
.chip--status.chip--closed       { background: #f1d9d5; color: #98271c; }
.chip--risk.chip--risk-low       { background: #e2ecdd; color: #3f6234; }
.chip--risk.chip--risk-med       { background: #fff4dd; color: var(--warn); }
.chip--risk.chip--risk-med-high  { background: #fde4d3; color: #b35716; }
.chip--risk.chip--risk-high      { background: #f1d9d5; color: #98271c; }

.empty-state { text-align: center; padding: 32px; }
.empty-state a { color: var(--brand-2); text-decoration: none; font-weight: 500; }

/* Buttons */
.btn-block { width: 100%; justify-content: center; }
.btn-secondary { background: var(--brand); color: white; border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-2); color: white; }
.btn:disabled { background: #f1ebdd; color: var(--muted); cursor: not-allowed; }

/* Fund detail */
.fund-detail__head { background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 24px 28px; margin-bottom: 16px; }
.fund-detail__chips { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.fund-detail__name { margin: 0; font-size: 28px; color: var(--brand); }
.fund-detail__sponsor { color: var(--muted); margin: 4px 0 0; font-size: 14px; }

.fund-detail__grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 880px) { .fund-detail__grid { grid-template-columns: 1fr; } }

.fund-detail__main { background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 0 28px 28px; }
.fund-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 -28px 24px; padding: 0 28px; }
.fund-tabs__link { padding: 14px 16px; text-decoration: none; color: var(--muted);
  border-bottom: 2px solid transparent; font-size: 14px; font-weight: 500; transition: all 0.1s; }
.fund-tabs__link:hover { color: var(--brand); }
.fund-tabs__link--active { color: var(--brand); border-bottom-color: var(--accent); }
.fund-tabs__link--external { color: var(--brand-2); margin-left: auto; }

.fund-section { margin-bottom: 28px; scroll-margin-top: 80px; }
.fund-section h2 { margin: 0 0 12px; font-size: 16px; color: var(--brand); text-transform: none;
  letter-spacing: 0; font-weight: 700; }
.fund-section p { line-height: 1.6; color: var(--ink); margin: 0 0 8px; }

.terms { display: grid; grid-template-columns: 200px 1fr; gap: 8px 24px; margin: 0; }
.terms dt { color: var(--muted); font-size: 13px; }
.terms dd { margin: 0; font-weight: 500; }

.doc-rows { list-style: none; margin: 0; padding: 0; }
.doc-rows li { display: flex; align-items: baseline; gap: 14px; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.doc-rows li:last-child { border: 0; }
.doc-rows__type { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); font-weight: 600; min-width: 160px; flex-shrink: 0; }
.doc-rows li a { color: var(--ink); text-decoration: none; font-weight: 500; }
.doc-rows li a:hover { color: var(--brand-2); text-decoration: underline; }

/* Sidebar */
.fund-detail__side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
.quick-facts { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.quick-facts__head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--brand); font-weight: 700; margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line); }
.quick-facts__row { display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 13px; }
.quick-facts__row span { color: var(--muted); }
.quick-facts__row strong { color: var(--ink); }

.cta-stack { background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.cta-form { display: flex; flex-direction: column; gap: 8px; }
.cta-form label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); font-weight: 600; }
.cta-form input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; background: white; }

/* ─── Shared investor page patterns ──────────────────────────────────── */

/* Back link — one class used on every inner page */
.page-back { font-size: 13px; color: var(--brand-2); text-decoration: none;
  margin-bottom: 16px; display: inline-flex; align-items: center; gap: 4px;
  font-weight: 500; transition: color .12s; }
.page-back:hover { color: var(--ink); }

/* Inner page gradient strip — breaks out of .wrap padding */
.page-strip { background: var(--gradient); padding: 20px 32px 22px;
  margin: -24px -24px 24px; }
.page-strip__title { font-size: 20px; font-weight: 600; color: #fff;
  margin: 0 0 4px; line-height: 1.2; }
.page-strip__meta { font-size: 13px; color: rgba(255,255,255,.65); margin: 0; }
.page-strip__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.page-strip__badge { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; padding: 4px 12px; border-radius: 16px; }

/* Section label — 10px small-caps, used in cards and sidebar across all pages */
.section-label { font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); display: block; margin-bottom: 10px; }

/* ─── Suitability questionnaire ──────────────────────────────────────── */
.suit-wizard { max-width: 680px; margin: 0 auto; }
.suit-progress { margin-bottom: 24px; }
.suit-progress-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.suit-progress-fill { height: 100%; background: var(--brand); transition: width .35s ease; }
.suit-progress-label { font-size: 12px; color: var(--muted); margin-top: 6px; }
.suit-section { display: none; }
.suit-section.active { display: block; animation: fadeInUp .2s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.section-desc { color: var(--muted); margin: 0 0 20px; font-size: 13px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.check-row input[type=checkbox] { width: auto; margin-top: 3px; flex-shrink: 0; accent-color: var(--brand); }
.check-row label { font-weight: 400; color: var(--ink); font-size: 14px; cursor: pointer; line-height: 1.4; }
.radio-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.radio-row { display: flex; align-items: center; gap: 10px; }
.radio-row input[type=radio] { width: auto; flex-shrink: 0; accent-color: var(--brand); }
.radio-row label { font-weight: 400; color: var(--ink); font-size: 14px; cursor: pointer; }
.cond-field { display: none; }
.cond-field.show { display: block; }
.char-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.suit-actions { display: flex; gap: 12px; margin-top: 28px; align-items: center; }
.suit-actions .spacer { flex: 1; }
.tier-badge { display: inline-block; padding: 10px 28px; border-radius: 24px;
  font-size: 20px; font-weight: 700; margin: 16px 0; }
.tier-badge.qualified_purchaser { background: #e8f0e8; color: var(--success); }
.tier-badge.qualified_client   { background: #f2ede4; color: var(--brand); }
.tier-badge.accredited         { background: #faf7f0; color: var(--brand-2); }
.tier-badge.pending            { background: #f5f0e8; color: var(--warn); }
.result-meta { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ─── Annual recertification ─────────────────────────────────────────── */
.recert { max-width: 640px; margin: 0 auto; }
.recert-intro { background: var(--bg-elevated); border-left: 3px solid var(--brand-2);
  padding: 14px 16px; border-radius: 4px; margin-bottom: 28px; font-size: 14px; color: var(--ink); }
.recert-section { margin-bottom: 20px; }
.recert-section h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.change-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.change-row input[type=checkbox] { width: auto; margin-top: 3px; accent-color: var(--brand); }
.change-row label { font-size: 14px; color: var(--ink); cursor: pointer; line-height: 1.4; }
.attestation-box { background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: 6px; padding: 16px 18px; margin: 28px 0 20px; font-size: 13px;
  color: var(--ink); line-height: 1.6; }
.attestation-confirm { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 14px; }
.attestation-confirm input { width: auto; margin-top: 3px; accent-color: var(--brand); }
.recert-result { text-align: center; padding: 32px 0; }
.recert-result h2 { color: var(--success); margin-bottom: 8px; }
.recert-result p { color: var(--muted); font-size: 14px; }

/* ─── Message center ─────────────────────────────────────────────────── */
.nav-badge { display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px;
  border-radius: 9px; background: #EB5757; color: #fff; font-size: 11px;
  font-weight: 700; text-align: center; }
.msg { padding: 12px 0; border-bottom: 1px solid var(--line); }
.msg:last-child { border-bottom: 0; }
.msg__meta { font-size: 12px; margin-bottom: 4px; }
.msg__body { white-space: pre-wrap; font-size: 14px; }
.msg--mine, .msg--advisor { background: var(--bg-elevated); margin: 0 -12px;
  padding-left: 12px; padding-right: 12px; border-radius: 8px; }
