:root {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #020708;
  background: #ffffff;
  font-synthesis: none;
  font-optical-sizing: auto;
  font-size: 14px;
  line-height: 1.45;
  --font-heading: "Manrope", "Inter", -apple-system, sans-serif;
  --ink: #020708;
  --muted: #596163;
  --subtle: #757d7f;
  --disabled: #979b9c;
  --surface: #ffffff;
  --grey-10: #eff0f0;
  --grey-20: #e2e4e4;
  --teal-110: #031416;
  --teal-100: #02262a;
  --teal-90: #0f383c;
  --bronze-30: #dbd1c9;
  --bronze-40: #c8b7ad;
  --blue: #1f63e6;
  --blue-light: #6197fc;
  --blue-hover: #1051cc;
  --blue-soft: #e6effe;
  --green: #25b379;
  --green-dark: #014c33;
  --green-text: #027048;
  --green-soft: #d8f4e7;
  --red: #d3334b;
  --red-text: #c70723;
  --red-soft: #fde7e5;
  --orange: #fe6f42;
  --orange-text: #e6501c;
  --orange-soft: #fde8e1;
  --border-card: rgba(0, 0, 0, 0.07);
  --border-divider: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.24);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 144px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
button:disabled { cursor: default; opacity: .5; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); letter-spacing: -.025em; }
small { color: var(--muted); }
.boot { padding: 40px 24px; max-width: 560px; margin: 0 auto; }

/* Auth screen */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--grey-10); }
.auth-screen > section { width: min(100%, 400px); padding: 30px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border-card); box-shadow: var(--shadow-sm); }
.auth-screen h1 { font-size: 24px; font-weight: 700; }

/* Icons */
.icon { width: 17px; height: 17px; display: inline-flex; flex: 0 0 auto; vertical-align: middle; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Shell & Exact 58px PDT Top Header */
.pdt-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface); }
.pdt-shell.page-grey { background: var(--grey-10); }
.pdt-header {
  position: sticky; top: 0; z-index: 20; height: 58px; background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 24px; gap: 12px;
}
.pdt-nav { display: flex; align-items: center; gap: 22px; }
.pdt-nav a {
  text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 6px 0; transition: color .14s ease; white-space: nowrap;
}
.pdt-nav a:hover { color: var(--ink); }
.pdt-nav a.current { color: var(--ink); font-weight: 600; }

.pdt-brand {
  text-decoration: none; display: inline-flex; flex-direction: column; align-items: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 16px; letter-spacing: -.04em;
  color: #8b9496; line-height: 1; user-select: none;
}
.pdt-brand::after {
  content: ""; display: block; width: 26px; height: 1.8px; margin-top: 2px;
  background: currentColor; transform: rotate(-5deg); border-radius: 2px; opacity: .75;
}
.pdt-brand:hover { color: var(--ink); }

.pdt-header-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; position: relative; }
.worth-pill {
  display: inline-flex; align-items: center; gap: 0; height: 32px; padding: 0 2px;
  border: 1px solid rgba(0, 0, 0, 0.12); border-radius: var(--radius-md); background: #fff;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink);
  white-space: nowrap; overflow: hidden;
}
.worth-pill .pill-seg {
  border: 0; background: transparent; color: inherit; height: 100%; padding: 0 8px;
  display: inline-flex; align-items: center; gap: 4px; font-weight: 600;
}
.worth-pill .pill-seg:hover { background: var(--grey-10); }
.worth-pill .pill-ytd small { color: var(--subtle); font-weight: 500; font-size: 11px; margin-right: 1px; }
.worth-pill .pill-ytd.positive { color: var(--green-text); }
.worth-pill .pill-ytd.negative { color: var(--red-text); }
.worth-pill .pill-caret { color: var(--subtle); font-size: 11px; padding: 0 7px; border-left: 1px solid rgba(0, 0, 0, 0.08); }

.icon-circle {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--grey-10); color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  padding: 0; transition: background .14s ease;
}
.icon-circle:hover { background: var(--grey-20); }
.icon-circle.ghost { background: transparent; border-color: transparent; }
.icon-circle.ghost:hover { background: var(--grey-10); }
.icon-circle .icon { width: 15px; height: 15px; }

