/* Layout adapters only. The palette, type and controls come from portfolio-design.css. */
:is(.macro-page, .aligned-multistrat) [hidden] { display: none !important; }
:is(.macro-page, .aligned-multistrat) .portfolio-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(400px, .85fr);
  align-items: start;
  gap: 0;
}
:is(.macro-page, .aligned-multistrat) .portfolio-overview-grid > section { min-width: 0; padding: 28px 24px; margin: 0; }
:is(.macro-page, .aligned-multistrat) .portfolio-overview-grid > .performance-panel { border: 1px solid var(--line); }
:is(.macro-page, .aligned-multistrat) .section-kicker { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
:is(.macro-page, .aligned-multistrat) .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
:is(.macro-page, .aligned-multistrat) .portfolio-facts { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
:is(.macro-page, .aligned-multistrat) .facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0; }
:is(.macro-page, .aligned-multistrat) .facts-grid > div { padding: 0; border: 0; }
:is(.macro-page, .aligned-multistrat) .facts-grid dt { color: var(--muted); font-size: 12px; }
:is(.macro-page, .aligned-multistrat) .facts-grid dd { margin: 4px 0 0; color: var(--text); font-size: 14px; font-weight: 500; }
:is(.macro-page, .aligned-multistrat) .comparison-head,
:is(.macro-page, .aligned-multistrat) .comparison-row { display: grid; grid-template-columns: minmax(115px, 1.2fr) repeat(5, minmax(0, 1fr)); gap: 10px; align-items: center; }
:is(.macro-page, .aligned-multistrat) .comparison-row { border: 0; border-bottom: 1px solid var(--line); }
:is(.macro-page, .aligned-multistrat) .comparison-stat { text-align: left; min-width: 0; }
:is(.macro-page, .aligned-multistrat) .comparison-head span { text-align: left; }
:is(.macro-page, .aligned-multistrat) .comparison-stat span { display: none; }
:is(.macro-page, .aligned-multistrat) .comparison-name { display: inline-flex; align-items: center; gap: 8px; }
:is(.macro-page, .aligned-multistrat) .comparison-name i { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--chart-portfolio); }
:is(.macro-page, .aligned-multistrat) .performance-comparison { margin: 18px 0 24px; }
:is(.macro-page, .aligned-multistrat) .managed-heatmap-scroll { max-height: 440px; padding: 0 0 4px; }
:is(.macro-page, .aligned-multistrat) .managed-monthly-grid { min-width: 620px; }
:is(.macro-page, .aligned-multistrat) .managed-heatmap-row { grid-template-columns: 48px repeat(12, minmax(36px, 1fr)) 58px; gap: 4px; }
:is(.macro-page, .aligned-multistrat) .managed-heatmap-cell { height: 36px; border-radius: 10px; font-size: 12px; }
.macro-page .portfolio-navigation { position: static; box-shadow: none; padding-bottom: 20px; }
.macro-page .macro-portfolio-selector { width: 100%; min-height: 70px; height: auto; padding: 14px 0; }
.macro-page .section-navigation { background: transparent; color: var(--muted); border-bottom: 1px solid var(--line); }
.macro-page .section-navigation .band-inner { display: flex; gap: 28px; width: 100%; }
.macro-page .section-navigation a { min-height: 42px; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; text-transform: none; font-weight: 500; }
.macro-page .section-navigation a[aria-current] { color: var(--blue); background: transparent; border-bottom-color: var(--blue); }
.macro-page .book-live .live-primary { display: grid; gap: 7px; }
.macro-page .live-readout { margin: 0 0 18px; }
.macro-page .coverage-note { margin-top: 6px; line-height: 1.6; }
.macro-page .chart-toolbar { flex-wrap: wrap; gap: 14px; }
.macro-page .sector-bars { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.macro-page .sector-allocation { margin-top: 30px; }
.macro-page .asset-tile { padding: 8px; gap: 4px; border: 1px solid var(--line); justify-content: space-between; }
.macro-page .allocation-mosaic { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); grid-auto-rows: auto; border: 0; }
.macro-page .asset-tile .asset-weight { font-size: 12px; }
.macro-page .asset-day { font-size: 12px; }
.macro-page .managed-monthly { margin-top: 20px; }
.aligned-multistrat {
  --ms-bg: var(--bg); --ms-panel: var(--panel); --ms-panel-deep: var(--panel-soft);
  --ms-ink: var(--text); --ms-muted: var(--muted); --ms-line: var(--line);
  --ms-blue: var(--chart-portfolio); --ms-slate: var(--chart-ahlyx); --ms-sand: var(--chart-aqmix);
  font: 400 14px/1.5 var(--font-ui);
}
.aligned-multistrat .portfolio-masthead h1 { font: 400 48px/1.1 var(--font-display); }
.aligned-multistrat .portfolio-masthead p { margin-top: 0; }
.aligned-multistrat .portfolio-masthead .masthead-description { margin-top: 12px; }
.aligned-multistrat .live-primary { display: grid; }
.aligned-multistrat .portfolio-view-tabs { display: flex; gap: 28px; padding: 8px 0 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.portfolio-view-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); min-height: 48px; padding: 10px 0; cursor: pointer; font-size: 14px; font-weight: 500; }
.portfolio-view-tabs button[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.portfolio-view-tabs button:hover { color: var(--blue); }
.aligned-multistrat .portfolio-dashboard :is(h2, .ms-section-heading h2),
.aligned-multistrat #allocations-panel .ms-section-heading h2 { font: 400 28px/1.1 var(--font-display); }
.aligned-multistrat .portfolio-dashboard .ms-reveal { opacity: 1; transform: none; transition: none; }
.aligned-multistrat .portfolio-dashboard .ms-chart-shell { margin: 18px 0 0; background: var(--bg); border: 0; padding: 0; }
.aligned-multistrat .portfolio-dashboard .ms-chart-toolbar { padding: 0; gap: 12px; flex-wrap: wrap-reverse; }
.aligned-multistrat .portfolio-dashboard .ms-series-controls { display: flex; gap: 8px 14px; flex-wrap: wrap; }
.aligned-multistrat .portfolio-dashboard .ms-series-controls button { min-height: 32px; padding: 4px 0; font-size: 12px; }
.aligned-multistrat .portfolio-dashboard .ms-range-controls { border: 1px solid var(--line); padding: 3px; gap: 0; }
.aligned-multistrat .portfolio-dashboard .ms-range-controls button { border-radius: 0; min-width: 44px; min-height: 38px; padding: 0; border: 0; font-size: 12px; font-weight: 500; }
.aligned-multistrat .portfolio-dashboard .ms-range-controls button.is-active { background: var(--accent-fill); color: var(--accent-text); }
.aligned-multistrat .portfolio-dashboard .ms-chart-wrap { margin: 8px 0 0; min-height: 0; overflow: visible; }
.aligned-multistrat .portfolio-dashboard .ms-performance-svg { width: 100%; min-width: 0; min-height: 0; height: auto; }
.aligned-multistrat .portfolio-dashboard .ms-chart-foot { font-size: 12px; gap: 12px; padding: 16px 0 0; }
.aligned-multistrat .portfolio-dashboard .chart-title { display: grid; gap: 4px; }
.aligned-multistrat .portfolio-dashboard .chart-title span { font-size: 12px; color: var(--muted); }
.aligned-multistrat .allocation-mosaic { display: grid; }
.aligned-multistrat .allocation-mosaic .quote-note { grid-column: 1/-1; padding: 18px 0; }
.aligned-multistrat .asset-tile { display: flex; flex-direction: column; justify-content: space-between; padding: 8px; border: 1px solid var(--line); min-width: 0; }
.aligned-multistrat .asset-tile.is-long span { color: var(--green); }
.aligned-multistrat .asset-tile.is-short span { color: var(--red); }
.ms-allocation-legend { display: flex; gap: 18px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.ms-allocation-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ms-allocation-legend i { width: 7px; height: 7px; border-radius: 2px; background: var(--green); }
.ms-allocation-legend span:last-child i { background: var(--red); }
.ms-allocation-exposure { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0 18px; }
.ms-allocation-exposure > div { display: grid; gap: 4px; }
.ms-allocation-exposure span { font-size: 12px; color: var(--muted); }
.ms-allocation-exposure strong { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.aligned-multistrat .portfolio-detail-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; margin-top: 16px; border-top: 1px solid var(--line); color: var(--blue); font-size: 13px; }
.aligned-multistrat .portfolio-detail-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.aligned-multistrat #allocations-panel .ms-section { padding: 20px 0 40px; }
.aligned-multistrat #allocations-panel .ms-section-heading { margin-bottom: 28px; align-items: start; }
.aligned-multistrat #allocations-panel .ms-section-heading br { display: none; }
.aligned-multistrat #allocations-panel .ms-section-heading > p { font-size: 14px; }
.aligned-multistrat .ms-footer { margin-top: 32px; }
/* The original visual story retains its own composition within Methodology. */
.aligned-multistrat .app-shell > #methodology-panel { width: 100%; }
.aligned-multistrat #methodology-panel { --ms-bg: #f8fafb; --ms-panel: #eef2f4; --ms-panel-deep: #e4eaee; --ms-ink: #172731; --ms-muted: #566875; --ms-line: #ced8de; --ms-blue: #47759a; --ms-slate: #758fa7; --ms-sand: #a58f70; background: var(--ms-bg); color: var(--ms-ink); }
[data-theme="dark"] .aligned-multistrat #methodology-panel { --ms-bg: #0b1013; --ms-panel: #11171c; --ms-panel-deep: #152029; --ms-ink: #edf1f7; --ms-muted: #b8c4ce; --ms-line: #2a363f; --ms-blue: #b7d5fa; --ms-slate: #829bb5; --ms-sand: #eee3d4; }
.aligned-multistrat #methodology-panel .ms-hero { min-height: 0; }
.aligned-multistrat #methodology-panel .ms-hero h1 { font-size: clamp(72px, 7.7vw, 132px); }
.aligned-multistrat #methodology-panel .ms-wrap { max-width: 1480px; }
@media (max-width: 1100px) {
  :is(.macro-page, .aligned-multistrat) .portfolio-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :is(.macro-page, .aligned-multistrat) .portfolio-overview-grid > section { padding: 24px 16px; }
  :is(.macro-page, .aligned-multistrat) .comparison-head { display: none; }
  :is(.macro-page, .aligned-multistrat) .comparison-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
  :is(.macro-page, .aligned-multistrat) .comparison-name { grid-column: 1/-1; }
  :is(.macro-page, .aligned-multistrat) .comparison-stat span { display: block; font-size: 11px; color: var(--muted); }
  .macro-page .macro-portfolio-selector { gap: 12px; flex-wrap: wrap; }
  .macro-page .macro-portfolio-selector .range-control { max-width: 100%; width: 100%; }
  .macro-page .macro-portfolio-selector .selected-portfolio { display: none; }
  .macro-page .section-navigation .band-inner { gap: 20px; overflow: auto; }
  .aligned-multistrat .portfolio-masthead h1 { font-size: 38px; }
  .aligned-multistrat .portfolio-view-tabs { gap: 24px; overflow-x: auto; }
  .portfolio-view-tabs button { font-size: 13px; white-space: nowrap; }
  .aligned-multistrat .ms-allocation-exposure strong { font-size: 22px; }
}
/* Keep chart labels readable at the actual panel width, including mobile. */
.aligned-multistrat .portfolio-masthead .masthead-eyebrow { margin-bottom: 10px; }
.aligned-multistrat .portfolio-dashboard .ms-chart-label { font-size: 12px; }
.aligned-multistrat .portfolio-dashboard .ms-chart-tooltip { max-width: calc(100% - 16px); font-size: 12px; box-shadow: none; }
.aligned-multistrat .portfolio-dashboard .ms-chart-tooltip span { gap: 10px; }
html[data-theme="light"] :is(.macro-page, .aligned-multistrat) .portfolio-masthead .live-primary strong { color: #fff; }
html[data-theme="light"] :is(.macro-page, .aligned-multistrat) .portfolio-masthead .live-primary strong.positive { color: #b5d4ff !important; }
html[data-theme="light"] :is(.macro-page, .aligned-multistrat) .portfolio-masthead .live-primary strong.negative { color: #eee3d4 !important; }