.avatar-pie {
  width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; overflow: hidden;
  background: conic-gradient(#7eaafb 0 42%, #1f63e6 42% 78%, #031416 78% 100%);
  flex: 0 0 auto;
}
.avatar-pie:hover { filter: brightness(1.06); }

/* Dropdown Menu */
.header-menu {
  position: absolute; top: 42px; right: 0; width: 226px; z-index: 40;
  background: #fff; border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 6px; display: grid; gap: 2px;
}
.header-menu[hidden] { display: none; }
.header-menu-group { padding: 6px 10px 3px; font-size: 11px; font-weight: 600; color: var(--subtle); text-transform: uppercase; letter-spacing: .04em; }
.header-menu button, .header-menu a {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px;
  border: 0; background: transparent; border-radius: var(--radius-md); color: var(--ink);
  font-size: 13px; font-weight: 500; text-align: left; text-decoration: none;
}
.header-menu button:hover, .header-menu a:hover { background: var(--grey-10); }
.header-menu .icon { width: 15px; height: 15px; color: var(--muted); }
.header-menu hr { border: 0; border-top: 1px solid var(--border-divider); margin: 4px 0; }

/* PDT Anchored Header Popovers (Performance & Portfolio value) */
.header-popover {
  position: fixed; top: 54px; right: 112px; z-index: 45; width: 344px; max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 72px); overflow-y: auto;
  background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16); padding: 18px; display: grid; gap: 14px;
}
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hp-head strong { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--ink); }
.hp-period-sel { min-height: 30px; height: 30px; padding: 0 10px; font-size: 13px; font-weight: 600; width: auto; }
.hp-tabs { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--border-divider); }
.hp-tabs button {
  background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 4px 0 9px; margin-bottom: -1px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
}
.hp-tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.hp-summary-card {
  border-radius: 12px; padding: 13px 14px; background: var(--grey-10); border: 1px solid var(--border-card);
  display: grid; gap: 5px;
}
.hp-summary-card.pos { background: #dff8ec; border-color: #87e0b4; }
.hp-summary-card.neg { background: #fde7e5; border-color: #f3a1a8; }
.hp-summary-vals { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hp-amt { font-family: var(--font-heading); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.hp-rows { display: grid; gap: 12px; }
.hp-row-wrap { display: grid; gap: 6px; }
.hp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hp-row-label { font-size: 12.5px; color: var(--muted); }
.hp-row-amt { font-family: var(--font-heading); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); margin-top: 2px; }
.hp-pct { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hp-detail-box {
  background: #020708; color: #ffffff; border-radius: 10px; padding: 9px 11px;
  display: grid; gap: 5px; font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 4px;
}
.hp-detail-box > div { display: flex; justify-content: space-between; gap: 10px; color: rgba(255, 255, 255, 0.78); }
.hp-detail-box strong { color: #ffffff; font-weight: 600; }
.hp-detail-box .hp-detail-tot { border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 5px; margin-top: 2px; color: #ffffff; }

.pv-icon-btn {
  width: 28px; height: 28px; border-radius: 7px; border: 0; background: var(--grey-20); color: var(--muted);
  display: inline-grid; place-items: center; padding: 0;
}
.pv-icon-btn:hover { background: var(--ink); color: #ffffff; }
.pv-icon-btn .icon { width: 14px; height: 14px; }
.pv-dark-card {
  background: #031416; color: #ffffff; border-radius: 13px; padding: 15px 15px 12px;
  display: grid; gap: 11px; overflow: hidden;
}
.pv-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pv-headline { font-family: var(--font-heading); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pv-ahead { font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, 0.68); white-space: nowrap; }
.pv-divider { height: 1px; background: rgba(255, 255, 255, 0.10); }
.pv-bars-svg { width: 100%; height: 164px; display: block; cursor: pointer; }
.pv-cards { display: grid; gap: 9px; }
.pv-card {
  background: #f3f4f4; border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 11px;
  padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.pv-card-lbl { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.pv-card-val { display: block; font-family: var(--font-heading); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); margin-top: 2px; }
.pv-sel { min-height: 30px; height: 30px; padding: 0 8px; font-size: 12.5px; font-weight: 500; width: auto; flex: 0 0 auto; }
.kpi-help.tiny { width: 16px; height: 16px; font-size: 10px; border-width: 1.2px; }
.pv-dark-card.padi-dark { background: #1b100b; }
.padi-bars-svg { width: 100%; height: 156px; display: block; cursor: pointer; }
.pv-card-wrap { display: grid; gap: 6px; }
.pv-card.pv-card-col { flex-direction: column; align-items: stretch; gap: 9px; }
.pv-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pdt-switch { position: relative; display: inline-flex; width: 38px; height: 22px; cursor: pointer; flex: 0 0 auto; }
.pdt-switch input { opacity: 0; width: 0; height: 0; }
.pdt-switch span {
  position: absolute; inset: 0; border-radius: 999px; background: #cfd3d4; transition: background .16s ease;
}
.pdt-switch span::after {
  content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform .16s ease;
}
.pdt-switch input:checked + span { background: #e6501c; }
.pdt-switch input:checked + span::after { transform: translateX(16px); }
.hp-sub-pill { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--grey-10); padding: 3px 9px; border-radius: var(--radius-pill); }
.dy-top-row { background: #f4f5f6; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; }
.cmd-item.cmd-sub { padding-left: 44px; min-height: 32px; font-size: 12.5px; color: var(--muted); }
.cmd-sub-prefix { color: var(--subtle); font-weight: 400; margin-right: 4px; }
.col-section { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border-divider); }
.col-section:last-child { border-bottom: 0; padding-bottom: 0; }
.col-section-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.col-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.d-val-btn { font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.d-formula-box { margin: 4px 0 8px; }
.meta-strategy-sel {
  border: 1px solid rgba(0, 0, 0, 0.12); background: #ffffff; color: var(--ink); border-radius: 6px;
  font-size: 12px; font-weight: 600; padding: 2px 6px; height: 24px;
}
.cal-year-select {
  font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--ink);
  border: 1px solid transparent; background: transparent; border-radius: var(--radius-md);
  padding: 4px 8px 4px 2px; cursor: pointer;
}
.cal-year-select:hover, .cal-year-select:focus { background: #ffffff; border-color: rgba(0, 0, 0, 0.12); }
.action-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border-divider);
}
.action-tabs button {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: var(--radius-md);
}
.action-tabs button:hover { background: var(--grey-10); color: var(--ink); }
.action-tabs button[aria-pressed="true"] { background: var(--ink); color: #ffffff; }
.action-kind-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.action-kind-seg label {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-card); border-radius: var(--radius-md); padding: 8px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; background: #ffffff;
}
.action-kind-seg label:has(input:checked) { border-color: var(--ink); background: var(--grey-10); }
.action-kind-seg input { accent-color: var(--ink); }
.cash-hint { font-size: 12.5px; color: var(--muted); background: var(--grey-10); padding: 8px 12px; border-radius: var(--radius-md); }
.cash-hint strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.cash-pill-btn { border: 0; cursor: pointer; }
.ledger-presets button { padding: 4px 8px; font-size: 12px; }
button.vol-chip { border: 1px solid rgba(0, 0, 0, 0.10); cursor: pointer; }
button.vol-chip:hover { background: var(--grey-20); }

/* Subtle Status Strip */
.status-strip {
  background: var(--bronze-30); color: var(--ink); font-size: 13px; font-weight: 500;
  padding: 7px 16px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.status-strip.info { background: #e8f1fd; color: #103a8c; }
.status-strip.warn { background: var(--orange-soft); color: #8c2f0c; }
.status-strip.timetravel { background: #0f383c; color: #ffffff; gap: 12px; }
.status-strip.timetravel .tt-status-label { display: inline-flex; align-items: center; gap: 7px; }
.status-strip.timetravel .icon { width: 15px; height: 15px; color: #7ef2be; }
.status-strip.timetravel button {
  border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.12); color: #ffffff;
}
.status-strip.timetravel button:hover { background: rgba(255, 255, 255, 0.22); }
.status-strip.timetravel button.tt-exit { background: #ffffff; color: #031416; border-color: #ffffff; }
.status-strip.timetravel button.tt-exit:hover { background: #e8f1fd; }
.status-strip button {
  border: 1px solid rgba(0, 0, 0, 0.16); background: rgba(255, 255, 255, 0.72); color: inherit;
  border-radius: var(--radius-pill); padding: 2px 10px; font-size: 12px; font-weight: 600;
}

/* Fluid Full-Width PDT Container (uses full screen width on wide monitors with 72px PDT side margins) */
.pdt-container { width: 100%; max-width: none; margin: 0 auto; padding-inline: clamp(16px, 4vw, 72px); }
.pdt-main { flex: 1; display: flex; flex-direction: column; }

/* Dark-Teal Portfolio Hero (#031416) */
.hero-dark {
  background: #031416;
  color: #ffffff;
  padding: 28px 0 36px;
  position: relative;
  overflow: hidden;
}
.hero-dark .hero-wireframe {
  position: absolute; inset: 0; pointer-events: none; width: 100%; height: 100%; opacity: .16;
}
.hero-dark > .pdt-container { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.report-controls, .report-selects { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.report-controls { justify-content: flex-end; min-width: 0; }
.report-selects > .control { width: auto; max-width: 100%; }
.hero-title-group { display: flex; align-items: center; gap: 12px; }
.hero-dark h1 { font-size: 28px; font-weight: 700; color: #fff; line-height: 1.15; }
.hero-pill-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px;
  border-radius: var(--radius-md); border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.09); color: #ffffff; font-size: 13px; font-weight: 500;
  text-decoration: none; white-space: nowrap; transition: background .14s ease;
}
.hero-pill-btn:hover { background: rgba(255, 255, 255, 0.16); }
.hero-pill-btn.active { background: #ffffff; color: #031416; border-color: #ffffff; font-weight: 600; }
.hero-pill-btn.active:hover { background: #e8f1fd; }
.hero-pill-btn .icon { width: 14px; height: 14px; }
.hero-expand-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.10); color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.hero-expand-btn:hover { background: rgba(255, 255, 255, 0.18); }
.hero-expand-btn .icon { width: 13px; height: 13px; }

/* Allocation dimension underline tabs */
.dim-tabs {
  display: flex; align-items: center; gap: 22px; margin-top: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  overflow-x: auto; scrollbar-width: none;
}
.dim-tabs::-webkit-scrollbar { display: none; }
.dim-tabs button {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.52); font-size: 13px; font-weight: 500;
  padding: 0 0 10px; margin-bottom: -1px; white-space: nowrap; transition: color .14s ease;
}
.dim-tabs button:hover { color: rgba(255, 255, 255, 0.88); }
.dim-tabs button[aria-pressed="true"] { color: #ffffff; font-weight: 600; border-bottom-color: #ffffff; }
.dim-count {
  display: inline-flex; align-items: center; justify-content: center; margin-left: 5px;
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: #25b379; color: #031416; font-size: 10.5px; font-weight: 700; line-height: 1;
}

/* Portfolio Hero Allocation Grid (Clean ring left + 2-column horizontal bar legend right) */
.alloc-hero {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 5vw, 76px);
  align-items: center; margin-top: 26px;
}
.alloc-donut-wrap { display: grid; place-items: center; }
.alloc-donut { width: 214px; height: 214px; border-radius: 50%; display: grid; place-items: center; transition: background .2s ease; }
.alloc-donut-hole {
  width: 158px; height: 158px; border-radius: 50%; background: #031416;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px;
}
.alloc-donut-hole.has-sel strong { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: #ffffff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.alloc-donut-hole.has-sel small { font-size: 11.5px; color: rgba(255, 255, 255, 0.68); margin-top: 4px; max-width: 126px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.alloc-bars-wrap { display: grid; gap: 16px; min-width: 0; }
.alloc-bars {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 6), auto); grid-auto-flow: column;
  gap: 14px 44px; align-content: start;
}
.alloc-item {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 11px; align-items: center;
  background: transparent; border: 1px solid transparent; padding: 4px 6px; border-radius: var(--radius-sm);
  text-align: left; color: #fff; transition: background .12s ease, opacity .14s ease, border-color .14s ease;
}
.alloc-item:hover { background: rgba(255, 255, 255, 0.08); opacity: 1; }
.alloc-item.active { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.24); opacity: 1; }
.alloc-item.dimmed { opacity: 0.44; }
.alloc-badge.selected { font-size: 12px; font-weight: 800; }
.worth-pill.is-filtered { border-color: var(--green); box-shadow: 0 0 0 2px rgba(37, 179, 121, 0.16); }
.hp-filter-tag {
  display: inline-block; margin-left: 7px; padding: 2px 7px; border-radius: 999px;
  background: rgba(37, 179, 121, 0.14); color: var(--green-text); font-size: 11px; font-weight: 600; vertical-align: middle;
}
.filter-chip { background: #e8f5ef; border-color: rgba(37, 179, 121, 0.35); color: #055939; font-weight: 600; }
.filter-chip:hover { background: #d6efe3; }
.alloc-more-btn {
  justify-self: start; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85); border-radius: var(--radius-pill); padding: 4px 12px; font-size: 12px; font-weight: 600;
}
.alloc-more-btn:hover { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
.action-group-btn {
  border: 0; background: var(--grey-10); color: var(--ink); width: 22px; height: 22px; border-radius: 5px;
  display: inline-grid; place-items: center; font-size: 11px; margin-right: 4px;
}
.action-group-btn:hover { background: var(--grey-20); }
.action-child-row td { background: #f8f9fa; font-size: 12.5px; }
.action-child-row td:first-child { padding-left: 28px; }
.alloc-badge {
  width: 24px; height: 24px; border-radius: 6px; background: #ffffff; color: #031416;
  display: grid; place-items: center; font-size: 9.5px; font-weight: 700; flex: 0 0 auto;
}
.alloc-meta { min-width: 0; display: grid; gap: 6px; }
.alloc-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.alloc-row-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: #f5f9f9; }
.alloc-row-head strong { font-weight: 500; color: rgba(255, 255, 255, 0.68); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.alloc-track { width: 100%; height: 3.5px; border-radius: 4px; background: transparent; overflow: hidden; }
.alloc-track i { display: block; height: 100%; border-radius: inherit; }
.alloc-scroll-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.alloc-scroll-bar i { display: block; width: 88%; height: 100%; background: rgba(255, 255, 255, 0.34); border-radius: inherit; }

/* Light-Grey Hero Band (Performance, Dividend) — Borderless chart directly on #eff0f0 */
.hero-grey { background: var(--grey-10); padding: 34px 0 36px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.hero-tabs { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.hero-tabs button {
  background: transparent; border: 0; padding: 0; font-family: var(--font-heading);
  font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2;
  color: var(--disabled); transition: color .14s ease;
}
.hero-tabs button:hover { color: var(--muted); }
.hero-tabs button[aria-pressed="true"] { color: var(--ink); }

/* Warm-Taupe Hero Band (Actions — exact 134px height + subtle doodle art) */
.hero-taupe {
  background: var(--bronze-40); color: var(--ink); min-height: 134px;
  padding: 36px 0; position: relative; overflow: hidden;
}
.hero-taupe .taupe-art {
  position: absolute; right: clamp(220px, 26vw, 410px); top: -8px; height: 150px;
  pointer-events: none; user-select: none;
}
.hero-taupe > .pdt-container { position: relative; z-index: 1; }
.hero-taupe h1 { font-size: 26px; font-weight: 700; line-height: 1.2; }
.hero-taupe p { color: #544d48; margin-top: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.hero-taupe .button.primary { height: 40px; padding: 0 16px; border-radius: var(--radius-md); font-size: 13.5px; }

/* Compact 68px PDT KPI Cards (3-col grid, gap 12px) */
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.kpi-card {
  background: #ffffff; border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 12px 16px; min-height: 68px; box-shadow: var(--shadow-xs);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0;
}
.kpi-body { min-width: 0; display: grid; gap: 3px; }
.kpi-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.kpi-swap {
  display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent;
  padding: 0; font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.kpi-swap .alt { color: var(--muted); font-weight: 500; }
.kpi-swap .arrows { color: var(--subtle); font-size: 11px; }
.kpi-swap:hover .alt { color: var(--ink); }
.kpi-value {
  font-family: var(--font-heading); font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.25;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.kpi-dotted {
  border: 0; background: transparent; padding: 0; font: inherit; color: inherit;
  border-bottom: 1.5px dotted rgba(0, 0, 0, 0.32); cursor: pointer; line-height: 1.2;
}
.kpi-dotted:hover { border-bottom-color: var(--ink); }
.kpi-icons { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.kpi-icon {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--grey-10); color: var(--ink);
}
.kpi-icon.green { background: var(--green-soft); color: var(--green); }
.kpi-icon.blue { background: var(--blue-soft); color: var(--blue); }
.kpi-icon.red { background: var(--red-soft); color: var(--red); }
.kpi-icon.orange { background: var(--orange-soft); color: var(--orange); }
.kpi-icon .icon { width: 15px; height: 15px; }
.kpi-help {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--disabled);
  background: transparent; color: var(--subtle); font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; padding: 0; align-self: flex-start;
}
.kpi-help:hover { border-color: var(--ink); color: var(--ink); }
.vol-chip {
  font-family: "Inter", sans-serif; font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--grey-10); border: 1px solid var(--border-card); border-radius: var(--radius-pill);
  padding: 2px 8px;
}

/* Borderless Chart Area directly on #eff0f0 */
.hero-chart-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 14px; }
.bench-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  height: 32px; padding: 0 11px; border-radius: var(--radius-md); border: 1px solid rgba(0, 0, 0, 0.10);
  background: #ffffff; color: var(--ink); font-size: 12.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 5px;
}
.chip-btn:hover { background: #fafafa; border-color: rgba(0, 0, 0, 0.22); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: #ffffff; border-color: var(--ink); font-weight: 600; }

/* Borderless PDT Timeframe Strip (YTD W M Y 3Y 5Y Max Custom) */
.period { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.period button {
  background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: var(--radius-md);
  padding: 5px 9px; min-height: 30px; font-weight: 500; font-size: 12.5px;
}
.period button:hover { color: var(--ink); }
.period button[aria-pressed="true"] {
  color: var(--ink); font-weight: 600; background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08); box-shadow: var(--shadow-xs);
}

/* White Sections & Cards */
.pdt-section { padding: 24px 0 48px; background: #ffffff; flex: 1; }
.pdt-section.grey { background: var(--grey-10); padding-top: 32px; }
.panel { background: #ffffff; border: 1px solid var(--border-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); min-width: 0; }
.panel-pad { padding: 20px 22px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.panel h2 { font-size: 16px; font-weight: 700; }
.panel h3 { font-size: 14px; font-weight: 700; }

/* Toolbar, Buttons, Controls, Underline Tabs */
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.split { justify-content: space-between; }
.stack { display: grid; gap: 16px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.12); background: #ffffff; color: var(--ink);
  border-radius: var(--radius-md); text-decoration: none; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}
.button:hover { background: var(--grey-10); }
.button.primary { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.button.primary:hover { background: #1e2729; }
.button.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.button.quiet:hover { background: var(--grey-10); color: var(--ink); }
.button.danger { color: var(--red-text); border-color: rgba(225, 43, 54, 0.25); }
.button.danger:hover { background: var(--red-soft); }
.button.only { min-width: 32px; padding: 6px; }
.button.compact { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.button .icon { width: 14px; height: 14px; }

.control {
  color: var(--ink); border: 1px solid rgba(0, 0, 0, 0.12); background: #fff;
  border-radius: var(--radius-md); min-height: 32px; padding: 5px 10px; font-size: 13px; max-width: 100%;
}
.control:disabled { background: var(--grey-10); color: var(--subtle); }
.control::placeholder { color: var(--subtle); }

.underline-tabs { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--border-divider); margin-bottom: 14px; }
.underline-tabs button {
  background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 6px 0 9px;
  margin-bottom: -1px; font-size: 13.5px; font-weight: 500; color: var(--muted);
}
.underline-tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* Clean 48px PDT Tables */
.scroll-table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13.5px; }
th {
  padding: 11px 12px; font-size: 12px; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--border-divider); white-space: nowrap; background: #ffffff;
}
th button { color: inherit; padding: 0; background: none; border: 0; text-align: inherit; font-weight: 600; }
th button:hover { color: var(--blue); }
td { padding: 11px 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); vertical-align: middle; height: 48px; }
th:first-child, td:first-child { padding-left: 4px; }
th:last-child, td:last-child { padding-right: 4px; }
tbody tr:hover { background: #fafafa; }
tr.total-row td { font-weight: 700; border-top: 1px solid var(--border-strong); border-bottom: 0; background: #ffffff; }
tr.broker-group-row td {
  height: 36px; padding: 8px 4px; background: #ffffff; border-bottom: 1px solid var(--border-divider);
}
.broker-group-bar { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.broker-group-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--blue); }
td.amt, th.amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.positive { color: var(--green-text); font-weight: 600; }
.negative { color: var(--red-text); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Compact 26x26 PDT Real Logo + Fallback Monogram */
.security-name {
  display: inline-flex; align-items: center; gap: 10px; text-align: left; color: var(--ink);
  border: 0; background: none; padding: 0; min-width: 150px;
}
.security-name.icon-only { min-width: 0; }
.security-name:hover strong { color: var(--blue); }
.security-name strong { font-weight: 500; font-size: 13.5px; color: var(--ink); }
.sec-dual { display: inline-flex; align-items: baseline; gap: 7px; }
.sec-sym { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.logo-frame {
  position: relative; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 6px; overflow: hidden; flex: 0 0 auto;
  background: var(--blue-soft); color: #1045ad; border: 1px solid rgba(0, 0, 0, 0.06);
}
.logo-frame.xs { width: 22px; height: 22px; border-radius: 5px; }
.logo-frame.xs .ticker-text { font-size: 8px; }
.logo-frame.lg { width: 48px; height: 48px; border-radius: 11px; }
.logo-frame[data-hue="1"] { background: var(--green-soft); color: var(--green-text); }
.logo-frame[data-hue="2"] { background: var(--orange-soft); color: var(--orange-text); }
.logo-frame[data-hue="3"] { background: #f0e8fe; color: #5b2ca0; }
.logo-frame .ticker-text { font-size: 9.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.logo-frame.lg .ticker-text { font-size: 12px; }
.logo-frame .asset-logo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: #ffffff; padding: 2px; border-radius: inherit;
}
.logo-frame .asset-logo[hidden] { display: none; }
tr.row-clickable { cursor: pointer; }
tr.row-clickable:hover { background: #f6f7f8; }

/* Security Header Gear Popover (Logo / Logo+name / Logo+symbol / Logo+symbol+name) */
.sec-head-wrap { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.gear-btn {
  border: 0; background: transparent; color: var(--subtle); padding: 2px; border-radius: 5px;
  display: inline-grid; place-items: center;
}
.gear-btn:hover { background: var(--grey-10); color: var(--ink); }
.gear-btn .icon { width: 14px; height: 14px; }
.sec-display-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 35; width: 192px;
  background: #ffffff; border: 1px solid var(--border-card); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 8px; display: grid; gap: 4px;
}
.sec-display-menu[hidden] { display: none; }
.sec-display-menu button {
  width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 500; padding: 8px 11px; border-radius: 8px;
}
.sec-display-menu button:hover { background: var(--grey-10); }
.sec-display-menu button.active { background: #020708; color: #ffffff; font-weight: 600; }

/* Header Menu Head & Link Button */
.header-menu-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 13.5px; }
.link-btn { border: 0; background: transparent; color: var(--blue); font-weight: 600; font-size: 12.5px; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* PDT Command Palette (Ctrl+K Search Modal) */
dialog.command { width: min(640px, calc(100% - 24px)); padding: 0; border-radius: 14px; overflow: hidden; }
.cmd-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-divider); }
.cmd-head .icon { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
.cmd-head input { flex: 1; border: 0; outline: 0; font-size: 14.5px; background: transparent; color: var(--ink); min-width: 0; }
.cmd-kbd { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--grey-10); border: 1px solid var(--border-card); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.cmd-results { max-height: 420px; overflow: auto; padding: 8px; display: grid; gap: 2px; }
.cmd-group { font-size: 11px; font-weight: 600; color: var(--subtle); padding: 8px 10px 4px; }
.cmd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0;
  border-radius: 8px; background: transparent; text-decoration: none; color: var(--ink); text-align: left; font-size: 13.5px;
}
.cmd-item:hover { background: var(--grey-10); }
.cmd-item .icon { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
.cmd-item-text { flex: 1; min-width: 0; display: grid; }
.cmd-item-text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-item-text small { font-size: 11.5px; color: var(--muted); }

/* PDT Slide-Over Security Drawer exact layout (Position + Performance MAX + Distribution + Dividend + Actions) */
.drawer-head-id { display: flex; align-items: center; gap: 13px; min-width: 0; }
.drawer-head-id h2 { font-size: 19px; font-weight: 700; line-height: 1.2; }
.drawer-head-id small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.meta-sep { color: var(--disabled); }
.meta-link { border: 0; border-bottom: 1px dotted rgba(0, 0, 0, 0.35); background: transparent; color: var(--ink); font-weight: 500; padding: 0; font-size: 12.5px; cursor: pointer; }
.meta-link:hover { color: var(--blue); border-bottom-color: var(--blue); }
.d-section { display: grid; gap: 6px; }
.d-section h3 { font-size: 13px; font-weight: 600; color: var(--ink); }
.d-sec-head { display: flex; justify-content: space-between; align-items: center; }
.d-pos-list { display: grid; }
.d-pos-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-divider); font-size: 13.5px; }
.d-pos-item:last-child { border-bottom: 0; }
.d-pos-item strong { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.d-pos-sub { font-size: 11.5px; color: var(--subtle); margin-top: 2px; }
.d-weight-bar { display: inline-flex; align-items: center; gap: 10px; }
.d-weight-bar .progress { width: 108px; height: 4px; }
.d-perf-group { border-top: 1px solid var(--border-divider); }
.d-perf-group summary { list-style: none; cursor: pointer; }
.d-perf-group summary::-webkit-details-marker { display: none; }
.d-perf-group summary .d-perf-row > span:first-child::after { content: ' ⌄'; color: var(--muted); font-size: 12px; }
.d-perf-group:not([open]) summary .d-perf-row > span:first-child::after { content: ' ›'; }
.d-perf-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 92px; align-items: baseline; gap: 10px;
  padding: 10px 0; font-size: 14px; font-variant-numeric: tabular-nums; border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.d-perf-row.sub { color: var(--muted); font-size: 13.5px; }
.d-perf-amt { text-align: right; font-weight: 500; color: var(--ink); }
.d-perf-row.sub .d-perf-amt { color: var(--muted); font-weight: 400; }
.d-perf-pct { text-align: right; font-weight: 500; }
.dist-grid { display: grid; gap: 10px; }
.dist-row { display: grid; gap: 5px; }
.dist-row-head { display: flex; justify-content: space-between; font-size: 13px; }
.dist-row-head strong { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.dist-track { height: 5px; border-radius: 4px; background: var(--grey-10); overflow: hidden; }
.dist-track i { display: block; height: 100%; border-radius: inherit; background: var(--teal-110); }
.d-cagr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.dist-toggle { display: inline-flex; gap: 14px; }
.dist-toggle button { border: 0; background: transparent; padding: 0 0 4px; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.dist-toggle button[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.d-cagr-card { background: var(--grey-10); border-radius: 10px; padding: 10px 12px; display: grid; gap: 3px; }
.d-cagr-card strong { font-size: 14.5px; font-variant-numeric: tabular-nums; }
.d-cal-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-divider); gap: 10px; }
.d-month-group { display: grid; gap: 8px; margin-top: 8px; }
.d-month-pill { display: inline-flex; justify-self: start; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--grey-10); font-size: 12px; font-weight: 600; color: var(--muted); }
.d-action-card { border: 1px solid var(--border-card); border-radius: 12px; padding: 11px 14px; display: grid; gap: 8px; background: #ffffff; }
.d-action-top, .d-action-bot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Inline metrics (weight transition, return contribution bar, yield range, payout count) */
.count-dot {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 50%; background: var(--grey-10); color: var(--muted); font-size: 11px; font-weight: 600;
  margin-left: 8px;
}
.weight-bar { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.progress { width: 64px; height: 4px; background: var(--grey-20); border-radius: 4px; display: inline-block; overflow: hidden; }
.progress i { display: block; height: 100%; background: #464e50; border-radius: inherit; }
.progress.green i { background: var(--green); }
.progress.red i { background: var(--red); }
.yield-pair { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-size: 13px; }
.yield-track { width: 58px; height: 2px; background: var(--grey-20); position: relative; display: inline-block; }
.yield-track i { position: absolute; top: -3px; width: 2px; height: 8px; background: var(--ink); border-radius: 2px; }

/* Pills & Cash Badges */
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--grey-10); color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.pill.green { background: var(--green-soft); color: var(--green-text); }
.pill.blue { background: var(--blue-soft); color: var(--blue-hover); }
.pill.amber { background: var(--orange-soft); color: var(--orange-text); }
.pill.neutral { background: var(--grey-10); color: var(--muted); }

.cash-pill {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.05); color: var(--ink);
}
.cash-pill.inflow { background: rgba(31, 99, 230, 0.11); color: var(--blue-hover); }
.cash-pill span { border-bottom: 1px dotted currentColor; }
.date-cell { display: inline-flex; align-items: center; gap: 9px; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.row-handle { border: 0; background: transparent; color: var(--disabled); padding: 2px; display: inline-flex; align-items: center; }
.row-handle:hover { color: var(--ink); }

/* Collapsible Closed Positions & Broker Cash Bar */
.collapse-bar {
  margin-top: 14px; border-radius: var(--radius-md); background: var(--grey-10);
  border: 1px solid var(--border-card); overflow: hidden;
}
.collapse-bar summary {
  padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; list-style: none;
}
.collapse-bar summary::-webkit-details-marker { display: none; }
.collapse-bar > div { background: #ffffff; padding: 8px 16px 14px; border-top: 1px solid var(--border-divider); }

/* Notices & Banners */
.notice { padding: 10px 14px; background: var(--blue-soft); border: 1px solid rgba(31, 99, 230, 0.16); color: #103a8c; border-radius: var(--radius-md); font-size: 13px; }
.notice.warn { background: var(--orange-soft); border-color: rgba(230, 80, 28, 0.22); color: #8c2f0c; }
.notice summary { cursor: pointer; font-weight: 600; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.banner {
  background: var(--grey-10); border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 18px 22px; display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 16px;
}
.banner p { color: var(--muted); margin-top: 3px; font-size: 13px; }
.empty { display: grid; justify-items: center; align-content: center; text-align: center; min-height: 160px; padding: 24px; gap: 8px; color: var(--muted); }
.empty .icon { color: var(--muted); width: 24px; height: 24px; }
.empty h3 { color: var(--ink); font-size: 15px; }
.empty p { max-width: 44ch; font-size: 13px; }

/* Charts (PDT Recharts exact style — borderless on #eff0f0, dark #020708 floating tooltip) */
.chart-wrap { position: relative; }
.chart { width: 100%; display: block; overflow: visible; touch-action: pan-y; }
.chart.clickable { cursor: pointer; }
.chart-grid { stroke: rgba(0, 0, 0, 0.08); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-zero { stroke: #c9c9c9; stroke-width: 1; }
.chart-axis { font-size: 11px; fill: #757d7f; font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.chart-line:not(.split) { stroke: var(--green); }
.chart-line.orange { stroke: var(--orange); }
.chart-line.orange.secondary { stroke: var(--orange); stroke-width: 2.3; stroke-dasharray: 4 4; opacity: 0.78; }
.chart-line.blue { stroke: var(--blue); }
.chart-line.booked { stroke: #979b9c !important; stroke-width: 2; stroke-dasharray: none; }
.chart-line.red { stroke: var(--red); }
.chart-line.secondary { stroke: rgba(2, 7, 8, 0.38); stroke-width: 1.8; stroke-dasharray: 4 3; }
.chart-bar-label { font-size: 11px; font-weight: 600; fill: #596163; font-variant-numeric: tabular-nums; }
.chart-cursor { stroke: rgba(2, 7, 8, 0.28); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-dot { fill: var(--green); stroke: #fff; stroke-width: 2.5; }
.chart-tooltip {
  position: absolute; top: 8px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 10px;
  pointer-events: none; border-radius: var(--radius-lg); background: #020708; color: #ffffff;
  padding: 8px 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24); font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.chart-tooltip[hidden] { display: none; }
.chart-tooltip strong { color: #ffffff; font-weight: 600; }
.chart-tooltip .tt-date { color: rgba(255, 255, 255, 0.62); font-size: 11.5px; }
.chart-tooltip .tt-pill { padding: 2px 7px; border-radius: 6px; font-weight: 600; font-size: 12px; background: rgba(255, 255, 255, 0.14); }
.chart-tooltip .tt-pill.pos { background: rgba(37, 179, 121, 0.24); color: #7ef2be; }
.chart-tooltip .tt-pill.blue { background: rgba(97, 151, 252, 0.26); color: #a8c7ff; }
.chart-tooltip .tt-pill.neg { background: rgba(211, 51, 75, 0.26); color: #ff9ba9; }
.chart-tooltip .tt-hint { font-size: 11px; color: rgba(255, 255, 255, 0.65); border-left: 1px solid rgba(255, 255, 255, 0.18); padding-left: 9px; }
.chart-legend { display: flex; align-items: center; justify-content: end; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--swatch, var(--green)); }

/* Calendar — PDT Exact 3-Month Column Card + 5-Day Week View */
.cal-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-year { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--ink); }
.cal-divider { width: 1px; height: 22px; background: rgba(0, 0, 0, 0.12); margin: 0 4px; }
.cal-seg {
  display: inline-flex; align-items: center; background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: var(--radius-md); padding: 2px;
}
.cal-seg button {
  border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500;
  padding: 5px 10px; border-radius: 6px;
}
.cal-seg button[aria-pressed="true"] { color: var(--ink); font-weight: 600; background: var(--grey-10); }

.cal-3col {
  background: #ffffff; border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; box-shadow: var(--shadow-xs);
}
.cal-month-col { border-right: 1px solid var(--border-divider); min-width: 0; display: flex; flex-direction: column; }
.cal-month-col:last-child { border-right: 0; }
.cal-month-head {
  padding: 13px 16px; border-bottom: 1px solid var(--border-divider);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.cal-month-total {
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--green-text); background: var(--green-soft); padding: 2px 8px; border-radius: var(--radius-pill);
}
.cal-month-name { font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 12px; border-radius: 7px; }
.cal-month-name.active { background: var(--teal-110); color: #ffffff; }
.cal-week-block { border-bottom: 1px solid var(--border-divider); }
.cal-week-block:last-child { border-bottom: 0; }
.cal-week-head {
  display: flex; justify-content: space-between; align-items: center; padding: 11px 16px 8px;
  font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.cal-week-btn { border: 0; background: transparent; color: var(--disabled); font-size: 12px; font-weight: 600; padding: 0; }
.cal-week-btn:hover { color: var(--ink); }
.cal-event-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 8px 16px; width: 100%; border: 0; background: transparent; text-align: left; font-size: 13px;
}
.cal-event-row:hover { background: #fafafa; }
.cal-event-row.today-row { border-left: 3px solid var(--teal-110); padding-left: 13px; }
.cal-event-day { font-size: 12px; color: var(--subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-event-row.today-row .cal-event-day { color: var(--ink); font-weight: 700; }
.cal-event-sym { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cal-event-sym strong { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event-right { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; }
.cal-div-amt { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.cal-div-amt.received { color: var(--green-text); }
.cal-div-amt.announced { color: var(--blue-hover); }
.cal-div-amt.estimated { color: var(--muted); font-weight: 600; }
.cal-event-type { font-size: 11.5px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.cal-wday-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cal-wday-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-wday-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--green); }
.status-dot.upcoming { background: var(--blue-light); }
.status-dot.estimated { background: var(--disabled); }

.cal-week-grid {
  background: #ffffff; border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; box-shadow: var(--shadow-xs);
}
.cal-wday { border-right: 1px solid var(--border-divider); min-height: 280px; display: flex; flex-direction: column; }
.cal-wday:last-child { border-right: 0; }
.cal-wday-head { padding: 12px 14px; border-bottom: 1px solid var(--border-divider); font-size: 13px; font-weight: 600; color: var(--muted); }
.cal-wday-head.today { color: var(--ink); border-bottom: 2px solid var(--teal-110); }
.cal-wday-body { padding: 8px; display: grid; gap: 6px; align-content: start; }
.cal-wday-card {
  border: 1px solid var(--border-card); border-radius: var(--radius-md); background: #fff;
  padding: 9px 10px; text-align: left; display: grid; gap: 4px;
}
.cal-wday-card:hover { background: #fafafa; }

/* Settings 2-Column Layout */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
.settings-layout > * { min-width: 0; }
.settings-aside { display: grid; gap: 3px; position: sticky; top: 82px; }
.settings-aside h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); padding: 12px 10px 4px; }
.settings-aside h4:first-child { padding-top: 0; }
.settings-aside a, .settings-aside button {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-md);
  text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--muted);
  border: 0; background: transparent; text-align: left; width: 100%;
}
.settings-aside a:hover, .settings-aside button:hover { background: var(--grey-10); color: var(--ink); }
.settings-aside a.current, .settings-aside button.current { background: var(--grey-10); color: var(--ink); font-weight: 600; }

/* Forms, Lines, Drawer & Modals */
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.data-list { display: grid; }
.data-line { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border-divider); font-size: 13.5px; }
.data-line:last-child { border-bottom: 0; }
.data-line strong { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.meta-strip { background: var(--grey-10); border-radius: var(--radius-md); padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--muted); }
.meta-strip span strong { color: var(--ink); font-weight: 600; margin-left: 4px; }

.field { display: grid; align-content: start; gap: 5px; color: var(--ink); font-size: 13px; font-weight: 600; min-width: 0; }
.field .control { width: 100%; font-weight: 400; }
.field textarea { resize: vertical; min-height: 70px; }
.field small { font-weight: 400; color: var(--muted); }
.field-wide { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: start; }
.form-actions { display: flex; justify-content: end; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; min-height: 30px; cursor: pointer; font-size: 13px; }
.check input { accent-color: var(--ink); }
.table-footer { padding: 12px 4px; border-top: 1px solid var(--border-divider); }
.page-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.page-list li { border: 1px solid var(--border-card); border-radius: var(--radius-md); padding: 10px 12px; }

dialog {
  background: #ffffff; color: var(--ink); border: 1px solid var(--border-card); padding: 0;
  box-shadow: var(--shadow-xl); border-radius: var(--radius-lg);
  width: min(580px, calc(100% - 24px)); max-height: calc(100dvh - 38px);
}
dialog.wide { width: min(880px, calc(100% - 24px)); }
dialog.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(656px, 100vw); max-width: 100vw;
  border-radius: 0; border: 0; border-left: 1px solid var(--border-divider); overflow-x: hidden;
}
dialog::backdrop { background: rgba(2, 7, 8, 0.58); }
.dialog-title {
  position: sticky; top: 0; z-index: 2; background: #ffffff; border-bottom: 1px solid var(--border-divider);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 22px;
}
.dialog-title h2 { font-size: 18px; font-weight: 700; }
.dialog-content { padding: 20px 22px 26px; }
.dialog-content p + p { margin-top: 8px; }
.error { color: var(--red-text); font-size: 13px; margin: 8px 0; }
.error:empty { display: none; }
.search-results { display: grid; margin-top: 10px; gap: 3px; max-height: 360px; overflow: auto; }
.search-results a, .search-results button {
  min-height: 38px; background: var(--grey-10); border: 0; border-radius: var(--radius-md);
  padding: 8px 12px; text-decoration: none; color: var(--ink); text-align: left; font-size: 13px;
}
.search-results a:hover, .search-results button:hover { background: var(--grey-20); }

#toast {
  position: fixed; z-index: 50; bottom: 20px; right: 20px; background: var(--teal-110); color: #fff;
  padding: 11px 16px; box-shadow: var(--shadow-md); border-radius: var(--radius-md);
  max-width: min(440px, 90vw); font-size: 13px; font-weight: 500;
}
#toast:empty { display: none; }
/* Mobile-only elements hidden on desktop */
.mobile-only { display: none !important; }
.mobile-worth-bar { display: none; }
.mobile-nav { display: none; }
.mobile-more-menu { display: none; }

/* Single-row benchmark chips & mobile controls order */
.perf-hero-body { display: flex; flex-direction: column; }
.perf-bottom-controls { display: flex; align-items: center; gap: 8px; }
.hero-chart-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: nowrap; margin: 22px 0 14px; }
.bench-chips { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.bench-chips::-webkit-scrollbar { display: none; }
.bench-chips .control { width: auto; flex: 0 0 auto; }
.bench-chips select.control {
  width: auto; min-width: 82px; max-width: 136px; min-height: 32px; height: 32px; line-height: 30px;
  padding: 0 10px; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  border-radius: 7px; text-overflow: ellipsis;
}

@media (max-width: 1020px) {
  .alloc-hero { grid-template-columns: 1fr; justify-items: center; gap: 24px; }
  .alloc-bars-wrap { width: 100%; }
  .cal-3col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-month-col:nth-child(3) { display: none; }
  .cal-month-col:nth-child(2) { border-right: 0; }
  .cal-week-grid { grid-template-columns: 1fr; }
  .cal-wday { border-right: 0; border-bottom: 1px solid var(--border-divider); min-height: 0; }
  .settings-layout { grid-template-columns: 1fr; gap: 20px; }
  .settings-aside { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .settings-aside h4 { display: none; }
  .settings-aside a, .settings-aside button { width: auto; padding: 7px 12px; font-size: 13px; }
  .hero-taupe .taupe-art { display: none; }
}

@media (max-width: 820px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .pdt-header { display: none; }
  .header-popover { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; max-width: none; max-height: calc(100dvh - 132px); overflow-y: auto; }
  .pdt-container { padding-inline: 16px; }
  .hero-portfolio-top { flex-direction: row !important; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; }
  .hero-portfolio-actions { flex-wrap: nowrap; gap: 6px; }
  dialog.drawer { width: 100vw; max-width: 100vw; margin: 0; left: 0; right: 0; border-left: 0; }
  dialog.drawer .dialog-title { padding: 14px 16px; }
  dialog.drawer .dialog-content { padding: 14px 16px 24px; overflow-x: hidden; }
  dialog.drawer .underline-tabs { gap: 14px; overflow-x: auto; scrollbar-width: none; }
  dialog.drawer .underline-tabs::-webkit-scrollbar { display: none; }
  dialog.drawer .underline-tabs button { white-space: nowrap; flex: 0 0 auto; }
  .d-pos-item { gap: 8px; }
  .d-pos-item > * { min-width: 0; }
  .d-weight-bar .progress { width: 64px; }
  .d-perf-row { grid-template-columns: minmax(0, 1fr) auto 76px; gap: 6px; font-size: 13px; }
  .d-cagr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Mobile Portfolio dark-teal hero */
  .hero-dark { padding: 20px 0 26px; }
  .hero-dark h1 { font-size: 26px; }
  .hero-pill-btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
  .mobile-worth-bar {
    display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 7px 9px;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.04);
  }
  .mobile-worth-pill {
    display: inline-flex; align-items: center; gap: 5px; height: 29px; padding: 0 11px;
    border-radius: 7px; background: #ffffff; color: var(--ink); border: 0;
    font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  .mobile-worth-pill small { color: var(--subtle); font-weight: 500; font-size: 11.5px; }
  .mobile-worth-pill .positive { color: var(--green-text); font-weight: 700; }
  .mobile-worth-pill .negative { color: var(--red-text); font-weight: 700; }
  .mobile-worth-swap {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16);
    background: transparent; color: rgba(255, 255, 255, 0.78); font-size: 11px;
    display: inline-grid; place-items: center; flex: 0 0 auto;
  }
  .dim-tabs { margin-top: 18px; gap: 18px; }
  .alloc-hero { margin-top: 20px; gap: 20px; }
  .alloc-donut { width: 196px; height: 196px; }
  .alloc-donut-hole { width: 142px; height: 142px; }
  .alloc-bars { grid-template-columns: 1fr; grid-template-rows: auto; grid-auto-flow: row; gap: 11px; }
  .alloc-scroll-bar { display: none; }

  /* Mobile Light-Grey Hero (Performance & Dividend) */
  .hero-grey { padding: 20px 0 22px; }
  .hero-top { flex-direction: column; align-items: stretch; gap: 12px; }
  .report-controls { justify-content: flex-start; }
  .report-controls .mobile-period-bar { width: 100%; }
  .hero-tabs { flex-wrap: nowrap; gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .hero-tabs::-webkit-scrollbar { display: none; }
  .hero-tabs button { font-size: 22px; white-space: nowrap; }

  /* Mobile Timeframe Bar (compact grey bar with white dropdown pill on left) */
  .mobile-period-bar {
    display: flex !important; align-items: center; justify-content: space-between;
    background: rgba(0, 0, 0, 0.045); border-radius: 10px; padding: 5px 6px; gap: 8px;
  }
  .mobile-period-bar select.control {
    min-height: 29px; height: 29px; padding: 0 10px; font-size: 13px; font-weight: 600;
    border-radius: 7px; border: 1px solid rgba(0, 0, 0, 0.08); box-shadow: var(--shadow-xs);
    width: auto;
  }
  .mobile-period-bar select.year-ghost {
    background: transparent; border: 0; box-shadow: none; color: var(--muted); font-weight: 500;
  }

  /* Single Unified 3-Row White KPI Card on Mobile (exact PDT mobile layout!) */
  .kpi-grid {
    display: flex; flex-direction: column; gap: 0; margin-top: 14px;
    background: #ffffff; border: 1px solid var(--border-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs); padding: 6px 16px;
  }
  .kpi-card {
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
    min-height: 36px; padding: 7px 0; flex-direction: row; align-items: center;
  }
  .kpi-body {
    width: 100%; display: flex; flex-direction: row; align-items: center;
    justify-content: space-between; gap: 10px;
  }
  .kpi-head, .kpi-swap { font-size: 14px; font-weight: 500; }
  .kpi-value { font-size: 15px; font-weight: 600; justify-content: flex-end; }
  .kpi-icon, .kpi-icons { display: none; }
  .kpi-card .kpi-help { order: 2; margin-left: 4px; align-self: center; }

  /* Mobile chart controls: benchmark chips above chart, Combined + By week below chart */
  .hero-chart-controls { margin: 14px 0 10px; }
  .perf-hero-body .chart-wrap { order: 2; margin-top: 4px; }
  .perf-hero-body .perf-controls-top { order: 1; margin: 14px 0 8px; }
  .perf-hero-body .perf-controls-bottom { order: 3; margin: 10px 0 0; justify-content: flex-start; }

  /* Mobile Actions warm-taupe hero */
  .hero-taupe { padding: 22px 0 22px; min-height: 0; }
  .hero-taupe .hero-top { gap: 16px; }
  .hero-taupe h1 { font-size: 25px; }
  .hero-taupe .button.primary { height: 38px; padding: 0 14px; font-size: 13px; }

  /* Mobile Calendar (clean white single-month layout below 720px; 2-month card at 720–1020px tablet) */
  .pdt-shell.page-grey { background: #ffffff; }
  .pdt-section.grey { background: #ffffff; padding-top: 20px; }
  .cal-controls { margin-bottom: 12px; gap: 10px; }
  .cal-year { font-size: 22px; }
  .cal-mobile-bar {
    display: flex !important; align-items: center; justify-content: space-between;
    background: var(--grey-10); border-radius: 10px; padding: 5px 6px; margin-bottom: 12px;
  }
  .cal-week-head { padding: 10px 0 7px; }
  .cal-event-row { padding: 9px 0; }
  .cal-event-row.today-row { padding-left: 10px; }

  .two-cols, .form-grid { grid-template-columns: 1fr; }
  #market-kind, #market-security { min-width: 0; max-width: 100%; width: 100%; }
  .pdt-section { padding: 16px 0 calc(78px + env(safe-area-inset-bottom, 0px)); }
  .banner { flex-direction: column; align-items: start; }
  th, td { padding: 10px 8px; font-size: 13px; }

  /* PDT Exact 5-Icon Mobile Bottom Tab Bar (56px, icon-only!) */
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    background: #ffffff; border-top: 1px solid var(--border-divider);
    padding: 0 4px env(safe-area-inset-bottom, 0px);
  }
  .mobile-nav a, .mobile-nav button {
    display: grid; place-items: center; border: 0; background: transparent;
    text-decoration: none; color: #9ea4a6; padding: 0; height: 56px;
  }
  .mobile-nav a.current, .mobile-nav button.current { color: var(--ink); }
  .mobile-nav .icon { width: 22px; height: 22px; }

  /* PDT Floating Mobile "..." More Popover */
  .mobile-more-menu {
    display: grid; gap: 3px; position: fixed; right: 12px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    width: 222px; z-index: 45; background: #ffffff;
    border: 1px solid var(--border-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); padding: 8px;
  }
  .mobile-more-menu[hidden] { display: none; }
  .mobile-more-menu a, .mobile-more-menu button {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 0;
    border-radius: var(--radius-md); background: transparent; color: var(--ink);
    font-size: 14px; font-weight: 500; text-decoration: none; text-align: left; width: 100%;
  }
  .mobile-more-menu a.current { background: var(--blue); color: #ffffff; font-weight: 600; }
  .mobile-more-menu a.current .icon { color: #ffffff; }
  .mobile-more-menu a:hover:not(.current), .mobile-more-menu button:hover { background: var(--grey-10); }
  .mobile-more-menu hr { border: 0; border-top: 1px solid var(--border-divider); margin: 4px 0; }

  #toast { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; max-width: none; }
}
@media (min-width: 720px) and (max-width: 1020px) {
  .cal-week-head { padding: 11px 14px 8px; }
  .cal-event-row { padding: 8px 14px; }
  .cal-event-row.today-row { padding-left: 11px; }
}
@media (max-width: 719px) {
  .cal-3col { grid-template-columns: 1fr; border: 0; box-shadow: none; border-radius: 0; }
  .cal-month-col:not(:first-child) { display: none; }
  .cal-month-col { border-right: 0; }
  .cal-month-head { display: none; }
}
@media (max-width: 480px) {
  .hide-xs { display: none; }
}
