/* Portiva Modern — theme tokens (Night default + light palettes via data-theme) */
:root{
  --bg0:#070a12;
  --bg1:#0c1222;
  --bg-linear-end:#0a0f1a;
  --radial-1:rgba(13,148,136,.12);
  --radial-2:rgba(180,83,9,.10);
  --glass:rgba(18,26,46,.72);
  --stroke:rgba(148,163,184,.085);
  --portiva-border:var(--stroke);
  --text:#f1f5f9;
  --muted:#94a3b8;
  --accent:#0f766e;
  --accent2:#b45309;
  --accent-border:rgba(15,118,110,.38);
  --accent-hover:rgba(15,118,110,.24);
  --surface-card:rgba(15,23,42,.55);
  --surface-card-hover:rgba(30,41,59,.65);
  --surface-btn:rgba(15,23,42,.5);
  --surface-btn-hover:rgba(30,41,59,.7);
  --surface-list:rgba(15,23,42,.45);
  --surface-list-hover:rgba(30,41,59,.45);
  --btn-primary-bg:var(--surface-btn);
  --btn-primary-border:var(--stroke);
  --btn-primary-fg:var(--text);
  --btn-primary-bg-hover:var(--surface-btn-hover);
  --btn-primary-border-hover:var(--stroke-hover);
  --stroke-hover:rgba(148,163,184,.22);
  --good:#34d399;
  --warn:#fbbf24;
  --cashflow-positive:#4ade80;
  --cashflow-negative:#fb7185;
  --radius:20px;
  --radius-sm:12px;
  --shadow:0 24px 80px rgba(0,0,0,.45);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --portiva-hero-equity-amount-size: clamp(1.5rem, 3.1vw, 2.45rem);
  --portiva-hero-equity-amount-size-compact: clamp(1.35rem, 4.5vw, 1.85rem);
  --portiva-hero-equity-amount-size-mobile: clamp(1.72rem, 4vw, 2.75rem);
  --portiva-hero-equity-amount-size-compact-mobile: clamp(1.55rem, 5.5vw, 2.05rem);
  --portiva-hero-equity-amount-size-desktop: clamp(1.35rem, 2.65vw, 2.05rem);
  --portiva-hero-equity-amount-size-overview-desktop: clamp(1.6rem, 2.9vw, 2.35rem);
  /* Desktop topbar Debt/Value pair — fixed slot so home/folder/entity never resize */
  --portiva-topbar-debt-value-summary-width: min(500px, 46vw);
  --portiva-topbar-debt-value-card-min-height: 3.5rem;
  --portiva-topbar-debt-value-breakdown-min-height: calc(2 * (.56rem * 1.12) + 1px);
  /* Overview chart tab track — home Folders/Entities/Assets matches folder name pill */
  --portiva-overview-chart-tabs-pad: 3px;
  --portiva-overview-chart-tabs-inner-min-h: 38px;
  --portiva-overview-chart-tabs-track-h: calc(var(--portiva-overview-chart-tabs-inner-min-h) + 2 * var(--portiva-overview-chart-tabs-pad) + 2px);
  --portiva-overview-chart-bubble-tabs-gap:6px;
  /* Portiva logo mark — cyan + violet */
  --portiva-brand-teal:#22d3ee;
  --portiva-brand-gold:#a78bfa;
  --brand-mark-bg:linear-gradient(135deg, #22d3ee, #a78bfa);
  --brand-mark-fg:#0f172a;
  --brand-mark-shadow:rgba(34,211,238,.25);
  --portiva-brand-mark-size:64px;
  --portiva-brand-mark-radius:18px;
  --portiva-brand-mark-font:calc(var(--portiva-brand-mark-size) * 0.72);
  --portiva-topbar-brand-mark-size:36px;
  --portiva-topbar-brand-mark-radius:10px;
  --portiva-topbar-brand-mark-font:calc(var(--portiva-topbar-brand-mark-size) * 0.68);
  --portiva-map-link-stroke:rgba(148,163,184,.62);
  --portiva-map-link-arrow:rgba(148,163,184,.88);
  --portiva-map-bg:#000;
  --portiva-canvas-bg:
    radial-gradient(1200px 600px at 10% -10%, var(--radial-1), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, var(--radial-2), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 40%, var(--bg-linear-end));
}

/* Night only — do not put these on :root (Classic / other themes inherit :root). */
[data-theme="night"]{
  --portiva-canvas-bg:#000;
  --surface-soft:rgba(255,255,255,.06);
  /* Same slate surface as Export & Import csv-import-bubble. */
  --portiva-menu-surface:color-mix(in srgb, var(--surface-soft) 92%, #94a3b8 8%);
  --portiva-menu-surface-border:color-mix(in srgb, var(--stroke) 78%, #94a3b8);
  --portiva-menu-surface-hover:color-mix(in srgb, var(--surface-soft) 86%, #94a3b8 14%);
  --glass:var(--portiva-menu-surface);
  --surface-card:var(--portiva-menu-surface);
  --surface-card-hover:var(--portiva-menu-surface-hover);
  --surface-list:var(--portiva-menu-surface);
  --surface-list-hover:var(--portiva-menu-surface-hover);
  --surface-btn:var(--portiva-menu-surface);
  --surface-btn-hover:var(--portiva-menu-surface-hover);
  --portiva-form-bubble-bg:var(--portiva-menu-surface);
  --surface-elevated:var(--portiva-menu-surface);
  --text-muted:var(--muted);
}

[data-theme="night-gray"]{
  --bg0:#0b0f18;
  --bg1:#111827;
  --bg-linear-end:#0f172a;
  --radial-1:rgba(13,148,136,.11);
  --radial-2:rgba(180,83,9,.09);
  --glass:rgba(31,41,55,.78);
  --stroke:rgba(203,213,225,.13);
  --portiva-border:var(--stroke);
  --text:#f1f5f9;
  --muted:#a7b3c5;
  --accent:#0f766e;
  --accent2:#b45309;
  --accent-border:rgba(15,118,110,.38);
  --accent-hover:rgba(15,118,110,.22);
  --surface-card:rgba(51,65,85,.68);
  --surface-card-hover:rgba(71,85,105,.78);
  --surface-btn:rgba(51,65,85,.64);
  --surface-btn-hover:rgba(71,85,105,.82);
  --surface-list:rgba(51,65,85,.58);
  --surface-list-hover:rgba(71,85,105,.72);
  --btn-primary-bg:var(--surface-btn);
  --stroke-hover:rgba(203,213,225,.28);
  --shadow:0 22px 64px rgba(0,0,0,.38);
  --portiva-canvas-bg:#050505;
}

[data-theme="gray-night"]{
  --bg0:#273142;
  --bg1:#1f2937;
  --bg-linear-end:#111827;
  --radial-1:rgba(13,148,136,.08);
  --radial-2:rgba(180,83,9,.07);
  --glass:rgba(15,23,42,.76);
  --stroke:rgba(226,232,240,.10);
  --portiva-border:var(--stroke);
  --text:#f8fafc;
  --muted:#cbd5e1;
  --accent:#0f766e;
  --accent2:#b45309;
  --accent-border:rgba(15,118,110,.36);
  --accent-hover:rgba(15,118,110,.20);
  --surface-card:rgba(15,23,42,.72);
  --surface-card-hover:rgba(30,41,59,.82);
  --surface-btn:rgba(15,23,42,.66);
  --surface-btn-hover:rgba(30,41,59,.86);
  --surface-list:rgba(15,23,42,.58);
  --surface-list-hover:rgba(30,41,59,.76);
  --btn-primary-bg:var(--surface-btn);
  --stroke-hover:rgba(226,232,240,.24);
  --shadow:0 24px 70px rgba(0,0,0,.42);
}

[data-theme="dawn"]{
  --bg0:#a8b8cc;
  --bg1:#9fb0c6;
  --bg-linear-end:#b0c0d2;
  --radial-1:rgba(13,148,136,.14);
  --radial-2:rgba(180,83,9,.10);
  --glass:#eef3f9;
  --stroke:rgba(15,23,42,.10);
  --portiva-border:var(--stroke);
  --text:#0f172a;
  --muted:#475569;
  --text-muted:#475569;
  --cashflow-positive:#15803d;
  --cashflow-negative:#dc2626;
  --accent:#0f766e;
  --accent2:#b45309;
  --accent-border:rgba(15,118,110,.40);
  --accent-hover:rgba(15,118,110,.16);
  --surface:#eef3f9;
  --surface-card:#f4f7fb;
  --surface-card-hover:#e6edf6;
  --surface-btn:#e9f0f7;
  --surface-btn-hover:#dbe4ef;
  --surface-list:#eef2f8;
  --surface-list-hover:#e2e9f2;
  --surface-raised:#f8fafc;
  --border-strong:rgba(15,23,42,.20);
  --btn-primary-bg:#556274;
  --stroke-hover:rgba(15,23,42,.22);
  --shadow:0 8px 24px rgba(15,23,42,.10), 0 1px 3px rgba(15,23,42,.06);
  --portiva-panel-bg:#f4f7fb;
  --portiva-field-bg:#dbe4ef;
  --portiva-action-bg:#556274;
  --portiva-action-hover:#465362;
  --portiva-action-fg:#f8fafc;
  --portiva-action-border:rgba(55,65,81,.42);
  --portiva-tab-fg:#64748b;
  --portiva-tab-fg-hover:#0f172a;
  --portiva-tab-fg-active:#0f172a;
  --portiva-tab-bar-border:rgba(15,23,42,.10);
  --portiva-tab-indicator:#0f766e;
  --portiva-form-bubble-bg:var(--portiva-panel-bg);
  --portiva-form-field-bg:var(--portiva-field-bg);
  --portiva-form-footer-btn-bg:var(--portiva-action-bg);
  --portiva-form-footer-btn-hover:var(--portiva-action-hover);
  --portiva-form-footer-btn-fg:var(--portiva-action-fg);
  --portiva-form-footer-btn-border:var(--portiva-action-border);
  --portiva-map-link-stroke:rgba(15,41,71,.64);
  --portiva-map-link-arrow:rgba(15,41,71,.90);
}

[data-theme="day"]{
  --bg0:#ffffff;
  --bg1:#fafafa;
  --bg-linear-end:#f8fafc;
  --radial-1:rgba(13,148,136,.04);
  --radial-2:rgba(15,23,42,.02);
  --glass:#eef2f7;
  --stroke:rgba(15,23,42,.11);
  --portiva-border:var(--stroke);
  --text:#0f172a;
  --muted:#64748b;
  --text-muted:#64748b;
  --cashflow-positive:#15803d;
  --cashflow-negative:#dc2626;
  --accent:#0f766e;
  --accent2:#b45309;
  --accent-border:rgba(15,118,110,.36);
  --accent-hover:rgba(15,118,110,.12);
  --surface:#eef2f7;
  --surface-card:#eef2f7;
  --surface-card-hover:#e2e8f0;
  --surface-btn:#dfe6ee;
  --surface-btn-hover:#d1dae6;
  --surface-list:#eef2f7;
  --surface-list-hover:#e2e8f0;
  --surface-raised:#ffffff;
  --border-strong:rgba(15,23,42,.22);
  --btn-primary-bg:#556274;
  --stroke-hover:rgba(15,23,42,.28);
  --shadow:0 6px 20px rgba(15,23,42,.10), 0 1px 3px rgba(15,23,42,.06);
  --portiva-canvas-bg:#ffffff;
  --portiva-panel-bg:#e8edf3;
  --portiva-field-bg:#d5dee8;
  --portiva-menu-surface:var(--portiva-field-bg);
  --portiva-menu-surface-border:var(--stroke);
  --portiva-menu-surface-hover:var(--surface-card-hover);
  --portiva-action-bg:#556274;
  --portiva-action-hover:#465362;
  --portiva-action-fg:#f8fafc;
  --portiva-action-border:rgba(55,65,81,.42);
  --portiva-tab-fg:#64748b;
  --portiva-tab-fg-hover:#0f172a;
  --portiva-tab-fg-active:#0f172a;
  --portiva-tab-bar-border:rgba(15,23,42,.08);
  --portiva-tab-indicator:#0f766e;
  --portiva-form-bubble-bg:var(--portiva-panel-bg);
  --portiva-form-field-bg:var(--portiva-field-bg);
  --portiva-form-footer-btn-bg:var(--portiva-action-bg);
  --portiva-form-footer-btn-hover:var(--portiva-action-hover);
  --portiva-form-footer-btn-fg:var(--portiva-action-fg);
  --portiva-form-footer-btn-border:var(--portiva-action-border);
  --portiva-map-link-stroke:rgba(15,23,42,.52);
  --portiva-map-link-arrow:rgba(15,23,42,.82);
}

/* Day — white canvas; elevated gray cards and form bubbles */
[data-theme="day"] .stat-card,
[data-theme="day"] .detailsChartSection,
[data-theme="day"] .modal-box,
[data-theme="day"] .topbar-overflow-panel,
[data-theme="day"] #addEntityModal .entityDetailsBubble,
[data-theme="day"] .add-entity-page .entityDetailsBubble,
[data-theme="day"] .edit-entity-page .entityDetailsBubble,
[data-theme="day"] #addAssetModal .entityDetailsBubble,
[data-theme="day"] .add-asset-page .entityDetailsBubble,
[data-theme="day"] #assetEditModal .entityDetailsBubble,
[data-theme="day"] .asset-edit-page .entityDetailsBubble,
[data-theme="day"] .add-asset-page .add-asset-section,
[data-theme="day"] .asset-edit-page .add-asset-section,
[data-theme="day"] #addAssetModal .add-asset-section,
[data-theme="day"] #assetEditModal .add-asset-section,
[data-theme="day"] .add-asset-page .add-asset-entity-context,
[data-theme="day"] .asset-edit-page .add-asset-entity-context,
[data-theme="day"] #homeHierTreeModal .modal-box.modal-box--home-hier-tree,
[data-theme="day"] .portiva-flow-page.backup-page .portiva-flow-page__body,
[data-theme="day"] .csv-transfer-page .csv-transfer-page__body,
[data-theme="day"] .support-page .support-page__body,
[data-theme="day"] .portiva-flow-page.summaries-page:not(.summaries-page--hub) .summaries-list-body,
[data-theme="day"] .portiva-flow-page.summaries-page--principal .summaries-metric-panel,
[data-theme="day"] .portiva-flow-page.summaries-page--debt .summaries-metric-panel,
[data-theme="day"] .portiva-flow-page.summaries-page--cashflow .summaries-metric-panel,
[data-theme="day"] .portiva-flow-page.summaries-page--investor-shares .summaries-metric-panel{
  border-color:var(--stroke);
  box-shadow:0 1px 3px rgba(15,23,42,.07), 0 6px 18px rgba(15,23,42,.09);
}
[data-theme="day"] .portiva-flow-page .layout-settings-field:not(.layout-settings-currency-field),
[data-theme="day"] .portiva-flow-page.summaries-page .summaries-entity-block,
[data-theme="day"] .portiva-flow-page.backup-page .restore-backup-item,
[data-theme="day"] .portiva-flow-page .export-csv-scope,
[data-theme="day"] .welcome-plans-page__pricing-grid th,
[data-theme="day"] .welcome-plans-page__pricing-grid td{
  border-color:var(--portiva-menu-surface-border);
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
[data-theme="day"] .home-overview-chart-tabs{
  background-color:var(--surface-btn);
  border-color:var(--stroke);
}
[data-theme="dawn"] .firebase-chip--ok,
[data-theme="day"] .firebase-chip--ok,
[data-theme="classic"] .firebase-chip--ok{
  color:#334155;
  border-color:var(--stroke);
  background:var(--surface-btn);
}

[data-theme="classic"]{
  --bg0:#d3dae5;
  --bg1:#cbd4e1;
  --bg-linear-end:#dce2eb;
  --radial-1:rgba(13,148,136,.10);
  --radial-2:rgba(180,83,9,.08);
  --glass:rgba(255,255,255,.94);
  --stroke:rgba(100,116,139,.19);
  --portiva-border:var(--stroke);
  --text:#0f172a;
  --muted:#475569;
  --text-muted:#475569;
  --cashflow-positive:#15803d;
  --cashflow-negative:#dc2626;
  --accent:#0f766e;
  --accent2:#b45309;
  --accent-border:rgba(15,118,110,.40);
  --accent-hover:rgba(15,118,110,.14);
  --surface:rgba(255,255,255,.94);
  --surface-card:#ffffff;
  --surface-card-hover:#f1f5f9;
  --surface-btn:#f1f5f9;
  --surface-btn-hover:#e2e8f0;
  --surface-list:#ffffff;
  --surface-list-hover:#f8fafc;
  --surface-raised:#ffffff;
  --border-strong:rgba(100,116,139,.30);
  --btn-primary-bg:#556274;
  --stroke-hover:rgba(100,116,139,.36);
  --shadow:0 4px 14px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --portiva-canvas-bg:
    radial-gradient(1200px 600px at 10% -10%, var(--radial-1), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, var(--radial-2), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 40%, var(--bg-linear-end));
  --portiva-panel-bg:#ffffff;
  --portiva-field-bg:#eef2f7;
  --portiva-menu-surface:var(--portiva-field-bg);
  --portiva-menu-surface-border:var(--stroke);
  --portiva-menu-surface-hover:var(--surface-card-hover);
  --portiva-action-bg:#556274;
  --portiva-action-hover:#465362;
  --portiva-action-fg:#f8fafc;
  --portiva-action-border:rgba(55,65,81,.42);
  --portiva-tab-fg:#64748b;
  --portiva-tab-fg-hover:#0f172a;
  --portiva-tab-fg-active:#0f172a;
  --portiva-tab-bar-border:rgba(100,116,139,.18);
  --portiva-tab-indicator:#0f766e;
  --portiva-form-bubble-bg:var(--portiva-panel-bg);
  --portiva-form-field-bg:var(--portiva-field-bg);
  --portiva-form-footer-btn-bg:var(--portiva-action-bg);
  --portiva-form-footer-btn-hover:var(--portiva-action-hover);
  --portiva-form-footer-btn-fg:var(--portiva-action-fg);
  --portiva-form-footer-btn-border:var(--portiva-action-border);
  --portiva-map-link-stroke:rgba(30,41,59,.60);
  --portiva-map-link-arrow:rgba(30,41,59,.88);
  --portiva-select-bg:#d8e0ea;
  --portiva-select-bg-hover:#c8d4e0;
}

[data-theme="dawn"],
[data-theme="day"],
[data-theme="classic"]{
  --portiva-map-bg:var(--bg0);
}

/* Light themes (Dawn / Day / Classic) — contrast + form pages */
[data-theme="dawn"] .home-overview-chart-tab,
[data-theme="day"] .home-overview-chart-tab,
[data-theme="classic"] .home-overview-chart-tab{
  color:var(--text);
}
[data-theme="dawn"] .home-overview-chart-tab.is-active,
[data-theme="day"] .home-overview-chart-tab.is-active,
[data-theme="classic"] .home-overview-chart-tab.is-active{
  color:var(--text);
}
[data-theme="dawn"] .home-overview-chart-tab[data-home-pie-tab].is-active,
[data-theme="day"] .home-overview-chart-tab[data-home-pie-tab].is-active,
[data-theme="classic"] .home-overview-chart-tab[data-home-pie-tab].is-active,
[data-theme="dawn"] .home-overview-chart-tab[data-welcome-pie-tab].is-active,
[data-theme="day"] .home-overview-chart-tab[data-welcome-pie-tab].is-active,
[data-theme="classic"] .home-overview-chart-tab[data-welcome-pie-tab].is-active{
  color:#fff;
}
[data-theme="dawn"] .entity-page .btn--entity-add-asset,
[data-theme="day"] .entity-page .btn--entity-add-asset,
[data-theme="classic"] .entity-page .btn--entity-add-asset,
[data-theme="dawn"] .entity-page .btn--entity-edit,
[data-theme="day"] .entity-page .btn--entity-edit,
[data-theme="classic"] .entity-page .btn--entity-edit,
[data-theme="dawn"] .entity-page .btn--entity-add-asset:hover,
[data-theme="day"] .entity-page .btn--entity-add-asset:hover,
[data-theme="classic"] .entity-page .btn--entity-add-asset:hover,
[data-theme="dawn"] .entity-page .btn--entity-edit:hover,
[data-theme="day"] .entity-page .btn--entity-edit:hover,
[data-theme="classic"] .entity-page .btn--entity-edit:hover{
  color:var(--text);
}
[data-theme="dawn"] .home-hier-tree-page__foot,
[data-theme="day"] .home-hier-tree-page__foot,
[data-theme="classic"] .home-hier-tree-page__foot,
[data-theme="dawn"] .home-hier-tree-modal__foot,
[data-theme="day"] .home-hier-tree-modal__foot,
[data-theme="classic"] .home-hier-tree-modal__foot,
[data-theme="dawn"] .home-hier-tree__mode-bar,
[data-theme="day"] .home-hier-tree__mode-bar,
[data-theme="classic"] .home-hier-tree__mode-bar{
  border-top-color:var(--stroke);
}
[data-theme="dawn"] .home-hier-tree__mode-check,
[data-theme="day"] .home-hier-tree__mode-check,
[data-theme="classic"] .home-hier-tree__mode-check{
  color:var(--muted);
}

/* Dawn / Day — elevated panels vs canvas (stat cards, pies, modals; skip color-mix toward bg) */
[data-theme="dawn"] .stat-card,
[data-theme="day"] .stat-card,
[data-theme="classic"] .stat-card,
[data-theme="dawn"] .detailsChartSection,
[data-theme="day"] .detailsChartSection,
[data-theme="classic"] .detailsChartSection,
[data-theme="dawn"] .modal-box,
[data-theme="day"] .modal-box,
[data-theme="classic"] .modal-box{
  background:var(--surface-card);
  border-color:var(--stroke);
}
[data-theme="dawn"] body.portiva-route-app .home-summary--in-main .stat-card--mini,
[data-theme="day"] body.portiva-route-app .home-summary--in-main .stat-card--mini,
[data-theme="classic"] body.portiva-route-app .home-summary--in-main .stat-card--mini,
[data-theme="dawn"] .home-summary:not(.home-summary--in-main) .stat-card,
[data-theme="day"] .home-summary:not(.home-summary--in-main) .stat-card,
[data-theme="classic"] .home-summary:not(.home-summary--in-main) .stat-card{
  background:var(--surface-card);
}
[data-theme="dawn"] .home-overview-chart-tabs,
[data-theme="day"] .home-overview-chart-tabs,
[data-theme="classic"] .home-overview-chart-tabs{
  background:var(--surface-btn);
  border-color:var(--stroke);
}

/* Dawn / Day — add / edit entity & asset full pages + modals (light elevated form bubbles) */
[data-theme="dawn"] #addEntityModal .entityDetailsBubble,
[data-theme="day"] #addEntityModal .entityDetailsBubble,
[data-theme="classic"] #addEntityModal .entityDetailsBubble,
[data-theme="dawn"] .add-entity-page .entityDetailsBubble,
[data-theme="day"] .add-entity-page .entityDetailsBubble,
[data-theme="classic"] .add-entity-page .entityDetailsBubble,
[data-theme="dawn"] .edit-entity-page .entityDetailsBubble,
[data-theme="day"] .edit-entity-page .entityDetailsBubble,
[data-theme="classic"] .edit-entity-page .entityDetailsBubble,
[data-theme="dawn"] #addAssetModal .entityDetailsBubble,
[data-theme="day"] #addAssetModal .entityDetailsBubble,
[data-theme="classic"] #addAssetModal .entityDetailsBubble,
[data-theme="dawn"] .add-asset-page .entityDetailsBubble,
[data-theme="day"] .add-asset-page .entityDetailsBubble,
[data-theme="classic"] .add-asset-page .entityDetailsBubble,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble,
[data-theme="day"] #assetEditModal .entityDetailsBubble,
[data-theme="classic"] #assetEditModal .entityDetailsBubble,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble,
[data-theme="day"] .asset-edit-page .entityDetailsBubble,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble,
[data-theme="dawn"] .add-asset-page .add-asset-section,
[data-theme="day"] .add-asset-page .add-asset-section,
[data-theme="classic"] .add-asset-page .add-asset-section,
[data-theme="dawn"] .asset-edit-page .add-asset-section,
[data-theme="day"] .asset-edit-page .add-asset-section,
[data-theme="classic"] .asset-edit-page .add-asset-section,
[data-theme="dawn"] #addAssetModal .add-asset-section,
[data-theme="day"] #addAssetModal .add-asset-section,
[data-theme="classic"] #addAssetModal .add-asset-section,
[data-theme="dawn"] #assetEditModal .add-asset-section,
[data-theme="day"] #assetEditModal .add-asset-section,
[data-theme="classic"] #assetEditModal .add-asset-section,
[data-theme="dawn"] .add-asset-page .add-asset-entity-context,
[data-theme="day"] .add-asset-page .add-asset-entity-context,
[data-theme="classic"] .add-asset-page .add-asset-entity-context,
[data-theme="dawn"] .asset-edit-page .add-asset-entity-context,
[data-theme="day"] .asset-edit-page .add-asset-entity-context,
[data-theme="classic"] .asset-edit-page .add-asset-entity-context{
  background:var(--portiva-panel-bg);
  border-color:var(--stroke);
  box-shadow:0 1px 4px color-mix(in srgb, var(--text) 8%, transparent);
}
[data-theme="classic"] :is(
  #addEntityModal,
  .add-entity-page,
  .edit-entity-page,
  #addAssetModal,
  #assetEditModal,
  .add-asset-page,
  .asset-edit-page
) :is(.entityDetailsBubble, .add-asset-section, .add-asset-entity-context){
  border-color:rgba(51,65,85,.62);
}
[data-theme="dawn"] #addEntityModal .entityDetailsBubble .field-input,
[data-theme="day"] #addEntityModal .entityDetailsBubble .field-input,
[data-theme="classic"] #addEntityModal .entityDetailsBubble .field-input,
[data-theme="dawn"] .add-entity-page .entityDetailsBubble .field-input,
[data-theme="day"] .add-entity-page .entityDetailsBubble .field-input,
[data-theme="classic"] .add-entity-page .entityDetailsBubble .field-input,
[data-theme="dawn"] .edit-entity-page .entityDetailsBubble .field-input,
[data-theme="day"] .edit-entity-page .entityDetailsBubble .field-input,
[data-theme="classic"] .edit-entity-page .entityDetailsBubble .field-input,
[data-theme="dawn"] #addAssetModal .entityDetailsBubble .field-input,
[data-theme="day"] #addAssetModal .entityDetailsBubble .field-input,
[data-theme="classic"] #addAssetModal .entityDetailsBubble .field-input,
[data-theme="dawn"] .add-asset-page .entityDetailsBubble .field-input,
[data-theme="day"] .add-asset-page .entityDetailsBubble .field-input,
[data-theme="classic"] .add-asset-page .entityDetailsBubble .field-input,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble .field-input,
[data-theme="day"] #assetEditModal .entityDetailsBubble .field-input,
[data-theme="classic"] #assetEditModal .entityDetailsBubble .field-input,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble .field-input,
[data-theme="day"] .asset-edit-page .entityDetailsBubble .field-input,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble .field-input,
[data-theme="dawn"] #addEntityModal .entityDetailsBubble .theme-select,
[data-theme="day"] #addEntityModal .entityDetailsBubble .theme-select,
[data-theme="dawn"] .add-entity-page .entityDetailsBubble .theme-select,
[data-theme="day"] .add-entity-page .entityDetailsBubble .theme-select,
[data-theme="dawn"] .edit-entity-page .entityDetailsBubble .theme-select,
[data-theme="day"] .edit-entity-page .entityDetailsBubble .theme-select,
[data-theme="dawn"] #addAssetModal .entityDetailsBubble .theme-select,
[data-theme="day"] #addAssetModal .entityDetailsBubble .theme-select,
[data-theme="dawn"] .add-asset-page .entityDetailsBubble .theme-select,
[data-theme="day"] .add-asset-page .entityDetailsBubble .theme-select,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble .theme-select,
[data-theme="day"] #assetEditModal .entityDetailsBubble .theme-select,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble .theme-select,
[data-theme="day"] .asset-edit-page .entityDetailsBubble .theme-select,
[data-theme="dawn"] #addEntityModal .named-links-editor__row,
[data-theme="day"] #addEntityModal .named-links-editor__row,
[data-theme="classic"] #addEntityModal .named-links-editor__row,
[data-theme="dawn"] .add-entity-page .named-links-editor__row,
[data-theme="day"] .add-entity-page .named-links-editor__row,
[data-theme="classic"] .add-entity-page .named-links-editor__row,
[data-theme="dawn"] .edit-entity-page .named-links-editor__row,
[data-theme="day"] .edit-entity-page .named-links-editor__row,
[data-theme="classic"] .edit-entity-page .named-links-editor__row,
[data-theme="dawn"] #addAssetModal .named-links-editor__row,
[data-theme="day"] #addAssetModal .named-links-editor__row,
[data-theme="classic"] #addAssetModal .named-links-editor__row,
[data-theme="dawn"] .add-asset-page .named-links-editor__row,
[data-theme="day"] .add-asset-page .named-links-editor__row,
[data-theme="classic"] .add-asset-page .named-links-editor__row,
[data-theme="dawn"] #assetEditModal .named-links-editor__row,
[data-theme="day"] #assetEditModal .named-links-editor__row,
[data-theme="classic"] #assetEditModal .named-links-editor__row,
[data-theme="dawn"] .asset-edit-page .named-links-editor__row,
[data-theme="day"] .asset-edit-page .named-links-editor__row,
[data-theme="classic"] .asset-edit-page .named-links-editor__row{
  background:var(--portiva-form-field-bg);
  border-color:var(--stroke);
}
[data-theme="dawn"] .portiva-mobile-form-page:not(.welcome-auth-page) .field-input,
[data-theme="day"] .portiva-mobile-form-page:not(.welcome-auth-page) .field-input,
[data-theme="classic"] .portiva-mobile-form-page:not(.welcome-auth-page) .field-input,
[data-theme="dawn"] .portiva-mobile-form-page:not(.welcome-auth-page) textarea,
[data-theme="day"] .portiva-mobile-form-page:not(.welcome-auth-page) textarea,
[data-theme="classic"] .portiva-mobile-form-page:not(.welcome-auth-page) textarea,
[data-theme="dawn"] .portiva-mobile-form-page:not(.welcome-auth-page) select,
[data-theme="day"] .portiva-mobile-form-page:not(.welcome-auth-page) select,
[data-theme="dawn"] .portiva-mobile-form-page:not(.welcome-auth-page) .theme-select,
[data-theme="day"] .portiva-mobile-form-page:not(.welcome-auth-page) .theme-select{
  background:var(--portiva-form-field-bg);
}

/* Light themes — unified controls (inputs, buttons, tabs, menu pages) */
[data-theme="dawn"] .field-input,
[data-theme="day"] .field-input,
[data-theme="classic"] .field-input,
[data-theme="dawn"] textarea.field-input,
[data-theme="day"] textarea.field-input,
[data-theme="classic"] textarea.field-input,
[data-theme="dawn"] select.field-input,
[data-theme="day"] select.field-input,
[data-theme="dawn"] .theme-select,
[data-theme="day"] .theme-select{
  background:var(--portiva-field-bg);
  color:var(--text);
  border-color:var(--stroke);
}
[data-theme="classic"] select:not(.topbar-locale-select),
[data-theme="classic"] select.field-input,
[data-theme="classic"] .theme-select{
  background-color:var(--portiva-select-bg);
  color:var(--text);
  border-color:var(--stroke);
}
[data-theme="classic"] select:not(.topbar-locale-select):hover,
[data-theme="classic"] select.field-input:hover,
[data-theme="classic"] .theme-select:hover{
  background-color:var(--portiva-select-bg-hover);
  border-color:var(--stroke-hover);
}
[data-theme="dawn"] .btn--primary,
[data-theme="day"] .btn--primary{
  background:var(--portiva-action-bg);
  background-image:none;
  border-color:var(--portiva-action-border);
  color:var(--portiva-action-fg);
}
[data-theme="dawn"] .btn--primary:hover:not(:disabled),
[data-theme="day"] .btn--primary:hover:not(:disabled){
  background:var(--portiva-action-hover);
  background-image:none;
  border-color:var(--portiva-action-border);
  color:var(--portiva-action-fg);
}
[data-theme="dawn"] .btn--primary:disabled,
[data-theme="day"] .btn--primary:disabled{
  opacity:.52;
  background:var(--portiva-action-bg);
  background-image:none;
  border-color:var(--portiva-action-border);
  color:var(--portiva-action-fg);
}
[data-theme="classic"] .btn--primary,
[data-theme="classic"] .btn--primary:disabled,
[data-theme="classic"] .btn--primary:disabled:hover{
  background:var(--portiva-action-bg);
  background-image:none;
  border-color:var(--portiva-action-border);
  color:var(--portiva-action-fg);
}
[data-theme="classic"] .btn--primary:hover:not(:disabled){
  background:var(--portiva-action-hover);
  background-image:none;
  border-color:var(--portiva-action-border);
  color:var(--portiva-action-fg);
}
[data-theme="classic"] .btn--primary:disabled{
  opacity:.52;
}
[data-theme="dawn"] .btn--ghost,
[data-theme="day"] .btn--ghost,
[data-theme="classic"] .btn--ghost{
  background:transparent;
  color:var(--text);
  border-color:var(--stroke);
}
[data-theme="dawn"] .btn--ghost:hover:not(:disabled),
[data-theme="day"] .btn--ghost:hover:not(:disabled),
[data-theme="classic"] .btn--ghost:hover:not(:disabled){
  background-color:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
  color:var(--text);
}

/* Bright palettes — stronger button outlines app-wide */
[data-theme="dawn"] .btn,
[data-theme="day"] .btn,
[data-theme="classic"] .btn{
  border-color:var(--border-strong);
}
[data-theme="dawn"] .btn:hover:not(:disabled),
[data-theme="day"] .btn:hover:not(:disabled),
[data-theme="classic"] .btn:hover:not(:disabled){
  border-color:color-mix(in srgb, var(--border-strong) 50%, #0f172a 50%);
}
[data-theme="dawn"] .btn:disabled,
[data-theme="day"] .btn:disabled,
[data-theme="classic"] .btn:disabled{
  border-color:var(--border-strong);
}
[data-theme="dawn"] .btn--primary,
[data-theme="day"] .btn--primary,
[data-theme="classic"] .btn--primary,
[data-theme="dawn"] .btn--primary:disabled,
[data-theme="day"] .btn--primary:disabled,
[data-theme="classic"] .btn--primary:disabled,
[data-theme="classic"] .btn--primary:disabled:hover{
  border-color:color-mix(in srgb, var(--portiva-action-border) 72%, #0f172a 28%);
}
[data-theme="dawn"] .btn--primary:hover:not(:disabled),
[data-theme="day"] .btn--primary:hover:not(:disabled),
[data-theme="classic"] .btn--primary:hover:not(:disabled){
  border-color:color-mix(in srgb, var(--portiva-action-border) 58%, #0f172a 42%);
}

[data-theme="dawn"] .import-csv-file-picker__btn,
[data-theme="day"] .import-csv-file-picker__btn,
[data-theme="classic"] .import-csv-file-picker__btn{
  background:var(--surface-btn);
  color:var(--text);
  border-color:var(--stroke);
}
[data-theme="dawn"] .import-csv-file-picker__btn:hover,
[data-theme="day"] .import-csv-file-picker__btn:hover,
[data-theme="classic"] .import-csv-file-picker__btn:hover{
  background:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
}

/* Light themes — overflow menu full pages */
[data-theme="dawn"] .portiva-flow-page.layout-settings-page,
[data-theme="day"] .portiva-flow-page.layout-settings-page,
[data-theme="classic"] .portiva-flow-page.layout-settings-page,
[data-theme="dawn"] .portiva-flow-page.backup-page,
[data-theme="day"] .portiva-flow-page.backup-page,
[data-theme="classic"] .portiva-flow-page.backup-page,
[data-theme="dawn"] .portiva-flow-page.summaries-page,
[data-theme="day"] .portiva-flow-page.summaries-page,
[data-theme="classic"] .portiva-flow-page.summaries-page,
[data-theme="dawn"] .portiva-flow-page.welcome-plans-page,
[data-theme="day"] .portiva-flow-page.welcome-plans-page,
[data-theme="classic"] .portiva-flow-page.welcome-plans-page,
[data-theme="dawn"] .portiva-flow-page.plan-details-page,
[data-theme="day"] .portiva-flow-page.plan-details-page,
[data-theme="classic"] .portiva-flow-page.plan-details-page,
[data-theme="dawn"] .csv-transfer-page,
[data-theme="day"] .csv-transfer-page,
[data-theme="classic"] .csv-transfer-page,
[data-theme="dawn"] .support-page,
[data-theme="day"] .support-page,
[data-theme="classic"] .support-page{
  --portiva-menu-surface:var(--portiva-field-bg);
  --portiva-menu-surface-border:var(--stroke);
  --portiva-menu-surface-hover:var(--surface-card-hover);
}
[data-theme="classic"] .portiva-flow-page.layout-settings-page,
[data-theme="classic"] .portiva-flow-page.backup-page,
[data-theme="classic"] .portiva-flow-page.summaries-page,
[data-theme="classic"] .portiva-flow-page.welcome-plans-page,
[data-theme="classic"] .portiva-flow-page.plan-details-page,
[data-theme="classic"] .portiva-flow-page.portiva-menu-surface-page,
[data-theme="classic"] .csv-transfer-page,
[data-theme="classic"] .support-page{
  --stroke:rgba(51,65,85,.62);
  --portiva-menu-surface-border:rgba(51,65,85,.62);
}
[data-theme="dawn"] .portiva-flow-page.backup-page .portiva-flow-page__body,
[data-theme="day"] .portiva-flow-page.backup-page .portiva-flow-page__body,
[data-theme="classic"] .portiva-flow-page.backup-page .portiva-flow-page__body,
[data-theme="dawn"] .csv-transfer-page .csv-transfer-page__body,
[data-theme="day"] .csv-transfer-page .csv-transfer-page__body,
[data-theme="classic"] .csv-transfer-page .csv-transfer-page__body,
[data-theme="dawn"] .support-page .support-page__body,
[data-theme="day"] .support-page .support-page__body,
[data-theme="classic"] .support-page .support-page__body{
  background:var(--portiva-panel-bg);
  border-color:var(--stroke);
}
[data-theme="dawn"] .portiva-flow-page.summaries-page:not(.summaries-page--hub) .summaries-list-body,
[data-theme="day"] .portiva-flow-page.summaries-page:not(.summaries-page--hub) .summaries-list-body,
[data-theme="classic"] .portiva-flow-page.summaries-page:not(.summaries-page--hub) .summaries-list-body,
[data-theme="dawn"] .portiva-flow-page.summaries-page--principal .summaries-metric-panel,
[data-theme="dawn"] .portiva-flow-page.summaries-page--debt .summaries-metric-panel,
[data-theme="dawn"] .portiva-flow-page.summaries-page--cashflow .summaries-metric-panel,
[data-theme="dawn"] .portiva-flow-page.summaries-page--investor-shares .summaries-metric-panel,
[data-theme="day"] .portiva-flow-page.summaries-page--principal .summaries-metric-panel,
[data-theme="day"] .portiva-flow-page.summaries-page--debt .summaries-metric-panel,
[data-theme="day"] .portiva-flow-page.summaries-page--cashflow .summaries-metric-panel,
[data-theme="day"] .portiva-flow-page.summaries-page--investor-shares .summaries-metric-panel,
[data-theme="classic"] .portiva-flow-page.summaries-page--principal .summaries-metric-panel,
[data-theme="classic"] .portiva-flow-page.summaries-page--debt .summaries-metric-panel,
[data-theme="classic"] .portiva-flow-page.summaries-page--cashflow .summaries-metric-panel,
[data-theme="classic"] .portiva-flow-page.summaries-page--investor-shares .summaries-metric-panel{
  background:var(--portiva-panel-bg);
  border:1px solid var(--stroke);
  border-radius:12px;
  padding:16px 18px;
  box-sizing:border-box;
}
[data-theme="dawn"] .portiva-flow-page.layout-settings-page .portiva-flow-page__footer,
[data-theme="day"] .portiva-flow-page.layout-settings-page .portiva-flow-page__footer,
[data-theme="classic"] .portiva-flow-page.layout-settings-page .portiva-flow-page__footer,
[data-theme="dawn"] .portiva-flow-page.portiva-menu-surface-page .portiva-flow-page__footer,
[data-theme="day"] .portiva-flow-page.portiva-menu-surface-page .portiva-flow-page__footer,
[data-theme="classic"] .portiva-flow-page.portiva-menu-surface-page .portiva-flow-page__footer,
[data-theme="dawn"] .portiva-flow-page.backup-page .portiva-flow-page__footer,
[data-theme="day"] .portiva-flow-page.backup-page .portiva-flow-page__footer,
[data-theme="classic"] .portiva-flow-page.backup-page .portiva-flow-page__footer,
[data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer,
[data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer,
[data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer,
[data-theme="dawn"] .welcome-plans-page .portiva-flow-page__footer,
[data-theme="day"] .welcome-plans-page .portiva-flow-page__footer,
[data-theme="classic"] .welcome-plans-page .portiva-flow-page__footer,
[data-theme="dawn"] .plan-details-page .portiva-flow-page__footer,
[data-theme="day"] .plan-details-page .portiva-flow-page__footer,
[data-theme="classic"] .plan-details-page .portiva-flow-page__footer,
[data-theme="dawn"] .csv-transfer-page .csv-transfer-page__footer,
[data-theme="day"] .csv-transfer-page .csv-transfer-page__footer,
[data-theme="classic"] .csv-transfer-page .csv-transfer-page__footer{
  background:transparent;
  border-top-color:transparent;
  box-shadow:none;
}
[data-theme="dawn"] .portiva-flow-page.summaries-page .summaries-hub-actions .btn,
[data-theme="day"] .portiva-flow-page.summaries-page .summaries-hub-actions .btn,
[data-theme="classic"] .portiva-flow-page.summaries-page .summaries-hub-actions .btn{
  background:var(--surface-btn);
  color:var(--text);
  border-color:var(--stroke);
}
[data-theme="dawn"] .portiva-flow-page.summaries-page .summaries-hub-actions .btn:hover:not(:disabled),
[data-theme="day"] .portiva-flow-page.summaries-page .summaries-hub-actions .btn:hover:not(:disabled),
[data-theme="classic"] .portiva-flow-page.summaries-page .summaries-hub-actions .btn:hover:not(:disabled){
  background:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
  color:var(--text);
}
[data-theme="dawn"] .support-page__tab,
[data-theme="day"] .support-page__tab,
[data-theme="classic"] .support-page__tab{
  color:var(--portiva-tab-fg);
  background:var(--surface-btn);
  border-color:var(--stroke);
}
[data-theme="dawn"] .support-page__tab:hover:not(.support-page__tab--active),
[data-theme="day"] .support-page__tab:hover:not(.support-page__tab--active),
[data-theme="classic"] .support-page__tab:hover:not(.support-page__tab--active){
  color:var(--portiva-tab-fg-hover);
  background:var(--surface-btn-hover);
}
[data-theme="dawn"] .support-page__tab--active,
[data-theme="day"] .support-page__tab--active,
[data-theme="classic"] .support-page__tab--active{
  color:var(--portiva-tab-fg-active);
  background:var(--accent-hover);
  border-color:var(--accent-border);
}
[data-theme="dawn"] .support-page .welcome-page__input,
[data-theme="day"] .support-page .welcome-page__input,
[data-theme="classic"] .support-page .welcome-page__input,
[data-theme="dawn"] .support-page .support-compose-form__message,
[data-theme="day"] .support-page .support-compose-form__message,
[data-theme="classic"] .support-page .support-compose-form__message{
  background:var(--portiva-field-bg);
  color:var(--text);
  border-color:var(--stroke);
}
[data-theme="dawn"] #addEntityModal .add-entity-section .entityDetailsBubbleTitle,
[data-theme="day"] #addEntityModal .add-entity-section .entityDetailsBubbleTitle,
[data-theme="classic"] #addEntityModal .add-entity-section .entityDetailsBubbleTitle,
[data-theme="dawn"] .add-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="day"] .add-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="classic"] .add-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="dawn"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="day"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="classic"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="dawn"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="day"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="classic"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="dawn"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="day"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="classic"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="day"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="classic"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="day"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitle{
  color:var(--text);
}
[data-theme="dawn"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="day"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="classic"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="dawn"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="day"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="classic"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="dawn"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="day"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="classic"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="dawn"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="day"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="classic"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="dawn"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="day"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="classic"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="day"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="classic"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="day"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble.modal-hint,
[data-theme="day"] #assetEditModal .entityDetailsBubble.modal-hint,
[data-theme="classic"] #assetEditModal .entityDetailsBubble.modal-hint,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble .modal-hint,
[data-theme="day"] .asset-edit-page .entityDetailsBubble .modal-hint,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble .modal-hint{
  color:var(--muted);
}
[data-theme="dawn"] #addEntityModal .add-entity-section .modal-field > span,
[data-theme="day"] #addEntityModal .add-entity-section .modal-field > span,
[data-theme="classic"] #addEntityModal .add-entity-section .modal-field > span,
[data-theme="dawn"] #addEntityModal .add-entity-section .named-links-editor .modal-field > span,
[data-theme="day"] #addEntityModal .add-entity-section .named-links-editor .modal-field > span,
[data-theme="classic"] #addEntityModal .add-entity-section .named-links-editor .modal-field > span,
[data-theme="dawn"] .add-entity-page .add-entity-section .modal-field > span,
[data-theme="day"] .add-entity-page .add-entity-section .modal-field > span,
[data-theme="classic"] .add-entity-page .add-entity-section .modal-field > span,
[data-theme="dawn"] .add-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="day"] .add-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="classic"] .add-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="dawn"] .edit-entity-page .add-entity-section .modal-field > span,
[data-theme="day"] .edit-entity-page .add-entity-section .modal-field > span,
[data-theme="classic"] .edit-entity-page .add-entity-section .modal-field > span,
[data-theme="dawn"] .edit-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="day"] .edit-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="classic"] .edit-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="dawn"] #addAssetModal .entityDetailsBubble .modal-field > span,
[data-theme="day"] #addAssetModal .entityDetailsBubble .modal-field > span,
[data-theme="classic"] #addAssetModal .entityDetailsBubble .modal-field > span,
[data-theme="dawn"] #addAssetModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="day"] #addAssetModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="classic"] #addAssetModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="dawn"] .add-asset-page .entityDetailsBubble .modal-field > span,
[data-theme="day"] .add-asset-page .entityDetailsBubble .modal-field > span,
[data-theme="classic"] .add-asset-page .entityDetailsBubble .modal-field > span,
[data-theme="dawn"] .add-asset-page .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="day"] .add-asset-page .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="classic"] .add-asset-page .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble .modal-field > span,
[data-theme="day"] #assetEditModal .entityDetailsBubble .modal-field > span,
[data-theme="classic"] #assetEditModal .entityDetailsBubble .modal-field > span,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="day"] #assetEditModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="classic"] #assetEditModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble .modal-field > span,
[data-theme="day"] .asset-edit-page .entityDetailsBubble .modal-field > span,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble .modal-field > span,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="day"] .asset-edit-page .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="dawn"] #assetEditModal .entityDetailsBubble .detail-field dt,
[data-theme="day"] #assetEditModal .entityDetailsBubble .detail-field dt,
[data-theme="classic"] #assetEditModal .entityDetailsBubble .detail-field dt,
[data-theme="dawn"] .asset-edit-page .entityDetailsBubble .detail-field dt,
[data-theme="day"] .asset-edit-page .entityDetailsBubble .detail-field dt,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble .detail-field dt{
  color:var(--text);
}
[data-theme="dawn"] .add-entity-page .portiva-flow-page__footer,
[data-theme="day"] .add-entity-page .portiva-flow-page__footer,
[data-theme="classic"] .add-entity-page .portiva-flow-page__footer,
[data-theme="dawn"] .edit-entity-page .portiva-flow-page__footer,
[data-theme="day"] .edit-entity-page .portiva-flow-page__footer,
[data-theme="classic"] .edit-entity-page .portiva-flow-page__footer,
[data-theme="dawn"] .add-asset-page .portiva-flow-page__footer,
[data-theme="day"] .add-asset-page .portiva-flow-page__footer,
[data-theme="classic"] .add-asset-page .portiva-flow-page__footer,
[data-theme="dawn"] .add-asset-pick-page .portiva-flow-page__footer,
[data-theme="day"] .add-asset-pick-page .portiva-flow-page__footer,
[data-theme="classic"] .add-asset-pick-page .portiva-flow-page__footer,
[data-theme="dawn"] .asset-edit-page .portiva-flow-page__footer,
[data-theme="day"] .asset-edit-page .portiva-flow-page__footer,
[data-theme="classic"] .asset-edit-page .portiva-flow-page__footer{
  background:var(--bg0);
  border-top-color:var(--stroke);
  box-shadow:0 -4px 18px color-mix(in srgb, var(--text) 10%, transparent);
}

*,*::before,*::after{ box-sizing:border-box; }
html{
  font-size:16px;
  scroll-behavior:smooth;
  /* Block browser pull-to-refresh (Chrome Android tab); reload on open/close only. */
  overscroll-behavior-y:none;
  /* Disable double-tap zoom; keep pan + pinch. Does not delay/block single taps. */
  touch-action:manipulation;
}
html:has(body.portiva-route-app){
  scrollbar-gutter:stable;
}
body{
  margin:0;
  min-height:100dvh;
  font-family:var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--radial-1), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, var(--radial-2), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 40%, var(--bg-linear-end));
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  overscroll-behavior-y:none;
  touch-action:manipulation;
}
/* Night theme: solid black main page background on every route. */
html[data-theme="night"] body,
html[data-theme="night"] body.portiva-route-app,
html[data-theme="night"] body.portiva-route-welcome,
html[data-theme="night"] body.portiva-route-welcome #view,
html[data-theme="night"] body.portiva-route-app #view,
html[data-theme="night"] body.portiva-route-main-currency-onboarding,
html[data-theme="night"] body.portiva-route-main-currency-onboarding #view,
html[data-theme="night"] body.portiva-route-billing-shell,
html[data-theme="night"] body.portiva-route-billing-shell #view{
  background:#000;
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

.app-shell{
  max-width:1120px;
  margin:0 auto;
  padding:max(12px, env(safe-area-inset-top, 0px)) 20px max(48px, env(safe-area-inset-bottom, 0px));
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}

/** Thin top bar while app loads (open / refresh only). */
#startupLoadingBar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:2px;
  z-index:2147483647;
  pointer-events:none;
  background:rgba(148,163,184,.22);
  overflow:hidden;
  opacity:0;
  visibility:hidden;
  transition:opacity .25s ease, visibility .25s ease;
}
#startupLoadingBar.startup-loading-visible{
  opacity:1;
  visibility:visible;
}
#startupLoadingBar .startupLoadingBarIndeterminate{
  height:100%;
  width:38%;
  margin-left:0;
  background:linear-gradient(90deg, var(--accent), var(--accent2));
  animation:startupBarSlide .9s ease-in-out infinite;
  transform:translateX(-100%);
}
@keyframes startupBarSlide{
  0%{ transform:translateX(-100%); }
  100%{ transform:translateX(380%); }
}
@media (prefers-reduced-motion:reduce){
  #startupLoadingBar .startupLoadingBarIndeterminate{
    animation:none;
    width:100%;
    transform:none;
    opacity:.9;
  }
}
body.portiva-startup-loading{
  background:#000;
}
body.portiva-startup-loading .portiva-intro-splash{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  background:#000;
  color:#f8fafc;
}
body.portiva-startup-loading .app-shell{
  visibility:hidden;
}
body.portiva-intro-active #startupLoadingBar{
  opacity:0 !important;
  visibility:hidden !important;
}

/** Visible until first route render replaces `#view` (slow modules / mobile). */
.boot-screen{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:max(40px, env(safe-area-inset-top, 0px)) 24px max(48px, env(safe-area-inset-bottom, 0px));
  text-align:center;
}
.boot-screen__msg{
  margin:0;
  font-size:.95rem;
  color:var(--muted);
}
.boot-screen__sub{
  margin:10px 0 0;
  font-size:.78rem;
  color:var(--muted);
  opacity:.85;
  max-width:280px;
  margin-left:auto;
  margin-right:auto;
  line-height:1.4;
}

/** Full-screen logo once `body.portiva-intro-active` is set → flies into topbar `.brand` (see `schedulePortivaIntroSplashModern` in app.js). Hidden until then so welcome/sign-in never flashes the splash. Always Gray Night look regardless of app theme. */
.portiva-intro-splash{
  --portiva-intro-splash-bg:
    radial-gradient(1200px 600px at 10% -10%, rgba(13,148,136,.08), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(180,83,9,.07), transparent 50%),
    linear-gradient(165deg, #273142, #1f2937 40%, #111827);
  position:fixed;
  inset:0;
  z-index:4100;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:max(24px, env(safe-area-inset-top, 0px)) 20px max(40px, env(safe-area-inset-bottom, 0px));
  background:var(--portiva-intro-splash-bg);
  color:#f8fafc;
}
body.portiva-intro-active .portiva-intro-splash{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  background:var(--portiva-intro-splash-bg);
  color:#f8fafc;
}
.portiva-intro-splash__brand{
  display:flex;
  align-items:center;
  gap:clamp(16px, 4vw, 28px);
  will-change:transform,opacity;
}
.portiva-intro-splash__mark.brand-mark{
  width:clamp(100px, 25vw, 168px);
  height:clamp(100px, 25vw, 168px);
  border-radius:clamp(25px, 6vw, 42px);
  font-size:clamp(3.4rem, 9.5vw, 5.25rem);
}
.portiva-intro-splash__text{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.portiva-intro-splash__text strong{
  font-size:clamp(1.75rem, 5.5vw, 2.85rem);
  letter-spacing:-.03em;
  font-weight:700;
  color:#f8fafc;
}
body.portiva-intro-active #portivaHeaderBrand,
body.portiva-intro-active #portivaWelcomeFlyTarget{
  opacity:0;
  visibility:hidden;
}
#portivaHeaderBrand,
#portivaWelcomeFlyTarget{
  transition:opacity .42s ease, visibility 0s linear .12s;
}
@media (prefers-reduced-motion: reduce){
  .portiva-intro-splash__brand{ will-change:auto; }
}

.topbar{
  display:block;
  width:100%;
}
.topbar__inner{
  max-width:1120px;
  margin:0 auto;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
  padding:4px 0 8px;
  box-sizing:border-box;
}
.topbar__primary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  min-width:0;
}
.topbar__navrow{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:8px;
  direction:ltr;
}
.topbar--home .topbar__navrow,
.topbar:has(+ main.folder-page) .topbar__navrow,
.topbar:has(+ main.entity-page) .topbar__navrow,
.topbar:has(+ main.asset-page) .topbar__navrow{
  height:44px;
  min-height:44px;
  max-height:44px;
  flex-shrink:0;
  flex-wrap:nowrap;
  overflow:visible;
}
.topbar__navrow-search{
  position:absolute;
  left:0;
  top:0;
  z-index:350;
  pointer-events:auto;
}
.topbar__navrow-nav{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-left:auto;
  margin-right:0;
  min-width:0;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.topbar__navrow .btn{
  flex:0 0 auto;
}
.topbar__nav-actions{
  display:flex;
  align-items:center;
  flex:0 0 auto;
  gap:8px;
}
.topbar__nav-title{
  margin:0;
  flex:1 1 auto;
  min-width:0;
  font-size:clamp(1rem, 3.5vw, 1.15rem);
  line-height:1.25;
  font-weight:600;
  color:var(--text);
}
#btnBack,
.portiva-nav-back{
  direction:ltr;
  unicode-bidi:isolate;
  text-align:end;
  flex:0 0 auto;
}
#btnBack{
  margin-inline-start:auto;
}
.topbar__navrow--welcome-auth{
  --welcome-auth-form-width:min(720px,100%);
  display:grid;
  grid-template-columns:1fr var(--welcome-auth-form-width) 1fr;
  align-items:center;
  column-gap:8px;
  width:100%;
  min-width:0;
}
.topbar__navrow--welcome-auth #btnBack{
  grid-column:3;
  justify-self:end;
  align-self:center;
  margin-inline-start:0;
}
.topbar__nav-title--welcome-auth{
  grid-column:2;
  justify-self:start;
  align-self:center;
  margin:0;
  padding:0 4px;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  font-size:clamp(1rem, 3.2vw, 1.12rem);
  font-weight:650;
}
@media (max-width:899px){
  .topbar__navrow--welcome-auth{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .topbar__nav-title--welcome-auth{
    grid-column:1;
    padding:0 4px 0 0;
  }
  .topbar__navrow--welcome-auth #btnBack{
    grid-column:2;
    justify-self:end;
  }
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
}
a.brand.brand--home-nav{
  color:inherit;
  text-decoration:none;
  border-radius:12px;
}
a.brand.brand--home-nav:hover{
  opacity:.92;
}
a.brand.brand--home-nav:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
}
.modern-stock-last-online{
  margin:10px 0 0;
  font-size:.85rem;
  color:var(--muted);
  line-height:1.45;
}
.modern-stock-last-online--form{
  margin-top:12px;
}
.brand-mark{
  width:var(--portiva-topbar-brand-mark-size);height:var(--portiva-topbar-brand-mark-size);border-radius:var(--portiva-topbar-brand-mark-radius);
  background:var(--brand-mark-bg);
  display:grid;place-items:center;
  font-weight:800;font-size:var(--portiva-topbar-brand-mark-font);line-height:1;color:var(--brand-mark-fg);
  box-shadow:0 8px 32px var(--brand-mark-shadow);
  flex-shrink:0;
}
.topbar .brand-mark,
.topbar #portivaHeaderFlyTarget.brand-mark{
  width:var(--portiva-topbar-brand-mark-size);
  height:var(--portiva-topbar-brand-mark-size);
  border-radius:var(--portiva-topbar-brand-mark-radius);
  font-size:var(--portiva-topbar-brand-mark-font);
}
img.brand-mark,
img.brand-mark--logo,
img.welcome-orbit__brand-mark,
img.portiva-intro-splash__mark,
img.portiva-auth-pending-overlay__mark{
  display:block;
  box-sizing:border-box;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
  object-fit:contain;
  font-size:0;
  color:transparent;
  line-height:0;
}
.brand-text{ display:flex; flex-direction:column; gap:2px; }
.brand-text strong{ font-size:1.15rem; letter-spacing:-.02em; }
.brand-tagline{
  font-size:.68rem;
  font-weight:500;
  letter-spacing:.03em;
  color:var(--muted);
  line-height:1.2;
}
.portiva-intro-splash__text .brand-tagline{
  font-size:clamp(.8rem, 2.1vw, .95rem);
  letter-spacing:.04em;
  color:#cbd5e1;
}
.portiva-startup-debug{
  position:fixed;
  left:50%;
  bottom:max(22px, env(safe-area-inset-bottom, 0px));
  width:min(560px, calc(100vw - 32px));
  transform:translateX(-50%);
  padding:12px 14px;
  border:1px solid var(--stroke);
  border-radius:16px;
  background:rgba(15,23,42,.74);
  color:var(--muted);
  box-shadow:0 18px 54px rgba(15,23,42,.26);
  backdrop-filter:blur(14px);
  font-size:.76rem;
  line-height:1.35;
}
.portiva-startup-debug strong{
  display:block;
  margin-bottom:6px;
  color:var(--text);
  font-size:.8rem;
}
.portiva-startup-debug ol{
  margin:0;
  padding-left:18px;
}
.portiva-startup-debug li{
  margin:2px 0;
  overflow-wrap:anywhere;
}
.portiva-auth-pending-overlay__word{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}

.top-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

/** Topbar language picker — always solid black pill + white text (welcome / sign-in). */
.topbar-locale-select{
  appearance:none;
  -webkit-appearance:none;
  font:inherit;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.04em;
  padding:6px 24px 6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.38);
  background-color:#000;
  color:#fff;
  cursor:pointer;
  max-width:min(68px, 22vw);
  min-width:3.25rem;
  text-align:center;
  text-transform:uppercase;
  color-scheme:dark;
  accent-color:#334155;
  -webkit-tap-highlight-color:transparent;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
}
.topbar-locale-select option{
  background-color:#000;
  color:#fff;
}
.topbar-locale-select:hover{
  background-color:#0a0a0a;
  border-color:rgba(255,255,255,.55);
  color:#fff;
}
.topbar-locale-select:focus,
.topbar-locale-select:focus-visible,
.topbar-locale-select:active{
  outline:none;
  border-color:rgba(255,255,255,.62);
  background-color:#000;
  color:#fff;
  box-shadow:none;
}
[data-theme="dawn"] .topbar-locale-select,
[data-theme="day"] .topbar-locale-select,
[data-theme="classic"] .topbar-locale-select,
[data-theme="night"] .topbar-locale-select,
[data-theme="night-gray"] .topbar-locale-select,
[data-theme="gray-night"] .topbar-locale-select,
body.portiva-route-welcome .topbar-locale-select,
body:has(main.privacy-page) .topbar-locale-select{
  background-color:#000;
  color:#fff;
  border-color:rgba(255,255,255,.38);
}
html[dir="rtl"] .topbar-locale-select{
  padding:6px 10px 6px 24px;
  background-position:left 10px center;
}
.btn-long{ display:inline; }
.btn-short{ display:none; }

.topbar-overflow{
  position:relative;
  flex-shrink:0;
}
.topbar-overflow-trigger{
  min-width:44px;
  min-height:44px;
  padding:8px 12px;
  font-size:1.25rem;
  line-height:1;
}
.topbar-overflow-trigger-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
}
.topbar-overflow-trigger:hover .topbar-overflow-trigger-icon,
.topbar-overflow-trigger[aria-expanded="true"] .topbar-overflow-trigger-icon{
  color:var(--accent);
}
.topbar-right-stack{
  position:relative;
  flex-shrink:0;
}
.topbar-search-btn{
  width:44px;
  min-width:44px;
  height:28px;
  min-height:28px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--radius-sm);
  color:var(--muted);
}
.topbar-search-btn:hover{
  color:var(--accent);
}
.topbar-search-btn:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.topbar-search-btn--spacer{
  visibility:hidden;
  pointer-events:none;
}
.topbar__navrow-search--reserved{
  pointer-events:none;
}
.topbar-overflow-panel{
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  min-width:220px;
  max-width:min(280px,92vw);
  padding:10px 0;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--glass);
  backdrop-filter:blur(14px);
  box-shadow:var(--shadow);
  z-index:400;
}
.topbar-overflow-row--theme{
  padding:6px 14px 12px;
  border-bottom:1px solid var(--stroke);
}
.topbar-overflow-stack-field{
  padding:8px 14px 10px;
  border-top:1px solid var(--stroke);
}
.topbar-overflow-field-hint{
  margin:6px 0 0;
  font-size:.72rem;
  line-height:1.45;
  color:var(--muted);
}
.topbar-overflow-field-hint strong{
  color:var(--text);
  font-weight:600;
}
.theme-select-wrap--labeled{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
  width:100%;
}
.theme-select-visible-label{
  flex:0 0 auto;
  font-size:.72rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
}
.theme-select--overflow{
  flex:1 1 auto;
  min-width:0;
  max-width:100%;
  width:auto;
}
.topbar-overflow-link{
  display:block;
  padding:12px 14px;
  font-size:.88rem;
  font-weight:600;
  color:var(--text);
  text-decoration:none;
}
.topbar-overflow-link:hover{
  background:var(--surface-btn-hover);
}
.topbar-overflow-item{
  display:block;
  width:100%;
  padding:12px 14px;
  margin:0;
  border:none;
  border-top:1px solid var(--stroke);
  background:transparent;
  font:inherit;
  font-size:.88rem;
  font-weight:600;
  text-align:left;
  cursor:pointer;
  color:var(--text);
}
.topbar-overflow-item:hover{
  background:var(--surface-btn-hover);
}
.topbar-overflow-item:disabled,
.topbar-overflow-item--disabled{
  color:var(--muted);
  opacity:.48;
  cursor:not-allowed;
}
.topbar-overflow-item:disabled:hover,
.topbar-overflow-item--disabled:hover{
  background:transparent;
}
.topbar-overflow-item--danger{
  color:#f87171;
}
.topbar-overflow-hint{
  margin:0;
  padding:0 14px 10px;
  font-size:.72rem;
  line-height:1.45;
  color:var(--muted);
}
.topbar-overflow-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 14px;
  flex-wrap:wrap;
}
.topbar-overflow-row--inline{
  flex-wrap:nowrap;
  gap:12px;
}
.topbar-overflow-row--inline .theme-select--overflow{
  flex:1 1 auto;
  min-width:0;
  max-width:100%;
}
.topbar-overflow-cur-label{
  flex:0 0 auto;
  font-size:.72rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--muted);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--surface-btn);
  color:var(--text);
  font:inherit; font-size:.88rem; font-weight:600;
  cursor:pointer;
  transition:background .15s, border-color .15s, transform .1s;
}
.btn:hover{ background:var(--surface-btn-hover); border-color:var(--stroke-hover); }
.btn:active{ transform:scale(.98); }
.btn:disabled,
.btn:disabled:hover,
.btn:disabled:active{
  opacity:.48;
  cursor:not-allowed;
  background:var(--surface-btn);
  border-color:var(--stroke);
  transform:none;
}
.btn--primary{
  border-color:var(--btn-primary-border, var(--stroke));
  background:var(--btn-primary-bg, var(--surface-btn));
  background-image:none;
  color:var(--btn-primary-fg, var(--text));
}
.btn--primary:hover:not(:disabled){
  background:var(--btn-primary-bg-hover, var(--surface-btn-hover));
  border-color:var(--btn-primary-border-hover, var(--stroke-hover));
  color:var(--btn-primary-fg, var(--text));
}
.btn--primary:disabled,
.btn--primary:disabled:hover{
  background:var(--btn-primary-bg, var(--surface-btn));
  background-image:none;
  border-color:var(--btn-primary-border, var(--stroke));
  color:var(--btn-primary-fg, var(--text));
}
.btn--ghost{ background:transparent; }

.visually-hidden{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

.theme-select-wrap{
  display:inline-flex;
  align-items:center;
}
.theme-select{
  appearance:none;
  font:inherit;font-size:.82rem;font-weight:600;
  padding:8px 28px 8px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--surface-btn);
  color:var(--text);
  cursor:pointer;
  max-width:min(118px,32vw);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
}
.theme-select:hover{
  background-color:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
}
.theme-select:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.theme-select--locked-add-asset:disabled,
.theme-select--locked-add-asset:disabled:hover,
.theme-select--locked-add-asset:disabled:focus,
.theme-select--locked-add-asset:disabled:focus-visible{
  pointer-events:none;
  cursor:default;
  opacity:1;
  outline:none;
  border-color:var(--stroke);
  background-color:var(--surface-btn);
  box-shadow:none;
}

#view{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
}
html.portiva-folder-scroll-restore,
html.portiva-links-scroll-restore{
  scroll-behavior:auto !important;
}
html.portiva-folder-scroll-restore #view,
html.portiva-links-scroll-restore #view{
  visibility:hidden;
}
#view > header.topbar{
  flex-shrink:0;
  margin-bottom:10px;
}
#view > header.topbar:has(+ main.home-hier-tree-page){
  margin-bottom:4px;
}
@media (min-width:821px){
  body.portiva-route-welcome #view > header.topbar:has(+ main.welcome-page--overview){
    margin-bottom:4px;
  }
}
#view > main{
  flex:1;
  min-height:0;
}
#view > main.home-hier-tree-page{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
#view > main.welcome-page--overview{
  display:flex;
  flex-direction:column;
  min-height:0;
}
/* Home: column layout + explicit order (stats → charts); flex sizing inside #view */
#view > main.home-main{
  flex:1 1 auto;
  min-height:min-content;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:0;
}
.home-main > .home-hero{
  order:1;
  flex:0 0 auto;
}
.home-main > .home-summary{
  order:2;
  flex:0 0 auto;
  width:100%;
}
.home-pie-shortcut-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  margin:0;
  border:none;
  background:transparent;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
/* Home assets tab — gallery icon in tab label + 2-column photo grid */
.home-overview-chart-tab[data-home-pie-tab="assets"] .home-overview-chart-tab__inner,
.home-overview-chart-tab[data-welcome-pie-tab="assets"] .home-overview-chart-tab__inner{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  max-width:100%;
  min-width:0;
}
.home-overview-chart-tab__gallery-icon{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  opacity:.92;
}
.home-asset-tab-pane,
.home-asset-tab-pane__pie{
  display:contents;
}
.home-asset-gallery{
  grid-column:2 / 4;
  grid-row:legend;
  align-self:start;
  width:100%;
  min-width:0;
  max-width:calc(
    var(--portiva-pie-legend-max-w) + var(--portiva-pie-chart-max-w) +
      clamp(56px, 7vw, 96px)
  );
  justify-self:center;
}
.home-overview-chart-pane--asset-gallery-open.portiva-overview-pie-layout{
  display:block;
  width:100%;
  min-width:0;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-tab-pane{
  display:block;
  width:100%;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-tab-pane__pie{
  display:none !important;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-tab-pane .pieChartBlockHeading,
.home-overview-chart-pane--asset-gallery-open .home-asset-tab-pane .pieChartBlockTitle,
.home-overview-chart-pane--asset-gallery-open .home-asset-tab-pane .pieChartBlockSubtitle,
.home-asset-tab-pane--gallery-open .pieChartBlockHeading,
.home-asset-tab-pane--gallery-open .pieChartBlockTitle,
.home-asset-tab-pane--gallery-open .pieChartBlockSubtitle{
  display:none !important;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-gallery{
  grid-column:auto;
  grid-row:auto;
  max-width:100%;
  width:100%;
  margin:0;
  justify-self:stretch;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty{
  display:block;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  margin-inline:0;
  padding:24px 0 0;
  min-height:0;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty .home-asset-gallery__empty-stage{
  position:relative;
  max-width:min(680px,100%);
  margin:0 auto;
  padding:28px 0 48px;
  box-sizing:border-box;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty .home-asset-gallery__empty-stage::before{
  content:"";
  display:block;
  width:100%;
  aspect-ratio:1/1;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty .home-asset-gallery__empty{
  position:absolute;
  inset:28px 0 48px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
  max-width:100%;
  padding:0 12px;
  text-align:center;
  box-sizing:border-box;
}
.home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty .home-asset-gallery__empty-stage--paused .home-asset-gallery__empty{
  inset:28px 12px 72px;
}
.home-asset-gallery__paused-cta{
  position:absolute;
  left:0;
  right:0;
  bottom:48px;
  z-index:1;
  margin:0;
  padding:0 12px;
  text-align:center;
  box-sizing:border-box;
}
.home-asset-gallery__plans-link{
  font-weight:600;
  color:var(--accent, var(--link, #6eb5ff));
  text-decoration:underline;
  text-underline-offset:2px;
}
.home-asset-gallery__plans-link:hover,
.home-asset-gallery__plans-link:focus-visible{
  color:var(--accent-strong, var(--link-hover, #9eceff));
}
.home-folder-pie-wrap--asset-gallery-open .home-pie-map-overlay,
.home-folder-pie-wrap--asset-gallery-open .home-pie-map-overlay-footer,
.home-folder-pie-wrap--asset-gallery-open .folder-page-pie-map-slot,
.home-folder-pie-wrap--asset-gallery-open .home-page-map-panel{
  display:none !important;
}
.home-asset-tab-pane--gallery-open .home-asset-tab-pane__pie .pieWrap{
  display:none !important;
}
.home-asset-gallery__grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  padding:4px 0 12px;
}
.home-asset-gallery__cell{
  display:block;
  min-width:0;
  text-decoration:none;
  color:inherit;
}
.home-asset-gallery__cell:hover .home-asset-gallery__label,
.home-asset-gallery__cell:focus-visible .home-asset-gallery__label{
  box-shadow:0 1px 6px rgba(0,0,0,.18);
}
.home-asset-gallery__img-wrap{
  position:relative;
  display:block;
  aspect-ratio:4 / 3;
  border-radius:10px;
  overflow:hidden;
  background:var(--surface-list);
  border:1px solid var(--stroke);
}
.home-asset-gallery__img{
  display:block;
  position:relative;
  z-index:0;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
}
.home-asset-gallery__label{
  position:absolute;
  top:6px;
  left:9px;
  right:9px;
  z-index:1;
  box-sizing:border-box;
  width:auto;
  padding:1px 8px;
  border-radius:5px;
  background:#fff;
  color:#111;
  font-size:.82rem;
  font-weight:600;
  line-height:1.15;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  box-shadow:0 1px 4px rgba(0,0,0,.14);
  pointer-events:none;
}
.home-asset-gallery__equity-main{
  position:absolute;
  left:6px;
  bottom:6px;
  z-index:2;
  display:block;
  color:#000;
  font-size:.65rem;
  font-weight:700;
  line-height:1.2;
  letter-spacing:.01em;
  pointer-events:none;
  text-shadow:
    0 0 2px #fff,
    0 1px 2px rgba(255,255,255,.9),
    1px 0 1px rgba(255,255,255,.75),
    -1px 0 1px rgba(255,255,255,.75);
}
.home-asset-gallery__equity-native{
  position:absolute;
  right:6px;
  bottom:6px;
  z-index:2;
  display:block;
  color:#000;
  font-size:.65rem;
  font-weight:700;
  line-height:1.2;
  letter-spacing:.01em;
  pointer-events:none;
  text-shadow:
    0 0 2px #fff,
    0 1px 2px rgba(255,255,255,.9),
    1px 0 1px rgba(255,255,255,.75),
    -1px 0 1px rgba(255,255,255,.75);
}
[data-theme="dawn"] .home-asset-gallery__equity-main,
[data-theme="day"] .home-asset-gallery__equity-main,
[data-theme="classic"] .home-asset-gallery__equity-main,
[data-theme="dawn"] .home-asset-gallery__equity-native,
[data-theme="day"] .home-asset-gallery__equity-native,
[data-theme="classic"] .home-asset-gallery__equity-native{
  color:#000;
}
@media (min-width:901px){
  .home-asset-gallery__grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .home-asset-gallery__label{
    left:14px;
    right:14px;
    padding:2px 8px;
    font-size:.95rem;
    line-height:1.15;
  }
}
.home-asset-gallery__empty{
  margin:8px 0 12px;
  text-align:center;
}
.home-pie-shortcut-btn__ring{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:50%;
  border:2px solid var(--border-strong, rgba(255,255,255,.28));
  font-size:.88rem;
  font-weight:700;
  line-height:1;
  letter-spacing:.02em;
  color:var(--text);
  background:var(--surface-raised, rgba(255,255,255,.04));
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.home-pie-shortcut-btn__ring--map{
  width:auto;
  min-width:4.75rem;
  max-width:4.75rem;
  padding:0 7px;
  border-radius:999px;
  font-size:.68rem;
  letter-spacing:0;
}
.home-pie-shortcut-btn:hover .home-pie-shortcut-btn__ring,
.home-pie-shortcut-btn:focus-visible .home-pie-shortcut-btn__ring{
  border-color:var(--accent, #6eb5ff);
  color:var(--accent, #6eb5ff);
  background:rgba(110,181,255,.08);
}
.home-pie-shortcut-btn:focus-visible{
  outline:none;
}
.home-pie-shortcut-btn:focus-visible .home-pie-shortcut-btn__ring{
  box-shadow:0 0 0 2px var(--bg, #070a12), 0 0 0 3px var(--accent, #6eb5ff);
}
.home-pie-shortcut-btn--folder-toggle:hover .home-pie-shortcut-btn__ring,
.home-pie-shortcut-btn--folder-toggle:focus-visible .home-pie-shortcut-btn__ring{
  border-color:var(--border-strong, rgba(255,255,255,.28));
  color:var(--text);
  background:var(--surface-raised, rgba(255,255,255,.04));
}
.home-pie-shortcut-btn--folder-toggle:focus-visible .home-pie-shortcut-btn__ring,
.home-pie-shortcut-btn--home-toggle:focus-visible .home-pie-shortcut-btn__ring,
.home-pie-shortcut-btn--entity-toggle:focus-visible .home-pie-shortcut-btn__ring{
  box-shadow:0 0 0 2px var(--bg, #070a12), 0 0 0 3px var(--border-strong, rgba(255,255,255,.28));
}
.home-pie-shortcut-btn--entity-toggle:hover .home-pie-shortcut-btn__ring,
.home-pie-shortcut-btn--entity-toggle:focus-visible .home-pie-shortcut-btn__ring{
  border-color:var(--border-strong, rgba(255,255,255,.28));
  color:var(--text);
  background:var(--surface-raised, rgba(255,255,255,.04));
}
.home-pie-shortcut-btn--home-toggle:hover .home-pie-shortcut-btn__ring,
.home-pie-shortcut-btn--home-toggle:focus-visible .home-pie-shortcut-btn__ring{
  border-color:var(--border-strong, rgba(255,255,255,.28));
  color:var(--text);
  background:var(--surface-raised, rgba(255,255,255,.04));
}
.pieChartBlockHeading--withActions{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.pieChartBlockHeading--withActions .pieChartBlockTitle{
  flex:1 1 auto;
  min-width:0;
  text-align:start;
}
.home-main > .home-excluded-entities{
  order:4;
  flex:0 0 auto;
  width:100%;
}
.home-main > .home-repro-session{
  order:7;
  flex:0 0 auto;
  width:100%;
  margin-top:12px;
  padding:16px 12px 24px;
  border-top:1px solid var(--stroke);
  text-align:center;
  font-size:.75rem;
  line-height:1.5;
  color:var(--muted);
}
.home-repro-session__title{
  margin:0 0 6px;
  font-size:.7rem;
  font-weight:600;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}
.home-repro-session__hint{
  margin:0 0 10px;
  max-width:36rem;
  margin-left:auto;
  margin-right:auto;
}
.home-repro-session__save{
  margin:0 auto;
}
.home-main > .home-firebase-bandwidth{
  order:6;
  flex:0 0 auto;
  width:100%;
  margin-top:28px;
  padding:20px 12px 8px;
  border-top:1px solid var(--stroke);
  text-align:center;
  font-size:.75rem;
  line-height:1.5;
  color:var(--muted);
}
.home-firebase-bandwidth__title{
  margin:0 0 6px;
  font-size:.7rem;
  font-weight:600;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}
.home-firebase-bandwidth__stats{
  margin:0 0 6px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px 14px;
  font-size:.8rem;
  color:var(--text, #e8eef7);
}
.home-firebase-bandwidth__stat{
  display:inline-flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:center;
  gap:0 .35em;
}
.home-firebase-bandwidth__visit{
  font-size:.92em;
  font-weight:500;
  color:var(--muted);
}
.home-firebase-bandwidth__stats strong{
  font-weight:600;
  color:inherit;
}
.home-firebase-bandwidth__sep{
  opacity:.45;
}
.home-firebase-bandwidth__hint{
  margin:0;
  font-size:.68rem;
  color:var(--muted);
  max-width:36rem;
  margin-left:auto;
  margin-right:auto;
}
@media (min-width:901px){
  #view > main.home-main{
    zoom:.8;
  }
  /* Folder / entity chart bubbles use same scale as home tabs (home-main zoom). */
  .folder-page > .folder-page-charts-stack,
  .entity-page .entity-page-charts-stack{
    zoom:.8;
  }
  /* Folder / entity / asset heroes sit in plain `<main>` (no home-main zoom) — match home hero scale. */
  body.portiva-route-app #view > main:not(.home-main) > section.hero.hero--entity{
    zoom:.8;
  }
  /* Entity details modal charts only — inline entity/folder pies match home at full size. */
  #detailsChartsMount{
    zoom:.8;
  }
}

/* Home structure drill-down tree (welcome-style nodes + orthogonal arrows) */
.home-hier-tree__link,
.welcome-structure-demo__link{
  fill:none;
  stroke:var(--portiva-map-link-stroke);
  stroke-width:1.5;
}
.home-hier-tree-panel svg .portiva-map-link-arrowhead,
.welcome-structure-demo svg .portiva-map-link-arrowhead{
  fill:var(--portiva-map-link-arrow);
}
[data-theme="dawn"] .home-hier-tree__link,
[data-theme="day"] .home-hier-tree__link,
[data-theme="classic"] .home-hier-tree__link,
[data-theme="dawn"] .welcome-structure-demo__link,
[data-theme="day"] .welcome-structure-demo__link,
[data-theme="classic"] .welcome-structure-demo__link{
  stroke-width:2;
}
.home-hier-tree-page{
  display:flex;
  flex-direction:column;
  flex:1 1 0;
  min-height:0;
  overflow:hidden;
  background:var(--portiva-map-bg);
  color:var(--text);
  box-sizing:border-box;
}
.home-hier-tree-page__head--map-title{
  flex:0 0 auto;
  padding:4px clamp(12px, 3vw, 20px) 0;
  margin:0 0 8px;
  background:var(--portiva-map-bg);
}
}
.home-hier-tree-page__head--map-title .home-hier-tree-page__title{
  margin:0;
  font-size:clamp(1rem, 3.5vw, 1.15rem);
  line-height:1.25;
  color:var(--text);
}
.home-hier-tree-page__empty{
  flex:0 0 auto;
  padding:8px clamp(12px, 3vw, 20px) 0;
  margin:0;
}
.home-hier-tree-page__foot{
  flex:0 0 auto;
  margin-top:auto;
  max-height:min(42vh, 320px);
  overflow:auto;
  padding:10px 8px max(10px, env(safe-area-inset-bottom, 0px));
  border-top:1px solid rgba(255,255,255,.08);
  background:var(--portiva-map-bg);
  -webkit-overflow-scrolling:touch;
}
.home-hier-tree__mode-bar{
  display:flex;
  justify-content:center;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.1);
  width:100%;
  box-sizing:border-box;
}
.home-hier-tree__mode-toggle{
  display:flex;
  flex-wrap:nowrap;
  justify-content:center;
  align-items:center;
  gap:8px;
  width:100%;
  max-width:100%;
}
.home-hier-tree__mode-toggle .home-hier-tree__mode-btn{
  flex:1 1 0;
  min-width:0;
  min-height:34px;
  max-width:11rem;
}
.home-hier-tree__mode-toggle .home-hier-tree__all-holdings-btn{
  flex:1.15 1 0;
  max-width:12rem;
}
.home-hier-tree__mode-toggle .home-hier-tree__mode-btn[aria-pressed="true"]{
  border-color:hsla(214, 72%, 64%, .65);
  background:rgba(59, 130, 246, .22);
  color:var(--text);
}
.home-hier-tree__mode-options{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:8px 14px;
  width:100%;
  margin-top:10px;
}
.home-hier-tree__mode-check{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.8125rem;
  color:var(--text-muted, rgba(255,255,255,.72));
  cursor:pointer;
  user-select:none;
}
.home-hier-tree__mode-check input{
  width:16px;
  height:16px;
  margin:0;
  accent-color:#3b82f6;
  cursor:pointer;
}
.home-hier-tree__mode-check input:disabled{
  cursor:not-allowed;
  opacity:.45;
}
.home-hier-tree__mode-check input:disabled + span{
  opacity:.45;
}
@media (max-width:899px){
  .home-hier-tree-page__foot .home-hier-tree__mode-bar{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    margin-top:8px;
    padding-top:8px;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-options{
    order:-1;
    width:100%;
    margin-top:0;
    flex-wrap:nowrap;
    justify-content:space-between;
    gap:6px 10px;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-check{
    flex:1 1 0;
    min-width:0;
    font-size:.72rem;
    gap:5px;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-check span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}
.home-hier-tree-panel--compact .home-hier-tree__row--brick-band{
  padding-top:0;
  padding-bottom:0;
}
.home-hier-tree-panel--compact .home-hier-tree__brick-band{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:clamp(10px, 2vw, 14px);
  width:max-content;
  min-width:100%;
  box-sizing:border-box;
}
.home-hier-tree-panel--compact .home-hier-tree__brick-band--sequential{
  display:block;
  min-width:0;
  width:max-content;
}
.home-hier-tree-panel--compact .home-hier-tree__brick-band .home-hier-tree__branch-track{
  position:relative;
  flex:0 0 auto;
}
.home-hier-tree-panel--portfolio-overview .home-hier-tree__child-slot .home-hier-tree-node--folder{
  max-width:none;
  width:100%;
}
/* Compact All holdings: column rows only as wide as packed tracks (not full viewport). */
.home-hier-tree-panel--portfolio-overview.home-hier-tree-panel--compact .home-hier-tree__branch-stack,
.home-hier-tree-panel--portfolio-overview.home-hier-tree-panel--compact .home-hier-tree__row--branch,
.home-hier-tree-panel--portfolio-overview.home-hier-tree-panel--compact .home-hier-tree__brick-band{
  min-width:0;
}
.home-hier-tree-panel--compact .home-hier-tree__arrows{
  z-index:2;
}
.home-hier-tree-panel--compact .home-hier-tree__layers{
  z-index:1;
}
.home-hier-tree-page > .home-hier-tree-panel{
  flex:1 1 0;
  min-height:12rem;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.home-hier-tree-page .home-hier-tree__main{
  flex:1 1 0;
  min-height:12rem;
  overflow-x:auto;
  overflow-y:auto;
  touch-action:pan-x pan-y;
  overscroll-behavior-x:contain;
}
#homeHierTreeModal.home-hier-tree-modal.modal-overlay{
  padding:0;
  align-items:stretch;
  justify-content:stretch;
  background:var(--portiva-map-bg);
  backdrop-filter:none;
  overflow:hidden;
}
#homeHierTreeModal .modal-box.modal-box--home-hier-tree{
  position:relative;
  width:100%;
  max-width:none;
  height:100dvh;
  max-height:100dvh;
  margin:0;
  padding:0;
  border:none;
  border-radius:0;
  box-shadow:none;
  display:flex;
  flex-direction:column;
  background:var(--portiva-map-bg);
  color:var(--text);
  overflow:hidden;
}
#homeHierTreeModal .modal-box--home-hier-tree .modal-title,
#homeHierTreeModal .modal-box--home-hier-tree .home-hier-tree__hint{
  color:var(--muted);
}
#homeHierTreeModal .modal-box--home-hier-tree .modal-close-btn{
  position:absolute;
  top:max(8px, env(safe-area-inset-top, 0px));
  right:max(8px, env(safe-area-inset-right, 0px));
  z-index:3;
  color:var(--text);
}
.home-hier-tree-modal__head{
  flex:0 0 auto;
  padding:max(10px, env(safe-area-inset-top, 0px)) 40px 6px 12px;
  border-bottom:none;
  background:var(--portiva-map-bg);
}
.home-hier-tree-modal__head .modal-title{
  margin:0;
  font-size:1rem;
  line-height:1.25;
}
.home-hier-tree-modal__head .home-hier-tree__hint{
  margin:4px 0 0;
}
.home-hier-tree-modal__body{
  flex:1 1 0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:var(--portiva-map-bg);
}
.home-hier-tree-modal__foot{
  flex:0 0 auto;
  max-height:min(42vh, 320px);
  overflow:auto;
  padding:10px 8px max(10px, env(safe-area-inset-bottom, 0px));
  border-top:1px solid rgba(255,255,255,.08);
  background:var(--portiva-map-bg);
  -webkit-overflow-scrolling:touch;
}
.home-hier-tree__main{
  flex:1 1 0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
}
.home-hier-tree-page .home-hier-tree__placeholder{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:min(40vh, 360px);
  margin:0;
  padding:24px 16px;
  font-size:clamp(0.9rem, 3.5vw, 1.05rem);
  color:var(--muted);
  text-align:center;
  line-height:1.4;
}
.home-hier-tree-page #homeHierTreeStage:not([hidden]){
  flex:1 1 auto;
  display:block;
  width:max-content;
  min-width:0;
  max-width:none;
  min-height:min(40vh, 420px);
  overflow:visible;
  margin-left:0;
  margin-right:0;
}
.home-hier-tree-page #homeHierTreeStage.home-hier-tree__stage--measuring{
  visibility:hidden;
}
.home-hier-tree-page #homeHierTreeMain.home-hier-tree__main--fits{
  align-items:center;
}
.home-hier-tree-page .home-hier-tree__layers{
  align-items:flex-start;
}
.home-hier-tree-page #homeHierTreeViewRoot{
  display:none;
}
.home-hier-tree-page .home-hier-tree__branch-stack{
  align-items:flex-start;
  width:max-content;
  min-width:0;
  margin-left:0;
  margin-right:0;
  padding-left:0;
  padding-right:0;
}
.home-hier-tree-page .home-hier-tree__layout-wrap{
  margin-left:0;
  margin-right:0;
}
.home-hier-tree-page .home-hier-tree__row--root{
  position:relative;
  left:0;
  width:100%;
  min-height:var(--home-hier-tier-height, 7.5rem);
  margin:0;
  padding:4px 0;
  box-sizing:border-box;
}
.home-hier-tree-page .home-hier-tree__row--branch{
  top:calc(var(--row-tier, 1) * var(--home-hier-tier-height, 7.5rem));
}
.home-hier-tree-page .home-hier-tree__branch-stack{
  --home-hier-tier-height:clamp(68px, 13vw, 86px);
}
.home-hier-tree-page .home-hier-tree__row--branch,
.home-hier-tree-page .home-hier-tree__row--root{
  padding-top:2px;
  padding-bottom:2px;
}
.home-hier-tree__folder-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:clamp(8px, 2vw, 12px);
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.home-hier-tree__folder-grid-cell{
  display:flex;
  justify-content:center;
  align-items:center;
  min-width:0;
}
.home-hier-tree__view-root{
  display:flex;
  justify-content:center;
  width:100%;
  margin:0 0 clamp(80px, 15vw, 120px);
}
.home-hier-tree__layout-wrap{
  position:relative;
  width:max-content;
  margin:0 auto;
  min-height:calc((var(--home-hier-max-tier, 0) + 1) * var(--home-hier-tier-height, 7.5rem));
}
.home-hier-tree__branch-track{
  position:relative;
  min-height:36px;
  margin:0;
}
.home-hier-tree__branch-track--root{
  min-height:38px;
}
.home-hier-tree__child-slot{
  position:absolute;
  top:0;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  box-sizing:border-box;
  min-height:36px;
  overflow:visible;
}
.home-hier-tree__layout-wrap,
.home-hier-tree__row--branch,
.home-hier-tree__row--root,
.home-hier-tree__branch-track,
.home-hier-tree__brick-band{
  pointer-events:none;
}
.home-hier-tree-panel{
  display:flex;
  flex-direction:column;
  flex:1 1 0;
  min-height:0;
  width:100%;
}
.home-hier-tree-panel .home-hier-tree__stage{
  display:inline-block;
  max-width:none;
  width:max-content;
  min-width:100%;
  margin:0 auto;
  vertical-align:top;
}
.home-hier-tree-page .home-hier-tree-panel .home-hier-tree__stage{
  display:block;
  width:max-content;
  max-width:none;
  min-width:0;
  margin-left:0;
  margin-right:0;
}
.home-hier-tree-page .home-hier-tree-panel .home-hier-tree__layers{
  width:max-content;
  min-width:0;
}
.home-hier-tree-panel .home-hier-tree__layers{
  width:max-content;
  min-width:100%;
}
.home-hier-tree-panel .home-hier-tree__row--branch{
  max-width:none;
}
.home-hier-tree__empty{
  margin:6px 0 0;
  font-size:.78rem;
  color:var(--muted);
  line-height:1.4;
  text-align:center;
}
.home-hier-tree__hint{
  margin:0;
  font-size:.75rem;
  color:var(--muted);
  line-height:1.35;
}
.home-hier-tree-panel .home-hier-tree__stage{
  min-height:120px;
}
.home-hier-tree__stage{
  position:relative;
  width:100%;
  max-width:none;
  margin:0;
  min-height:0;
}
.home-hier-tree__arrows{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  overflow:visible;
  z-index:2;
}
.home-hier-tree-panel--ownership-percentages .home-hier-tree-node__incoming-pct,
.home-hier-tree-panel--ownership-percentages .home-hier-tree-node__incoming-equity{
  display:none;
}
.home-hier-tree-panel--ownership-percentages .home-hier-tree__incoming-pct,
.home-hier-tree-panel--ownership-percentages .home-hier-tree__incoming-equity{
  fill:var(--text);
  font-size:11px;
  font-weight:400;
  font-feature-settings:"tnum" 1;
  pointer-events:none;
}
.home-hier-tree__layers{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0;
}
.home-hier-tree__branch-stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0;
  width:max-content;
  min-width:100%;
  margin:0 auto;
  padding:0 clamp(12px, 3vw, 24px) 24px;
  box-sizing:border-box;
  --home-hier-tier-height:clamp(112px, 22vw, 156px);
}
.home-hier-tree__row--branch{
  position:absolute;
  left:0;
  top:calc(var(--row-tier, 0) * var(--home-hier-tier-height, 7.5rem));
  display:block;
  width:max-content;
  min-width:100%;
  min-height:32px;
  max-width:none;
  margin:0;
  padding:4px 0;
  box-sizing:border-box;
}
.home-hier-tree__branch-group{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:stretch;
  gap:clamp(6px, 1.5vw, 10px);
  width:max-content;
}
.home-hier-tree__branch-track .home-hier-tree__child{
  width:100%;
  display:flex;
  justify-content:center;
}
.home-hier-tree__child{
  flex:0 0 auto;
  display:flex;
  justify-content:center;
}
.home-hier-tree-node:not(.home-hier-tree-node--folder){
  width:max-content;
  max-width:min(9.5rem, 100%);
  min-height:26px;
  padding:3px 7px;
}
#homeHierTreePanel.home-hier-tree-panel:not(.home-hier-tree-panel--compact)
  .home-hier-tree__child-slot
  .home-hier-tree-node:not(.home-hier-tree-node--folder){
  width:100%;
  max-width:none;
  min-width:0;
  overflow:visible;
  box-sizing:border-box;
}
#homeHierTreePanel.home-hier-tree-panel--compact
  .home-hier-tree__child-slot
  .home-hier-tree-node:not(.home-hier-tree-node--folder){
  width:100%;
  max-width:none;
  min-width:0;
  box-sizing:border-box;
}
.home-hier-tree-node{
  cursor:pointer;
  pointer-events:auto;
  -webkit-tap-highlight-color:transparent;
  font:inherit;
}
#homeHierTreePanel button.home-hier-tree-node.home-hier-tree-node--folder.welcome-structure-node--folder,
#homeHierTreeFolderFooter button.home-hier-tree-node.home-hier-tree-node--folder.welcome-structure-node--folder,
.home-hier-tree-page__foot button.home-hier-tree-node.home-hier-tree-node--folder.welcome-structure-node--folder{
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  max-width:12rem;
  min-width:0;
  min-height:34px;
  height:34px;
  max-height:34px;
  padding:4px 8px;
  flex:0 0 auto;
  overflow:hidden;
  font-size:clamp(0.62rem, 2.2vw, 0.74rem);
}
.home-hier-tree-page #homeHierTreePanel .home-hier-tree__row--root button.home-hier-tree-node.home-hier-tree-node--folder.welcome-structure-node--folder{
  max-width:none;
  min-height:40px;
  height:auto;
  max-height:48px;
  padding:6px 14px;
  font-size:clamp(0.92rem, 3.6vw, 1.1rem);
  font-weight:600;
}
.home-hier-tree-page #homeHierTreePanel .home-hier-tree__row--root .home-hier-tree-node--folder .home-hier-tree-node__label{
  font-size:inherit;
}
#homeHierTreePanel .home-hier-tree-node--folder .home-hier-tree-node__label,
#homeHierTreeFolderFooter .home-hier-tree-node--folder .home-hier-tree-node__label,
.home-hier-tree-page__foot .home-hier-tree-node--folder .home-hier-tree-node__label{
  display:block;
  width:100%;
  max-width:100%;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.home-hier-tree-node__label{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#homeHierTreePanel.home-hier-tree-panel:not(.home-hier-tree-panel--compact)
  .home-hier-tree__child-slot
  .home-hier-tree-node__label{
  overflow:visible;
  text-overflow:clip;
}
.home-hier-tree-node--active.welcome-structure-node--folder{
  box-shadow:
    0 3px 16px hsla(214, 75%, 38%, 0.42),
    inset 0 1px 0 hsla(214, 90%, 82%, 0.24),
    inset 0 0 0 2px hsla(214, 90%, 82%, 0.55);
  outline:none;
}
.home-hier-tree-node--active.welcome-structure-node--entity{
  outline:2px solid hsla(8, 85%, 82%, 0.45);
  outline-offset:2px;
}
.home-hier-tree-node--orphan{
  opacity:.85;
}
.welcome-structure-node--overview-excluded{
  opacity:.72;
}
.home-struct-crumbs{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 10px;
  font-size:.78rem;
  color:var(--muted);
}
.home-struct-crumb{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  color:var(--accent-strong);
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.home-struct-crumb--current{
  color:var(--text);
  font-weight:700;
}
.home-struct-grid{
  display:block;
}
.home-struct-card{
  width:min(100%, 360px);
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  grid-template-areas:
    "kind title"
    "kind meta"
    "kind equity";
  gap:2px 10px;
  text-align:left;
  border:1px solid var(--stroke);
  border-radius:16px;
  background:var(--surface-soft);
  color:var(--text);
  padding:10px 12px;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
}
.home-struct-graph{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0;
  min-width:0;
}
.home-struct-graph__top{
  display:flex;
  justify-content:center;
  width:100%;
}
.home-struct-graph__top .home-struct-card{
  border-color:var(--accent-border);
  background:var(--surface);
}
.home-struct-arrow{
  width:2px;
  height:28px;
  margin:4px 0 16px;
  background:var(--stroke-hover);
  position:relative;
}
.home-struct-arrow::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-7px;
  transform:translateX(-50%);
  width:0;
  height:0;
  border-left:7px solid transparent;
  border-right:7px solid transparent;
  border-top:9px solid var(--stroke-hover);
}
.home-struct-graph__children{
  width:100%;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(220px,100%), 1fr));
  gap:12px;
  align-items:start;
  justify-items:center;
}
.home-struct-graph__children .home-struct-card{
  width:100%;
  max-width:360px;
}
button.home-struct-card{
  cursor:pointer;
}
button.home-struct-card:hover{
  background:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
}
.home-struct-card__kind{
  grid-area:kind;
  align-self:start;
  min-width:48px;
  padding:2px 7px;
  border-radius:999px;
  background:rgba(148,163,184,.15);
  color:var(--muted);
  font-size:.66rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.home-struct-card--entity .home-struct-card__kind{
  background:hsl(8 58% 52%);
  color:#fff;
}
.home-struct-card__title{
  grid-area:title;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.92rem;
  font-weight:800;
}
.home-struct-card__meta{
  grid-area:meta;
  color:var(--muted);
  font-size:.74rem;
  line-height:1.3;
}
.home-struct-card__equity{
  grid-area:equity;
  color:var(--muted);
  font-size:.72rem;
  line-height:1.3;
  font-variant-numeric:tabular-nums;
}
.home-struct-card--asset{
  background:var(--surface);
}
.home-hier-line{
  margin:2px 0;
  color:var(--text);
}
.home-hier-line--root{
  margin-bottom:6px;
}
.home-hier-line--orphan strong{
  color:var(--muted);
}
.home-hier-orphan-intro{
  margin:12px 0 6px;
  font-size:.8rem;
  color:var(--muted);
  line-height:1.45;
}
.home-hier-empty{
  margin:8px 0 0;
  font-size:.85rem;
  color:var(--muted);
}
.home-hier-leaf,
.home-hier-branch{
  color:var(--muted);
  font-weight:400;
}

.hero{
  margin-bottom:18px;
}
.home-main .home-hero{
  margin-bottom:24px;
}
.hero h1{
  margin:0 0 10px;
  font-size:clamp(1.75rem, 4vw, 2.35rem);
  font-weight:700;
  letter-spacing:-.03em;
  line-height:1.15;
}
.hero p{
  margin:0;
  max-width:52ch;
  color:var(--muted);
  font-size:1rem;
  line-height:1.55;
}
.hero-sub{
  margin:12px 0 0;
  max-width:60ch;
  font-size:.88rem;
  color:var(--muted);
  line-height:1.5;
}
.hero-rel{
  margin:14px 0 0;
  font-size:.88rem;
  color:var(--muted);
  line-height:1.45;
}
.hero-rel a{
  font-weight:600;
}

.hero--entity{
  margin-bottom:14px;
}
.hero--entity .hero-title-row{
  flex-wrap:nowrap;
  align-items:baseline;
}
.hero-title-row{
  display:flex;
  flex-direction:row;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:0 0 6px;
  flex-wrap:wrap;
}
.hero-title-row__actions{
  flex:0 0 auto;
  align-self:center;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:4px;
}
.home-hero-actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0;
  line-height:1;
  flex-wrap:nowrap;
}
.home-usd-spot-rate{
  font-size:max(11px, 0.7rem);
  font-weight:500;
  color:var(--muted);
  line-height:1.15;
  margin:0;
  padding:0;
  text-align:center;
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
/* Matching currencies: spot label keeps its slot; text invisible (invalid --bg broke prior rule) */
html.portiva-spot-same-currency .js-home-usd-spot-rate,
html.portiva-spot-same-currency .home-usd-spot-rate,
html.portiva-spot-same-currency .home-equity-spot-label,
html.portiva-spot-same-currency .home-equity-action-stack .js-home-usd-spot-rate,
html.portiva-spot-same-currency .home-equity-action-stack .home-usd-spot-rate,
html.portiva-spot-same-currency .home-equity-action-stack .home-equity-spot-label{
  color:transparent;
}
/* Home equity card: action stack on the right; $1 label centered over the button */
.home-equity-split__right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:flex-end;
  min-width:0;
}
.home-equity-action-stack{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  max-width:100%;
}
.home-equity-action-row{
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:8px;
  max-width:100%;
}
.home-equity-action-stack .home-equity-spot-label,
.home-equity-action-stack .home-usd-spot-rate{
  display:block;
  margin:0;
  padding:0;
  text-align:center;
  text-transform:none;
  letter-spacing:0;
  font-size:max(11px, 0.7rem);
  font-weight:500;
  line-height:1.15;
  color:var(--muted);
  white-space:nowrap;
  max-width:100%;
  transform:translateX(-0.28em);
}
.home-equity-action-stack .home-equity-spot-label[hidden],
.home-equity-action-stack .home-usd-spot-rate[hidden]{
  display:none;
}
.home-equity-action-stack .home-equity-add-entity-btn{
  margin:0;
  align-self:stretch;
  text-align:center;
  border:1px solid rgba(255,255,255,.35);
  background:transparent;
}
.home-equity-action-stack .home-equity-add-entity-btn:hover:not(:disabled){
  border-color:rgba(255,255,255,.48);
  background:rgba(255,255,255,.06);
}
.portiva-empty-cta-target{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
  align-self:stretch;
  min-width:0;
  width:100%;
}
.portiva-empty-cta-target .home-equity-add-entity-btn{
  flex:1 1 auto;
  min-width:0;
}
.portiva-empty-cta-hint{
  --portiva-empty-cta-font-scale:1.3;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:calc(5px * var(--portiva-empty-cta-font-scale));
  pointer-events:none;
  user-select:none;
}
.portiva-empty-cta-hint--points-right{
  flex-direction:row;
}
.portiva-empty-cta-hint--points-left{
  flex-direction:row;
}
.portiva-empty-cta-hint--points-down{
  flex-direction:column;
}
.portiva-empty-cta-hint--points-up{
  flex-direction:column;
}
.portiva-empty-cta-hint--points-down-left{
  flex-direction:column;
  align-items:flex-end;
  gap:calc(3px * var(--portiva-empty-cta-font-scale));
}
.portiva-empty-cta-hint--points-down-right{
  flex-direction:column;
  align-items:flex-start;
  gap:calc(3px * var(--portiva-empty-cta-font-scale));
}
.portiva-empty-cta-hint__label{
  font-size:max(calc(11px * var(--portiva-empty-cta-font-scale)), calc(0.7rem * var(--portiva-empty-cta-font-scale)));
  font-weight:600;
  letter-spacing:0.02em;
  line-height:1.1;
  white-space:nowrap;
  opacity:0.72;
}
.portiva-empty-cta-hint--entity .portiva-empty-cta-hint__label{
  color:rgb(249, 115, 22);
  animation:portiva-empty-cta-arrow-glow-entity 2.4s ease-in-out infinite;
}
.portiva-empty-cta-hint--asset .portiva-empty-cta-hint__label{
  color:hsl(272 72% 78%);
  animation:portiva-empty-cta-arrow-glow-asset 2.4s ease-in-out infinite;
}
.portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware,
.portiva-empty-cta-arrow--theme-aware{
  color:#fff;
  opacity:1;
  animation:portiva-empty-cta-arrow-glow-nav 4.8s ease-in-out infinite;
}
.portiva-empty-cta-hint--maps-split.portiva-empty-cta-hint--float{
  z-index:130;
}
.portiva-empty-cta-hint--maps-split .portiva-empty-cta-hint__label--theme-aware,
.portiva-empty-cta-hint--maps-split .portiva-empty-cta-arrow--theme-aware{
  color:#fff;
  opacity:1;
  animation:portiva-empty-cta-arrow-glow-nav 4.8s ease-in-out infinite;
}
[data-theme="dawn"] .portiva-empty-cta-hint--maps-split .portiva-empty-cta-hint__label--theme-aware,
[data-theme="day"] .portiva-empty-cta-hint--maps-split .portiva-empty-cta-hint__label--theme-aware,
[data-theme="classic"] .portiva-empty-cta-hint--maps-split .portiva-empty-cta-hint__label--theme-aware,
[data-theme="dawn"] .portiva-empty-cta-hint--maps-split .portiva-empty-cta-arrow--theme-aware,
[data-theme="day"] .portiva-empty-cta-hint--maps-split .portiva-empty-cta-arrow--theme-aware,
[data-theme="classic"] .portiva-empty-cta-hint--maps-split .portiva-empty-cta-arrow--theme-aware{
  color:#000;
  animation:portiva-empty-cta-arrow-glow-nav-dark 4.8s ease-in-out infinite;
}
.portiva-empty-cta-hint--pie-slice.portiva-empty-cta-hint--float{
  z-index:130;
  max-width:min(92vw, calc(11rem * var(--portiva-empty-cta-font-scale)));
}
.portiva-empty-cta-hint--pie-slice.portiva-empty-cta-hint--points-down-left{
  align-items:flex-start;
  gap:0;
}
.portiva-empty-cta-hint--pie-slice.portiva-empty-cta-hint--points-down-right{
  align-items:flex-end;
  gap:0;
}
.portiva-empty-cta-hint--pie-slice .portiva-empty-cta-arrow{
  margin-top:calc(10px * var(--portiva-empty-cta-font-scale));
}
.portiva-empty-cta-hint--pie-slice .portiva-empty-cta-hint__label{
  white-space:normal;
  text-align:center;
}
[data-theme="dawn"] .portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware,
[data-theme="day"] .portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware,
[data-theme="classic"] .portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware,
[data-theme="dawn"] .portiva-empty-cta-arrow--theme-aware,
[data-theme="day"] .portiva-empty-cta-arrow--theme-aware,
[data-theme="classic"] .portiva-empty-cta-arrow--theme-aware{
  color:#000;
  animation:portiva-empty-cta-arrow-glow-nav-dark 4.8s ease-in-out infinite;
}
[data-theme="dawn"] .portiva-empty-cta-hint__label--theme-aware,
[data-theme="day"] .portiva-empty-cta-hint__label--theme-aware,
[data-theme="classic"] .portiva-empty-cta-hint__label--theme-aware{
  color:#000;
  opacity:1;
  text-shadow:none;
}
[data-theme="dawn"] .portiva-empty-cta-hint--entity .portiva-empty-cta-hint__label,
[data-theme="day"] .portiva-empty-cta-hint--entity .portiva-empty-cta-hint__label,
[data-theme="classic"] .portiva-empty-cta-hint--entity .portiva-empty-cta-hint__label,
[data-theme="dawn"] .portiva-empty-cta-hint--asset .portiva-empty-cta-hint__label,
[data-theme="day"] .portiva-empty-cta-hint--asset .portiva-empty-cta-hint__label,
[data-theme="classic"] .portiva-empty-cta-hint--asset .portiva-empty-cta-hint__label,
[data-theme="dawn"] .portiva-empty-cta-arrow--entity,
[data-theme="day"] .portiva-empty-cta-arrow--entity,
[data-theme="classic"] .portiva-empty-cta-arrow--entity,
[data-theme="dawn"] .portiva-empty-cta-arrow--asset,
[data-theme="day"] .portiva-empty-cta-arrow--asset,
[data-theme="classic"] .portiva-empty-cta-arrow--asset{
  color:#000;
  opacity:1;
  animation:portiva-empty-cta-arrow-glow-nav-dark 4.8s ease-in-out infinite;
}
.portiva-empty-cta-arrow{
  flex:0 0 auto;
  display:block;
  width:calc(1.4rem * var(--portiva-empty-cta-font-scale, 1.3));
  font-size:calc(1.35rem * var(--portiva-empty-cta-font-scale, 1.3));
  font-weight:700;
  line-height:1;
  text-align:center;
  opacity:0.38;
  pointer-events:none;
  user-select:none;
}
.portiva-empty-cta-arrow--right::before{
  content:"→";
}
.portiva-empty-cta-arrow--left::before{
  content:"←";
}
.portiva-empty-cta-arrow--up::before{
  content:"↑";
}
.portiva-empty-cta-arrow--down::before{
  content:"↓";
}
.portiva-empty-cta-arrow--down-left::before{
  content:"↙";
  font-size:calc(1.5rem * var(--portiva-empty-cta-font-scale, 1.3));
}
.portiva-empty-cta-arrow--down-right::before{
  content:"↘";
  font-size:calc(1.5rem * var(--portiva-empty-cta-font-scale, 1.3));
}
.portiva-empty-cta-arrow--entity{
  color:rgb(249, 115, 22);
  animation:portiva-empty-cta-arrow-glow-entity 2.4s ease-in-out infinite;
}
.portiva-empty-cta-arrow--asset{
  color:hsl(272 72% 78%);
  animation:portiva-empty-cta-arrow-glow-asset 2.4s ease-in-out infinite;
}
@keyframes portiva-empty-cta-arrow-glow-entity{
  0%, 100%{
    opacity:0.32;
    text-shadow:0 0 4px rgba(249, 115, 22, 0.25);
  }
  50%{
    opacity:1;
    text-shadow:0 0 12px rgba(249, 115, 22, 0.95), 0 0 20px rgba(249, 115, 22, 0.45);
  }
}
@keyframes portiva-empty-cta-arrow-glow-asset{
  0%, 100%{
    opacity:0.32;
    text-shadow:0 0 4px hsl(272 65% 58% / 0.28);
  }
  50%{
    opacity:1;
    text-shadow:0 0 12px hsl(272 72% 72% / 0.95), 0 0 20px hsl(272 65% 58% / 0.5);
  }
}
@keyframes portiva-empty-cta-arrow-glow-nav{
  0%, 100%{
    opacity:0.45;
    text-shadow:0 0 5px rgba(255, 255, 255, 0.35);
  }
  50%{
    opacity:1;
    text-shadow:0 0 14px rgba(255, 255, 255, 1), 0 0 24px rgba(255, 255, 255, 0.65);
  }
}
@keyframes portiva-empty-cta-arrow-glow-nav-dark{
  0%, 100%{
    opacity:0.45;
    text-shadow:0 0 4px rgba(15, 23, 42, 0.28);
  }
  50%{
    opacity:1;
    text-shadow:0 0 12px rgba(15, 23, 42, 0.92), 0 0 20px rgba(15, 23, 42, 0.4);
  }
}
.portiva-empty-cta-hint--float{
  position:fixed;
  pointer-events:none;
  z-index:120;
  margin:0;
  transform:translateX(-50%);
}
body:has(.modal-overlay.modal-overlay--open) .portiva-empty-cta-hint--float{
  visibility:hidden;
  pointer-events:none;
}
@media (prefers-reduced-motion: reduce){
  .portiva-empty-cta-arrow--entity,
  .portiva-empty-cta-arrow--asset,
  .portiva-empty-cta-arrow--theme-aware,
  .portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware,
  .portiva-empty-cta-hint--entity .portiva-empty-cta-hint__label,
  .portiva-empty-cta-hint--asset .portiva-empty-cta-hint__label{
    animation:none;
    opacity:0.85;
  }
  .portiva-empty-cta-arrow--entity{
    text-shadow:0 0 8px rgba(249, 115, 22, 0.55);
  }
  .portiva-empty-cta-arrow--asset{
    text-shadow:0 0 8px hsl(272 65% 58% / 0.55);
  }
  .portiva-empty-cta-arrow--theme-aware,
  .portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware{
    text-shadow:0 0 10px rgba(255, 255, 255, 0.75);
  }
  [data-theme="dawn"] .portiva-empty-cta-arrow--theme-aware,
  [data-theme="day"] .portiva-empty-cta-arrow--theme-aware,
  [data-theme="classic"] .portiva-empty-cta-arrow--theme-aware,
  [data-theme="dawn"] .portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware,
  [data-theme="day"] .portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware,
  [data-theme="classic"] .portiva-empty-cta-hint--nav .portiva-empty-cta-hint__label--theme-aware{
    text-shadow:0 0 8px rgba(0, 0, 0, 0.35);
  }
  [data-theme="dawn"] .portiva-empty-cta-arrow--entity,
  [data-theme="day"] .portiva-empty-cta-arrow--entity,
  [data-theme="classic"] .portiva-empty-cta-arrow--entity,
  [data-theme="dawn"] .portiva-empty-cta-arrow--asset,
  [data-theme="day"] .portiva-empty-cta-arrow--asset,
  [data-theme="classic"] .portiva-empty-cta-arrow--asset,
  [data-theme="dawn"] .portiva-empty-cta-hint--entity .portiva-empty-cta-hint__label,
  [data-theme="day"] .portiva-empty-cta-hint--entity .portiva-empty-cta-hint__label,
  [data-theme="classic"] .portiva-empty-cta-hint--entity .portiva-empty-cta-hint__label,
  [data-theme="dawn"] .portiva-empty-cta-hint--asset .portiva-empty-cta-hint__label,
  [data-theme="day"] .portiva-empty-cta-hint--asset .portiva-empty-cta-hint__label,
  [data-theme="classic"] .portiva-empty-cta-hint--asset .portiva-empty-cta-hint__label{
    animation:none;
    opacity:1;
    color:#000;
    text-shadow:0 0 8px rgba(0, 0, 0, 0.35);
  }
}
.hero-title-row h1{
  margin:0;
  flex:1 1 auto;
  min-width:0;
  font-size:clamp(1.75rem, 4vw, 2.35rem);
  font-weight:700;
  letter-spacing:-.03em;
  line-height:1.15;
}
.hero--entity .hero-title-row h1,
.hero--entity .entity-hero-grid__name{
  display:flex;
  align-items:baseline;
  gap:.22em;
  white-space:nowrap;
  overflow:hidden;
  overflow-wrap:normal;
  word-break:normal;
  font-size:clamp(1.45rem, 3.4vw, 2rem);
}
.hero-title-main{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.hero-title-share{
  flex:0 0 auto;
  font-size:.48em;
  font-weight:500;
  color:var(--muted);
  letter-spacing:0;
  white-space:nowrap;
}
.asset-stock-readonly{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
}
.asset-stock-readonly__label{
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
.asset-stock-readonly__body{
  width:100%;
  min-width:0;
}
.detail-field--stock-holdings{
  flex-direction:column;
  align-items:stretch;
  gap:10px;
}
.detail-field--stock-holdings dt{
  margin:0;
  text-align:left;
}
.detail-field--stock-holdings dd{
  text-align:left;
  width:100%;
  flex:none;
}
.modern-holding-value{
  font-variant-numeric:tabular-nums;
  font-weight:600;
  white-space:nowrap;
}
.hero-page-kind{
  flex:0 0 auto;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#fff;
  line-height:1.2;
  padding:4px 10px;
  border-radius:999px;
  background:hsl(145 60% 38%);
  white-space:nowrap;
  text-shadow:none;
  box-shadow:0 0 0 1px rgba(0,0,0,.18) inset;
}
.hero-page-kind--folder{
  background:hsl(214 72% 46%);
  color:#fff;
  text-shadow:none;
}
.hero-page-kind--entity{
  background:hsl(8 58% 52%);
  color:#fff;
}
.hero-page-kind--asset{
  background:hsl(272 62% 52%);
  color:#fff;
  text-shadow:none;
}
.hero-asset-subline{
  margin:6px 0 0;
  font-size:.88rem;
  color:var(--muted);
}
.topbar__navrow--spacer{
  min-height:44px;
  box-sizing:border-box;
  pointer-events:none;
}
.pieSliceLabelLink{
  text-decoration:none;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
foreignObject.pieSliceLabelFo{
  pointer-events: none;
}
.pieSliceLabelLink:focus{
  outline:none;
}
.pieSliceLabelLink:focus-visible{
  outline:none;
}
.pieSliceLabelLink:focus-visible .pieSliceLabel,
.pieSliceLabelLink:focus-visible text{
  filter:drop-shadow(0 0 2px var(--accent));
}
.pieSliceLabelLink:active .pieSliceLabel,
.pieSliceLabelLink:active text{
  opacity:.88;
}
a.pieSliceLabelLink[dir="rtl"]{
  direction:rtl;
  unicode-bidi:embed;
}
.home-excluded-entities{
  margin-top:40px;
  padding-top:24px;
  border-top:1px solid var(--stroke);
}
.home-excluded-entities__hint{
  margin:0 0 14px;
  font-size:.82rem;
  color:var(--muted);
  line-height:1.45;
  max-width:62ch;
}
.home-excluded-entities__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.home-excluded-entities__item{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-card);
}
/* Overview-excluded entities (purple asset ramp / red edit on entity page) */
.entity-overview-excluded-badge{
  display:inline-flex;
  align-items:center;
  flex-shrink:0;
  margin-inline-start:6px;
  padding:2px 7px;
  border-radius:999px;
  font-size:.62rem;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  line-height:1.25;
  vertical-align:middle;
  color:hsl(272 72% 82%);
  background:hsl(272 48% 22%);
  border:1px solid hsl(272 45% 42%);
}
.home-struct-card--overview-excluded{
  border-color:hsl(272 42% 38%);
  box-shadow:inset 0 0 0 1px hsl(272 50% 28% / 0.35);
}
.home-struct-card__meta .entity-overview-excluded-badge{
  margin-inline-start:0;
}
.entity-tree-card--overview-excluded{
  border-color:hsl(272 42% 38%);
}
.entity-tree-card h3{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px 6px;
}
.entity-page .btn--entity-add-asset{
  border:2px solid hsl(272 52% 52%);
  background:var(--surface-btn);
  color:#fff;
  font-weight:700;
}
.entity-page .btn--entity-add-asset:hover{
  background:hsl(272 62% 48% / 0.12);
  border-color:hsl(272 62% 58%);
  color:#fff;
}
.entity-page .btn--entity-edit{
  border:2px solid hsl(8 55% 50%);
  background:var(--surface-btn);
  color:#fff;
  font-weight:700;
}
.entity-page .btn--entity-edit:hover{
  background:hsl(8 58% 52% / 0.12);
  border-color:hsl(8 58% 58%);
  color:#fff;
}
.home-excluded-entities__link{
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px 6px;
  font-weight:600;
  color:var(--text);
}
.home-excluded-entities__link .entity-overview-excluded-badge{
  margin-inline-start:0;
}
.entity-details-inline .detailsChartSection--asset .pieDonutCenter--countOnly .pieDonutCenterLabel{
  fill:hsl(272 70% 72%);
}
.entity-details-exclude-mount{
  margin-top:20px;
  padding-top:4px;
}
.entity-details-exclude-section{
  margin:0;
  padding:16px 18px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-card);
}
.entity-details-exclude-section__title{
  margin:0 0 8px;
  font-size:.85rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}
.entity-details-exclude-section__hint{
  margin:0 0 12px;
  font-size:.86rem;
  line-height:1.5;
  color:var(--text);
  max-width:52rem;
}
.entity-assets-panel{
  margin-bottom:4px;
}
.detail-field--stack{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.field-input--type-custom:disabled{
  opacity:.45;
}
.asset-readonly-panel .entityDetailsDl dt{
  margin-bottom:2px;
  padding-top:2px;
}
.asset-readonly-panel .entityDetailsDl dd{
  margin-bottom:4px;
  margin-left:0;
  position:relative;
  box-sizing:border-box;
}
.asset-readonly-panel .entityDetailsDl{
  grid-template-columns:minmax(0,1fr) minmax(0,2fr);
}
.asset-readonly-panel .entityDetailsDl dd,
.asset-readonly-panel .entityDetailsDl dd.entityDetailsDd--num,
.asset-readonly-panel .entityDetailsDl dd.entityDetailsDd--text{
  text-align:left;
  justify-self:stretch;
  width:100%;
}
.asset-readonly-panel .entityDetailsDl dd.formula-field-dd .formula-field-dot--readonly{
  position:absolute;
  left:-10px;
  top:0.55em;
  transform:translateY(-50%);
  margin:0;
}
.asset-readonly-panel .entityDetailsDl dd.formula-field-dd .formula-field-dd__row,
.asset-readonly-panel .entityDetailsDl dd.formula-field-dd .formula-field-dd__val{
  display:block;
}
.asset-readonly-panel .entityDetailsBubbleTitle{
  margin-bottom:8px;
}
.asset-readonly-link{
  color:var(--accent);
  font-weight:600;
  text-decoration:underline;
  text-underline-offset:2px;
  word-break:break-word;
}
.asset-readonly-panel .entityDetailsDdWithCopy .asset-readonly-link{
  min-width:0;
}
/* Entity page readonly details — match asset browse (stacked bubbles, no outer glass wrap). */
.entity-page .entity-details-meta-mount .entityDetailsReadonlySection.asset-readonly-panel{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.entity-page .entity-details-meta-mount .entityDetailsReadonlySection--empty{
  padding:0;
  border:0;
  background:transparent;
  backdrop-filter:none;
  box-shadow:none;
  border-radius:0;
}
.entity-page .entity-details-meta-mount .entityDetailsReadonlySection--empty .entity-details-placeholder-title{
  margin:0 0 8px;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-list{
  margin-top:.15rem;
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row--readonly{
  display:flex;
  flex-direction:column;
  gap:.34rem;
  padding:.45rem 0 .55rem;
  font-size:.92rem;
  line-height:1.12;
  border-bottom:1px solid var(--stroke);
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row--readonly:last-child{
  border-bottom:0;
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row__line--head,
.entity-page .entityDetailsBubble--investors .pm-investor-share-row__line--foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  width:100%;
  min-width:0;
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row__line--head .pm-investor-share-row__name{
  flex:0 1 auto;
  min-width:0;
  font-weight:600;
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row__track{
  display:flex;
  align-items:center;
  gap:.45rem;
  flex:1 1 auto;
  min-width:0;
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row__track .pm-investor-share-row__bar{
  flex:1 1 auto;
  min-width:2.5rem;
  max-width:12rem;
  height:.55rem;
  border-radius:999px;
  background:var(--surface-btn);
  border:1px solid var(--stroke);
  overflow:hidden;
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row__track .pm-investor-share-row__pct{
  flex:0 0 auto;
  min-width:2.5rem;
  text-align:end;
  font-variant-numeric:tabular-nums;
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row__bar-fill{
  display:block;
  height:100%;
  border-radius:999px;
  background:var(--accent);
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-row__amounts{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:.12rem;
  flex:0 0 auto;
  min-width:0;
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-row__amount{
  font-size:.82rem;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-row__amount--empty{
  color:var(--muted);
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row--owner .pm-investor-share-row__line--foot{
  flex-wrap:wrap;
  align-items:flex-start;
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-row__financials{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:.28rem;
  flex:1 1 100%;
  min-width:min(100%, 12rem);
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-row__metric{
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  gap:.35rem;
  width:100%;
  min-width:0;
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-row__metric-label{
  flex:0 0 auto;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--muted);
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-row__metric .entity-investors-readonly-row__amounts{
  flex-direction:row;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:.2rem .35rem;
}
.entity-page .entityDetailsBubble--investors .entity-investors-readonly-row__amounts--equity-only{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:.12rem;
  flex:0 0 auto;
  min-width:0;
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row--retained-leftover{
  margin-top:.2rem;
  padding-top:.55rem;
  border-top:1px dashed var(--stroke);
}
.entity-page .entityDetailsBubble--investors .pm-investor-share-row--retained-leftover .pm-investor-share-row__name{
  font-weight:600;
  color:var(--muted);
}
/* Entity + asset browse: strong white titles in readonly detail bubbles (night palettes). */
.entity-page .entity-details-meta-mount .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
.entity-details-main .entity-details-meta-mount .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
.asset-page #assetReadonlyWrap .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
.asset-page #assetReadonlyWrap .asset-readonly-panel .asset-stock-readonly__label{
  color:#fff;
  font-weight:700;
}
[data-theme="dawn"] .entity-page .entity-details-meta-mount .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="day"] .entity-page .entity-details-meta-mount .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="classic"] .entity-page .entity-details-meta-mount .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="dawn"] .entity-details-main .entity-details-meta-mount .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="day"] .entity-details-main .entity-details-meta-mount .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="classic"] .entity-details-main .entity-details-meta-mount .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="dawn"] .asset-page #assetReadonlyWrap .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="day"] .asset-page #assetReadonlyWrap .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="classic"] .asset-page #assetReadonlyWrap .asset-readonly-panel .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="dawn"] .asset-page #assetReadonlyWrap .asset-readonly-panel .asset-stock-readonly__label,
[data-theme="day"] .asset-page #assetReadonlyWrap .asset-readonly-panel .asset-stock-readonly__label,
[data-theme="classic"] .asset-page #assetReadonlyWrap .asset-readonly-panel .asset-stock-readonly__label{
  color:#111;
}
#view > main:not(.home-main) .home-summary .stat-card--total{
  min-height:108px;
  box-sizing:border-box;
}
.home-main .home-summary .stat-card--total{
  min-height:108px;
  box-sizing:border-box;
}
.entity-hero-stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  max-width:560px;
}
.entity-hero-stat{
  padding:12px 10px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-card);
  text-align:center;
  min-width:0;
}
.entity-hero-stat__label{
  display:block;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:6px;
}
.entity-hero-stat__value{
  display:block;
  font-size:clamp(.88rem, 2.8vw, 1.05rem);
  font-weight:700;
  font-variant-numeric:tabular-nums;
  font-family:var(--mono);
  line-height:1.2;
  word-break:break-word;
}
@media (max-width:380px){
  .entity-hero-stats{ gap:6px; }
  .entity-hero-stat{ padding:10px 6px; }
}

.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
  gap:16px;
  margin-bottom:32px;
}
.stat-card{
  padding:22px 22px 20px;
  border-radius:var(--radius);
  border:1px solid var(--stroke);
  background:var(--glass);
  backdrop-filter:blur(16px);
  box-shadow:var(--shadow);
}
.stat-card .label{
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:var(--muted);
  margin-bottom:8px;
}
button.value.equity-summary-value-toggle,
button.home-hero-equity__amount.equity-summary-value-toggle{
  display:inline;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  font:inherit;
  font-size:inherit;
  font-weight:inherit;
  letter-spacing:inherit;
  color:inherit;
  text-align:inherit;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
button.value.equity-summary-value-toggle:hover,
button.value.equity-summary-value-toggle:focus-visible,
button.home-hero-equity__amount.equity-summary-value-toggle:hover,
button.home-hero-equity__amount.equity-summary-value-toggle:focus-visible{
  opacity:0.88;
  outline:none;
}
.stat-card .value{
  font-size:clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight:700;
  letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
}
/* Hero / main summary equity amount (mobile + tablet; desktop hero uses --desktop token below) */
.home-hero-equity .home-hero-equity__amount,
.stat-card.stat-card--total .home-hero-equity__amount{
  font-size:var(--portiva-hero-equity-amount-size);
  font-weight:700;
  letter-spacing:-.04em;
  line-height:1;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
@media (max-width: 900px){
  :root{
    --portiva-hero-equity-amount-size:var(--portiva-hero-equity-amount-size-mobile);
    --portiva-hero-equity-amount-size-compact:var(--portiva-hero-equity-amount-size-compact-mobile);
  }
  .hero-title-row .home-hero-equity .home-hero-equity__amount,
  .hero-title-row .home-hero-equity [data-home-beneficial-total],
  .hero-title-row .home-hero-equity [data-folder-beneficial-total],
  .hero-title-row .home-hero-equity [data-entity-beneficial-total],
  .hero-title-row .home-hero-equity [data-asset-beneficial-total]{
    font-size:var(--portiva-hero-equity-amount-size-mobile);
    font-weight:700;
    letter-spacing:-.04em;
    line-height:1;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
  }
  .stat-card--total .stat-card-total-main--equity [data-home-beneficial-total],
  .stat-card--total .stat-card-total-main--equity [data-folder-beneficial-total],
  .stat-card--total .stat-card-total-main--equity [data-entity-beneficial-total],
  .stat-card--total .stat-card-total-main--equity [data-asset-beneficial-total],
  .stat-card--total .stat-card-total-main--equity .value{
    font-size:var(--portiva-hero-equity-amount-size-mobile);
    font-weight:700;
    letter-spacing:-.04em;
    line-height:1.05;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
  }
  .home-summary--compact .stat-card--total .stat-card-total-main--equity [data-home-beneficial-total],
  .home-summary--compact .stat-card--total .stat-card-total-main--equity [data-folder-beneficial-total],
  .home-summary--compact .stat-card--total .stat-card-total-main--equity [data-entity-beneficial-total],
  .home-summary--compact .stat-card--total .stat-card-total-main--equity [data-asset-beneficial-total],
  .home-summary--compact .stat-card--total .stat-card-total-main--equity .value{
    font-size:var(--portiva-hero-equity-amount-size-compact-mobile);
  }
}
.home-summary--compact .home-hero-equity__amount,
.home-summary--in-main.home-summary--compact .stat-card--total .home-hero-equity__amount{
  font-size:var(--portiva-hero-equity-amount-size-compact);
}
.stat-card .hint{
  margin-top:8px;
  font-size:.78rem;
  color:var(--muted);
  line-height:1.4;
}

.home-main .home-summary{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:0;
  margin-bottom:28px;
  position:relative;
  z-index:0;
}
.home-summary.home-summary--compact{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:8px;
  margin-top:-10px;
  margin-bottom:10px;
}
#view > main .home-summary.home-summary--compact{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:8px;
  margin-top:-10px;
  margin-bottom:10px;
}
.home-summary--compact .stat-card{
  display:block;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
}
.home-summary--compact .stat-card-total-main--equity{
  display:block;
}
#view > main:not(.home-main) .home-summary.home-summary--compact .stat-card--total,
#view > main.home-main .home-summary.home-summary--compact .stat-card--total{
  min-height:0;
  box-sizing:border-box;
}
.home-summary--compact .home-mini-row{
  gap:8px;
}
.home-summary--compact .stat-card .label,
.home-summary--compact .stat-card--mini .label{
  margin-bottom:4px;
  font-size:.62rem;
}
.stat-card-label-row__fx:empty{
  display:none;
}
.home-summary--compact .stat-card .value{
  font-size:clamp(1rem,2vw,1.28rem);
  text-align:left;
  white-space:nowrap;
}
.home-summary--compact .stat-card-total-value-row{
  margin-top:0;
  gap:8px;
}
.home-summary--compact:not(.home-summary--equity-fx-expanded) .stat-card-total-fx,
.home-summary--compact:not(.home-summary--equity-fx-expanded) .stat-card--mini-cur-breakdown{
  display:none;
}
.home-summary--compact.home-summary--equity-fx-expanded .stat-card-total-fx:not(:empty),
.home-summary--compact.home-summary--equity-fx-expanded .stat-card--mini-cur-breakdown:not(:empty){
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
}
#view > main:not(.home-main) .home-summary:not(.home-summary--in-main){
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-bottom:28px;
  position:relative;
  z-index:0;
}
#view > main:not(.home-main) .home-summary.home-summary--in-main:not(.home-summary--compact),
#view > main.folder-page .home-summary.home-summary--in-main:not(.home-summary--compact){
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-bottom:28px;
  position:relative;
  z-index:0;
}
.home-mini-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  min-width:0;
}
/* Folder page hero: two rows — left aligned | right aligned; Debt/Value below */
.hero-title-row--folder{
  display:block;
  margin:0;
}
.folder-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto;
  align-items:end;
  gap:8px 12px;
  width:100%;
}
.folder-hero-grid__name{
  grid-column:1;
  grid-row:1;
  justify-self:start;
  align-self:end;
  margin:0;
  text-align:left;
}
.folder-hero-rail__buttons{
  grid-column:2;
  grid-row:1;
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  justify-content:flex-end;
  align-items:stretch;
  justify-self:end;
  gap:10px;
}
.folder-hero-rail__buttons .btn{
  flex:0 1 auto;
  min-width:5.5rem;
  min-height:38px;
  padding-left:14px;
  padding-right:14px;
  white-space:nowrap;
}
.folder-hero-equity{
  grid-column:1;
  grid-row:2;
  justify-self:start;
  align-self:end;
  text-align:left;
}
.folder-hero-equity__label{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:var(--muted);
  margin-bottom:4px;
}
.folder-hero-equity__row{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:6px 10px;
}
.folder-hero-equity__amount{
  font-size:clamp(1.2rem,5.2vw,1.65rem);
  font-weight:700;
  letter-spacing:-.04em;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.hero-title-row--entity-hero{
  display:block;
  margin:0;
}
.entity-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:end;
  gap:8px 12px;
  width:100%;
}
.entity-hero-grid__name{
  grid-column:1;
  justify-self:start;
  align-self:end;
  margin:0;
  text-align:left;
  display:flex;
  align-items:baseline;
  gap:.22em;
  min-width:0;
}
.entity-hero-grid .folder-hero-equity{
  grid-column:2;
  justify-self:center;
  align-self:end;
  text-align:center;
}
.entity-hero-grid > .hero-page-kind{
  grid-column:3;
  justify-self:end;
  align-self:end;
  margin:0;
}
@media (max-width: 900px){
  .topbar__home-summary-slot{
    display:none !important;
  }
  /* Folder / entity / asset mobile: summary only; desktop hero off-screen for a11y */
  .folder-page > .hero--folder-page,
  .entity-page > .hero--folder-page,
  .asset-page > .hero--folder-page{
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    padding:0;
    overflow:hidden;
    clip:rect(0,0,0,0);
    clip-path:inset(50%);
    white-space:nowrap;
    border:0;
  }
  #view > main.folder-page .home-summary--in-main:not(.home-summary--compact),
  #view > main:not(.home-main) .home-summary.home-summary--in-main:not(.home-summary--compact){
    margin-top:0;
    margin-bottom:18px;
    gap:12px;
  }
  #view > main.folder-page .home-summary.home-summary--in-main.home-summary--compact{
    margin-top:0;
    margin-bottom:8px;
    gap:8px;
  }
  #view > main.home-main > .home-hero{
    margin-bottom:0;
  }
  #view > main.home-main .hero-title-row--home{
    margin-bottom:0;
  }
  #view > main.folder-page > .folder-page-charts-stack,
  #view > main.entity-page > .entity-details-inline > .entity-page-charts-stack{
    margin-top:0;
  }
  .topbar__navrow:has(#btnBack){
    margin-bottom:0;
  }
  #view > header.topbar:has(+ main.home-main),
  #view > header.topbar:has(+ main.folder-page),
  #view > header.topbar:has(+ main.entity-page),
  #view > header.topbar:has(+ main.asset-page){
    margin-bottom:0;
  }
  #view > header.topbar:has(+ main.home-main) .topbar__inner,
  #view > header.topbar:has(+ main.folder-page) .topbar__inner,
  #view > header.topbar:has(+ main.entity-page) .topbar__inner,
  #view > header.topbar:has(+ main.asset-page) .topbar__inner{
    padding-bottom:6px;
  }
  #view > main.home-main{
    margin-top:-11px;
  }
  #view > main.folder-page,
  #view > main.entity-page,
  #view > main.asset-page{
    margin-top:-1px;
  }
  /* Entity: equity lives in main summary on narrow viewports — hide hero duplicate. */
  .entity-hero-grid{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .entity-hero-grid .folder-hero-equity{
    display:none !important;
  }
  .entity-hero-grid__name{
    grid-column:1;
  }
  .entity-hero-grid > .hero-page-kind{
    grid-column:2;
  }
}
/* Desktop: Beneficial equity, Debt, Value as three equal-width bubbles */
@media (min-width: 901px){
  /* Home overview: summary in topbar center; main copy hidden so pies sit higher */
  .topbar--home .topbar__primary{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    column-gap:14px;
  }
  .topbar--home .brand{
    flex-shrink:0;
    justify-self:start;
    grid-column:1;
  }
  .topbar--home .top-actions{
    flex-shrink:0;
    justify-self:end;
    grid-column:3;
  }
  .topbar--home .topbar__home-summary-slot{
    justify-self:center;
    grid-column:2;
    width:var(--portiva-topbar-debt-value-summary-width);
    min-width:var(--portiva-topbar-debt-value-summary-width);
    max-width:var(--portiva-topbar-debt-value-summary-width);
  }
  .topbar--home .topbar__home-summary-slot--spacer{
    visibility:hidden;
    pointer-events:none;
    min-height:var(--portiva-topbar-debt-value-card-min-height);
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:8px;
    align-items:stretch;
    margin:0;
    width:100%;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar.home-summary--debt-value-only{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    width:100%;
    min-width:100%;
    max-width:100%;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .home-mini-row{
    display:contents;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar{
    align-items:stretch;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card{
    min-height:0;
    height:auto;
    padding:5px 8px 6px;
    border-radius:12px;
    box-sizing:border-box;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar.home-summary--debt-value-only .stat-card--mini{
    min-height:var(--portiva-topbar-debt-value-card-min-height);
    height:var(--portiva-topbar-debt-value-card-min-height);
    padding:3px 8px 4px;
    align-content:start;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar.home-summary--debt-value-only .stat-card--mini .label{
    margin-bottom:1px;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--total{
    display:flex;
    flex-direction:column;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--total .stat-card-total-main--equity{
    flex:0 0 auto;
    min-height:0;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card .label{
    font-size:.6rem;
    margin-bottom:2px;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini .value{
    font-size:clamp(.86rem, 1vw, 1.02rem);
    line-height:1.08;
    white-space:nowrap;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--total .value{
    font-size:clamp(1.25rem, 1.65vw, 1.65rem);
    font-weight:700;
    letter-spacing:-.03em;
    line-height:1.05;
  }
  /* Big number left, native currency lines right (all three bubbles) */
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card-total-value-row{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    margin-top:0;
    gap:6px 8px;
    flex:0 0 auto;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card-total-value-row > .value{
    flex:1 1 auto;
    min-width:0;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card-total-value-row .stat-card-total-fx,
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini-cur-breakdown{
    flex:0 1 auto;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    justify-content:flex-start;
    gap:1px;
    margin-top:0;
    min-height:var(--portiva-topbar-debt-value-breakdown-min-height);
    max-width:min(54%, 136px);
    text-align:right;
    font-size:.56rem;
    line-height:1.12;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini-cur-breakdown:empty{
    display:flex !important;
    visibility:hidden;
    pointer-events:none;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card-total-fx__line,
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini-cur-breakdown .stat-card-total-fx__line{
    line-height:1.12;
    font-size:.56rem;
    text-align:right;
    white-space:nowrap;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    grid-template-rows:auto auto;
    align-items:center;
    column-gap:10px;
    row-gap:0;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini .label{
    grid-column:1 / -1;
    margin-bottom:2px;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini .value{
    grid-column:1;
    grid-row:2;
    align-self:center;
  }
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini .stat-card--mini-cur-breakdown{
    grid-column:2;
    grid-row:2;
    align-self:center;
    justify-self:end;
    align-items:flex-end;
    text-align:right;
  }
  /* Desktop topbar: beneficial equity without bubble; Debt/Value glass bubbles */
  .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--total{
    border:none;
    background:transparent;
    backdrop-filter:none;
    box-shadow:none;
  }
  body.portiva-route-app .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--total{
    background:transparent;
    border:none;
    backdrop-filter:none;
    box-shadow:none;
  }
  body.portiva-route-app .topbar--home .topbar__home-summary-slot .home-summary--in-topbar .stat-card--mini{
    background:color-mix(in srgb, var(--glass) 88%, var(--bg0));
    border:1px solid var(--stroke);
    backdrop-filter:blur(16px);
    box-shadow:var(--shadow);
  }
  #view > header.topbar--home{
    margin-bottom:0;
  }
  #view > header.topbar--home .topbar__inner{
    padding-bottom:2px;
  }
  #view > main.home-main{
    margin-top:-20px;
  }
  #view > main.folder-page,
  #view > main.entity-page,
  #view > main.asset-page{
    margin-top:-16px;
  }
  #view > header.topbar:has(+ main.home-main),
  #view > header.topbar:has(+ main.folder-page),
  #view > header.topbar:has(+ main.entity-page),
  #view > header.topbar:has(+ main.asset-page){
    margin-bottom:0;
  }
  .home-main > .home-summary--in-main,
  #view > main .home-summary--in-main{
    display:none !important;
  }
  /* Folder desktop: equity in hero; main summary shows debt/value row only */
  #view > main:not(.home-main) .home-summary--in-main .stat-card--total{
    display:none !important;
  }
  .home-main > .home-hero,
  .folder-page > .hero--folder-page,
  .entity-page > .hero--folder-page,
  .asset-page > .hero--folder-page{
    margin-bottom:22px;
  }
  /* Portfolio hero (home / folder / entity / asset): nudge row down without shifting the pie */
  html[dir="ltr"] .home-main > .home-hero .hero-title-row--home,
  html[dir="ltr"] .folder-page > .hero--folder-page .hero-title-row--home,
  html[dir="ltr"] .entity-page > .hero--folder-page .hero-title-row--home,
  html[dir="ltr"] .asset-page > .hero--folder-page .hero-title-row--home{
    transform:translateY(6px);
  }
  /* Nav back: 4px shorter; row footprint unchanged so nothing below shifts */
  .topbar__navrow #btnBack{
    padding-block:8px;
  }
  .topbar__navrow-nav:has(#btnBack){
    align-items:flex-start;
    padding-bottom:4px;
    box-sizing:border-box;
  }
  .topbar__navrow:has(> #btnBack) #btnBack{
    margin-bottom:4px;
  }
  /* English desktop: search spacer left, nav cluster right */
  html[dir="ltr"] .topbar__navrow-search{
    left:0;
    right:auto;
  }
  html[dir="ltr"] .topbar__navrow-nav{
    margin-left:auto;
    margin-right:0;
  }
  /* Home desktop: page title left, equity centered, actions right */
  .hero-title-row--home{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr);
    align-items:flex-end;
    gap:12px 20px;
    margin:0 0 6px;
  }
  .hero-title-row--home h1{
    margin:0;
    grid-column:1;
    justify-self:start;
    align-self:end;
    min-width:0;
  }
  .hero-title-row--home.hero-title-row--portfolio-subpage h1{
    visibility:hidden;
    pointer-events:none;
  }
  .hero-title-row--home .hero-title-row__middle{
    display:block !important;
    grid-column:2;
    justify-self:center;
    align-self:end;
    min-width:0;
  }
  .hero-title-row--home .hero-title-row__actions{
    grid-column:3;
    justify-self:end;
    align-self:end;
    align-items:flex-end;
  }
  /* Folder / entity / asset desktop: name | equity | FOLDER/ENTITY/ASSET label (one row) */
  .hero--entity .hero-title-row.hero-title-row--scoped-summary{
    flex-wrap:nowrap;
  }
  .hero-title-row--scoped-summary{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr);
    align-items:flex-end;
    gap:12px 20px;
    margin:0 0 6px;
  }
  .hero-title-row--scoped-summary h1{
    grid-column:1;
    justify-self:start;
    align-self:end;
    text-align:left;
    margin:0;
    min-width:0;
    flex:none;
  }
  .hero-title-row--scoped-summary .hero-title-row__middle{
    display:block !important;
    grid-column:2;
    justify-self:center;
    align-self:end;
    min-width:0;
  }
  .hero-title-row--scoped-summary .hero-page-kind{
    grid-column:3;
    justify-self:end;
    align-self:end;
    margin:0;
  }
  .hero-title-row--scoped-summary .hero-title-row__actions{
    grid-column:1 / -1;
    justify-self:end;
    margin-top:4px;
  }
  /* Folder desktop: 3-col hero like home — name | equity (center) | actions + badge */
  .folder-hero-grid{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    grid-template-rows:auto auto;
    gap:8px 20px;
  }
  .folder-hero-grid__name{
    grid-column:1;
    grid-row:1 / span 2;
    align-self:end;
  }
  .folder-hero-equity{
    grid-column:2;
    grid-row:1 / span 2;
    justify-self:center;
    align-self:end;
    text-align:center;
  }
  .folder-hero-equity__label{
    margin-bottom:6px;
  }
  .folder-hero-equity__row{
    flex-wrap:nowrap;
    justify-content:center;
    gap:14px 18px;
  }
  .folder-hero-equity__amount{
    font-size:var(--portiva-hero-equity-amount-size-summary-desktop,clamp(1.35rem,2.5vw,1.65rem));
    white-space:nowrap;
  }
  .folder-hero-equity__fx.stat-card-total-fx{
    flex:0 1 auto;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:2px;
    margin:0;
    padding:0;
    max-width:min(42%,160px);
    text-align:left;
  }
  .folder-hero-equity__fx.stat-card-total-fx:empty{
    display:none;
  }
  .folder-hero-rail__buttons{
    grid-column:3;
    grid-row:1;
  }
  /* Folder desktop hero: equity center, Rename / Add entity right */
  .folder-hero-grid--title-in-pie{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    grid-template-rows:auto auto;
    align-items:end;
    gap:8px 12px;
  }
  .folder-hero-grid--title-in-pie .folder-hero-equity{
    display:contents;
  }
  .folder-hero-grid--title-in-pie .folder-hero-equity .label{
    grid-column:2;
    grid-row:1;
    justify-self:center;
    text-align:center;
    margin:0 0 6px;
  }
  .folder-hero-grid--title-in-pie .home-hero-equity > [data-folder-beneficial-total]{
    grid-column:2;
    grid-row:2;
    justify-self:center;
  }
  .folder-hero-grid--title-in-pie .folder-hero-rail__buttons{
    display:contents;
  }
  .folder-hero-grid--title-in-pie [data-folder-action="rename"]{
    grid-column:3;
    grid-row:1;
    justify-self:end;
    align-self:end;
  }
  .folder-hero-grid--title-in-pie .folder-hero-rail__add-stack{
    grid-column:3;
    grid-row:2;
    justify-self:end;
    align-self:end;
  }
  .entity-page .folder-hero-grid--title-in-pie .folder-hero-rail__buttons{
    display:contents;
  }
  .entity-page .folder-hero-grid--title-in-pie .folder-hero-rail__add-stack{
    grid-column:3;
    grid-row:2;
    justify-self:end;
    align-self:end;
  }
  .hero-title-row--folder .folder-hero-rail__add-stack .home-equity-spot-label,
  .hero-title-row--folder .folder-hero-rail__add-stack .home-usd-spot-rate{
    text-align:center;
    font-size:max(12px, 0.82rem);
  }
  /* Same slot size for Add entity (folder) and Add asset (entity) — avoids layout jump on nav */
  .hero-title-row--folder .folder-hero-rail__add-stack > .btn{
    flex:0 0 auto;
    min-width:8.25rem;
    width:8.25rem;
    max-width:8.25rem;
    min-height:40px;
    padding:8px 14px;
    font-size:.95rem;
    font-weight:600;
    line-height:1.2;
    white-space:nowrap;
    text-align:center;
    box-sizing:border-box;
  }
  .entity-hero-grid{
    gap:8px 20px;
  }
  .entity-hero-grid .folder-hero-equity .label{
    margin-bottom:6px;
  }
  .entity-hero-grid .home-hero-equity__row{
    flex-wrap:nowrap;
    justify-content:center;
    gap:14px 18px;
  }
  .entity-hero-grid .home-hero-equity__amount,
  .entity-hero-grid [data-entity-beneficial-total]{
    font-size:var(--portiva-hero-equity-amount-size-summary-desktop,clamp(1.35rem,2.5vw,1.65rem));
    white-space:nowrap;
  }
  .entity-hero-grid .home-hero-equity__fx.stat-card-total-fx{
    flex:0 1 auto;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:2px;
    margin:0;
    padding:0;
    max-width:min(42%,160px);
    text-align:left;
  }
  .entity-hero-grid .home-hero-equity__fx.stat-card-total-fx:empty{
    display:none;
  }
  .hero-title-row--home .home-equity-action-stack--hero-desktop{
    align-items:stretch;
  }
  .hero-title-row--home .home-equity-action-stack--hero-desktop .home-usd-spot-rate,
  .hero-title-row--home .home-equity-action-stack--hero-desktop .home-equity-spot-label{
    text-align:center;
    font-size:max(12px, 0.82rem);
  }
  .hero-title-row--home .home-equity-action-stack--hero-desktop .home-equity-add-entity-btn{
    flex:0 0 auto;
    min-width:8.25rem;
    width:8.25rem;
    max-width:8.25rem;
    min-height:40px;
    padding:8px 14px;
    font-size:.95rem;
    font-weight:600;
    line-height:1.2;
    white-space:nowrap;
    text-align:center;
    box-sizing:border-box;
  }
  .folder-hero-rail__buttons .btn{
    font-size:.9rem;
    min-width:6rem;
    min-height:40px;
    padding-left:16px;
    padding-right:16px;
  }
  /* Portfolio page hero equity (same overview sizing as home) */
  .hero-title-row--home .home-hero-equity [data-home-beneficial-total],
  .hero-title-row--home .home-hero-equity [data-folder-beneficial-total],
  .hero-title-row--home .home-hero-equity [data-entity-beneficial-total],
  .hero-title-row--home .home-hero-equity [data-asset-beneficial-total]{
    font-size:var(--portiva-hero-equity-amount-size-overview-desktop);
    font-weight:700;
    letter-spacing:-.04em;
    line-height:1;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
  }
  .home-hero-equity{
    text-align:center;
    transform:none;
  }
  .home-hero-equity .label{
    font-size:.8rem;
    text-transform:uppercase;
    letter-spacing:.14em;
    color:var(--muted);
    margin:0 0 6px;
  }
  .home-hero-equity__row{
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:center;
    gap:14px 18px;
    min-width:0;
  }
  .hero-title-row--home .home-hero-equity__amount,
  .hero-title-row--summary-desktop .home-hero-equity__amount,
  .hero-title-row--summary-desktop .home-hero-equity [data-home-beneficial-total]{
    flex:0 0 auto;
    font-size:var(--portiva-hero-equity-amount-size-desktop);
    font-weight:700;
    letter-spacing:-.04em;
    line-height:1;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
  }
  .hero-title-row--home .home-hero-equity__fx.stat-card-total-fx,
  .hero-title-row--summary-desktop .home-hero-equity__fx.stat-card-total-fx{
    flex:0 1 auto;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:2px;
    margin:0;
    padding:0;
    max-width:min(42%, 160px);
    text-align:left;
  }
  .hero-title-row--home .home-hero-equity__fx.stat-card-total-fx:empty,
  .hero-title-row--summary-desktop .home-hero-equity__fx.stat-card-total-fx:empty{
    display:none;
  }
  .hero-title-row--home .home-hero-equity__fx .stat-card-total-fx__line,
  .hero-title-row--summary-desktop .home-hero-equity__fx .stat-card-total-fx__line{
    font-size:clamp(.62rem, 1.1vw, .72rem);
    line-height:1.2;
    text-align:left;
  }
  .home-main > .home-page-charts-stack{
    margin-top:-6px;
  }
  .home-main > .home-folder-pie-wrap{
    margin-top:0;
  }
  #home-folder-pie-mount .detailsChartSection--overview-tabs,
  #folder-entity-pie-mount .detailsChartSection--overview-tabs,
  #entityInlineChartsMount .detailsChartSection--overview-tabs,
  .folder-page-pie-wrap .detailsChartSection--folder-entity.detailsChartSection--overview-tabs,
  .entity-page-pie-wrap .detailsChartSection--folder-entity.detailsChartSection--overview-tabs{
    padding-top:var(--portiva-overview-chart-bubble-tabs-gap);
  }
  #home-folder-pie-mount .home-overview-chart-tabs,
  #folder-entity-pie-mount .home-overview-chart-tabs,
  #entityInlineChartsMount .home-overview-chart-tabs,
  #entityInlineChartsMount .home-overview-chart-tabs--folder-name,
  .folder-page-pie-wrap .detailsChartSection--folder-entity > .home-overview-chart-tabs--folder-name,
  .entity-page-pie-wrap .detailsChartSection--entity-page > .home-overview-chart-tabs--folder-name{
    margin-bottom:8px;
    padding:var(--portiva-overview-chart-tabs-pad);
    box-sizing:border-box;
    width:100%;
    min-height:var(--portiva-overview-chart-tabs-track-h);
    height:var(--portiva-overview-chart-tabs-track-h);
    align-items:stretch;
  }
  #home-folder-pie-mount .home-overview-chart-tabs:not(.home-overview-chart-tabs--folder-name){
    box-sizing:border-box;
    width:100%;
  }
  #home-folder-pie-mount .home-overview-chart-tabs:not(.home-overview-chart-tabs--folder-name) .home-overview-chart-tab{
    flex:1 1 0;
    min-height:var(--portiva-overview-chart-tabs-inner-min-h);
    height:var(--portiva-overview-chart-tabs-inner-min-h);
    padding:0 10px;
    box-sizing:border-box;
    line-height:1.2;
    box-shadow:none;
  }
  #home-folder-pie-mount .home-overview-chart-tab[data-home-pie-tab].is-active{
    box-shadow:none;
  }
  #home-folder-pie-mount .home-overview-chart-tab,
  #folder-entity-pie-mount .home-overview-chart-tab,
  #folder-entity-pie-mount .home-overview-chart-tab--folder-name,
  #entityInlineChartsMount .home-overview-chart-tab--folder-name,
  #entityInlineChartsMount .home-overview-chart-tab--entity-name{
    min-height:var(--portiva-overview-chart-tabs-inner-min-h);
    font-size:.94rem;
  }
  /* Folder / entity blue name pill — same outer track + inner fill as home Folders/Entities/Assets row */
  .folder-page-pie-wrap .detailsChartSection--folder-entity > .home-overview-chart-tabs--folder-name,
  .entity-page-pie-wrap .detailsChartSection--entity-page > .home-overview-chart-tabs--folder-name,
  .asset-page .entityDetailsBubble.asset-page-name-bubble > .home-overview-chart-tabs--folder-name{
    display:flex;
    align-items:stretch;
    gap:0;
    margin-bottom:8px;
    padding:var(--portiva-overview-chart-tabs-pad);
    box-sizing:border-box;
    width:100%;
    min-height:var(--portiva-overview-chart-tabs-track-h);
    height:var(--portiva-overview-chart-tabs-track-h);
    border:1px solid var(--stroke);
    border-radius:999px;
    background:var(--surface-btn);
  }
  .folder-page-pie-wrap .home-overview-chart-tab--folder-name,
  .entity-page-pie-wrap .home-overview-chart-tab--folder-name,
  .asset-page .entityDetailsBubble.asset-page-name-bubble .home-overview-chart-tab--asset-name{
    flex:1 1 auto;
    width:100%;
    min-height:var(--portiva-overview-chart-tabs-inner-min-h);
    height:var(--portiva-overview-chart-tabs-inner-min-h);
    align-self:stretch;
    margin:0;
    font-size:.94rem;
  }
  /* Overview-style pies: home + entity inline + entity details (legend | chart, centered pair) */
  .portiva-overview-pie-layout{
    --portiva-pie-legend-max-w:480px;
    --portiva-pie-chart-max-w:360px;
    --portiva-pie-chart-pad-top:12px;
    --portiva-pie-chart-pad-bottom:22px;
    --portiva-pie-chart-body-h:360px;
    --portiva-pie-chart-slot-h:calc(var(--portiva-pie-chart-pad-top) + var(--portiva-pie-chart-body-h) + var(--portiva-pie-chart-pad-bottom));
    --portiva-pie-chart-rail-gap:10px;
    --portiva-pie-chart-rail-h:40px;
    --portiva-pie-chart-rail-total-h:calc(var(--portiva-pie-chart-rail-gap) + var(--portiva-pie-chart-rail-h));
    display:grid;
    grid-template-columns:1fr minmax(320px,var(--portiva-pie-legend-max-w)) minmax(260px,var(--portiva-pie-chart-max-w)) 1fr;
    grid-template-areas:
      ". heading heading ."
      ". headingsub headingsub ."
      ". legend chartpie ."
      ". . chartrail .";
    grid-template-rows:auto auto var(--portiva-pie-chart-slot-h) var(--portiva-pie-chart-rail-total-h);
    column-gap:clamp(56px,7vw,96px);
    row-gap:0;
    align-items:start;
    width:100%;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst.pieChartBlock{
    display:contents;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle{
    grid-area:heading;
    justify-self:start;
    align-self:start;
    margin:14px 0 0;
    padding:0 0 4px;
    max-width:none;
    line-height:1.2;
    white-space:normal;
    text-align:left;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading{
    display:block;
    margin-bottom:0;
    padding-bottom:0;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading--withActions{
    display:flex;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading .pieChartBlockTitle{
    margin:0;
    padding:0;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst > .pieChartBlockSubtitle{
    grid-area:headingsub;
    justify-self:start;
    align-self:start;
    margin:0 0 8px;
    padding:0;
    max-width:min(720px, 100%);
  }
  .portiva-overview-pie-layout--directHint .home-overview-pie-analyst .pieChartBlockHeading{
    position:relative;
    overflow:visible;
    z-index:2;
  }
  .portiva-overview-pie-layout--directHint .home-overview-pie-analyst .pieChartBlockHeading .pieChartBlockTitleHint{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    margin:2px 0 0;
    padding:0;
    max-width:min(720px, 100%);
  }
  .portiva-overview-pie-layout--directHint .home-overview-pie-analyst .pieLegend{
    margin-top:calc(22px - var(--portiva-pie-direct-hint-h));
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading + .pieWrap,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockSubtitle + .pieWrap,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle + .pieWrap{
    margin-top:0;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieWrap{
    display:contents;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegend{
    grid-area:legend;
    flex:none;
    width:100%;
    min-width:0;
    max-width:var(--portiva-pie-legend-max-w);
    max-height:var(--portiva-pie-chart-slot-h);
    justify-self:start;
    align-self:start;
    margin:22px clamp(96px,14vw,200px) 0 0;
    padding-right:4px;
    padding-top:2px;
    border-top:none;
    transform:translateX(clamp(-40px,-4vw,-72px));
    overflow-x:visible;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow--rollup > .pieLegendRollupRow,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupRow{
    min-width:0;
    width:100%;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupMeta{
    min-width:10rem;
    word-break:normal;
    overflow-wrap:normal;
    white-space:nowrap;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap{
    grid-area:chartpie;
    flex:none;
    width:100%;
    max-width:var(--portiva-pie-chart-max-w);
    justify-self:start;
    display:flex;
    justify-content:center;
    align-items:flex-start;
    align-self:start;
    padding:20px 4px 24px 12px;
    overflow:visible;
    margin:0;
    box-sizing:border-box;
    position:relative;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty{
    padding-top:14px;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty .home-asset-gallery__empty-stage{
    max-width:var(--portiva-pie-chart-max-w);
    padding:20px 4px 24px 12px;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty .home-asset-gallery__empty{
    inset:20px 12px 24px 4px;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty .home-asset-gallery__empty-stage--paused .home-asset-gallery__empty{
    inset:20px 12px 56px 4px;
  }
  .home-asset-gallery__paused-cta{
    bottom:24px;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieSvg{
    display:block;
    width:100%;
    max-width:360px;
    height:auto;
    margin:0 auto;
  }
  /* Donut center count (compensates for SVG coordinate space) */
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieDonutCenter--countOnly .pieDonutCenterLabel{
    font-size:38px;
    font-weight:750;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterLabel,
  .entity-page-pie-wrap .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterLabel{
    font-size:34px;
    font-weight:750;
    letter-spacing:.03em;
    fill:#ffffff;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterValue,
  .entity-page-pie-wrap .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterValue{
    font-size:30px;
    font-weight:650;
    letter-spacing:.02em;
    fill:rgba(255,255,255,.88);
  }

  .home-main .home-summary:not(.home-summary--compact):not(.home-summary--in-main),
  #view > main:not(.home-main) .home-summary:not(.home-summary--compact){
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
    align-items:stretch;
  }
  .home-main .home-summary:not(.home-summary--compact):not(.home-summary--in-main) .home-mini-row,
  #view > main:not(.home-main) .home-summary:not(.home-summary--compact) .home-mini-row{
    display:contents;
  }
  .home-main .home-summary:not(.home-summary--compact):not(.home-summary--in-main) .stat-card,
  #view > main:not(.home-main) .home-summary:not(.home-summary--compact) .stat-card{
    min-height:108px;
    height:100%;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
  }
  .home-main .home-summary:not(.home-summary--compact) .stat-card--total .stat-card-total-main--equity,
  #view > main:not(.home-main) .home-summary:not(.home-summary--compact) .stat-card--total .stat-card-total-main--equity{
    flex:1 1 auto;
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  .home-main .home-summary:not(.home-summary--compact) .stat-card--total .stat-card-total-value-row,
  #view > main:not(.home-main) .home-summary:not(.home-summary--compact) .stat-card--total .stat-card-total-value-row{
    flex:1 1 auto;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:8px;
    margin-top:6px;
  }
  .home-main .home-summary:not(.home-summary--compact) .stat-card--total .stat-card-total-fx,
  #view > main:not(.home-main) .home-summary:not(.home-summary--compact) .stat-card--total .stat-card-total-fx{
    align-items:flex-start;
    text-align:left;
    max-width:100%;
    padding-top:0;
  }
  .home-main .home-summary:not(.home-summary--compact) .stat-card--mini .value,
  #view > main:not(.home-main) .home-summary:not(.home-summary--compact) .stat-card--mini .value{
    font-size:clamp(1.05rem, 1.6vw, 1.35rem);
  }
  .home-main .home-summary:not(.home-summary--compact) .stat-card--total .value,
  #view > main:not(.home-main) .home-summary:not(.home-summary--compact) .stat-card--total .value{
    font-size:clamp(1.05rem, 1.6vw, 1.35rem);
  }
}
.stat-card--mini{
  padding:16px 16px 14px;
  min-width:0;
}
.stat-card--mini .label{
  font-size:.68rem;
}
.stat-card--mini .hint{
  font-size:.72rem;
  margin-top:6px;
}
.stat-card--mini .value{
  font-size:clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight:700;
  letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
}
.stat-card--mini-cur-breakdown{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  min-height:0;
}
.stat-card--mini-cur-breakdown:empty{
  display:none;
}
.stat-card--mini-cur-breakdown .stat-card-total-fx__line{
  text-align:left;
}

.stat-card-total-main--equity{
  width:100%;
  min-width:0;
}
.stat-card-total-value-row{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  gap:10px 16px;
  min-width:0;
  margin-top:4px;
}
.stat-card-total-value-row > .value{
  flex:1 1 auto;
  min-width:0;
  margin:0;
  line-height:1.05;
}
.stat-card-total-value-row .stat-card-total-fx{
  flex:0 1 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:2px;
  padding-top:0;
  max-width:min(48%, 200px);
  text-align:right;
}
.stat-card-total-fx:empty{
  display:none;
}
.stat-card-total-fx__line{
  display:block;
  font-size:.68rem;
  line-height:1.25;
  font-weight:500;
  font-variant-numeric:tabular-nums;
  font-family:var(--mono);
  color:var(--muted);
  opacity:.88;
  white-space:nowrap;
}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 14px;
}
.section-title h2{
  margin:0;
  font-size:1.05rem;
  font-weight:700;
  letter-spacing:-.01em;
}
.section-title--stack{
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:6px;
}
.home-folders-hint{
  margin:0;
  font-size:.82rem;
  color:var(--muted);
  line-height:1.45;
  font-weight:400;
}

.home-entity-share-chart{
  margin-top:18px;
}
.home-entity-share-note{
  margin:8px 0 0;
  font-size:.78rem;
  color:var(--muted);
  line-height:1.45;
  max-width:62ch;
}
.homeEntityShareRows{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}
.homeEntityShareRow{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(0,2fr) auto auto;
  gap:8px 12px;
  align-items:center;
}
.homeEntityShareLabel{
  font-size:.88rem;
  font-weight:600;
  color:var(--text);
  text-decoration:none;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.homeEntityShareLabel:hover{
  color:var(--accent);
  text-decoration:underline;
}
.homeEntityShareLabel--static{
  cursor:default;
  color:var(--muted);
}
.homeEntityShareBarTrack{
  height:10px;
  border-radius:999px;
  background:var(--surface-btn);
  border:1px solid var(--stroke);
  overflow:hidden;
  min-width:0;
}
.homeEntityShareBarFill{
  height:100%;
  border-radius:999px;
  min-width:2px;
  transition:width .2s ease;
}
.homeEntitySharePct{
  font-size:.78rem;
  font-variant-numeric:tabular-nums;
  color:var(--muted);
  text-align:right;
  white-space:nowrap;
}
.homeEntityShareAmt{
  font-size:.82rem;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  text-align:right;
  white-space:nowrap;
  color:var(--text);
}
@media (max-width:700px){
  .homeEntityShareRow{
    grid-template-columns:1fr;
    align-items:stretch;
    gap:6px;
  }
  .homeEntityShareBarTrack{
    order:2;
  }
  .homeEntitySharePct,
  .homeEntityShareAmt{
    text-align:left;
  }
  .homeEntityShareRow .homeEntitySharePct{ order:3; }
  .homeEntityShareRow .homeEntityShareAmt{ order:4; }
}

.pieSvg polyline.pieLeader.pieLeader--theme{
  fill:none;
  stroke:var(--muted,#64748b);
  stroke-opacity:0.95;
}

.home-folder-pie-wrap .pieChartBlockTitle + .pieWrap{
  margin-top:22px;
}
.home-folder-pie-wrap .pieChartBlock{
  margin-bottom:0;
  overflow:visible;
}
.home-folder-pie-wrap .pieWrap{
  display:flex;
  flex-direction:column;
  flex-wrap:nowrap;
  align-items:stretch;
  width:100%;
  max-width:min(560px,100%);
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}
.home-folder-pie-wrap .pieLegend{
  flex:none;
  align-self:stretch;
  min-width:0;
}
.home-folder-pie-wrap .pieChartSvgWrap{
  display:flex;
  justify-content:center;
  overflow:visible;
  padding:36px 0 44px;
  box-sizing:border-box;
}
.home-folder-pie-wrap .pieSvg{
  max-width:100%;
  height:auto;
  overflow:visible;
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieChartBlockTitle{
  font-size:.82rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieChartSvgWrap{
  position:relative;
  padding-top:18px;
  padding-bottom:28px;
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieSvg{
  filter:drop-shadow(0 20px 34px rgba(0,0,0,.2));
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieSvg path,
.home-folder-pie-wrap .home-overview-pie-dashboard .pieSvg circle:not(.pieDonutHole){
  stroke:var(--surface-card);
  stroke-linejoin:round;
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieDonutHole{
  filter:drop-shadow(0 0 18px rgba(15,23,42,.22));
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieDonutCenter{
  fill:var(--text);
  pointer-events:none;
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieDonutCenter--countOnly .pieDonutCenterLabel{
  font-size:24px;
  font-weight:800;
  letter-spacing:.04em;
  fill:var(--text);
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieLegend{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(260px,100%), 1fr));
  gap:10px;
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieLegendRow{
  margin:0;
  padding:11px 12px;
  border:1px solid var(--stroke);
  border-radius:16px;
  background:var(--surface-list);
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieLegendFolderLink,
.home-folder-pie-wrap .home-overview-pie-dashboard .pieLegendEntityLink{
  text-decoration:none;
}
.home-folder-pie-wrap .home-overview-pie-dashboard .pieLegendRow:hover{
  border-color:var(--stroke-hover);
  background:var(--surface-list-hover);
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieChartBlockTitle{
  font-size:.86rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--text);
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieChartSvgWrap{
  padding-top:30px;
  padding-bottom:36px;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieSvg{
  filter:
    drop-shadow(0 22px 36px rgba(0,0,0,.2))
    drop-shadow(0 0 18px rgba(34,211,238,.08));
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieSvg path,
.home-folder-pie-wrap .home-overview-pie-segmented .pieSvg circle:not(.pieDonutHole){
  stroke:var(--bg1);
  stroke-width:10px;
  stroke-linejoin:round;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieDonutHole{
  filter:drop-shadow(0 0 16px rgba(34,211,238,.12));
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieSliceLabel{
  font-weight:900;
  letter-spacing:.01em;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieSliceLabelPct,
.home-folder-pie-wrap .home-overview-pie-segmented .pieSliceLabelFoPct{
  font-weight:600;
  opacity:.9;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieSliceLabelFoPct{
  margin-top:0;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieSliceLabelEquity{
  font-weight:700;
  opacity:.92;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieLegend{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieLegendRow{
  margin:0;
  padding:8px 0;
  border-bottom:1px solid var(--stroke);
  background:transparent;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieLegendRow:last-child{
  border-bottom:0;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieLegendFolderLink,
.home-folder-pie-wrap .home-overview-pie-segmented .pieLegendEntityLink{
  text-decoration:none;
}
.home-folder-pie-wrap .home-overview-pie-segmented .pieLegendRow:hover{
  border-color:var(--stroke-hover);
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieChartBlockTitle{
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--muted);
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieWrap{
  max-width:min(680px,100%);
}
.detailsPieStack--overview-tabs{
  gap:0;
}
.detailsChartSection--overview-tabs{
  padding-top:12px;
}
/*
 * Portfolio routes (`body.portiva-route-app`): theme canvas
 * (`--portiva-canvas-bg`; Night = #000, Night gray = #050505).
 * Bubbles stay glass: .stat-card, .detailsChartSection, .topbar-overflow-panel, etc.
 */
body.portiva-route-app{
  --portiva-page-body-bg-saved:var(--bg0);
  background:var(--portiva-canvas-bg);
}
body.portiva-route-app .app-shell{
  background:transparent;
}
.home-overview-chart-tabs{
  display:flex;
  gap:8px;
  margin:0 0 10px;
  padding:4px;
  border:1px solid var(--stroke);
  border-radius:999px;
  background:var(--surface-btn);
}
.home-overview-chart-tab{
  appearance:none;
  flex:1 1 0;
  min-height:34px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#fff;
  font:inherit;
  font-size:.82rem;
  font-weight:700;
  cursor:pointer;
}
.home-overview-chart-tab.is-active{
  background:var(--surface-btn-hover);
  color:#fff;
  box-shadow:0 0 0 1px var(--stroke-hover);
}
.home-overview-chart-tab[data-home-pie-tab="folders"].is-active{
  background:hsl(214 72% 46%);
  border-color:hsl(214 60% 38%);
  color:#fff;
}
.home-overview-chart-tab[data-home-pie-tab="entities"].is-active{
  background:hsl(8 58% 52%);
  border-color:hsl(8 52% 42%);
  color:#fff;
}
.home-overview-chart-tab[data-home-pie-tab="assets"].is-active{
  background:hsl(272 62% 52%);
  border-color:hsl(272 52% 42%);
  color:#fff;
}
.home-overview-chart-tab[data-welcome-pie-tab="folders"].is-active{
  background:hsl(214 72% 46%);
  border-color:hsl(214 60% 38%);
  color:#fff;
}
.home-overview-chart-tab[data-welcome-pie-tab="entities"].is-active{
  background:hsl(8 58% 52%);
  border-color:hsl(8 52% 42%);
  color:#fff;
}
.home-overview-chart-tab[data-welcome-pie-tab="assets"].is-active{
  background:hsl(272 62% 52%);
  border-color:hsl(272 52% 42%);
  color:#fff;
}
.home-overview-chart-tabs--folder-name{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  pointer-events:none;
}
.home-overview-chart-tab.home-overview-chart-tab--folder-name,
.home-overview-chart-tab.home-overview-chart-tab--folder-name.is-active{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  min-height:34px;
  padding:0 10px 0 14px;
  box-sizing:border-box;
  border:0;
  border-radius:999px;
  background:hsl(214 72% 46%);
  border-color:hsl(214 60% 38%);
  color:#fff;
  font:inherit;
  font-size:.82rem;
  font-weight:700;
  line-height:1.2;
  text-align:center;
  cursor:default;
  pointer-events:none;
  box-shadow:none;
}
[data-theme="dawn"] .home-overview-chart-tab.home-overview-chart-tab--folder-name,
[data-theme="dawn"] .home-overview-chart-tab.home-overview-chart-tab--folder-name.is-active,
[data-theme="day"] .home-overview-chart-tab.home-overview-chart-tab--folder-name,
[data-theme="day"] .home-overview-chart-tab.home-overview-chart-tab--folder-name.is-active,
[data-theme="classic"] .home-overview-chart-tab.home-overview-chart-tab--folder-name,
[data-theme="classic"] .home-overview-chart-tab.home-overview-chart-tab--folder-name.is-active{
  background:hsl(214 72% 46%);
  color:#fff;
}
.home-overview-chart-tab.home-overview-chart-tab--entity-name,
.home-overview-chart-tab.home-overview-chart-tab--entity-name.is-active{
  background:hsl(8 58% 52%);
  border-color:hsl(8 52% 42%);
  color:#fff;
  pointer-events:auto;
  cursor:default;
}
[data-theme="dawn"] .home-overview-chart-tab.home-overview-chart-tab--entity-name,
[data-theme="dawn"] .home-overview-chart-tab.home-overview-chart-tab--entity-name.is-active,
[data-theme="day"] .home-overview-chart-tab.home-overview-chart-tab--entity-name,
[data-theme="day"] .home-overview-chart-tab.home-overview-chart-tab--entity-name.is-active,
[data-theme="classic"] .home-overview-chart-tab.home-overview-chart-tab--entity-name,
[data-theme="classic"] .home-overview-chart-tab.home-overview-chart-tab--entity-name.is-active{
  background:hsl(8 58% 52%);
  color:#fff;
}
.portiva-shared-graft-pill{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  padding:0 5px;
  border-radius:4px;
  background:hsl(220 6% 42%);
  color:#fff;
  font-size:.62rem;
  font-weight:600;
  line-height:1.35;
  white-space:nowrap;
  vertical-align:baseline;
}
.portiva-shared-graft-name{
  display:inline-flex;
  align-items:baseline;
  gap:.35em;
  min-width:0;
  max-width:100%;
}
.portiva-shared-graft-name__text{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.home-hier-tree-node__label .portiva-shared-graft-name{
  display:inline-flex;
  vertical-align:top;
  max-width:100%;
}
.pieLegendRollupName .portiva-shared-graft-pill{
  align-self:center;
  flex:0 0 auto;
}
.home-overview-chart-tab--folder-name__text{
  display:block;
  flex:1 1 auto;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:left;
  font-size:.96rem;
  line-height:1.1;
}
.home-overview-chart-tab--folder-name__text .portiva-shared-graft-name{
  display:inline-flex;
  vertical-align:top;
  max-width:100%;
}
.home-overview-chart-tab--entity-name__actions{
  flex:0 0 auto;
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  pointer-events:auto;
}
.entity-page .home-overview-chart-tab--entity-name__edit,
.entity-page .home-overview-chart-tab--entity-name__move{
  flex:0 0 auto;
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:0 10px;
  box-sizing:border-box;
  border:1px solid rgb(255 255 255 / 0.55);
  border-radius:999px;
  background:hsl(8 58% 52%);
  color:#fff;
  font:inherit;
  font-size:.74rem;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none;
  text-shadow:none;
  -webkit-tap-highlight-color:transparent;
}
.entity-page .home-overview-chart-tab--entity-name__edit:hover,
.entity-page .home-overview-chart-tab--entity-name__move:hover{
  background:hsl(8 58% 52%);
  color:#fff;
  border-color:rgb(255 255 255 / 0.72);
}
.entity-page .home-overview-chart-tab--entity-name__edit:focus-visible,
.entity-page .home-overview-chart-tab--entity-name__move:focus-visible{
  outline:2px solid rgb(255 255 255 / 0.65);
  outline-offset:1px;
}
[data-theme="dawn"] .entity-page .home-overview-chart-tab--entity-name__edit,
[data-theme="dawn"] .entity-page .home-overview-chart-tab--entity-name__move,
[data-theme="day"] .entity-page .home-overview-chart-tab--entity-name__edit,
[data-theme="day"] .entity-page .home-overview-chart-tab--entity-name__move,
[data-theme="classic"] .entity-page .home-overview-chart-tab--entity-name__edit,
[data-theme="classic"] .entity-page .home-overview-chart-tab--entity-name__move{
  background:hsl(8 58% 52%);
  color:#fff;
  border-color:rgb(255 255 255 / 0.55);
}
@media (min-width:901px){
  .entity-page .home-overview-chart-tab--entity-name__edit,
  .entity-page .home-overview-chart-tab--entity-name__move{
    font-size:.82rem;
    min-height:28px;
    padding:0 12px;
  }
}
.entity-page .home-overview-chart-tab--entity-name__share{
  flex:0 0 auto;
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:0 10px;
  box-sizing:border-box;
  border:1px solid rgb(255 255 255 / 0.55);
  border-radius:999px;
  background:hsl(82 26% 26%);
  color:#fff;
  font:inherit;
  font-size:.74rem;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none;
  text-shadow:none;
  -webkit-tap-highlight-color:transparent;
}
.entity-page .home-overview-chart-tab--entity-name__share:hover{
  background:hsl(82 26% 21%);
  color:#fff;
  border-color:rgb(255 255 255 / 0.72);
}
.entity-page .home-overview-chart-tab--entity-name__share:focus-visible{
  outline:2px solid rgb(255 255 255 / 0.65);
  outline-offset:1px;
}
[data-theme="dawn"] .entity-page .home-overview-chart-tab--entity-name__share,
[data-theme="day"] .entity-page .home-overview-chart-tab--entity-name__share,
[data-theme="classic"] .entity-page .home-overview-chart-tab--entity-name__share{
  background:hsl(82 26% 26%);
  color:#fff;
  border-color:rgb(255 255 255 / 0.55);
}
@media (min-width:901px){
  .entity-page .home-overview-chart-tab--entity-name__share{
    font-size:.82rem;
    min-height:28px;
    padding:0 12px;
  }
}
/* Asset browse page — purple name bar (desktop track matches folder/entity/home tabs). */
@media (min-width:901px){
  .asset-page{
    --asset-page-track-max-w:min(720px, calc(100% - 2rem));
  }
  .asset-page > .entityDetailsBubble.asset-page-name-bubble,
  .asset-page > #assetPhotoReadonlyMount,
  .asset-page > #assetReadonlyWrap{
    width:100%;
    max-width:var(--asset-page-track-max-w);
    margin-left:auto;
    margin-right:auto;
    box-sizing:border-box;
  }
}
.asset-page .entityDetailsBubble.asset-page-name-bubble{
  padding:14px 16px;
}
.asset-page .entityDetailsBubble.asset-page-name-bubble > .home-overview-chart-tabs--folder-name{
  width:100%;
  box-sizing:border-box;
}
/* Entity + asset browse: content bubbles — mobile uses surface-list; desktop lifts slightly. */
.entity-page,
.asset-page{
  --portiva-browse-bubble-bg:var(--surface-list);
}
.entity-page .entity-details-meta-mount .entityDetailsBubble,
.asset-page #assetReadonlyWrap .entityDetailsBubble,
.asset-page > .asset-photo-readonly-mount .asset-photo-panel,
.asset-page .entityDetailsBubble.asset-page-name-bubble{
  background:var(--portiva-browse-bubble-bg);
  border:1px solid var(--stroke);
  backdrop-filter:none;
  box-shadow:none;
}
@media (min-width:901px){
  .entity-page,
  .asset-page{
    --portiva-browse-bubble-bg:color-mix(in srgb, var(--glass) 58%, var(--surface-list));
  }
  [data-theme="dawn"] .entity-page,
  [data-theme="dawn"] .asset-page,
  [data-theme="day"] .entity-page,
  [data-theme="day"] .asset-page,
  [data-theme="classic"] .entity-page,
  [data-theme="classic"] .asset-page{
    --portiva-browse-bubble-bg:var(--surface-card);
  }
  .asset-page .entityDetailsBubble.asset-page-name-bubble{
    padding:var(--portiva-overview-chart-bubble-tabs-gap) 16px 14px;
    box-sizing:border-box;
    width:100%;
  }
}
@media (max-width:900px){
  .asset-page .entityDetailsBubble.asset-page-name-bubble{
    padding-top:6px;
  }
  .asset-page .entityDetailsBubble.asset-page-name-bubble > .home-overview-chart-tabs--folder-name{
    margin-bottom:4px;
  }
}
.asset-page .home-overview-chart-tabs--asset-name{
  pointer-events:none;
}
.asset-page .asset-page__add-asset-slot{
  pointer-events:none;
  cursor:default;
}
.asset-page .home-equity-action-stack .home-equity-add-entity-btn,
.asset-page .hero-title-row--home .home-equity-action-stack--hero-desktop .home-equity-add-entity-btn,
.asset-page .asset-page__add-asset-slot{
  border-color:#000;
}
.asset-page .home-equity-action-stack .home-equity-add-entity-btn:hover:not(:disabled),
.asset-page .hero-title-row--home .home-equity-action-stack--hero-desktop .home-equity-add-entity-btn:hover:not(:disabled),
.asset-page .asset-page__add-asset-slot:hover:not(:disabled){
  border-color:#000;
  background:transparent;
}
@media (max-width: 900px){
  #view > main.asset-page .home-summary--in-main{
    display:flex !important;
    flex-direction:column;
    gap:14px;
    margin-bottom:28px;
  }
  #view > main.asset-page .home-summary--in-main.home-summary--compact{
    display:grid !important;
    margin-bottom:10px;
  }
}
/* Purple pill: color only — size from shared .home-overview-chart-tab--folder-name (entity page). */
.asset-page .home-overview-chart-tab.home-overview-chart-tab--asset-name,
.asset-page .home-overview-chart-tab.home-overview-chart-tab--asset-name.is-active{
  background:hsl(272 62% 52%);
  border-color:hsl(272 52% 42%);
  color:#fff;
}
[data-theme="dawn"] .asset-page .home-overview-chart-tab.home-overview-chart-tab--asset-name,
[data-theme="dawn"] .asset-page .home-overview-chart-tab.home-overview-chart-tab--asset-name.is-active,
[data-theme="day"] .asset-page .home-overview-chart-tab.home-overview-chart-tab--asset-name,
[data-theme="day"] .asset-page .home-overview-chart-tab.home-overview-chart-tab--asset-name.is-active,
[data-theme="classic"] .asset-page .home-overview-chart-tab.home-overview-chart-tab--asset-name,
[data-theme="classic"] .asset-page .home-overview-chart-tab.home-overview-chart-tab--asset-name.is-active{
  background:hsl(272 62% 52%);
  color:#fff;
}
.asset-page .home-overview-chart-tab--asset-name__edit{
  flex:0 0 auto;
  margin-left:auto;
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:0 10px;
  box-sizing:border-box;
  border:1px solid rgb(255 255 255 / 0.55);
  border-radius:999px;
  background:hsl(272 62% 52%);
  color:#fff;
  font:inherit;
  font-size:.74rem;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none;
  text-shadow:none;
  -webkit-tap-highlight-color:transparent;
}
.asset-page .home-overview-chart-tab--asset-name__edit:hover{
  background:hsl(272 62% 52%);
  color:#fff;
  border-color:rgb(255 255 255 / 0.72);
}
.asset-page .home-overview-chart-tab--asset-name__edit:focus-visible{
  outline:2px solid rgb(255 255 255 / 0.65);
  outline-offset:1px;
}
[data-theme="dawn"] .asset-page .home-overview-chart-tab--asset-name__edit,
[data-theme="day"] .asset-page .home-overview-chart-tab--asset-name__edit,
[data-theme="classic"] .asset-page .home-overview-chart-tab--asset-name__edit{
  background:hsl(272 62% 52%);
  color:#fff;
  border-color:rgb(255 255 255 / 0.55);
}
@media (min-width:901px){
  .asset-page .home-overview-chart-tab--asset-name__edit{
    font-size:.82rem;
    min-height:28px;
    padding:0 12px;
  }
}
.home-overview-chart-tab--folder-name__rename{
  flex:0 0 auto;
  margin-left:auto;
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:0 10px;
  box-sizing:border-box;
  border:1px solid rgb(255 255 255 / 0.55);
  border-radius:999px;
  background:hsl(214 72% 46%);
  color:#fff;
  font:inherit;
  font-size:.74rem;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none;
  text-shadow:none;
  -webkit-tap-highlight-color:transparent;
}
.home-overview-chart-tab--folder-name__rename:hover{
  background:hsl(214 72% 42%);
  color:#fff;
  border-color:rgb(255 255 255 / 0.72);
}
.home-overview-chart-tab--folder-name__rename:focus-visible{
  outline:2px solid rgb(255 255 255 / 0.65);
  outline-offset:1px;
}
[data-theme="dawn"] .home-overview-chart-tab--folder-name__rename,
[data-theme="day"] .home-overview-chart-tab--folder-name__rename,
[data-theme="classic"] .home-overview-chart-tab--folder-name__rename{
  background:hsl(214 72% 46%);
  color:#fff;
  border-color:rgb(255 255 255 / 0.55);
}
@media (min-width:901px){
  .home-overview-chart-tab--folder-name__rename{
    font-size:.82rem;
    min-height:28px;
    padding:0 12px;
  }
}
@media (min-width:901px){
  .home-overview-chart-tab{
    font-size:.94rem;
    min-height:38px;
  }
  .home-overview-chart-tab--folder-name{
    font-size:.94rem;
    min-height:38px;
  }
  .home-overview-chart-tab--folder-name__text{
    font-size:1.04rem;
  }
}
.home-overview-chart-pane--entities .pieDonutCenter--countOnly .pieDonutCenterLabel{
  fill:hsl(8 70% 68%);
}
.home-folder-pie-wrap .home-overview-chart-pane .pieDonutCenter--countOnly .pieDonutCenterLabel,
.home-folder-pie-wrap .home-overview-pie-analyst .pieDonutCenter--countOnly .pieDonutCenterLabel{
  fill:#ffffff;
}
.home-overview-chart-pane{
  min-width:0;
}
@media (max-width:900px){
  .topbar__home-summary-slot{
    display:none;
  }
  body.portiva-route-app .home-summary--in-main .stat-card--mini{
    background:color-mix(in srgb, var(--glass) 88%, var(--bg0));
    border:1px solid var(--stroke);
    backdrop-filter:blur(16px);
    box-shadow:var(--shadow);
  }
  /* Mobile (all pages): beneficial equity headline — no bubble; Debt/Value keep bubbles */
  #view > main .home-summary--in-main .stat-card--total,
  .home-main .home-summary--in-main .stat-card--total{
    min-height:0;
    padding:4px 0 10px;
    border:none;
    border-radius:0;
    background:transparent;
    backdrop-filter:none;
    box-shadow:none;
  }
  body.portiva-route-app #view > main .home-summary--in-main .stat-card--total,
  body.portiva-route-app .home-main .home-summary--in-main .stat-card--total{
    background:transparent;
    border:none;
    backdrop-filter:none;
    box-shadow:none;
  }
  #view > main .home-summary--in-main .home-equity-split,
  .home-main .home-summary--in-main .home-equity-split{
    display:flex;
    flex-direction:row;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px 14px;
  }
  #view > main .home-summary--in-main .home-equity-split__left,
  .home-main .home-summary--in-main .home-equity-split__left{
    flex:1 1 auto;
    min-width:0;
    transform:translateY(-4px);
  }
  #view > main .home-summary--in-main .home-equity-split__left .label,
  .home-main .home-summary--in-main .home-equity-split__left .label{
    margin-bottom:4px;
  }
  #view > main .home-summary--in-main .home-equity-split__left .stat-card-label-row,
  .home-main .home-summary--in-main .home-equity-split__left .stat-card-label-row{
    overflow:visible;
  }
  #view > main .home-summary--in-main .home-equity-split__right,
  .home-main .home-summary--in-main .home-equity-split__right{
    flex:0 0 auto;
    margin-top:14px;
  }
  #view > main .home-summary--in-main .home-equity-action-stack .home-equity-add-entity-btn,
  .home-main .home-summary--in-main .home-equity-action-stack .home-equity-add-entity-btn{
    white-space:nowrap;
    padding:7px 12px;
    font-size:.8rem;
    min-height:36px;
  }
  #view > main.folder-page .home-summary--in-main .home-equity-action-stack .home-equity-add-entity-btn,
  #view > main.entity-page .home-summary--in-main .home-equity-action-stack .home-equity-add-entity-btn,
  #view > main.asset-page .home-summary--in-main .home-equity-action-stack .home-equity-add-entity-btn,
  #view > main.asset-page .home-summary--in-main .home-equity-action-stack .asset-page__add-asset-slot,
  #view > main.home-main .home-summary--in-main .home-equity-action-stack .home-equity-add-entity-btn,
  .home-main .home-summary--in-main .home-equity-action-stack .home-equity-add-entity-btn{
    min-width:6.875rem;
    width:6.875rem;
    max-width:6.875rem;
    box-sizing:border-box;
    text-align:center;
  }
  /* Mobile English: keep spot-label slot height when main === secondary (label hidden) */
  html[dir="ltr"].portiva-locale-en #view > main.home-main .home-summary--in-main .home-equity-action-stack .home-equity-spot-label,
  html[dir="ltr"].portiva-locale-en #view > main.home-main .home-summary--in-main .home-equity-action-stack .home-usd-spot-rate,
  html[dir="ltr"].portiva-locale-en .home-main .home-summary--in-main .home-equity-action-stack .home-equity-spot-label,
  html[dir="ltr"].portiva-locale-en .home-main .home-summary--in-main .home-equity-action-stack .home-usd-spot-rate{
    min-height:calc(max(11px, 0.7rem) * 1.15);
  }
  html[dir="ltr"].portiva-locale-en #view > main.home-main .home-summary--in-main .home-equity-action-stack .home-equity-spot-label[hidden],
  html[dir="ltr"].portiva-locale-en #view > main.home-main .home-summary--in-main .home-equity-action-stack .home-usd-spot-rate[hidden],
  html[dir="ltr"].portiva-locale-en .home-main .home-summary--in-main .home-equity-action-stack .home-equity-spot-label[hidden],
  html[dir="ltr"].portiva-locale-en .home-main .home-summary--in-main .home-equity-action-stack .home-usd-spot-rate[hidden]{
    display:block;
    visibility:hidden;
  }
  /* Mobile English + matching currencies: home-only 1px nudge below $1 spot label */
  html[dir="ltr"].portiva-locale-en.portiva-spot-same-currency #view > main.home-main .home-summary--in-main .home-equity-split__left .label,
  html[dir="ltr"].portiva-locale-en.portiva-spot-same-currency #view > main.home-main .home-summary--in-main .home-equity-split__left .value,
  html[dir="ltr"].portiva-locale-en.portiva-spot-same-currency .home-main .home-summary--in-main .home-equity-split__left .label,
  html[dir="ltr"].portiva-locale-en.portiva-spot-same-currency .home-main .home-summary--in-main .home-equity-split__left .value,
  html[dir="ltr"].portiva-locale-en.portiva-spot-same-currency #view > main.home-main .home-summary--in-main .home-mini-row,
  html[dir="ltr"].portiva-locale-en.portiva-spot-same-currency #view > main.home-main .home-summary--in-main ~ *{
    transform:translateY(-1px);
  }
  #view > main .home-summary--in-main .stat-card--total .value,
  .home-main .home-summary--in-main .stat-card--total .value,
  #view > main .home-summary--in-main .stat-card--total .home-hero-equity__amount,
  .home-main .home-summary--in-main .stat-card--total .home-hero-equity__amount{
    letter-spacing:-.03em;
    line-height:1.05;
  }
  #view > main .home-summary--in-main.home-summary--compact .stat-card--total,
  .home-main .home-summary--in-main.home-summary--compact .stat-card--total{
    padding:4px 0 6px;
  }
  #view > main.home-main > .home-summary.home-summary--in-main .stat-card--total,
  #view > main.home-main > .home-summary.home-summary--in-main.home-summary--compact .stat-card--total{
    padding-top:0;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieDonutCenter--countOnly .pieDonutCenterLabel,
  .home-folder-pie-wrap .home-overview-pie-analyst .pieDonutCenter--countOnly .pieDonutCenterLabel,
  .detailsChartSection .home-overview-pie-analyst .pieDonutCenter--countOnly .pieDonutCenterLabel{
    font-size:30px;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterLabel,
  .home-folder-pie-wrap .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterLabel,
  .detailsChartSection .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterLabel,
  .entity-page-pie-wrap .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterLabel{
    font-size:28px;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterValue,
  .home-folder-pie-wrap .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterValue,
  .detailsChartSection .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterValue,
  .entity-page-pie-wrap .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterValue{
    font-size:24px;
  }
  .portiva-overview-pie-layout{
    display:block;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty{
    padding-top:24px;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery--empty .home-asset-gallery__empty-stage{
    max-width:min(680px,100%);
    padding:28px 0 48px;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst.pieChartBlock{
    display:block;
    max-width:100%;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieWrap{
    display:flex;
    flex-direction:column;
    max-width:min(680px,100%);
    margin-left:auto;
    margin-right:auto;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle{
    max-width:none;
    padding:0;
    margin:0 0 4px;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading{
    display:block;
    margin-bottom:0;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading--withActions{
    display:flex;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading .pieChartBlockTitle{
    margin:0;
    padding:0;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst > .pieChartBlockSubtitle{
    margin:0 0 8px;
    padding:0;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading + .pieWrap,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockSubtitle + .pieWrap,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle + .pieWrap{
    margin-top:4px;
  }
  #home-folder-pie-mount .detailsChartSection--overview-tabs,
  #folder-entity-pie-mount .detailsChartSection--overview-tabs,
  #entityInlineChartsMount .detailsChartSection--overview-tabs{
    padding-top:6px;
  }
  #home-folder-pie-mount .home-overview-chart-tabs,
  #folder-entity-pie-mount .home-overview-chart-tabs,
  #entityInlineChartsMount .home-overview-chart-tabs,
  #entityInlineChartsMount .home-overview-chart-tabs--folder-name{
    margin-bottom:4px;
  }
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap{
    padding-top:28px;
    padding-bottom:48px;
  }
  .home-asset-tab-pane,
  .home-asset-tab-pane__pie{
    display:block;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-tab-pane{
    display:block;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-tab-pane__pie{
    display:none !important;
  }
  .home-asset-gallery{
    grid-column:auto;
    grid-row:auto;
    max-width:100%;
    width:100%;
    margin:0;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery{
    box-sizing:border-box;
    width:calc(100% + 32px);
    max-width:calc(100% + 32px);
    margin-inline:-16px;
    padding-inline:2px;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery__grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    width:100%;
    padding:4px 0 12px;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery__cell{
    width:100%;
  }
  .home-overview-chart-pane--asset-gallery-open .home-asset-gallery__img{
    object-fit:cover;
    border-radius:8px;
  }
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieChartSvgWrap{
  padding-top:18px;
  padding-bottom:22px;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieSvg{
  filter:drop-shadow(0 18px 34px rgba(0,0,0,.16));
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieSvg path,
.home-folder-pie-wrap .home-overview-pie-analyst .pieSvg circle:not(.pieDonutHole){
  stroke:#000;
  stroke-width:1.5px;
  stroke-linejoin:round;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieDonutHole{
  filter:drop-shadow(0 0 12px rgba(15,23,42,.14));
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieDonutCenter{
  fill:var(--text);
  pointer-events:none;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieDonutCenter--countOnly .pieDonutCenterLabel{
  font-size:38px;
  font-weight:750;
  letter-spacing:.04em;
  fill:#ffffff;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterLabel{
  font-size:34px;
  font-weight:750;
  letter-spacing:.03em;
  fill:#ffffff;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterValue{
  font-size:30px;
  font-weight:650;
  letter-spacing:.02em;
  fill:rgba(255,255,255,.88);
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieSliceLabel{
  font-weight:600;
  letter-spacing:.01em;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieSliceLabelPct,
.home-folder-pie-wrap .home-overview-pie-analyst .pieSliceLabelFoPct{
  font-weight:500;
  opacity:.88;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieSliceLabelFoPct{
  margin-top:0;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieLegend{
  display:flex;
  flex-direction:column;
  gap:0;
  border-top:1px solid var(--stroke);
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieLegendRow{
  margin:0;
  padding:10px 2px;
  border-bottom:1px solid var(--stroke);
  background:transparent;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieLegendRollupRow{
  gap:14px;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieLegendRollupMeta{
  font-weight:600;
  color:var(--text);
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieLegendRollupEq{
  color:var(--muted);
  font-weight:650;
  font-variant-numeric:tabular-nums;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieSwatch{
  width:9px;
  height:9px;
  border-radius:999px;
  box-shadow:0 0 0 3px color-mix(in srgb, currentColor 8%, transparent);
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieLegendFolderLink,
.home-folder-pie-wrap .home-overview-pie-analyst .pieLegendEntityLink{
  text-decoration:none;
}
.home-folder-pie-wrap .home-overview-pie-analyst .pieLegendRow:hover{
  background:color-mix(in srgb, var(--surface-list-hover) 45%, transparent);
}
.detailsChartSection .home-overview-pie-analyst .pieChartBlockTitle{
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.16em;
  color:var(--muted);
}
.pieChartBlockHeading .pieChartBlockTitleHint,
.detailsChartSection .home-overview-pie-analyst .pieChartBlockHeading .pieChartBlockTitleHint,
.entity-page-pie-wrap .pieChartBlockHeading .pieChartBlockTitleHint{
  margin:2px 0 0;
  font-size:.68rem;
  font-weight:500;
  line-height:1.35;
  letter-spacing:.01em;
  color:var(--muted);
}
/* Direct-assets hint: under title in heading slot; legend margin absorbs height on desktop */
.portiva-overview-pie-layout--directHint{
  --portiva-pie-direct-hint-h:calc(.68rem * 1.35 + 2px);
}
.detailsChartSection .home-overview-pie-analyst .pieChartBlockSubtitle,
.entity-page-pie-wrap .pieChartBlockSubtitle,
.home-folder-pie-wrap .pieChartBlockSubtitle{
  margin:-4px 0 10px;
  font-size:.68rem;
  font-weight:500;
  line-height:1.35;
  letter-spacing:.01em;
  color:var(--muted);
}
.detailsChartSection .home-overview-pie-analyst .pieWrap{
  max-width:min(680px,100%);
}
.detailsChartSection .home-overview-pie-analyst .pieChartSvgWrap{
  padding-top:18px;
  padding-bottom:22px;
}
.detailsChartSection .home-overview-pie-analyst .pieSvg{
  filter:drop-shadow(0 18px 34px rgba(0,0,0,.16));
}
.detailsChartSection .home-overview-pie-analyst .pieSvg path,
.detailsChartSection .home-overview-pie-analyst .pieSvg circle:not(.pieDonutHole){
  stroke:#000;
  stroke-width:1.5px;
  stroke-linejoin:round;
}
.detailsChartSection .home-overview-pie-analyst .pieDonutHole{
  fill:#050505;
  filter:drop-shadow(0 0 12px rgba(15,23,42,.14));
}
.detailsChartSection .home-overview-pie-analyst .pieDonutCenter{
  fill:var(--text);
  pointer-events:none;
}
.detailsChartSection .home-overview-pie-analyst .pieDonutCenter--countOnly .pieDonutCenterLabel{
  font-size:38px;
  font-weight:750;
  letter-spacing:.04em;
  fill:#ffffff;
}
.detailsChartSection .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterLabel{
  font-size:34px;
  font-weight:750;
  letter-spacing:.03em;
  fill:#ffffff;
}
.detailsChartSection .home-overview-pie-analyst .pieDonutCenter:not(.pieDonutCenter--countOnly) .pieDonutCenterValue{
  font-size:30px;
  font-weight:650;
  letter-spacing:.02em;
  fill:rgba(255,255,255,.88);
}
.detailsChartSection .home-overview-pie-analyst .pieSliceLabel{
  font-weight:600;
  letter-spacing:.01em;
}
.detailsChartSection .home-overview-pie-analyst .pieLegend{
  display:flex;
  flex-direction:column;
  gap:0;
  border-top:1px solid var(--stroke);
}
.detailsChartSection .home-overview-pie-analyst .pieLegendRow{
  margin:0;
  padding:10px 2px;
  border-bottom:1px solid var(--stroke);
  background:transparent;
}
.detailsChartSection .home-overview-pie-analyst .pieLegendRollupRow{
  gap:14px;
}
.detailsChartSection .home-overview-pie-analyst .pieLegendRollupMeta{
  font-weight:600;
  color:var(--text);
}
.detailsChartSection .home-overview-pie-analyst .pieLegendRollupEq{
  color:var(--muted);
  font-weight:650;
  font-variant-numeric:tabular-nums;
}
.detailsChartSection .home-overview-pie-analyst .pieSwatch{
  width:9px;
  height:9px;
  box-shadow:0 0 0 3px color-mix(in srgb, currentColor 8%, transparent);
}
.detailsChartSection .home-overview-pie-analyst .pieLegendFolderLink,
.detailsChartSection .home-overview-pie-analyst .pieLegendEntityLink{
  text-decoration:none;
}
.detailsChartSection .home-overview-pie-analyst .pieLegendRow:hover{
  background:color-mix(in srgb, var(--surface-list-hover) 45%, transparent);
}
/* Zero row padding only when the link carries it — unlinked asset rows keep
   the same 10px row padding as entity/folder legend lines. */
.detailsChartSection .home-overview-pie-analyst .pieLegendRow--asset:has(> .pieLegendAssetLink){
  margin:0;
  padding:0;
  border-bottom:1px solid var(--stroke);
  background:transparent;
}
.detailsChartSection .home-overview-pie-analyst .pieLegendRow--asset > .pieLegendAssetLink{
  display:block;
  width:100%;
  padding:10px 2px;
  text-decoration:none;
  color:inherit;
}
.detailsChartSection .home-overview-pie-analyst .pieLegendRow--asset:hover{
  background:color-mix(in srgb, var(--surface-list-hover) 45%, transparent);
}
.detailsChartSection .home-overview-pie-analyst .pieLegendAssetText{
  font-weight:600;
  color:var(--text);
  white-space:normal;
  word-break:break-word;
}
/* Asset overview pies: legend swatches match entity (rect, not round). */
.home-overview-pie-analyst .pieLegendRow--asset .pieLegendRowMain > .pieSwatch{
  width:12px;
  height:12px;
  min-width:12px;
  min-height:12px;
  border-radius:3px;
  box-shadow:none;
}
/* Entity overview pies (home Entities tab + folder page): legend matches Assets tab. */
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupMeta,
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupEq,
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendEntityLink{
  line-height:1.35;
}
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupMeta,
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupEq{
  font-weight:600;
  color:var(--text);
  white-space:normal;
  word-break:break-word;
}
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupMeta{
  overflow-wrap:anywhere;
}
/* Row height between dividers — mirror .pieLegendRow--asset (padding on link, not row). */
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRow--rollup:has(.pieLegendEntityLink){
  margin:0;
  padding:0;
  border-bottom:1px solid var(--stroke);
  background:transparent;
}
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendEntityLink{
  display:block;
  width:100%;
  margin:0;
  padding:10px 2px;
  text-decoration:none;
  color:inherit;
  box-sizing:border-box;
  border-radius:0;
}
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendEntityLink:hover{
  background:transparent;
}
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRow--rollup:has(.pieLegendEntityLink):hover{
  background:color-mix(in srgb, var(--surface-list-hover) 45%, transparent);
}
.home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupRow{
  align-items:center;
  gap:14px;
}
/* Asset overview pies: same legend layout as entity (details left, values right). */
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupMeta,
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupEq,
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendAssetLink{
  line-height:1.35;
}
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupMeta,
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupEq{
  font-weight:600;
  color:var(--text);
  white-space:normal;
  word-break:break-word;
}
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupMeta{
  overflow-wrap:anywhere;
}
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRow--rollup:has(.pieLegendAssetLink){
  margin:0;
  padding:0;
  border-bottom:1px solid var(--stroke);
  background:transparent;
}
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendAssetLink{
  display:block;
  width:100%;
  margin:0;
  padding:10px 2px;
  text-decoration:none;
  color:inherit;
  box-sizing:border-box;
  border-radius:0;
}
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendAssetLink:hover{
  background:transparent;
}
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRow--rollup:has(.pieLegendAssetLink):hover{
  background:color-mix(in srgb, var(--surface-list-hover) 45%, transparent);
}
.home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupRow{
  align-items:center;
  gap:14px;
}
.pieOtherAssetList .pieLegendRollupRow{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:100%;
  min-width:0;
}
.pieOtherAssetList .pieLegendRollupMeta{
  flex:1 1 0%;
  min-width:0;
}
.pieOtherAssetList .pieLegendRollupEq{
  flex:0 0 auto;
  margin-left:auto;
  text-align:right;
  font-variant-numeric:tabular-nums;
  font-weight:600;
}
@media (max-width:900px){
  .home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupMeta,
  .home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupEq,
  .home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendEntityLink,
  .home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupMeta,
  .home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupEq,
  .home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendAssetLink{
    font-size:.98rem;
  }
}
@media (min-width:901px){
  /* Desktop-only: larger legend text on every pie (home, folder, entity, asset). */
  .pieLegend,
  .pieOtherAssetList,
  .pieOtherAssetText,
  .pieLegendRollupMeta,
  .pieLegendRollupEq,
  .pieLegendMerged,
  .pieLegendMerged > span,
  .pieLegendEntityLink,
  .pieLegendFolderLink,
  .pieLegendAssetLink,
  .pieLegendAssetText,
  .home-overview-pie-analyst .pieLegendRollupMeta,
  .home-overview-pie-analyst .pieLegendRollupEq,
  .home-overview-pie-analyst .pieLegendAssetText,
  .home-overview-pie-analyst .pieLegendFolderLink,
  .home-overview-pie-analyst .pieLegendEntityLink,
  .home-overview-pie-analyst .pieLegendAssetLink,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupMeta,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupEq,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendFolderLink,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendEntityLink,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendAssetText,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendAssetLink,
  .home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupMeta,
  .home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendRollupEq,
  .home-overview-chart-pane--entities .home-overview-pie-analyst .pieLegendEntityLink,
  .home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupMeta,
  .home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendRollupEq,
  .home-overview-chart-pane--assets .home-overview-pie-analyst .pieLegendAssetLink,
  .home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupMeta,
  .home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupEq,
  .home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendFolderLink,
  .home-folder-pie-wrap .home-overview-pie-analyst .pieLegendRollupMeta,
  .home-folder-pie-wrap .home-overview-pie-analyst .pieLegendRollupEq,
  .home-folder-pie-wrap .home-overview-pie-analyst .pieLegendFolderLink,
  .home-folder-pie-wrap .home-overview-pie-analyst .pieLegendEntityLink,
  .home-folder-pie-wrap .home-overview-pie-analyst .pieLegendAssetText,
  .detailsChartSection .pieLegend,
  .detailsChartSection .home-overview-pie-analyst .pieLegendRollupMeta,
  .detailsChartSection .home-overview-pie-analyst .pieLegendRollupEq,
  .detailsChartSection .home-overview-pie-analyst .pieLegendFolderLink,
  .detailsChartSection .home-overview-pie-analyst .pieLegendEntityLink,
  .detailsChartSection .home-overview-pie-analyst .pieLegendAssetText,
  .home-folder-pie-wrap .pieLegend,
  .detailsChartSection--asset .details-asset-pie--legend-wrap .pieLegendAssetText,
  .detailsChartSection--asset .details-asset-pie--legend-wrap .pieLegendAssetLink,
  .pieOtherAssetList .pieLegendAssetLink,
  .pieOtherAssetList .pieOtherAssetLink{
    font-size:1.3125rem;
    line-height:1.35;
  }
  .home-overview-pie-analyst .pieLegendRowMain > .pieSwatch,
  .home-overview-pie-analyst .pieLegendRollupRow .pieLegendRowMain > .pieSwatch{
    width:12px;
    height:12px;
    min-width:12px;
    min-height:12px;
    border-radius:3px;
    box-shadow:none;
  }
  /* Wider legend column — keep row labels on one line (desktop pies only). */
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupMeta,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupEq,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendAssetText,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendMerged > span,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieOtherAssetLink,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieOtherAssetText{
    white-space:nowrap;
  }
  /* Desktop-only: pie headings (Equity by folder / entity / assets). */
  .home-folder-pie-wrap .home-overview-pie-analyst .pieChartBlockTitle,
  .detailsChartSection .home-overview-pie-analyst .pieChartBlockTitle,
  .detailsChartSection .pieChartBlockTitle,
  .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle,
  .home-folder-pie-fallback__title{
    font-size:1.125rem;
    line-height:1.3;
  }
}
/* Folder overview pies (home Folders tab): legend matches Assets tab. */
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupMeta,
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupEq,
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendFolderLink{
  line-height:1.35;
}
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupMeta,
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupEq{
  font-weight:600;
  color:var(--text);
  white-space:normal;
  word-break:break-word;
}
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupMeta{
  overflow-wrap:anywhere;
}
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRow--rollup:has(.pieLegendFolderLink){
  margin:0;
  padding:0;
  border-bottom:1px solid var(--stroke);
  background:transparent;
}
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendFolderLink{
  display:block;
  width:100%;
  margin:0;
  padding:10px 2px;
  text-decoration:none;
  color:inherit;
  box-sizing:border-box;
  border-radius:0;
}
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendFolderLink:hover{
  background:transparent;
}
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRow--rollup:has(.pieLegendFolderLink):hover{
  background:color-mix(in srgb, var(--surface-list-hover) 45%, transparent);
}
.home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupRow{
  align-items:center;
  gap:14px;
}
@media (max-width:900px){
  .home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupMeta,
  .home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendRollupEq,
  .home-overview-chart-pane--folders .home-overview-pie-analyst .pieLegendFolderLink{
    font-size:.98rem;
  }
}
.detailsChartSection .home-overview-pie-analyst .folderHeader{
  margin:10px 0 4px;
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted);
}
.home-folder-pie-wrap{
  overflow:visible;
}
.home-folder-pie-stage{
  position:relative;
  width:100%;
}
.home-folder-pie-mount{
  width:100%;
  min-width:0;
}
.home-folder-pie-wrap .portiva-overview-pie-layout .pieChartSvgWrap,
.folder-page-pie-wrap .portiva-overview-pie-layout .pieChartSvgWrap,
.entity-page-pie-wrap .portiva-overview-pie-layout .pieChartSvgWrap{
  position:relative;
}
.home-folder-pie-wrap .pieChartSvgWrap > .home-pie-map-overlay,
.folder-page-pie-wrap .pieChartSvgWrap > .home-pie-map-overlay,
.entity-page-pie-wrap .pieChartSvgWrap > .home-pie-map-overlay{
  position:absolute;
  right:0;
  bottom:5px;
  z-index:4;
  margin:0;
}
.home-folder-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > .home-pie-map-overlay,
.folder-page-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > .home-pie-map-overlay,
.entity-page-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > .home-pie-map-overlay{
  grid-area:chart;
  justify-self:end;
  align-self:end;
  z-index:4;
  margin:0 2px 11px 0;
}
.home-folder-pie-stage > .home-pie-map-overlay,
.folder-page-pie-stage > .home-pie-map-overlay,
.entity-page-pie-stage > .home-pie-map-overlay{
  position:absolute;
  right:clamp(4px, 2vw, 16px);
  bottom:clamp(40px, 8vw, 96px);
  z-index:4;
  margin:0;
}
/* Full Map bottom-left of the pie chart; Map/Pie toggle stays bottom-right */
.home-folder-pie-wrap .pieChartSvgWrap > #btnHomeShortcutMap.home-pie-map-overlay,
.home-folder-pie-wrap .pieChartSvgWrap > #btnHomeShortcutMap.home-pie-map-overlay--in-chart,
.folder-page-pie-wrap .pieChartSvgWrap > #btnFolderPageFullMap.home-pie-map-overlay,
.folder-page-pie-wrap .pieChartSvgWrap > #btnFolderPageFullMap.home-pie-map-overlay--in-chart,
.entity-page-pie-wrap .pieChartSvgWrap > #btnEntityPageFullMap.home-pie-map-overlay,
.entity-page-pie-wrap .pieChartSvgWrap > #btnEntityPageFullMap.home-pie-map-overlay--in-chart{
  right:auto;
  left:0;
}
.home-folder-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > #btnHomeShortcutMap.home-pie-map-overlay,
.home-folder-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > #btnHomeShortcutMap.home-pie-map-overlay--in-pane,
.folder-page-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > #btnFolderPageFullMap.home-pie-map-overlay,
.folder-page-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > #btnFolderPageFullMap.home-pie-map-overlay--in-pane,
.entity-page-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > #btnEntityPageFullMap.home-pie-map-overlay,
.entity-page-pie-wrap .home-overview-chart-pane.portiva-overview-pie-layout > #btnEntityPageFullMap.home-pie-map-overlay--in-pane{
  justify-self:start;
  align-self:end;
  margin:0 0 11px 2px;
}
.home-folder-pie-wrap .detailsPieStack{
  gap:40px;
}
@media (max-width:900px){
  .home-summary.home-summary--compact{
    grid-template-columns:1fr;
    gap:8px;
    margin-bottom:8px;
  }
  #view > main .home-summary.home-summary--compact{
    grid-template-columns:1fr;
    gap:8px;
    margin-bottom:8px;
  }
  .home-summary--compact .home-mini-row{
    grid-template-columns:1fr 1fr;
  }
  .home-summary--compact .stat-card{
    min-width:0;
  }
  .home-summary--compact .stat-card .label{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .home-summary--compact .stat-card .label.stat-card-label-row{
    display:flex;
    flex-direction:row;
    align-items:baseline;
    justify-content:flex-start;
    gap:6px;
    overflow:visible;
    white-space:normal;
  }
  .home-summary--compact .stat-card-label-row__title{
    flex:0 1 auto;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .home-summary--compact .stat-card-label-row__fx:empty{
    display:none;
  }
  .home-summary--compact:not(.home-summary--equity-fx-expanded) .stat-card-label-row__fx{
    display:none;
  }
  .home-summary--compact.home-summary--equity-fx-expanded .stat-card-label-row__fx:not(:empty){
    flex:0 0 auto;
    margin-inline-start:auto;
    font-size:.56rem;
    line-height:1.2;
    font-weight:500;
    color:var(--muted);
    white-space:nowrap;
    text-align:end;
    direction:ltr;
    unicode-bidi:isolate;
    font-variant-numeric:normal;
    letter-spacing:0;
  }
  .home-summary--compact.home-summary--equity-fx-expanded .stat-card-total-fx:not(:empty),
  .home-summary--compact.home-summary--equity-fx-expanded .stat-card--mini-cur-breakdown:not(:empty){
    display:none !important;
  }
  .detailsPieStack{
    gap:88px;
  }
  .home-folder-pie-wrap .detailsPieStack{
    gap:48px;
  }
  .home-folder-pie-wrap .detailsPieStack--overview-tabs{
    gap:0;
  }
  .pieLegend{
    min-width:0;
  }
  .home-folder-pie-wrap .pieLegend{
    font-size:.98rem;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
  .home-folder-pie-wrap .pieLegendRow--folderLink,
  .home-folder-pie-wrap .pieLegendRow:has(.pieLegendRollupRow){
    min-width:0;
  }
  .home-folder-pie-wrap .pieLegendFolderLink,
  .home-folder-pie-wrap .pieLegendEntityLink{
    min-width:0;
  }
  .detailsChartSection .pieLegend{
    min-width:0;
    font-size:.98rem;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
  .detailsChartSection .pieLegendRow--folderLink,
  .detailsChartSection .pieLegendRow:has(.pieLegendRollupRow){
    min-width:0;
  }
  .detailsChartSection .pieLegendFolderLink,
  .detailsChartSection .pieLegendEntityLink{
    min-width:0;
  }
  /* Tight title → pie on narrow screens (home + entity details charts). */
  .home-folder-pie-wrap .pieChartBlockTitle + .pieWrap{
    margin-top:8px;
  }
  .home-folder-pie-wrap .pieChartSvgWrap{
    padding-top:12px;
    padding-bottom:40px;
  }
  .detailsChartSection .pieChartBlockTitle + .pieWrap{
    margin-top:8px;
  }
  .detailsChartSection .pieChartSvgWrap{
    padding-top:12px;
    padding-bottom:40px;
  }
}
.home-folder-pie-loading{
  margin:0;
  padding:16px 14px;
  border-radius:var(--radius-sm);
  border:1px dashed var(--stroke);
  color:var(--muted);
  font-size:.88rem;
}
.home-folder-pie-wrap .detailsChartSection > .home-folder-pie-loading{
  margin:0;
  padding:0;
  border:none;
  background:transparent;
}
.home-folder-pie-fallback__title{
  margin:0 0 6px;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
.home-folder-pie-fallback__msg{
  margin:0;
  font-size:.86rem;
  color:var(--muted);
  line-height:1.45;
}

a.pieSliceLink.pieSliceLink--entity,
a.pieSliceLink.pieSliceLink--folder,
a.pieSliceLink.pieSliceLink--asset,
a.pieSliceLink.pieSliceLink--assetPick{
  cursor:pointer;
  text-decoration:none;
  outline:none;
  -webkit-tap-highlight-color:transparent;
}
a.pieSliceLink.pieSliceLink--entity path,
a.pieSliceLink.pieSliceLink--entity circle,
a.pieSliceLink.pieSliceLink--folder path,
a.pieSliceLink.pieSliceLink--folder circle,
a.pieSliceLink.pieSliceLink--asset path,
a.pieSliceLink.pieSliceLink--asset circle,
a.pieSliceLink.pieSliceLink--assetPick path,
a.pieSliceLink.pieSliceLink--assetPick circle{
  transition:opacity .12s ease, filter .12s ease;
}
a.pieSliceLink.pieSliceLink--entity:hover path,
a.pieSliceLink.pieSliceLink--entity:hover circle,
a.pieSliceLink.pieSliceLink--folder:hover path,
a.pieSliceLink.pieSliceLink--folder:hover circle,
a.pieSliceLink.pieSliceLink--asset:hover path,
a.pieSliceLink.pieSliceLink--asset:hover circle,
a.pieSliceLink.pieSliceLink--assetPick:hover path,
a.pieSliceLink.pieSliceLink--assetPick:hover circle{
  opacity:.92;
  filter:brightness(1.05);
}
a.pieSliceLink.pieSliceLink--entity:focus-visible path,
a.pieSliceLink.pieSliceLink--entity:focus-visible circle,
a.pieSliceLink.pieSliceLink--folder:focus-visible path,
a.pieSliceLink.pieSliceLink--folder:focus-visible circle,
a.pieSliceLink.pieSliceLink--asset:focus-visible path,
a.pieSliceLink.pieSliceLink--asset:focus-visible circle,
a.pieSliceLink.pieSliceLink--assetPick:focus-visible path,
a.pieSliceLink.pieSliceLink--assetPick:focus-visible circle,
a.pieSliceLink.pieSliceLink--entity:active path,
a.pieSliceLink.pieSliceLink--entity:active circle,
a.pieSliceLink.pieSliceLink--folder:active path,
a.pieSliceLink.pieSliceLink--folder:active circle,
a.pieSliceLink.pieSliceLink--asset:active path,
a.pieSliceLink.pieSliceLink--asset:active circle,
a.pieSliceLink.pieSliceLink--assetPick:active path,
a.pieSliceLink.pieSliceLink--assetPick:active circle{
  opacity:.92;
  filter:brightness(1.05);
}
.pieLegendEntityLink{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  text-decoration:none;
  color:inherit;
  border-radius:8px;
  margin:-2px -6px;
  padding:6px 8px;
  transition:background .12s ease;
}
.pieLegendEntityLink:hover{
  background:var(--surface-btn-hover);
}
.pieLegendEntityLink:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:1px;
}

/* Folder pie: linked slices (modern home) */
.pieLegendRow--folderLink{
  margin-bottom:2px;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.pieLegendRow:has(.pieLegendRollupRow){
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.pieLegendRow--rollup{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.pieLegendRow--rollup > .pieLegendFolderLink,
.pieLegendRow--rollup > .pieLegendEntityLink,
.pieLegendRow--rollup > .pieLegendAssetLink,
.pieLegendRow--rollup > .pieLegendRollupRow{
  flex:1 1 0%;
  min-width:0;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.pieLegendRollupRow{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.pieLegendRollupRow > .pieLegendRowMain{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:10px;
}
.pieLegendRollupRow .pieLegendRowMain > .pieSwatch{
  display:block;
  flex:0 0 auto;
  width:12px;
  height:12px;
  min-width:12px;
  min-height:12px;
  border-radius:3px;
  box-sizing:border-box;
  flex-shrink:0;
}
.pieLegendRollupMeta{
  flex:1 1 0%;
  min-width:0;
  white-space:normal;
  word-break:break-word;
  overflow:visible;
  text-overflow:clip;
}
.pieLegendRollupName{
  display:flex;
  flex-direction:row;
  direction:ltr;
  align-items:baseline;
  gap:0.28em;
  flex:1 1 0%;
  min-width:0;
  white-space:normal;
  word-break:break-word;
  overflow:visible;
  text-overflow:clip;
}
.pieLegendRollupNameText{
  flex:1 1 0%;
  min-width:0;
  white-space:normal;
  word-break:break-word;
  overflow:visible;
  text-overflow:clip;
  unicode-bidi:isolate;
}
.pieLegendRollupPct{
  flex:0 0 auto;
  white-space:nowrap;
  font-size:0.65em;
  font-variant-numeric:tabular-nums;
  direction:ltr;
  unicode-bidi:isolate;
}

/* English (desktop + mobile): % just left of the equity value, not beside the name. */
html[dir="ltr"].portiva-locale-en .pieLegendRollupNameText{
  order:1;
  flex:1 1 0%;
}
html[dir="ltr"].portiva-locale-en .pieLegendRollupPct{
  order:2;
  flex:0 0 auto;
  margin-left:0;
}
html[dir="ltr"].portiva-locale-en .pieLegendRollupRow{
  gap:12px;
}
.pieLegendRollupEq{
  flex:0 0 auto;
  margin-left:auto;
  text-align:right;
  font-variant-numeric:tabular-nums;
  font-weight:600;
  color:var(--text);
  white-space:nowrap;
}
.pieLegendRollupEq--stacked{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
}
.pieLegendRollupEqLine{
  display:block;
}
.pieLegendFolderLink{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  text-decoration:none;
  color:inherit;
  border-radius:8px;
  margin:-2px -6px;
  padding:6px 8px;
  transition:background .12s ease;
}
.pieLegendFolderLink:hover{
  background:var(--surface-btn-hover);
}
.pieLegendFolderLink:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:1px;
}

.card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:14px;
}

.card{
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-card);
  padding:18px 18px 16px;
  cursor:pointer;
  text-align:left;
  color:inherit;
  font:inherit;
  transition:border-color .15s, background .15s, transform .12s;
}
.card:hover{
  border-color:var(--accent-hover);
  background:var(--surface-card-hover);
}
.card:active{ transform:scale(.992); }
.card h3{
  margin:0 0 6px;
  font-size:1.02rem;
  font-weight:700;
}
.card .meta{
  font-size:.82rem;
  color:var(--muted);
}
.card .chev{
  float:right;
  margin-top:-4px;
  color:var(--accent);
  font-size:1.2rem;
}

/* Folder tiles: no floats (iOS layout); entity cards unchanged */
.folder-card{
  display:grid;
  grid-template-columns:1fr auto;
  grid-template-rows:auto auto;
  align-items:start;
  column-gap:10px;
  row-gap:4px;
}
.folder-card .chev{
  float:none;
  grid-column:2;
  grid-row:1;
  margin-top:0;
}
.folder-card h3{
  grid-column:1;
  grid-row:1;
  margin:0;
}
.folder-card .meta{
  grid-column:1 / -1;
  grid-row:2;
  margin-top:2px;
}

.entity-tree-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
/* Folder page entity rows only: shorter (less vertical space), full width. */
.entity-tree-list:not(.entity-tree-list--assets){
  gap:8px;
}
.entity-tree-list:not(.entity-tree-list--assets) .entity-tree-card{
  padding:11px 16px 9px;
}
.entity-tree-list:not(.entity-tree-list--assets) .entity-tree-card h3{
  margin:0 0 3px;
  font-size:1rem;
  line-height:1.25;
}
.entity-tree-list:not(.entity-tree-list--assets) .entity-tree-card .meta{
  font-size:.8rem;
  line-height:1.35;
}
.entity-tree-list:not(.entity-tree-list--assets) .entity-tree-card .chev{
  margin-top:-2px;
  font-size:1.05rem;
}
.entity-tree-list:not(.entity-tree-list--assets) .entity-tree-card .tree-hint{
  margin:4px 0 2px;
  font-size:.74rem;
}
.entity-tree-card{
  width:100%;
  box-sizing:border-box;
}
.entity-tree-card .tree-hint{
  margin:6px 0 4px;
  font-size:.76rem;
  color:var(--muted);
  line-height:1.4;
  clear:both;
}
.entity-tree-card h3{
  clear:none;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.entity-tree-card__value{
  font-weight:700;
  font-variant-numeric:tabular-nums;
  color:var(--accent);
}
.entity-tree-card__value--muted{
  font-weight:600;
  font-variant-numeric:tabular-nums;
  color:var(--muted);
}
.entity-tree-list--assets .entity-tree-card--asset .meta{
  line-height:1.45;
}

.list{
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  overflow:hidden;
  background:var(--surface-list);
}
.list-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  border-bottom:1px solid var(--stroke);
  cursor:pointer;
  color:inherit;
  font:inherit;
  text-align:left;
  width:100%;
  background:transparent;
  transition:background .12s;
}
.list-row:last-child{ border-bottom:none; }
.list-row:hover{ background:var(--surface-list-hover); }

.list-row .left{ min-width:0; }
.list-row .title{ font-weight:600; font-size:.95rem; }
.list-row .sub{ font-size:.78rem; color:var(--muted); margin-top:3px; }
.list-row .amt{
  font-weight:700;
  font-variant-numeric:tabular-nums;
  font-size:.95rem;
  color:var(--accent);
}

.detail-dl{
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-list);
  padding:8px 0;
}
.detail-dl > div,
.detail-dl .detail-field{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:12px 18px;
  border-bottom:1px solid var(--stroke);
  font-size:.9rem;
}
.detail-dl > div:last-child,
.detail-dl .detail-field:last-child{ border-bottom:none; }
.detail-dl dt{ color:var(--muted); font-weight:500; }
.detail-dl dd{ margin:0; font-weight:600; text-align:right; min-width:0; flex:1; }
.detail-dl--form dd{
  text-align:left;
  font-weight:500;
}
#assetEditModal .detail-dl.detail-dl--form{
  border:0;
  background:transparent;
  padding:0;
}
#assetEditModal .detail-dl.detail-dl--form .detail-field{
  display:grid;
  grid-template-columns:minmax(96px,34%) minmax(0,1fr);
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  padding:0;
  border-bottom:0;
  font-size:.84rem;
  font-weight:600;
  color:var(--muted);
}
#assetEditModal .detail-dl.detail-dl--form .detail-field dt,
#assetEditModal .detail-dl.detail-dl--form .detail-field dd{
  width:100%;
  max-width:100%;
  min-width:0;
  text-align:left;
}
#assetEditModal .detail-dl.detail-dl--form .detail-field dd{
  flex:1 1 auto;
}
#assetEditModal .field-input,
#assetEditModal .theme-select{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
#assetEditModal .field-input--locked-type,
#assetEditModal .field-input--locked-type:hover,
#assetEditModal .field-input--locked-type:focus,
#assetEditModal .field-input--locked-type:focus-visible{
  cursor:default;
  outline:none;
  border-color:var(--stroke);
  background:var(--surface-btn);
  box-shadow:none;
}
#assetEditModal .detail-dl.detail-dl--form .entityDetailsBubble{
  margin-top:0;
  margin-bottom:0;
}
#assetEditModal .detail-dl.detail-dl--form > .add-asset-entity-context,
#assetEditModal .detail-dl.detail-dl--form > .add-asset-section,
#assetEditModal .detail-dl.detail-dl--form > .entityDetailsBubble{
  border-bottom:0;
  box-sizing:border-box;
  width:100%;
}
#assetEditModal .detail-dl.detail-dl--form > .add-asset-entity-context,
#assetEditModal .detail-dl.detail-dl--form > .add-asset-section{
  display:block;
  justify-content:initial;
  gap:initial;
}
#assetEditModal .modal-form-group-bubble .detail-field,
#assetEditModal .modal-optional-fields-bubble .detail-field{
  border-bottom:0;
  padding:0;
}
#assetEditModal .modal-field,
.asset-edit-page .modal-field{
  display:grid;
  grid-template-columns:minmax(96px,34%) minmax(0,1fr);
  align-items:center;
  gap:8px;
  font-size:.84rem;
  flex-direction:unset;
}
#assetEditModal .modal-field > span{
  min-width:0;
}
#assetEditModal .modal-field input,
#assetEditModal .modal-field textarea,
#assetEditModal .modal-field .theme-select,
#assetEditModal .modal-field .field-input{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
#assetEditModal .modal-field--comments,
#assetEditModal .modal-field:has(textarea){
  grid-template-columns:1fr;
}
.field-input{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-btn);
  color:var(--text);
  font:inherit;
  font-size:.9rem;
}
.field-input:focus{
  outline:none;
  border-color:var(--accent-border);
  box-shadow:0 0 0 2px var(--accent-hover);
}
/* iOS Safari zooms the viewport when focused inputs use a font-size below 16px. */
#summariesSearchInput,
.summaries-search-field__input{
  font-size:1rem;
}
#modernExportCsvModal .field-input,
#modernExportCsvFilename{
  font-size:1rem;
}
#modernImportCsvModal .field-input{
  font-size:1rem;
}
#modernSetEmailPasswordModal .modal-field input,
#modernSetEmailPasswordModal .field-input{
  font-size:16px;
}
.import-csv-file-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:0 0 14px;
}
.import-csv-file-picker{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 12px;
}
.import-csv-file-picker__input{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.import-csv-file-picker__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 18px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-btn);
  color:var(--text);
  font-size:.9rem;
  font-weight:600;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease, box-shadow .15s ease;
  box-shadow:var(--shadow);
}
.import-csv-file-picker__btn:hover{
  background:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
}
.import-csv-file-picker__btn:focus-visible{
  outline:none;
  border-color:var(--accent-border);
  box-shadow:0 0 0 2px var(--accent-hover);
}
.import-csv-file-picker__name{
  flex:1 1 min(140px, 100%);
  min-width:0;
  font-size:.88rem;
  color:var(--muted);
  line-height:1.35;
  word-break:break-all;
}
.import-csv-file-picker__name--chosen{
  color:var(--text);
  font-weight:500;
}
.export-csv-scope{
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  background:var(--surface-soft);
}
.export-csv-scope__legend{
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  padding:0 6px;
}
.export-csv-scope__row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:8px 0 0;
}
.export-csv-scope__choice{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.88rem;
  cursor:pointer;
}
.export-csv-scope__select{
  flex:1 1 min(220px, 100%);
  min-width:0;
  max-width:100%;
}
.export-csv-scope--dual{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.export-csv-scope--dual .export-csv-scope__field{
  margin:0;
  min-width:0;
}
.export-csv-scope--dual .export-csv-scope__select{
  width:100%;
  max-width:none;
}
.modal-box--export-csv,
.modal-box--import-csv{
  max-width:min(480px, 94vw);
}
#homeEquityPrincipalModal.modal-overlay{
  overflow:hidden;
  overscroll-behavior:none;
  align-items:center;
  justify-content:center;
}
#incomeSummaryModal.modal-overlay{
  overflow:hidden;
  overscroll-behavior:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.78);
  backdrop-filter:blur(8px);
}
#incomeSummaryModal .modal-box.modal-box--home-equity-principal{
  background:#000;
  border-color:rgba(255,255,255,.12);
  color:#f1f5f9;
  box-shadow:0 24px 64px rgba(0,0,0,.85);
}
#incomeSummaryModal .modal-title{
  color:#f8fafc;
}
#incomeSummaryModal .modal-hint{
  color:#94a3b8;
}
#incomeSummaryModal .modal-close-btn{
  color:#94a3b8;
}
#incomeSummaryModal .modal-close-btn:hover{
  background:rgba(255,255,255,.08);
  color:#f8fafc;
}
#incomeSummaryModal .cashflow-summary-modal__net-label,
#incomeSummaryModal .cashflow-summary-modal__part-label{
  color:#94a3b8;
}
#incomeSummaryModal .home-equity-principal-modal__total-breakdown{
  color:#94a3b8;
}
#incomeSummaryModal .home-equity-principal-modal__empty{
  color:#94a3b8;
}
#incomeSummaryModal .home-equity-principal-modal__total{
  padding-bottom:14px;
  margin-bottom:0;
  border-bottom:1px solid rgba(255,255,255,.08);
}
#incomeSummaryModal .home-equity-principal-modal__list{
  gap:0;
}
#incomeSummaryModal .home-equity-principal-modal__row{
  padding:11px 0;
  border:0;
  border-radius:0;
  background:transparent;
  border-bottom:1px solid rgba(255,255,255,.08);
  color:#f1f5f9;
}
#incomeSummaryModal .home-equity-principal-modal__row:last-child{
  border-bottom:none;
}
#incomeSummaryModal .home-equity-principal-modal__asset,
#incomeSummaryModal button.home-equity-principal-modal__entry-link{
  color:#f8fafc;
}
#incomeSummaryModal .home-equity-principal-modal__asset{
  font-weight:600;
}
#incomeSummaryModal .home-equity-principal-modal__meta{
  color:#94a3b8;
  font-weight:400;
}
#incomeSummaryModal .home-equity-principal-modal__beneficial.cashflow-summary-modal__amount--positive,
#incomeSummaryModal .home-equity-principal-modal__total-main.cashflow-summary-modal__amount--positive,
#incomeSummaryModal .cashflow-summary-modal__part-main.cashflow-summary-modal__amount--positive,
#incomeSummaryModal .cashflow-summary-modal__in{
  color:#4ade80;
}
#incomeSummaryModal .home-equity-principal-modal__beneficial.cashflow-summary-modal__amount--negative,
#incomeSummaryModal .home-equity-principal-modal__total-main.cashflow-summary-modal__amount--negative,
#incomeSummaryModal .cashflow-summary-modal__part-main.cashflow-summary-modal__amount--negative,
#incomeSummaryModal .cashflow-summary-modal__out{
  color:#fb7185;
}
.modal-box--home-equity-principal{
  position:relative;
  width:100%;
  max-width:min(560px, 94vw);
  max-height:min(90dvh, calc(100dvh - 40px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
  min-height:0;
}
.summaries-metric-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
  box-sizing:border-box;
  padding:14px 16px;
}
.summaries-metric-panel .home-equity-principal-modal__total{
  margin-bottom:0;
}
.summaries-metric-panel .home-equity-principal-modal__body{
  margin-bottom:0;
}
.portiva-flow-page.summaries-page--debt .home-equity-principal-modal__total-main,
.portiva-flow-page.summaries-page--principal .home-equity-principal-modal__total-main,
.portiva-flow-page.summaries-page--investor-shares .home-equity-principal-modal__total-main{
  font-size:1.05rem;
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.25;
}
.summaries-metric-panel__subtitle{
  margin:20px 0 6px;
  font-size:1.05rem;
  font-weight:600;
  line-height:1.3;
}
.summaries-metric-panel__subtitle:first-of-type{
  margin-top:4px;
}
.summaries-metric-panel .portiva-flow-page__lead + .home-equity-principal-modal__total{
  margin-top:10px;
}
.home-equity-principal-modal__total{
  flex:0 0 auto;
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:space-between;
  gap:12px 20px;
  margin:0 0 14px;
  min-height:0;
}
.home-equity-principal-modal__total-main{
  flex:0 1 auto;
  min-width:0;
  font-size:clamp(1.65rem, 4vw, 2.25rem);
  font-weight:700;
  letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;
  line-height:1.1;
}
.cashflow-summary-modal__total{
  flex-direction:column;
  align-items:stretch;
  gap:10px;
}
.cashflow-summary-modal__totals{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
}
.cashflow-summary-modal__net{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:space-between;
  gap:8px 16px;
}
.cashflow-summary-modal__net-label{
  font-size:.95rem;
  font-weight:600;
  color:var(--text-muted, #64748b);
}
.cashflow-summary-modal__parts{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px 16px;
}
.cashflow-summary-modal__part{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.cashflow-summary-modal__part-label{
  font-size:.8rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--text-muted, #64748b);
}
.cashflow-summary-modal__part-main{
  font-size:1.05rem;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.cashflow-summary-modal__amount--positive,
.home-equity-principal-modal__beneficial.cashflow-summary-modal__amount--positive{
  color:var(--cashflow-positive, #4ade80);
}
.cashflow-summary-modal__amount--negative,
.home-equity-principal-modal__beneficial.cashflow-summary-modal__amount--negative{
  color:var(--cashflow-negative, #fb7185);
}
.cashflow-summary-modal__in{
  color:var(--cashflow-positive, #4ade80);
  font-weight:700;
}
.cashflow-summary-modal__out{
  color:var(--cashflow-negative, #fb7185);
  font-weight:700;
}
.home-equity-principal-modal__total-main.cashflow-summary-modal__amount--positive{
  color:var(--cashflow-positive, #4ade80);
}
.home-equity-principal-modal__total-main.cashflow-summary-modal__amount--negative{
  color:var(--cashflow-negative, #fb7185);
}
/* Cashflow asset list — physical L/R columns (immune to html[dir=rtl] grid mirroring) */
#incomeSummaryModal .home-equity-principal-modal__list--cashflow button.home-equity-principal-modal__entry-link{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  width:100%;
  gap:4px;
}
.home-equity-principal-modal__list--cashflow .home-equity-principal-modal__row-head{
  direction:ltr;
  display:grid;
  align-items:baseline;
  gap:10px 14px;
  min-width:0;
}
/* EN: name/meta left, cash right */
.home-equity-principal-modal__list--cashflow-en .home-equity-principal-modal__row-head{
  grid-template-columns:minmax(0, 1fr) auto;
}
.home-equity-principal-modal__list--cashflow-en .home-equity-principal-modal__asset,
.home-equity-principal-modal__list--cashflow-en button.home-equity-principal-modal__entry-link{
  grid-column:1;
  grid-row:1;
  text-align:left;
  justify-self:stretch;
  min-width:0;
}
.home-equity-principal-modal__list--cashflow-en .home-equity-principal-modal__beneficial{
  grid-column:2;
  grid-row:1;
  justify-self:end;
}
.home-equity-principal-modal__list--cashflow-en .home-equity-principal-modal__meta{
  text-align:left;
}
/* HE: cash left, name/meta right */
.home-equity-principal-modal__list--cashflow-he .home-equity-principal-modal__row-head{
  grid-template-columns:auto minmax(0, 1fr);
}
.home-equity-principal-modal__list--cashflow-he .home-equity-principal-modal__beneficial{
  grid-column:1;
  grid-row:1;
  justify-self:start;
  direction:ltr;
  unicode-bidi:isolate;
}
.home-equity-principal-modal__list--cashflow-he .home-equity-principal-modal__asset,
.home-equity-principal-modal__list--cashflow-he button.home-equity-principal-modal__entry-link{
  grid-column:2;
  grid-row:1;
  text-align:right;
  direction:rtl;
  unicode-bidi:isolate;
  justify-self:stretch;
  min-width:0;
}
.home-equity-principal-modal__list--cashflow-he .home-equity-principal-modal__meta{
  text-align:right;
  direction:rtl;
}
/* Principal / debt list — physical L/R columns; EN: details left, amount right; HE: amount left, details right */
.home-equity-principal-modal__list--principal .home-equity-principal-modal__row-head{
  direction:ltr;
  display:grid;
  align-items:baseline;
  gap:10px 14px;
  min-width:0;
}
.home-equity-principal-modal__list--principal-en .home-equity-principal-modal__row-head{
  grid-template-columns:minmax(0, 1fr) auto;
}
.home-equity-principal-modal__list--principal-en .home-equity-principal-modal__beneficial{
  grid-column:2;
  grid-row:1;
  justify-self:end;
  direction:ltr;
  unicode-bidi:isolate;
}
.home-equity-principal-modal__list--principal-en .home-equity-principal-modal__asset,
.home-equity-principal-modal__list--principal-en button.home-equity-principal-modal__entry-link{
  grid-column:1;
  grid-row:1;
  text-align:left;
  justify-self:stretch;
  min-width:0;
}
.home-equity-principal-modal__list--principal-en .home-equity-principal-modal__meta{
  text-align:left;
}
.home-equity-principal-modal__list--principal-he .home-equity-principal-modal__row-head{
  grid-template-columns:auto minmax(0, 1fr);
}
.home-equity-principal-modal__list--principal-he .home-equity-principal-modal__beneficial{
  grid-column:1;
  grid-row:1;
  justify-self:start;
  direction:ltr;
  unicode-bidi:isolate;
}
.home-equity-principal-modal__list--principal-he .home-equity-principal-modal__asset,
.home-equity-principal-modal__list--principal-he button.home-equity-principal-modal__entry-link{
  grid-column:2;
  grid-row:1;
  text-align:right;
  direction:rtl;
  unicode-bidi:isolate;
  justify-self:stretch;
  min-width:0;
}
.home-equity-principal-modal__list--principal-he .home-equity-principal-modal__meta{
  text-align:right;
  direction:rtl;
}
.home-equity-principal-modal__list--principal .home-equity-principal-modal__row--rtl .home-equity-principal-modal__row-head{
  flex-direction:unset;
}
.home-equity-principal-modal__total-breakdown{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  align-self:center;
  gap:3px;
  font-size:.82rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.2;
}
.home-equity-principal-modal__total-fx{
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
#homeEquityPrincipalModal .modal-hint,
#homeEquityPrincipalModal .modal-title,
#homeEquityPrincipalModal .form-actions{
  flex:0 0 auto;
}
.home-equity-principal-modal__body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  margin:0 0 8px;
}
.home-equity-principal-modal__loading,
.home-equity-principal-modal__empty{
  margin:0;
  font-size:.9rem;
  color:var(--muted);
  line-height:1.5;
}
.home-equity-principal-modal__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.home-equity-principal-modal__row{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  background:var(--surface-card);
}
.home-equity-principal-modal__row-head{
  display:flex;
  flex-wrap:nowrap;
  align-items:baseline;
  justify-content:space-between;
  gap:10px 14px;
  min-width:0;
}
.home-equity-principal-modal__asset{
  flex:1 1 auto;
  min-width:0;
  font-weight:600;
  line-height:1.25;
  text-align:left;
}
button.home-equity-principal-modal__entry-link{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  font:inherit;
  color:inherit;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
button.home-equity-principal-modal__entry-link:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}
button.home-equity-principal-modal__entry-link:focus-visible{
  outline:2px solid var(--accent, #6eb5ff);
  outline-offset:2px;
  border-radius:4px;
}
.home-equity-principal-modal__term-end,
.home-equity-principal-modal__full-balance{
  font-size:.82em;
  font-weight:400;
  color:var(--muted);
}
.home-equity-principal-modal__beneficial{
  flex:0 0 auto;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.home-equity-principal-modal__meta{
  display:block;
  width:100%;
  font-size:.78rem;
  color:var(--muted);
  line-height:1.35;
  text-align:left;
}
.modern-mortgages-bubble .modern-mortgages-hint{
  margin:0 0 12px;
  font-size:.82rem;
  color:var(--muted);
  line-height:1.45;
}
.welcome-verify-email-page__body{
  flex:0 1 auto;
  justify-content:flex-start;
  gap:12px;
  padding-top:clamp(18px, 3vh, 28px);
  padding-bottom:clamp(20px, 4vh, 36px);
}
.welcome-verify-email__copy{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  width:min(440px, 100%);
  max-width:100%;
}
.welcome-verify-email__lead,
.welcome-verify-email__hint{
  margin:0;
  max-width:100%;
  font-size:.95rem;
  line-height:1.5;
  color:var(--muted);
  text-align:center;
}
.welcome-verify-email__lead strong{
  color:rgba(248,250,252,.92);
  font-weight:600;
}
.welcome-verify-email__actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:clamp(16px, 3vh, 24px);
  width:100%;
  margin-top:3em;
  margin-top:3lh;
}
.welcome-verify-email__action{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:#f8fafc;
  font-family:var(--font), system-ui, sans-serif;
  font-size:clamp(1.12rem, 3.4vw, 1.35rem);
  font-weight:600;
  line-height:1.3;
  letter-spacing:-0.01em;
  text-decoration:none;
  cursor:pointer;
}
.welcome-verify-email__action:hover:not(:disabled){
  color:var(--accent);
}
.welcome-verify-email__action:focus-visible{
  outline:2px solid rgba(255,255,255,.42);
  outline-offset:4px;
}
.welcome-verify-email__ok{
  margin:0;
  max-width:min(440px, 100%);
  font-size:.86rem;
  color:var(--good, #34d399);
  line-height:1.4;
  text-align:center;
}
.modern-mortgages-bubble .modern-mortgages-disclaimer{
  margin:0 0 12px;
}
.modern-mortgages-bubble .modern-mortgages-disclaimer.loan-update-status,
.entityDetailsBubbleTitleHint--disclaimer{
  max-width:none;
  width:100%;
  font-size:.82rem;
  line-height:1.45;
}
.entityDetailsBubbleTitleHint--disclaimer{
  margin-top:0;
}
.modern-mortgages-cards{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:12px;
}
.modern-mortgage-card{
  padding:12px 14px;
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  background:var(--surface-card);
}
/* Edit asset — lender cards nearly match Lenders bubble, hint lighter */
#assetEditForm .modern-mortgage-card,
#assetEditModal .modern-mortgage-card,
.asset-edit-page .modern-mortgage-card{
  background:color-mix(in srgb, #1a2234 94%, white 6%);
  border-color:color-mix(in srgb, var(--stroke) 88%, white 12%);
}
[data-theme="dawn"] #assetEditForm .modern-mortgage-card,
[data-theme="dawn"] #assetEditModal .modern-mortgage-card,
[data-theme="dawn"] .asset-edit-page .modern-mortgage-card,
[data-theme="day"] #assetEditForm .modern-mortgage-card,
[data-theme="day"] #assetEditModal .modern-mortgage-card,
[data-theme="day"] .asset-edit-page .modern-mortgage-card,
[data-theme="classic"] #assetEditForm .modern-mortgage-card,
[data-theme="classic"] #assetEditModal .modern-mortgage-card,
[data-theme="classic"] .asset-edit-page .modern-mortgage-card{
  background:color-mix(in srgb, var(--portiva-panel-bg) 94%, white 6%);
  border-color:var(--stroke);
}
.modern-mortgage-card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.modern-mortgage-card__title{
  font-weight:700;
  font-size:.92rem;
}
.modern-mortgage-card__fields{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap:10px 12px;
}
@media (min-width:901px){
  #assetEditForm .modern-mortgage-card__fields,
  #assetEditModal .modern-mortgage-card__fields,
  .asset-edit-page .modern-mortgage-card__fields{
    grid-template-columns:1fr;
  }
}
.modern-mortgage-field{
  margin:0;
}
.modern-mortgage-field__value-cell{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-width:0;
  align-self:center;
}
.modern-mortgage-field__value-cell > .formula-control-wrap{
  flex:1 1 auto;
  min-width:0;
  width:100%;
}
.modern-mortgage-field__value-cell > input.field-input,
.modern-mortgage-field__value-cell > select.field-input{
  flex:1 1 auto;
  min-width:0;
  width:auto;
}
.modern-mortgage-field__value-cell > .loan-field-help-toggle{
  flex-shrink:0;
  margin-left:0;
}
.modern-mortgage-field__label-row,
.entityDetailsDt__label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.modern-mortgage-field__label{
  min-width:0;
}
.entityDetailsDd__value-help-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  width:100%;
  min-width:0;
}
.entityDetailsDd--text .entityDetailsDd__value-help-row{
  justify-content:flex-start;
}
.entityDetailsDd--text .entityDetailsDd__value-help-row .loan-field-help-toggle{
  margin-left:auto;
}
.loan-field-help-toggle{
  flex-shrink:0;
  margin-left:auto;
  min-width:28px;
  width:28px;
  height:28px;
  padding:0;
  font-size:.82rem;
  font-weight:700;
  line-height:1;
  border-radius:999px;
  opacity:.72;
}
.loan-field-help-toggle[aria-expanded="true"]{
  opacity:1;
  color:var(--accent);
}
.loan-field-help-panel{
  margin-top:6px;
}
.loan-field-help-panel[hidden]{
  display:none !important;
}
.modern-mortgage-balance-includes select.field-input{
  width:100%;
}
.asset-lender-balance-log-panel{
  margin-top:10px;
}
.asset-lender-balance-log-btn{
  margin-top:4px;
}
.asset-lender-balance-log-send-wrap{
  margin-top:10px;
}
.asset-lender-balance-log-send{
  display:inline;
  padding:0;
  margin:0;
  border:none;
  background:none;
  font:inherit;
  font-size:inherit;
  font-weight:inherit;
  line-height:inherit;
  color:var(--accent);
  text-decoration:underline;
  cursor:pointer;
  vertical-align:baseline;
}
.asset-lender-balance-log-send:hover{
  opacity:.85;
}
.asset-lender-balance-log-list{
  margin-top:8px;
}
.asset-lender-balance-log-entries{
  margin:0;
  padding-left:1.1rem;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.asset-lenders-readonly{
  display:flex;
  flex-direction:column;
  gap:0;
}
.asset-lender-readonly + .asset-lender-readonly{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--stroke);
}
.asset-lender-readonly__head{
  font-weight:700;
  font-size:.88rem;
  margin:0 0 6px;
}
.asset-lender-readonly__dl{
  margin:0;
}
/* RTL entity short name (Hebrew, etc.): amount left, name right on line 1 */
.home-equity-principal-modal__row--rtl .home-equity-principal-modal__row-head{
  flex-direction:row-reverse;
}
.home-equity-principal-modal__row--rtl .home-equity-principal-modal__asset,
.home-equity-principal-modal__row--rtl button.home-equity-principal-modal__entry-link{
  direction:rtl;
  unicode-bidi:plaintext;
  text-align:right;
}
.import-csv-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:12px 0;
  font-size:.88rem;
  font-weight:500;
  cursor:pointer;
}
.import-csv-check input{
  margin-top:3px;
  flex-shrink:0;
}
.required-input-wrap{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  width:100%;
  align-self:center;
}
.required-input-wrap input,
.required-input-wrap select,
.required-input-wrap .theme-select{
  flex:1 1 auto;
  min-width:0;
}
/* Asset edit / add / entity add & edit — single-line controls share one height (native <select> and <input type="date"> ignore min-height alone) */
#assetEditForm .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
#assetEditModal .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
.asset-edit-page .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
#addAssetModal .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
.add-asset-page .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
#formAddEntity .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
#formAddEntityPage .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
#formEditEntity .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
#addEntityModal .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
.add-entity-page .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
.edit-entity-page .modal-field input.field-input:not(textarea):not(.field-input--holdings):not(.field-input--comments),
#assetEditForm .modal-field select.field-input,
#assetEditModal .modal-field select.field-input,
.asset-edit-page .modal-field select.field-input,
#addAssetModal .modal-field select.field-input,
.add-asset-page .modal-field select.field-input,
#formAddEntity .modal-field select.field-input,
#formAddEntityPage .modal-field select.field-input,
#formEditEntity .modal-field select.field-input,
#addEntityModal .modal-field select.field-input,
.add-entity-page .modal-field select.field-input,
.edit-entity-page .modal-field select.field-input{
  display:block;
  width:100%;
  height:calc(22px + 1.25em);
  min-height:calc(22px + 1.25em);
  max-height:calc(22px + 1.25em);
  line-height:1.25;
  box-sizing:border-box;
}
#assetEditForm .modal-field input.field-input[type="date"],
#assetEditModal .modal-field input.field-input[type="date"],
.asset-edit-page .modal-field input.field-input[type="date"],
#addAssetModal .modal-field input.field-input[type="date"],
.add-asset-page .modal-field input.field-input[type="date"],
#formAddEntity .modal-field input.field-input[type="date"],
#formAddEntityPage .modal-field input.field-input[type="date"],
#formEditEntity .modal-field input.field-input[type="date"],
#addEntityModal .modal-field input.field-input[type="date"],
.add-entity-page .modal-field input.field-input[type="date"],
.edit-entity-page .modal-field input.field-input[type="date"],
.flex-loan-add-payment .modal-field input.field-input[type="date"],
.modern-mortgage-field input.field-input[type="date"]{
  display:flex;
  align-items:center;
  padding:0 36px 0 12px;
  line-height:1.25;
  position:relative;
  height:calc(22px + 1.25em);
  min-height:calc(22px + 1.25em);
  max-height:calc(22px + 1.25em);
}
#assetEditForm .modal-field select.field-input,
#assetEditModal .modal-field select.field-input,
.asset-edit-page .modal-field select.field-input,
#addAssetModal .modal-field select.field-input,
.add-asset-page .modal-field select.field-input{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding:10px 36px 10px 12px;
  overflow:hidden;
  text-overflow:ellipsis;
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:12px 12px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
}
[data-theme="dawn"] #assetEditForm .modal-field select.field-input,
[data-theme="day"] #assetEditForm .modal-field select.field-input,
[data-theme="dawn"] #assetEditModal .modal-field select.field-input,
[data-theme="day"] #assetEditModal .modal-field select.field-input,
[data-theme="dawn"] .asset-edit-page .modal-field select.field-input,
[data-theme="day"] .asset-edit-page .modal-field select.field-input{
  background-color:var(--portiva-field-bg);
}
[data-theme="classic"] #assetEditForm .modal-field select.field-input,
[data-theme="classic"] #assetEditModal .modal-field select.field-input,
[data-theme="classic"] .asset-edit-page .modal-field select.field-input{
  background-color:var(--portiva-select-bg);
}
[data-theme="classic"] #assetEditForm .modal-field select.field-input:hover,
[data-theme="classic"] #assetEditModal .modal-field select.field-input:hover,
[data-theme="classic"] .asset-edit-page .modal-field select.field-input:hover{
  background-color:var(--portiva-select-bg-hover);
}
.required-field-dot{
  display:block;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#f87171;
  flex:0 0 7px;
  flex-shrink:0;
  align-self:center;
}
.formula-field-dot{
  display:block;
  width:7px;
  height:7px;
  margin-left:6px;
  border-radius:50%;
  background:#38bdf8;
  flex:0 0 7px;
  flex-shrink:0;
  align-self:center;
}
.formula-field-dot--readonly{
  width:5px;
  height:5px;
  flex:0 0 5px;
  margin:0;
}
.formula-field-dot--control.formula-field-dot--readonly{
  margin:0 6px 0 0;
}
.entityDetailsDl dd.formula-field-dd{
  min-width:0;
}
.entityDetailsDl dd.formula-field-dd .formula-field-dd__row{
  display:flex;
  align-items:center;
  gap:5px;
  max-width:100%;
  min-width:0;
}
.entityDetailsDl dd.formula-field-dd .formula-field-dd__val{
  min-width:0;
}
.formula-field-dot--control,
.formula-control-wrap > .formula-field-dot,
.required-input-wrap > .formula-field-dot{
  margin:0;
  align-self:center;
}
.formula-control-wrap{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  flex:1 1 auto;
  justify-self:stretch;
  align-self:center;
}
.formula-control-wrap > input,
.formula-control-wrap > select,
.formula-control-wrap > textarea{
  flex:1 1 0;
  min-width:0;
  width:auto;
  max-width:none;
  align-self:center;
}
.modal-field > .formula-control-wrap,
.modal-field > .required-input-wrap,
.modal-field > input:not([type="hidden"]),
.modal-field > select,
.modal-field > textarea,
.modal-field > .theme-select,
.entityDetailsBubble .modal-field > .formula-control-wrap,
.entityDetailsBubble .modal-field > .required-input-wrap,
.detail-dl--form .detail-field dd .formula-control-wrap,
.detail-dl--form .detail-field dd .required-input-wrap{
  align-self:center;
}
/* Add/edit asset — 5px dot in gutter; inputs stay full-width and aligned */
#formAddAsset .formula-control-wrap,
#assetEditForm .formula-control-wrap,
#addAssetModal .formula-control-wrap,
#assetEditModal .formula-control-wrap,
.add-asset-page .formula-control-wrap,
.asset-edit-page .formula-control-wrap{
  position:relative;
  display:block;
  width:100%;
  min-width:0;
  align-self:center;
}
#formAddAsset .formula-control-wrap > input,
#formAddAsset .formula-control-wrap > select,
#formAddAsset .formula-control-wrap > textarea,
#assetEditForm .formula-control-wrap > input,
#assetEditForm .formula-control-wrap > select,
#assetEditForm .formula-control-wrap > textarea,
#addAssetModal .formula-control-wrap > input,
#addAssetModal .formula-control-wrap > select,
#addAssetModal .formula-control-wrap > textarea,
#assetEditModal .formula-control-wrap > input,
#assetEditModal .formula-control-wrap > select,
#assetEditModal .formula-control-wrap > textarea,
.add-asset-page .formula-control-wrap > input,
.add-asset-page .formula-control-wrap > select,
.add-asset-page .formula-control-wrap > textarea,
.asset-edit-page .formula-control-wrap > input,
.asset-edit-page .formula-control-wrap > select,
.asset-edit-page .formula-control-wrap > textarea{
  width:100%;
  max-width:100%;
  display:block;
  flex:none;
}
#formAddAsset .formula-control-wrap > .formula-field-dot,
#assetEditForm .formula-control-wrap > .formula-field-dot,
#addAssetModal .formula-control-wrap > .formula-field-dot,
#assetEditModal .formula-control-wrap > .formula-field-dot,
.add-asset-page .formula-control-wrap > .formula-field-dot,
.asset-edit-page .formula-control-wrap > .formula-field-dot,
#formAddAsset .required-input-wrap > .formula-field-dot,
#assetEditForm .required-input-wrap > .formula-field-dot,
#addAssetModal .required-input-wrap > .formula-field-dot,
#assetEditModal .required-input-wrap > .formula-field-dot,
.add-asset-page .required-input-wrap > .formula-field-dot,
.asset-edit-page .required-input-wrap > .formula-field-dot{
  position:absolute;
  left:-10px;
  top:50%;
  transform:translateY(-50%);
  margin:0;
  width:5px;
  height:5px;
  flex:none;
}
#formAddAsset .required-input-wrap,
#assetEditForm .required-input-wrap,
#addAssetModal .required-input-wrap,
#assetEditModal .required-input-wrap,
.add-asset-page .required-input-wrap,
.asset-edit-page .required-input-wrap:has(> .formula-field-dot){
  position:relative;
}
#formAddAsset .required-input-wrap,
#addAssetModal .required-input-wrap,
.add-asset-page .required-input-wrap{
  display:block;
  width:100%;
  min-width:0;
}
#formAddAsset .required-input-wrap > .required-field-dot,
#addAssetModal .required-input-wrap > .required-field-dot,
.add-asset-page .required-input-wrap > .required-field-dot{
  position:absolute;
  left:-10px;
  top:50%;
  transform:translateY(-50%);
  margin:0;
  width:5px;
  height:5px;
  flex:none;
}
#formAddAsset .required-input-wrap > input,
#addAssetModal .required-input-wrap > input,
.add-asset-page .required-input-wrap > input{
  width:100%;
  max-width:100%;
  display:block;
}
/* Gutter room for 5px dots (red left, blue right in RTL) — all fields same width */
#formAddAsset .modal-scroll-frame,
#addAssetModal #formAddAsset .modal-scroll-frame,
.add-asset-page #formAddAsset .modal-scroll-frame{
  padding-left:12px;
  padding-right:12px;
  box-sizing:border-box;
}
/* Asset edit — required dot in gutter; Entity / Asset name same width as Type */
#assetEditForm .required-input-wrap,
#assetEditModal .required-input-wrap,
.asset-edit-page .required-input-wrap{
  display:block;
  width:100%;
  min-width:0;
}
#assetEditForm .required-input-wrap > .required-field-dot,
#assetEditModal .required-input-wrap > .required-field-dot,
.asset-edit-page .required-input-wrap > .required-field-dot{
  position:absolute;
  left:-10px;
  top:50%;
  transform:translateY(-50%);
  margin:0;
  width:5px;
  height:5px;
  flex:none;
}
#assetEditForm .required-input-wrap > input.field-input,
#assetEditForm .required-input-wrap > select.field-input,
#assetEditModal .required-input-wrap > input.field-input,
#assetEditModal .required-input-wrap > select.field-input,
.asset-edit-page .required-input-wrap > input.field-input,
.asset-edit-page .required-input-wrap > select.field-input{
  width:100%;
  max-width:100%;
  display:block;
  flex:none;
}
/* Add/edit entity — full-width controls; dots inline in flex wraps (same as add-asset) */
#formAddEntity .modal-field select.field-input,
#addEntityModal .modal-field select.field-input,
.add-entity-page .modal-field select.field-input,
.edit-entity-page .modal-field select.field-input,
#formAddEntity .modal-field > select.field-input,
#addEntityModal .modal-field > select.field-input,
.add-entity-page .modal-field > select.field-input,
.edit-entity-page .modal-field > select.field-input{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
#formAddEntity .modal-field--locked select.field-input:disabled,
#addEntityModal .modal-field--locked select.field-input:disabled,
.add-entity-page .modal-field--locked select.field-input:disabled,
.edit-entity-page .modal-field--locked select.field-input:disabled{
  opacity:.88;
  cursor:not-allowed;
}
#formAddEntity .modal-field select.field-input,
#addEntityModal .modal-field select.field-input,
.add-entity-page .modal-field select.field-input,
.edit-entity-page .modal-field select.field-input{
  display:block;
  height:calc(22px + 1.25em);
  min-height:calc(22px + 1.25em);
  max-height:calc(22px + 1.25em);
  line-height:1.25;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding:10px 36px 10px 12px;
  overflow:hidden;
  text-overflow:ellipsis;
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:12px 12px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
}
#formAddEntity .modal-field .formula-control-wrap,
#addEntityModal .modal-field .formula-control-wrap,
.add-entity-page .modal-field .formula-control-wrap,
.edit-entity-page .modal-field .formula-control-wrap{
  width:100%;
  min-width:0;
}
#formAddEntity .modal-field .formula-control-wrap > input.field-input,
#formAddEntity .modal-field .formula-control-wrap > select.field-input,
#addEntityModal .modal-field .formula-control-wrap > input.field-input,
#addEntityModal .modal-field .formula-control-wrap > select.field-input,
.add-entity-page .modal-field .formula-control-wrap > input.field-input,
.add-entity-page .modal-field .formula-control-wrap > select.field-input,
.edit-entity-page .modal-field .formula-control-wrap > input.field-input,
.edit-entity-page .modal-field .formula-control-wrap > select.field-input{
  flex:1 1 auto;
  min-width:0;
  width:auto;
  max-width:100%;
}
.formula-field-help-trigger-wrap{
  margin:4px 0 12px;
}
.formula-field-help-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  font-size:13px;
  padding:6px 10px;
  line-height:1;
  box-sizing:border-box;
}
.formula-field-help-btn__dots{
  display:inline-flex;
  align-items:center;
  gap:3px;
  flex:0 0 auto;
}
.formula-field-help-dot{
  display:block;
  width:7px;
  height:7px;
  border-radius:50%;
  flex:0 0 auto;
}
.formula-field-help-dot--red{
  background:#f87171;
}
.formula-field-help-dot--blue{
  background:#38bdf8;
}
.formula-field-help-btn__label{
  flex:0 1 auto;
  min-width:0;
}
.modal-box--formula-help .formula-field-help-scroll{
  max-height:min(52vh, 420px);
}
.formula-field-help-entry{
  margin-bottom:16px;
  padding-bottom:14px;
  border-bottom:1px solid var(--stroke);
}
.formula-field-help-entry:last-child{
  margin-bottom:0;
  padding-bottom:0;
  border-bottom:none;
}
.formula-field-help-entry__title{
  margin:0 0 6px;
  font-size:15px;
  font-weight:600;
  color:var(--text);
}
.formula-field-help-entry__badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin:0 0 8px;
}
.formula-field-help-entry__badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:500;
  color:var(--text-muted);
}
.formula-field-help-entry__badge--muted{
  font-style:italic;
}
.formula-field-help-entry__purpose,
.formula-field-help-entry__empty{
  margin:0 0 6px;
  font-size:13px;
  line-height:1.45;
  color:var(--text-muted);
}
.formula-field-help-entry__empty strong{
  color:var(--text);
  font-weight:600;
}
.folder-page-pie-stage,
.entity-page-pie-stage{
  position:relative;
  width:100%;
  margin-bottom:0;
}
.home-page-charts-stack,
.folder-page-charts-stack,
.entity-page-charts-stack{
  display:flex;
  flex-direction:column;
  gap:24px;
  width:100%;
  margin-bottom:24px;
}
.home-main > .home-page-charts-stack{
  order:3;
  flex:0 0 auto;
  width:100%;
}
.home-page-charts-stack > .home-folder-pie-wrap{
  margin-bottom:0;
}
.folder-page-map-bubble{
  width:100%;
  max-height:420px;
  min-height:0;
  height:auto;
  padding:12px 16px;
  border-radius:var(--radius-sm);
  border:1px solid rgba(255,255,255,.1);
  background:var(--portiva-map-bg);
  backdrop-filter:none;
  box-shadow:none;
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
  overflow:hidden;
}
.folder-page-map-bubble--map-empty .home-hier-tree__placeholder--map-empty,
.home-hier-tree-page--empty-map .home-hier-tree__placeholder--map-empty{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:min(280px, 38vh);
  margin:0;
  padding:24px 20px;
  font-size:clamp(0.88rem, 2.8vw, 1rem);
  color:rgba(255,255,255,.62);
  text-align:center;
  line-height:1.45;
}
.home-hier-tree-page--empty-map .home-hier-tree-page__empty-map-wrap{
  flex:1 1 auto;
  width:100%;
  max-width:min(920px, 100%);
  min-height:min(52vh, 420px);
  max-height:none;
  margin:0 auto;
}
.home-hier-tree-page--empty-map .home-hier-tree-page__empty-map-panel{
  flex:1 1 auto;
  min-height:100%;
}
.folder-page-map-bubble--map-empty .home-hier-tree-panel--empty,
.home-hier-tree-page--empty-map .home-hier-tree-panel--empty{
  flex:1 1 auto;
  min-height:100%;
}
.folder-page-map-bubble--map-empty .home-hier-tree-panel--empty .home-hier-tree__main,
.home-hier-tree-page--empty-map .home-hier-tree-panel--empty .home-hier-tree__main{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:min(240px, 34vh);
}
.folder-page-map-bubble__title{
  margin:0;
  color:rgba(255,255,255,.5);
}
.folder-page-map-bubble .home-hier-tree__view-root{
  display:none;
  margin:0;
}
.folder-page-map-bubble .home-hier-tree__branch-stack{
  --home-hier-tier-height:clamp(56px, 10vw, 72px);
  padding:24px clamp(16px, 3.5vw, 28px) 0;
}
.folder-page-map-bubble .home-hier-tree__layout-wrap{
  min-height:0;
}
.folder-page-map-bubble .home-hier-tree-panel--compact .home-hier-tree__child-slot{
  max-width:11.5rem;
}
.folder-page-map-bubble .home-hier-tree-node:not(.home-hier-tree-node--folder){
  max-width:10.5rem;
  font-size:clamp(0.68rem, 1.75vw, 0.78rem);
  min-height:26px;
  padding:3px 8px;
}
.folder-page-map-bubble .home-hier-tree-node--entity{
  max-width:11rem;
}
.folder-page-map-bubble .home-hier-tree__row--root{
  position:relative;
  min-height:0;
  margin:0;
  padding:0;
}
.folder-page-map-bubble .home-hier-tree-panel,
.folder-page-map-bubble .entity-page-map-panel,
.folder-page-map-bubble .home-page-map-panel{
  flex:0 0 auto;
  min-height:0;
}
.folder-page-map-bubble .home-hier-tree__main{
  flex:0 0 auto;
  min-height:0;
  height:auto;
  overflow:auto;
  overflow-x:auto;
  overflow-y:auto;
  background:var(--portiva-map-bg);
  touch-action:pan-x pan-y;
  overscroll-behavior:contain;
  padding:8px 0 12px;
  box-sizing:border-box;
  -webkit-overflow-scrolling:touch;
}
.folder-page-map-bubble .home-hier-tree__main.home-hier-tree__main--fits{
  overflow:auto;
  overflow-x:auto;
  overflow-y:auto;
}
/* Desktop: fitted map should not capture vertical page scroll. */
@media (min-width:901px){
  .folder-page-map-bubble .home-hier-tree__main{
    overscroll-behavior:auto;
  }
  .folder-page-map-bubble .home-hier-tree__main.home-hier-tree__main--desk-page-scroll,
  .folder-page-map-bubble .home-hier-tree__main.home-hier-tree__main--desk-page-scroll.home-hier-tree__main--fits{
    overflow:hidden;
    touch-action:auto;
  }
}
@media (max-width:900px){
  .folder-page-map-bubble{
    max-height:280px;
    min-height:0;
    height:auto;
    padding:8px 12px;
    overflow:hidden;
  }
  .folder-page-map-bubble .folder-page-map-panel,
  .folder-page-map-bubble .entity-page-map-panel,
  .folder-page-map-bubble .home-page-map-panel{
    flex:1 1 auto;
    min-height:0;
    max-height:100%;
    overflow:hidden;
  }
  .folder-page-map-bubble .home-hier-tree__main{
    padding:6px 0 10px;
    max-height:100%;
  }
  .folder-page-map-bubble .home-hier-tree__branch-stack{
    padding-top:20px;
  }
  .folder-page-map-bubble .home-hier-tree__stage{
    min-width:0;
    width:max-content;
    margin-left:0;
    margin-right:0;
  }
  .folder-page-map-bubble .home-hier-tree__layers{
    width:max-content;
    min-width:0;
    align-items:flex-start;
  }
  .folder-page-map-bubble .home-hier-tree__branch-stack{
    align-items:flex-start;
    min-width:0;
    margin-left:0;
    margin-right:0;
  }
}
.folder-page-map-bubble .home-hier-tree__stage{
  margin-top:0;
}
.folder-page-map-bubble .folder-page-map-panel,
.folder-page-map-bubble .entity-page-map-panel,
.folder-page-map-bubble .home-page-map-panel{
  flex:1 1 auto;
  min-height:0;
  max-height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:var(--portiva-map-bg);
}
.folder-page-map-bubble .home-hier-tree__stage,
.folder-page-map-bubble .home-hier-tree__layers{
  background:var(--portiva-map-bg);
}
[data-theme="day"] .folder-page-map-bubble,
[data-theme="dawn"] .folder-page-map-bubble,
[data-theme="classic"] .folder-page-map-bubble{
  background:var(--portiva-map-bg);
  border-color:rgba(255,255,255,.12);
}
.folder-page-pie-wrap,
.entity-page-pie-wrap{
  overflow:visible;
  margin-bottom:0;
}
.entity-page-pie-wrap .portiva-overview-pie-layout .pieChartSvgWrap{
  position:relative;
}
.folder-page-pie-wrap .home-overview-chart-pane--entities .pieDonutCenter--countOnly .pieDonutCenterLabel{
  fill:#ffffff;
}
.folder-page-pie-wrap .detailsChartSection--folder-entity.detailsChartSection--overview-tabs{
  overflow:hidden;
}
.folder-page-pie-wrap .detailsChartSection--folder-entity > .home-overview-chart-tabs--folder-name{
  width:100%;
  box-sizing:border-box;
}
.entity-page-pie-wrap .detailsChartSection--entity-page.detailsChartSection--folder-entity{
  overflow:visible;
}
.entity-page-pie-wrap .pieChartBlockSubtitle,
.home-folder-pie-wrap .entity-page-pie-wrap .pieChartBlockSubtitle{
  display:block;
  opacity:1;
}
.entity-page-pie-wrap .detailsChartSection--entity-page > .home-overview-chart-tabs--folder-name{
  width:100%;
  box-sizing:border-box;
}
.entity-page-pie-wrap .detailsChartSection--entity-page > .home-overview-chart-pane{
  width:100%;
  box-sizing:border-box;
}
.folder-page-pie-wrap .detailsChartSection--folder-entity > .pieChartBlock{
  width:100%;
  box-sizing:border-box;
}
.folder-page-pie-wrap .detailsChartSection--folder-entity > .home-folder-pie-fallback__msg{
  margin:0;
  padding:18px 16px 4px;
  text-align:center;
}
/* Inline map toggle: hide pie only; legend + chart slot size unchanged */
.folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .pieChartSvgWrap,
.home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .pieChartSvgWrap,
.entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .pieChartSvgWrap{
  position:relative;
}
.folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .pieChartSvgWrap > .pieSvg,
.home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .pieChartSvgWrap > .pieSvg,
.entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .pieChartSvgWrap > .pieSvg{
  visibility:hidden;
  pointer-events:none;
}
.folder-page-pie-wrap .folder-page-pie-map-slot,
.home-folder-pie-wrap .folder-page-pie-map-slot,
.entity-page-pie-wrap .folder-page-pie-map-slot{
  position:absolute;
  left:0;
  right:0;
  top:0;
  bottom:0;
  z-index:2;
  display:none;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  pointer-events:none;
}
.folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .folder-page-pie-map-slot,
.home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .folder-page-pie-map-slot,
.entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .folder-page-pie-map-slot{
  display:flex;
  pointer-events:auto;
}
.folder-page-pie-wrap .folder-page-pie-map-slot > .folder-page-map-bubble--in-chart-pane,
.home-folder-pie-wrap .folder-page-pie-map-slot > .folder-page-map-bubble--in-chart-pane,
.entity-page-pie-wrap .folder-page-pie-map-slot > .folder-page-map-bubble--in-chart-pane{
  flex:0 1 auto;
  width:100%;
  max-width:100%;
  height:auto;
  max-height:100%;
  margin:0;
  padding:0;
  border:none;
  border-radius:var(--radius-sm);
  background:var(--portiva-map-bg);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  align-self:center;
}
.folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-panel,
.home-folder-pie-wrap .folder-page-pie-map-slot .home-page-map-panel,
.entity-page-pie-wrap .folder-page-pie-map-slot .entity-page-map-panel{
  flex:1 1 auto;
  min-height:0;
  max-height:min(320px,100%);
  border-radius:inherit;
  overflow:hidden;
}
.folder-page-pie-wrap .folder-page-pie-map-slot .home-hier-tree__main,
.home-folder-pie-wrap .folder-page-pie-map-slot .home-hier-tree__main,
.entity-page-pie-wrap .folder-page-pie-map-slot .home-hier-tree__main{
  flex:1 1 auto;
  min-height:0;
  max-height:100%;
  border-radius:inherit;
}
/* Pie chart mini map (Map toggle in chart pane): center subtree in the frame */
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__main{
  align-items:center;
}
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__stage{
  min-width:0;
  width:max-content;
  margin-left:auto;
  margin-right:auto;
}
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__layers,
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__branch-stack{
  align-items:center;
  min-width:0;
  margin-left:auto;
  margin-right:auto;
}
/* Flat layout mini map: center the layout-wrap subtree (not only compact bricks). */
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel:not(.home-hier-tree-panel--compact) .home-hier-tree__layout-wrap{
  margin-left:auto;
  margin-right:auto;
}
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel:not(.home-hier-tree-panel--compact) .home-hier-tree__row--branch,
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel:not(.home-hier-tree-panel--compact) .home-hier-tree__row--root{
  min-width:0;
}
/* Mini map: grow node boxes to fit painted labels (layout measure uses a smaller font). */
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__child-slot{
  max-width:none;
}
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__child-slot .home-hier-tree-node,
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__row--root .home-hier-tree-node{
  width:100%;
  max-width:none;
  height:auto;
  overflow:visible;
  box-sizing:border-box;
}
.folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-node__label{
  overflow:visible;
  text-overflow:clip;
}
@media (min-width:901px){
  .folder-page-pie-wrap .detailsChartSection--folder-entity > .pieChartBlock.home-overview-pie-analyst,
  .entity-page-pie-wrap .detailsChartSection--folder-entity > .home-overview-chart-pane .pieChartBlock.home-overview-pie-analyst{
    display:contents;
    padding:0;
  }
  .folder-page-pie-wrap .detailsChartSection--folder-entity > .home-folder-pie-fallback__msg{
    grid-column:1 / -1;
    justify-self:stretch;
    padding:18px 16px 4px;
  }
  /* Entity page empty chart: pane uses legend|chart grid — span full width and center. */
  .portiva-overview-pie-layout > .empty{
    grid-column:1 / -1;
    justify-self:center;
    max-width:min(680px, calc(100% - 32px));
    width:100%;
    margin:20px 0;
    box-sizing:border-box;
  }
}
.add-asset-inline-fields{
  display:flex;
  flex-direction:column;
  gap:0;
}
.modal-form-group-bubble.entityDetailsBubble{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  margin-top:0;
  margin-bottom:0;
  width:100%;
  box-sizing:border-box;
}
.portiva-asset-form-bubble-stack,
#addAssetModal #formAddAsset .modal-scroll-frame,
.add-asset-page #formAddAsset .modal-scroll-frame,
#assetEditModal #assetEditForm .modal-scroll-frame,
.asset-edit-page #assetEditForm .modal-scroll-frame,
#assetEditModal .detail-dl.detail-dl--form,
.asset-edit-page .detail-dl.detail-dl--form,
#addEntityModal #formAddEntity .modal-scroll-frame,
#addEntityModal #formAddEntity .add-entity-scroll-fields,
.add-entity-page #formAddEntityPage .modal-scroll-frame,
.add-entity-page #formAddEntityPage .add-entity-scroll-fields,
.edit-entity-page #formEditEntity .modal-scroll-frame,
.edit-entity-page #formEditEntity .add-entity-scroll-fields{
  --portiva-form-bubble-gap:18px;
  --portiva-form-bubble-row-gap:10px;
}
.portiva-asset-form-bubble-stack{
  display:flex;
  flex-direction:column;
  gap:var(--portiva-form-bubble-gap,18px);
}
#addAssetModal #formAddAsset .modal-scroll-frame,
.add-asset-page #formAddAsset .modal-scroll-frame,
#assetEditModal #assetEditForm .modal-scroll-frame,
.asset-edit-page #assetEditForm .modal-scroll-frame,
#assetEditModal .detail-dl.detail-dl--form,
.asset-edit-page .detail-dl.detail-dl--form{
  display:flex;
  flex-direction:column;
  gap:var(--portiva-form-bubble-gap,18px);
}
#addEntityModal #formAddEntity .modal-scroll-frame,
.add-entity-page #formAddEntityPage .modal-scroll-frame,
.edit-entity-page #formEditEntity .modal-scroll-frame{
  gap:var(--portiva-form-bubble-gap,18px);
}
#assetEditModal .detail-dl.detail-dl--form,
.asset-edit-page .detail-dl.detail-dl--form{
  border:none;
  background:transparent;
  padding:0;
}
.detail-dl.detail-dl--form > .entityDetailsBubble,
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-form-group-bubble{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:8px;
  padding:12px 14px;
  border-bottom:none;
}
.detail-dl.detail-dl--form > label.modal-field{
  display:grid;
  justify-content:initial;
  padding:0;
  border-bottom:none;
}
.detail-dl.detail-dl--form > input[type="hidden"]{
  display:none;
  padding:0;
  border-bottom:none;
}
#assetEditModal .entityDetailsBubble .modal-field,
.asset-edit-page .entityDetailsBubble .modal-field,
#addAssetModal .entityDetailsBubble .modal-field,
.add-asset-page .entityDetailsBubble .modal-field{
  display:grid;
  grid-template-columns:minmax(96px,34%) minmax(0,1fr);
  align-items:center;
  gap:8px;
  flex-direction:unset;
}
#assetEditModal .entityDetailsBubble .detail-field:not(.detail-field--stack),
.asset-edit-page .entityDetailsBubble .detail-field:not(.detail-field--stack){
  display:grid;
  grid-template-columns:minmax(96px,34%) minmax(0,1fr);
  align-items:center;
  gap:8px;
  padding:0;
  border-bottom:none;
  justify-content:initial;
}
#assetEditModal .entityDetailsBubble .detail-field dt,
.asset-edit-page .entityDetailsBubble .detail-field dt{
  margin-bottom:0;
}
.modal-form-group-bubble__inner,
.modal-optional-fields-bubble__inner{
  display:flex;
  flex-direction:column;
  gap:var(--portiva-form-bubble-row-gap,10px);
  width:100%;
}
/* Entity/asset add & edit — rows inside each bubble */
.add-entity-page .modal-form-group-bubble__inner,
.edit-entity-page .modal-form-group-bubble__inner,
.add-entity-page .add-entity-section .modal-form-group-bubble__inner,
.edit-entity-page .add-entity-section .modal-form-group-bubble__inner,
.add-asset-page .modal-form-group-bubble__inner,
.asset-edit-page .modal-form-group-bubble__inner,
#addEntityModal .add-entity-section .modal-form-group-bubble__inner,
#addAssetModal .modal-form-group-bubble__inner,
#assetEditModal .modal-form-group-bubble__inner,
#assetEditModal .modal-optional-fields-bubble__inner,
.portiva-mobile-form-page .modal-form-group-bubble__inner{
  gap:var(--portiva-form-bubble-row-gap,10px);
}
.entityDetailsBubble .modal-form-group-bubble__inner > .modal-field,
.add-entity-section .modal-form-group-bubble__inner > .modal-field,
.add-asset-page .entityDetailsBubble .modal-form-group-bubble__inner > .modal-field,
.asset-edit-page .entityDetailsBubble .modal-form-group-bubble__inner > .modal-field{
  width:100%;
  margin:0;
  align-items:center;
}
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-form-group-bubble .detail-field.detail-field--stack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:6px;
  width:100%;
}
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-form-group-bubble .detail-field.detail-field--stack dt,
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-form-group-bubble .detail-field.detail-field--stack dd{
  width:100%;
  max-width:100%;
  text-align:left;
}

.section-title--row{
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.rename-folder-page__error{
  margin:8px 0 0;
  font-size:13px;
  line-height:1.4;
  color:var(--danger, #c62828);
}
.rename-folder-page__error[hidden]{
  display:none;
}
.rename-folder-page__lead{
  margin:0 0 16px;
  font-size:14px;
  line-height:1.45;
  color:var(--text-muted);
}
.rename-folder-page__lead strong{
  color:var(--text);
  font-weight:600;
}
.rename-folder-page .modal-field,
.rename-folder-page .modal-field > span,
#newEntityDomainCustomWrap.modal-field,
#newEntityDomainCustomWrap.modal-field > span{
  color:var(--text);
}
.rename-folder-page__nav-grid{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:12px;
  width:100%;
}
.rename-folder-page__nav-title{
  margin:0;
  font-size:1.05rem;
  font-weight:600;
}
.rename-folder-page__nav-actions{
  flex-wrap:nowrap;
}
.entity-section-toolbar{
  margin:0 0 14px;
}
.entity-page-charts-stack .entity-section-toolbar--below-legend{
  margin:14px 0 0;
  order:2;
}
.entity-details-inline > .entity-page-charts-stack{
  margin-bottom:12px;
  gap:12px;
}
.entity-page-exclude-toolbar{
  margin:12px 0 0;
}
.entity-page-exclude-toolbar .entity-section-toolbar__row{
  margin-bottom:0;
}
.entity-page-charts-stack > .entity-page-pie-stage{
  order:1;
}
.entity-section-toolbar__row > .entity-section-toolbar__action-stack{
  flex:1 1 0;
  min-width:0;
  width:100%;
}
.entity-section-toolbar__action-stack .home-equity-spot-label,
.entity-section-toolbar__action-stack .home-usd-spot-rate{
  min-height:calc(max(11px, 0.7rem) * 1.15);
}
.entity-section-toolbar__action-stack .home-equity-spot-label[hidden],
.entity-section-toolbar__action-stack .home-usd-spot-rate[hidden]{
  display:block;
  visibility:hidden;
}
.entity-section-toolbar__action-stack .home-equity-add-entity-btn,
.entity-section-toolbar__action-stack [data-folder-action="add-entity"]{
  width:100%;
  align-self:stretch;
}
.entity-section-toolbar__row{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:stretch;
  gap:10px;
  margin-bottom:12px;
}
.entity-section-toolbar__row > .btn--compact{
  flex:1 1 0;
  min-width:0;
}
.btn--compact{
  padding:8px 14px;
  font-size:.82rem;
}

.form-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
  margin-top:8px;
}
.form-actions--spread{
  justify-content:space-between;
}
.form-actions--center{
  justify-content:center;
  margin-top:14px;
}
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:10px;
}
.modal-hint{
  margin:0 0 14px;
  font-size:.88rem;
  line-height:1.45;
  color:var(--muted);
}
.modal-hint--error{
  color:#b91c1c;
  margin-bottom:0;
}
[data-theme="night"] .modal-hint--error,
[data-theme="dawn"] .modal-hint--error{
  color:#fca5a5;
}
.modal-box--gate{
  max-width:min(92vw,360px);
  padding:18px 18px 16px;
}
.modal-box--gate .modal-title{
  margin:0 0 8px;
  font-size:1rem;
}
.firebase-gate-err{
  font-size:.84rem;
  color:#b91c1c;
  margin:-4px 0 12px;
  line-height:1.4;
}
[data-theme="night"] .firebase-gate-err,
[data-theme="dawn"] .firebase-gate-err{
  color:#fca5a5;
}
.modal-form--scroll{
  max-height:min(70vh,560px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding-right:4px;
}
.modal-scroll-frame{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.modal-box--add-entity .modal-form--scroll{
  display:flex;
  flex-direction:column;
  max-height:min(82dvh,560px);
  overflow:hidden;
  overscroll-behavior:contain;
}
.modal-box--add-asset-wide{
  max-width:min(94vw,880px);
}
.add-asset-entity-context{
  margin:0 0 12px;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:rgba(148,163,184,.08);
}
.add-asset-form-subtitle{
  margin:0 0 12px;
  font-size:.95rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.4;
  word-break:break-word;
}
#assetEditModal .modal-title + .add-asset-form-subtitle,
#assetEditModal .modal-title + .asset-edit-form-subtitle{
  margin-top:-4px;
}
.add-asset-page .portiva-flow-page__hero .add-asset-form-subtitle{
  margin:4px 0 0;
}
/* Add / edit form bubbles — blue-black on legacy night-gray only (Night uses gray menu surface below). */
[data-theme="night-gray"] #addEntityModal .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] #addEntityModal .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] .add-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] .add-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] .edit-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] .edit-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
.welcome-auth-page .welcome-auth-bubble.entityDetailsBubble.modal-form-group-bubble{
  background:#0a0e14;
  border-color:rgba(255,255,255,.2);
}
[data-theme="night-gray"] #addAssetModal .entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] #addAssetModal .entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] #addAssetModal #addAssetSectionCashflow.entityDetailsBubble,
[data-theme="gray-night"] #addAssetModal #addAssetSectionCashflow.entityDetailsBubble,
[data-theme="night-gray"] #addAssetModal .add-asset-bubble--docs,
[data-theme="gray-night"] #addAssetModal .add-asset-bubble--docs,
[data-theme="night-gray"] #addAssetModal .add-asset-bubble--comments,
[data-theme="gray-night"] #addAssetModal .add-asset-bubble--comments,
[data-theme="night-gray"] .add-asset-page .entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] .add-asset-page .entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] .add-asset-page #addAssetSectionCashflow.entityDetailsBubble,
[data-theme="gray-night"] .add-asset-page #addAssetSectionCashflow.entityDetailsBubble,
[data-theme="night-gray"] .add-asset-page .add-asset-bubble--docs,
[data-theme="gray-night"] .add-asset-page .add-asset-bubble--docs,
[data-theme="night-gray"] .add-asset-page .add-asset-bubble--comments,
[data-theme="gray-night"] .add-asset-page .add-asset-bubble--comments,
[data-theme="night-gray"] #addEntityModal .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] #addEntityModal .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] .add-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] .add-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] .edit-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] .edit-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] #assetEditModal .detail-dl.detail-dl--form > .entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] #assetEditModal .detail-dl.detail-dl--form > .entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] #assetEditModal .detail-dl.detail-dl--form > .entityDetailsBubble.add-asset-bubble--docs,
[data-theme="gray-night"] #assetEditModal .detail-dl.detail-dl--form > .entityDetailsBubble.add-asset-bubble--docs,
[data-theme="night-gray"] #assetEditModal .detail-dl.detail-dl--form > .entityDetailsBubble.add-asset-bubble--comments,
[data-theme="gray-night"] #assetEditModal .detail-dl.detail-dl--form > .entityDetailsBubble.add-asset-bubble--comments,
[data-theme="night-gray"] .asset-edit-page .detail-dl.detail-dl--form > .entityDetailsBubble.modal-form-group-bubble,
[data-theme="gray-night"] .asset-edit-page .detail-dl.detail-dl--form > .entityDetailsBubble.modal-form-group-bubble,
[data-theme="night-gray"] .asset-edit-page .detail-dl.detail-dl--form > .entityDetailsBubble.add-asset-bubble--docs,
[data-theme="gray-night"] .asset-edit-page .detail-dl.detail-dl--form > .entityDetailsBubble.add-asset-bubble--docs,
[data-theme="night-gray"] .asset-edit-page .detail-dl.detail-dl--form > .entityDetailsBubble.add-asset-bubble--comments,
[data-theme="gray-night"] .asset-edit-page .detail-dl.detail-dl--form > .entityDetailsBubble.add-asset-bubble--comments{
  background:#1a2234;
  border-width:2px;
  border-style:solid;
  border-color:rgba(255,255,255,.28);
}
/* Night only: bubbles match Export & Import import surface (not near-black #0a0e14 / #1a2234). */
html[data-theme="night"] .entityDetailsBubble,
html[data-theme="night"] .entityDetailsBubble.modal-form-group-bubble,
html[data-theme="night"] .add-asset-bubble--docs,
html[data-theme="night"] .add-asset-bubble--comments,
html[data-theme="night"] #addAssetModal #addAssetSectionCashflow.entityDetailsBubble,
html[data-theme="night"] .add-asset-page #addAssetSectionCashflow.entityDetailsBubble,
html[data-theme="night"] .stat-card,
html[data-theme="night"] .detailsChartSection,
html[data-theme="night"] .modal-box,
html[data-theme="night"] .welcome-auth-bubble,
html[data-theme="night"] .welcome-auth-bubble.entityDetailsBubble.modal-form-group-bubble,
html[data-theme="night"] .topbar-overflow-panel,
html[data-theme="night"] fieldset.export-csv-scope,
html[data-theme="night"] .portiva-flow-page .export-csv-scope{
  background:var(--portiva-menu-surface);
  border-width:1px;
  border-style:solid;
  border-color:var(--portiva-menu-surface-border, var(--stroke));
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
/* Night overflow menu only: solid surface, no glass blur. */
html[data-theme="night"] .topbar-overflow-panel{
  background:#1e293b;
  border-color:#475569;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
/* Night layout settings dropdown popups only. */
[data-theme="night"] .theme-select--layout-settings{
  color-scheme:dark;
}
[data-theme="night"] .theme-select--layout-settings option{
  background-color:#334155;
  color:#f1f5f9;
}
[data-theme="night"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="night-gray"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="gray-night"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="night"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="night-gray"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="gray-night"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="night"] #addEntityModal .add-entity-section .entityDetailsBubbleTitle,
[data-theme="night-gray"] #addEntityModal .add-entity-section .entityDetailsBubbleTitle,
[data-theme="gray-night"] #addEntityModal .add-entity-section .entityDetailsBubbleTitle,
[data-theme="night"] .add-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="night-gray"] .add-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="gray-night"] .add-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="night"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="night-gray"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitle,
[data-theme="gray-night"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitle,
.welcome-auth-page .welcome-auth-bubble .entityDetailsBubbleTitle,
[data-theme="night"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="night-gray"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="gray-night"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="night"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="night-gray"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="gray-night"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitle,
[data-theme="night"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
.welcome-auth-page .welcome-auth-bubble .entityDetailsBubbleTitleHint,
[data-theme="night"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint{
  color:rgba(255,255,255,.92);
}
[data-theme="night"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] #addAssetModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] .add-asset-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] #addEntityModal .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] .add-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] .edit-entity-page .add-entity-section .entityDetailsBubbleTitleHint,
.welcome-auth-page .welcome-auth-bubble .entityDetailsBubbleTitleHint,
[data-theme="night"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] #assetEditModal .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="night-gray"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint,
[data-theme="gray-night"] .asset-edit-page .entityDetailsBubble .entityDetailsBubbleTitleHint{
  color:rgba(255,255,255,.65);
}
#addAssetModal .entityDetailsBubble .modal-field > span:not(.formula-control-wrap):not(.required-input-wrap),
.add-asset-page .entityDetailsBubble .modal-field > span:not(.formula-control-wrap):not(.required-input-wrap),
#addAssetModal .entityDetailsBubble .named-links-editor .modal-field > span:not(.formula-control-wrap):not(.required-input-wrap),
.add-asset-page .entityDetailsBubble .named-links-editor .modal-field > span:not(.formula-control-wrap):not(.required-input-wrap),
.welcome-auth-page .welcome-auth-bubble .modal-field{
  display:grid;
  grid-template-columns:minmax(96px,34%) minmax(0,1fr);
  align-items:center;
  gap:8px;
  font-size:.84rem;
}
#addAssetModal .entityDetailsBubble .modal-field > span:not(.formula-control-wrap):not(.required-input-wrap),
.add-asset-page .entityDetailsBubble .modal-field > span:not(.formula-control-wrap):not(.required-input-wrap),
#addAssetModal .entityDetailsBubble .named-links-editor .modal-field > span:not(.formula-control-wrap):not(.required-input-wrap),
.add-asset-page .entityDetailsBubble .named-links-editor .modal-field > span:not(.formula-control-wrap):not(.required-input-wrap),
.welcome-auth-page .welcome-auth-bubble .modal-field > span,
.asset-stock-basis__opt > span,
.asset-stock-basis__label{
  display:inline;
  grid-template-columns:unset;
  min-width:0;
}
.entityDetailsBubble .modal-field > .formula-control-wrap,
.entityDetailsBubble .modal-field > .required-input-wrap,
.add-entity-section .modal-field > .formula-control-wrap,
.add-entity-section .modal-field > .required-input-wrap,
#addAssetModal .entityDetailsBubble .modal-field > .formula-control-wrap,
#addAssetModal .entityDetailsBubble .modal-field > .required-input-wrap,
.add-asset-page .entityDetailsBubble .modal-field > .formula-control-wrap,
.add-asset-page .entityDetailsBubble .modal-field > .required-input-wrap,
#assetEditModal .entityDetailsBubble .modal-field > .formula-control-wrap,
#assetEditModal .entityDetailsBubble .modal-field > .required-input-wrap,
.asset-edit-page .entityDetailsBubble .modal-field > .formula-control-wrap,
.asset-edit-page .entityDetailsBubble .modal-field > .required-input-wrap{
  display:flex;
  align-items:center;
  width:100%;
  min-width:0;
  align-self:center;
}
.welcome-auth-page .welcome-auth-bubble .modal-field .field-input{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
[data-theme="night"] #addEntityModal .add-entity-section .modal-field > span,
[data-theme="night-gray"] #addEntityModal .add-entity-section .modal-field > span,
[data-theme="gray-night"] #addEntityModal .add-entity-section .modal-field > span,
[data-theme="night"] #addEntityModal .add-entity-section .named-links-editor .modal-field > span,
[data-theme="night-gray"] #addEntityModal .add-entity-section .named-links-editor .modal-field > span,
[data-theme="gray-night"] #addEntityModal .add-entity-section .named-links-editor .modal-field > span,
[data-theme="night"] .add-entity-page .add-entity-section .modal-field > span,
[data-theme="night-gray"] .add-entity-page .add-entity-section .modal-field > span,
[data-theme="gray-night"] .add-entity-page .add-entity-section .modal-field > span,
[data-theme="night"] .add-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="night-gray"] .add-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="gray-night"] .add-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="night"] .edit-entity-page .add-entity-section .modal-field > span,
[data-theme="night-gray"] .edit-entity-page .add-entity-section .modal-field > span,
[data-theme="gray-night"] .edit-entity-page .add-entity-section .modal-field > span,
[data-theme="night"] .edit-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="night-gray"] .edit-entity-page .add-entity-section .named-links-editor .modal-field > span,
[data-theme="gray-night"] .edit-entity-page .add-entity-section .named-links-editor .modal-field > span,
.welcome-auth-page .welcome-auth-bubble .modal-field > span,
[data-theme="night"] #assetEditModal .entityDetailsBubble .modal-field > span,
[data-theme="night-gray"] #assetEditModal .entityDetailsBubble .modal-field > span,
[data-theme="gray-night"] #assetEditModal .entityDetailsBubble .modal-field > span,
[data-theme="night"] .asset-edit-page .entityDetailsBubble .modal-field > span,
[data-theme="night-gray"] .asset-edit-page .entityDetailsBubble .modal-field > span,
[data-theme="gray-night"] .asset-edit-page .entityDetailsBubble .modal-field > span,
[data-theme="night"] #assetEditModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="night-gray"] #assetEditModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="gray-night"] #assetEditModal .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="night"] .asset-edit-page .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="night-gray"] .asset-edit-page .entityDetailsBubble .named-links-editor .modal-field > span,
[data-theme="gray-night"] .asset-edit-page .entityDetailsBubble .named-links-editor .modal-field > span{
  color:rgba(255,255,255,.88);
}
[data-theme="night"] #assetEditModal .entityDetailsBubble.modal-hint,
[data-theme="night-gray"] #assetEditModal .entityDetailsBubble.modal-hint,
[data-theme="gray-night"] #assetEditModal .entityDetailsBubble.modal-hint,
[data-theme="night"] .asset-edit-page .entityDetailsBubble .modal-hint,
[data-theme="night-gray"] .asset-edit-page .entityDetailsBubble .modal-hint,
[data-theme="gray-night"] .asset-edit-page .entityDetailsBubble .modal-hint{
  color:rgba(255,255,255,.65);
}
.add-asset-entity-context__title{
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  margin:0 0 4px;
}
.add-asset-entity-context__name{
  font-size:1rem;
  font-weight:600;
  color:var(--text);
  line-height:1.35;
  word-break:break-word;
}
/* Asset edit modal: wide on desktop; on small screens keep similar card width but reclaim horizontal space for fields */
html.modern-modal-scroll-locked,
body.modern-modal-scroll-locked{
  overflow:hidden;
  height:100%;
}
body.modern-modal-scroll-locked{
  position:fixed;
  left:0;
  right:0;
  width:100%;
}
@media (max-width:899px){
  html.modern-modal-scroll-locked,
  body.modern-modal-scroll-locked{
    overflow:hidden;
    overscroll-behavior:none;
  }
  body.modern-modal-scroll-locked{
    position:static;
    width:auto;
    touch-action:none;
  }
  /* iOS home-screen: never use touch-action:none on body (blocks keyboard focus) */
  html.ios-pwa body.modern-modal-scroll-locked{
    touch-action:auto;
  }
  html.ios-pwa body{
    touch-action:auto;
  }
  /* Body stays auto for keyboard; shells still disable double-tap zoom. */
  html.ios-pwa #view,
  html.ios-pwa .app-shell,
  html.ios-pwa .topbar,
  html.ios-pwa main,
  html.ios-pwa .modal-overlay{
    touch-action:manipulation;
  }
  body.modern-modal-scroll-locked .summaries-list-body,
  body.modern-modal-scroll-locked .home-equity-principal-modal__body,
  body.modern-modal-scroll-locked #assetEditModal .modal-box--edit-asset,
  body.modern-modal-scroll-locked #addAssetModal .modal-box--add-asset-wide,
  body.modern-modal-scroll-locked #addEntityModal.entity-mobile-page .modal-box--add-entity,
  body.modern-modal-scroll-locked #addAssetTypePickerModal .modal-box--pick-type,
  body.modern-modal-scroll-locked #assetEditForm .modal-scroll-frame,
  body.modern-modal-scroll-locked #assetEditForm.modal-form--scroll,
  body.modern-modal-scroll-locked #formAddAsset .modal-scroll-frame,
  body.modern-modal-scroll-locked #formAddAsset.modal-form--scroll,
  body.modern-modal-scroll-locked #formAddEntity .modal-scroll-frame,
  body.modern-modal-scroll-locked #formAddEntity.modal-form--scroll,
  body.modern-modal-scroll-locked .add-entity-scroll-fields,
  body.modern-modal-scroll-locked .modal-box--csv-transfer,
  body.modern-modal-scroll-locked .modal-box--layout-settings,
  body.modern-modal-scroll-locked .modal-box--restore-backup,
  body.modern-modal-scroll-locked .modal-box--welcome-auth,
  body.modern-modal-scroll-locked .modal-box--welcome-contact{
    touch-action:pan-y;
  }
}
/* Form fields must stay touch-action:auto so keyboard/focus still works when shells use manipulation. */
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):not([type="image"]),
textarea,
select{
  touch-action:auto;
}
/* iOS installed app: inputs need touch-action:auto (manipulation/none on body blocks keyboard) */
html.ios-pwa input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):not([type="image"]),
html.ios-pwa textarea,
html.ios-pwa select{
  touch-action:auto !important;
  -webkit-user-select:text !important;
  user-select:text !important;
  position:relative;
  z-index:1;
}
html.ios-pwa label{
  touch-action:auto;
}
#assetEditModal.modal-overlay,
#addAssetModal.modal-overlay,
#addAssetTypePickerModal.modal-overlay,
#addEntityModal.modal-overlay{
  align-items:flex-start;
  overflow:hidden;
  overscroll-behavior:contain;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(6px);
}
#assetEditModal .modal-box--edit-asset,
#addAssetModal .modal-box--add-asset-wide,
#addEntityModal .modal-box--add-entity,
#addAssetTypePickerModal .modal-box--pick-type{
  background:color-mix(in srgb, var(--glass) 72%, var(--bg0));
  border-color:rgba(148,163,184,.18);
}
.modal-box--edit-asset{
  width:100%;
  max-width:min(98vw,540px);
  max-height:calc(100dvh - 40px);
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
@media (min-width:900px){
  #assetEditModal .modal-box--edit-asset,
  #addAssetModal .modal-box--add-asset-wide,
  #addEntityModal .modal-box--add-entity,
  #addAssetTypePickerModal .modal-box--pick-type{
    width:min(94vw,880px);
    max-width:min(94vw,880px);
    max-height:calc(100dvh - 40px);
    overflow:hidden;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    display:flex;
    flex-direction:column;
    padding:18px 18px 22px;
  }
  #addAssetTypePickerModal .modal-box--pick-type{
    width:min(94vw,680px);
    max-width:min(94vw,680px);
  }
  .modal-box--edit-asset{
    max-width:min(94vw,880px);
  }
  #assetEditForm,
  #formAddAsset,
  #addEntityModal #formAddEntity{
    display:flex;
    flex-direction:column;
    gap:10px;
    max-height:none;
    overflow:hidden;
    padding:0;
    min-height:0;
    flex:1 1 auto;
  }
  #assetEditForm .modal-scroll-frame,
  #formAddAsset .modal-scroll-frame,
  #addEntityModal #formAddEntity .modal-scroll-frame{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding-right:4px;
  }
  #assetEditForm .form-actions,
  #formAddAsset .form-actions,
  #addEntityModal #formAddEntity .form-actions,
  #addAssetTypePickerModal .form-actions{
    order:10;
    position:sticky;
    bottom:0;
    z-index:20;
    margin:0;
    margin-top:auto;
    padding:12px 0 0;
    flex:0 0 auto;
    flex-wrap:nowrap;
    justify-content:flex-start;
    gap:8px;
    background:color-mix(in srgb, var(--glass) 92%, var(--bg0));
    border-top:1px solid var(--stroke);
    border-bottom:0;
    box-shadow:0 -10px 22px rgba(15,23,42,.14);
  }
  #assetEditForm .form-actions .btn,
  #formAddAsset .form-actions .btn,
  #addEntityModal #formAddEntity .form-actions .btn,
  #addAssetTypePickerModal .form-actions .btn{
    flex:1 1 0;
    min-width:0;
  }
  #assetEditModal .modal-close-btn,
  #addEntityModal .modal-close-btn{
    display:none;
  }
  .modal-box--add-entity .modal-form--scroll{
    max-height:none;
    overflow:hidden;
  }
  .add-entity-scroll-fields{
    flex:0 0 auto;
    overflow:visible;
    max-height:none;
    padding-right:0;
  }
  #assetEditModal .detail-dl.detail-dl--form{
    border:0;
    background:transparent;
    padding:0;
  }
  #addAssetModal .modal-field,
  #assetEditModal .modal-field,
  #addEntityModal .modal-field{
    display:grid;
    grid-template-columns:minmax(120px,28%) minmax(0,1fr);
    align-items:center;
    gap:8px;
    font-size:.84rem;
    flex-direction:unset;
  }
  #addAssetModal .modal-field input,
  #addAssetModal .modal-field textarea,
  #addAssetModal .modal-field .theme-select,
  #assetEditModal .modal-field input,
  #assetEditModal .modal-field textarea,
  #assetEditModal .modal-field .theme-select,
  #addEntityModal .modal-field input,
  #addEntityModal .modal-field textarea,
  #addEntityModal .modal-field .theme-select{
    width:100%;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  #addAssetModal .modal-field--radio,
  #addAssetModal .field-input--comments,
  #addAssetModal .add-asset-section .modal-field:has(textarea),
  #assetEditModal .modal-field--comments,
  #assetEditModal .modal-field:has(textarea),
  #addEntityModal .add-entity-comments .modal-field{
    grid-template-columns:1fr;
  }
}
@media (max-width:899px){
  #assetEditModal.modal-overlay{
    padding-left:12px;
    padding-right:12px;
    padding-top:12px;
    padding-bottom:12px;
  }
  .modal-box--edit-asset{
    padding-left:12px;
    padding-right:12px;
    max-height:calc(100dvh - 24px);
  }
}
.modal-box--pick-type{
  max-width:min(94vw,680px);
}
.modal-box--add-entity{
  max-width:min(94vw,880px);
}
.modal-optional-fields-bubble.entityDetailsBubble{
  margin-top:10px;
  margin-bottom:12px;
  background:transparent;
}
/* Bubble is a direct child of .detail-dl — avoid the row flex that pins content to the right */
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-optional-fields-bubble{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:8px;
  width:100%;
  box-sizing:border-box;
}
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-optional-fields-bubble .modal-optional-fields-bubble__inner{
  width:100%;
  align-self:stretch;
}
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-optional-fields-bubble .detail-field{
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:6px;
  width:100%;
}
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-optional-fields-bubble .detail-field dt,
.detail-dl.detail-dl--form > .entityDetailsBubble.modal-optional-fields-bubble .detail-field dd{
  width:100%;
  max-width:100%;
  text-align:left;
}
.field-input--type-custom[disabled],
.field-input--type-custom[hidden]{
  display:none !important;
}
.add-entity-optional-grid{
  display:flex;
  flex-direction:column;
  gap:var(--portiva-form-bubble-row-gap,10px);
  margin-bottom:0;
}
.add-entity-scroll-fields{
  display:flex;
  flex-direction:column;
  gap:var(--portiva-form-bubble-gap,18px);
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:2px;
}
/* Add-entity page: no inner scroll traps — whole .portiva-flow-page__scroll scrolls */
.add-entity-page.portiva-flow-page #formAddEntityPage,
.add-entity-page.portiva-flow-page #formAddEntityPage .modal-scroll-frame,
.add-entity-page.portiva-flow-page #formAddEntityPage .add-entity-scroll-fields{
  flex:0 0 auto;
  min-height:unset;
  max-height:none;
  overflow:visible;
  overscroll-behavior:auto;
  -webkit-overflow-scrolling:auto;
}
.edit-entity-page.portiva-flow-page,
.add-asset-page.portiva-flow-page,
.asset-edit-page.portiva-flow-page{
  --add-entity-field-grid:minmax(96px,34%) minmax(0,1fr);
  --add-entity-field-gap:8px;
}
.add-entity-page__desktop-head{
  display:none;
}
.add-entity-page .formula-field-help-trigger-wrap{
  display:none;
}
.edit-entity-page .formula-field-help-trigger-wrap,
.add-asset-page .formula-field-help-trigger-wrap,
.asset-edit-page .formula-field-help-trigger-wrap{
  display:none;
}
/* Form-flow pages: no inner scroll traps — whole .portiva-flow-page__scroll scrolls */
.edit-entity-page.portiva-flow-page #formEditEntity,
.edit-entity-page.portiva-flow-page #formEditEntity .modal-scroll-frame,
.edit-entity-page.portiva-flow-page #formEditEntity .add-entity-scroll-fields,
.add-asset-page.portiva-flow-page #formAddAsset,
.add-asset-page.portiva-flow-page #formAddAsset .modal-scroll-frame,
.asset-edit-page.portiva-flow-page #assetEditForm,
.asset-edit-page.portiva-flow-page #assetEditForm .modal-scroll-frame{
  flex:0 0 auto;
  min-height:unset;
  max-height:none;
  overflow:visible;
  overscroll-behavior:auto;
  -webkit-overflow-scrolling:auto;
}
.add-entity-page .add-entity-page__toolbar{
  position:static;
  flex:0 0 auto;
  margin:0;
  padding:0 0 12px;
  border:0;
  box-shadow:none;
  background:transparent;
}
.add-entity-page .add-entity-page__toolbar .btn{
  flex:0 1 auto;
  min-width:120px;
  min-height:44px;
}
@media (min-width:900px){
  #addEntityModal #formAddEntity .modal-scroll-frame > .add-entity-scroll-fields{
    flex:0 0 auto;
    min-height:initial;
    max-height:none;
    overflow:visible;
    overscroll-behavior:auto;
    -webkit-overflow-scrolling:auto;
    padding-right:0;
  }
  #addEntityModal #formAddEntity.modal-form--scroll,
  #assetEditForm.modal-form--scroll,
  #formAddAsset.modal-form--scroll{
    overflow:hidden;
  }
}
.modal-box--add-entity .form-actions{
  flex-shrink:0;
  padding-top:10px;
  border-top:1px solid var(--stroke);
  background:var(--surface);
}
.add-entity-docs-links,
.detail-field__links-block{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:6px;
}
.add-entity-section.entityDetailsBubble{
  margin:0;
}
.add-entity-section .modal-field{
  margin:0;
}
#addEntityModal .add-entity-parent-fields,
.add-entity-page .add-entity-parent-fields,
.edit-entity-page .add-entity-parent-fields{
  display:flex;
  flex-direction:column;
  gap:var(--portiva-form-bubble-row-gap,10px);
}
.add-entity-comments .modal-field,
.add-entity-section .modal-field:has(textarea){
  grid-template-columns:1fr;
}
.named-links-editor{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.named-links-editor__rows{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.named-links-editor__row{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  background:var(--surface-list);
  border:1px solid var(--stroke);
}
.named-links-editor__add{
  align-self:flex-start;
}
.modal-hint--tight{
  margin-bottom:8px;
}
.modal-hint--compact{
  margin:0 0 12px;
  font-size:.82rem;
}
.modal-hint--delete-entity-summary{
  margin-bottom:10px;
}
.delete-entity-confirm-detail{
  display:none;
  margin:0 0 12px;
  padding:0;
  border:0;
  background:transparent;
}
.delete-entity-confirm-detail.delete-entity-confirm-detail--visible{
  display:block;
}
.delete-entity-confirm-detail__section + .delete-entity-confirm-detail__section{
  margin-top:10px;
}
.delete-entity-confirm-detail__heading{
  margin:0 0 4px;
  padding:0;
  font-size:.92rem;
  font-weight:700;
  line-height:1.45;
  color:#fff;
}
.delete-entity-confirm-detail__list{
  list-style:none;
  margin:0;
  padding:0;
}
.delete-entity-confirm-detail__list li{
  margin:0;
  padding:0;
  font-size:.92rem;
  font-weight:400;
  line-height:1.45;
  color:#fff;
}
.delete-entity-confirm-detail__list li + li{
  margin-top:4px;
}
.delete-entity-confirm-detail__photos-note{
  margin:0.55rem 0 0;
  font-size:0.92rem;
  line-height:1.4;
  color:var(--text-muted, #64748b);
}
[data-theme="dawn"] .delete-entity-confirm-detail__heading,
[data-theme="day"] .delete-entity-confirm-detail__heading,
[data-theme="classic"] .delete-entity-confirm-detail__heading,
[data-theme="dawn"] .delete-entity-confirm-detail__list li,
[data-theme="day"] .delete-entity-confirm-detail__list li,
[data-theme="classic"] .delete-entity-confirm-detail__list li{
  color:var(--text);
}
.modal-hint--entity-notice-body{
  white-space:pre-line;
}
.modal-box--delete-entity-confirm{
  max-width:min(96vw,480px);
}
.modal-box--delete-entity-confirm .entity-delete-shares-block{
  display:none;
  margin:0 0 .65rem;
  padding:.55rem .65rem .6rem;
  border:1px solid var(--border-strong, var(--stroke));
  border-inline-start:3px solid var(--accent-border, var(--accent));
  border-radius:8px;
  background:var(--surface-card, var(--portiva-panel-bg, var(--surface-list)));
}
.modal-box--delete-entity-confirm .entity-delete-shares-block.entity-delete-shares-block--visible{
  display:block;
}
[data-theme="dawn"] .modal-box--delete-entity-confirm .entity-delete-shares-block,
[data-theme="day"] .modal-box--delete-entity-confirm .entity-delete-shares-block,
[data-theme="classic"] .modal-box--delete-entity-confirm .entity-delete-shares-block{
  background:var(--portiva-panel-bg, var(--surface-card));
  border-color:var(--border-strong, var(--stroke));
}
[data-theme="dawn"] .modal-box--delete-entity-confirm .pm-investor-share-row__remove,
[data-theme="day"] .modal-box--delete-entity-confirm .pm-investor-share-row__remove,
[data-theme="classic"] .modal-box--delete-entity-confirm .pm-investor-share-row__remove{
  color:var(--text);
  background:var(--portiva-field-bg, var(--surface-btn));
  border-color:var(--border-strong, var(--stroke));
  font-weight:600;
}
[data-theme="dawn"] .modal-box--delete-entity-confirm .pm-investor-share-row__remove:hover:not(:disabled),
[data-theme="day"] .modal-box--delete-entity-confirm .pm-investor-share-row__remove:hover:not(:disabled),
[data-theme="classic"] .modal-box--delete-entity-confirm .pm-investor-share-row__remove:hover:not(:disabled){
  color:var(--text);
  background:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
}
.add-asset-type-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(112px,1fr));
  gap:10px;
  margin-bottom:4px;
}
.add-asset-type-tile{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:88px;
  padding:10px 8px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-btn);
  color:var(--text);
  font:inherit;
  font-size:.78rem;
  font-weight:600;
  cursor:pointer;
  text-align:center;
  transition:background .15s,border-color .15s;
}
.add-asset-type-tile:hover{
  background:var(--surface-btn-hover);
  border-color:var(--accent);
}
.add-asset-type-tile__ic{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  line-height:0;
}
.add-asset-type-tile__svg{
  width:28px;
  height:28px;
  display:block;
}
.add-asset-type-tile:hover .add-asset-type-tile__ic{
  color:var(--text);
}
.add-asset-type-tile__lab{
  line-height:1.25;
}
.add-asset-section{
  margin:12px 0;
  padding:12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:rgba(148,163,184,.06);
}
.add-asset-section__title{
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  margin:0 0 10px;
}
.asset-edit-form{
  margin-bottom:8px;
}

.modal-overlay{
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(6px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  overflow:auto;
}
.modal-overlay--open{
  opacity:1;
  pointer-events:auto;
}
/* Stacked confirmations above other modals (e.g. edit asset / edit entity) */
#deleteAssetConfirmModal.modal-overlay,
#deleteEntityConfirmModal.modal-overlay{
  z-index:110;
}
.modal-delete-confirm-idle[hidden],
.modal-delete-confirm-busy[hidden],
#deleteAssetConfirmModal[aria-busy="true"] .modal-delete-confirm-idle,
#deleteEntityConfirmModal[aria-busy="true"] .modal-delete-confirm-idle{
  display:none !important;
}
#deleteAssetConfirmModal[aria-busy="true"] .modal-delete-confirm-busy,
#deleteEntityConfirmModal[aria-busy="true"] .modal-delete-confirm-busy{
  display:flex !important;
}
#revokeShareConfirmModal.modal-overlay,
#sendShareConfirmModal.modal-overlay,
#deleteInvestorConfirmModal.modal-overlay{
  z-index:130;
}
#entityModalNotice.modal-overlay{
  z-index:120;
}
.modal-box--restore-backup{
  position:relative;
  max-width:min(480px,94vw);
}
.modal-box--restore-backup .modal-title{
  padding-right:40px;
}
.modal-box--csv-transfer{
  position:relative;
}
.modal-box--csv-transfer .modal-title{
  padding-right:40px;
}
#modernLayoutSettingsModal.modal-overlay{
  align-items:center;
  justify-content:center;
  padding:max(24px,10vh) 20px max(24px,8vh);
}
@media (max-width:640px){
  .modal-box--add-entity .modal-form--scroll{
    max-height:min(80dvh, calc(100dvh - 104px));
  }
  .modal-box--add-entity:focus-within .modal-form--scroll{
    max-height:min(74dvh, calc(100dvh - 104px));
  }
  .add-entity-scroll-fields{
    max-height:32dvh;
  }
  .portiva-mobile-form-page .add-entity-scroll-fields,
  .add-entity-page .add-entity-scroll-fields,
  .edit-entity-page .add-entity-scroll-fields{
    max-height:none;
    overflow:visible;
    flex:0 0 auto;
    min-height:initial;
    overscroll-behavior:auto;
    -webkit-overflow-scrolling:auto;
    padding-right:0;
  }
  .modal-box--layout-settings{
    width:100%;
    max-width:100%;
    max-height:calc(100dvh - 24px);
    padding:16px 14px 14px;
  }
}

@media (max-width:899px){
  #assetEditModal.modal-overlay,
  #addAssetModal.modal-overlay,
  #addAssetTypePickerModal.modal-overlay,
  #addEntityModal.modal-overlay.entity-mobile-page{
    align-items:stretch;
    justify-content:stretch;
    padding:0;
    background:var(--bg0);
    backdrop-filter:none;
    overflow:hidden;
  }
  #assetEditModal .modal-box--edit-asset,
  #addAssetModal .modal-box--add-asset-wide,
  #addAssetTypePickerModal .modal-box--pick-type,
  #addEntityModal.entity-mobile-page .modal-box--add-entity{
    position:relative;
    width:100%;
    max-width:none;
    height:100dvh;
    max-height:100dvh;
    margin:0;
    border:0;
    border-radius:0;
    box-shadow:none;
    background:var(--bg0);
    padding:max(16px, env(safe-area-inset-top, 0px)) 14px max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    display:flex;
    flex-direction:column;
  }
  #assetEditModal .modal-title,
  #addAssetModal .modal-title,
  #addAssetTypePickerModal .modal-title,
  #addEntityModal.entity-mobile-page .modal-title{
    margin:0 44px 10px 0;
    font-size:1rem;
    flex:0 0 auto;
  }
  #assetEditForm,
  #formAddAsset,
  #addEntityModal #formAddEntity{
    display:flex;
    flex-direction:column;
    gap:10px;
    max-height:none;
    overflow:visible;
    padding:0;
  }
  #assetEditForm .form-actions,
  #formAddAsset .form-actions,
  #addAssetTypePickerModal .form-actions,
  #addEntityModal #formAddEntity .form-actions,
  #addEntityModal.entity-mobile-page #formAddEntity .form-actions{
    order:10;
    position:fixed;
    bottom:0;
    top:auto;
    left:0;
    right:0;
    z-index:120;
    margin:0;
    padding:10px 14px max(10px, env(safe-area-inset-bottom, 0px));
    justify-content:flex-start;
    gap:8px;
    background:var(--bg0);
    border-top:1px solid var(--stroke);
    border-bottom:0;
    box-shadow:0 -8px 22px rgba(15,23,42,.12);
  }
  #assetEditModal .modal-close-btn,
  #addAssetModal .modal-close-btn,
  #addAssetTypePickerModal .modal-close-btn,
  #addEntityModal.entity-mobile-page .modal-close-btn{
    display:none;
  }
  #assetEditForm .form-actions .btn,
  #formAddAsset .form-actions .btn,
  #addAssetTypePickerModal .form-actions .btn,
  #addEntityModal #formAddEntity .form-actions .btn{
    flex:1 1 0;
    min-width:0;
  }
  #assetEditForm .form-actions #btnDeleteAsset{
    flex:0 1 auto;
  }
  #assetEditModal .detail-dl.detail-dl--form{
    border:0;
    background:transparent;
    padding:0;
  }
  #assetEditModal .detail-dl.detail-dl--form .detail-field{
    display:grid;
    grid-template-columns:minmax(96px,34%) minmax(0,1fr);
    align-items:center;
    gap:8px;
    padding:9px 0;
    font-size:.84rem;
  }
  #assetEditModal .detail-dl.detail-dl--form .detail-field dt,
  #assetEditModal .detail-dl.detail-dl--form .detail-field dd{
    width:100%;
    min-width:0;
    max-width:100%;
    text-align:left;
  }
  #assetEditModal .detail-dl.detail-dl--form > .entityDetailsBubble,
  #assetEditModal .detail-dl.detail-dl--form > .modal-form-group-bubble,
  #assetEditModal .detail-field--stack{
    grid-column:1 / -1;
  }
  #addAssetModal .modal-field,
  #assetEditModal .modal-field,
  #addEntityModal.entity-mobile-page .modal-field{
    display:grid;
    grid-template-columns:minmax(96px,34%) minmax(0,1fr);
    align-items:center;
    gap:8px;
    font-size:.84rem;
    flex-direction:unset;
  }
  #addAssetModal .modal-field > span,
  #assetEditModal .modal-field > span,
  #addEntityModal.entity-mobile-page .modal-field > span{
    min-width:0;
  }
  #addAssetModal .modal-field input,
  #addAssetModal .modal-field textarea,
  #addAssetModal .modal-field .theme-select,
  #assetEditModal .modal-field input,
  #assetEditModal .modal-field textarea,
  #assetEditModal .modal-field .theme-select,
  #addEntityModal.entity-mobile-page .modal-field input,
  #addEntityModal.entity-mobile-page .modal-field textarea,
  #addEntityModal.entity-mobile-page .modal-field .theme-select{
    width:100%;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  #assetEditModal input,
  #assetEditModal textarea,
  #assetEditModal select,
  #addAssetModal input,
  #addAssetModal textarea,
  #addAssetModal select,
  #addEntityModal input,
  #addEntityModal textarea,
  #addEntityModal select{
    font-size:16px;
  }
  #addAssetModal .modal-field--radio,
  #addAssetModal .field-input--comments,
  #addAssetModal .add-asset-section .modal-field:has(textarea),
  #assetEditModal .modal-field--comments,
  #assetEditModal .modal-field:has(textarea),
  #addEntityModal.entity-mobile-page .add-entity-comments .modal-field{
    grid-template-columns:1fr;
  }
  #addAssetModal .add-asset-bubble--comments .modal-field,
  .add-asset-page .add-asset-bubble--comments .modal-field,
  .portiva-mobile-form-page.add-asset-page .add-asset-bubble--comments .modal-field,
  .asset-edit-page .add-asset-bubble--comments .modal-field,
  #assetEditModal .add-asset-bubble--comments .modal-field{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    grid-template-columns:unset;
  }
  #addAssetModal .add-asset-bubble--comments .modal-field > span,
  .add-asset-page .add-asset-bubble--comments .modal-field > span{
    width:100%;
  }
  #addAssetModal .add-asset-bubble--comments textarea,
  .add-asset-page .add-asset-bubble--comments textarea{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  #addAssetModal .add-asset-section{
    margin:8px 0;
    padding:10px;
  }
  #addEntityModal.entity-mobile-page .add-entity-scroll-fields{
    max-height:none;
    overflow:visible;
    padding-right:0;
  }
  #addEntityModal.entity-mobile-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble{
    margin:0;
    padding:12px 14px;
  }
  .add-entity-page .add-entity-page__form,
  .edit-entity-page .edit-entity-page__form{
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:0;
  }
  .add-entity-page .modal-field,
  .edit-entity-page .modal-field{
    display:grid;
    grid-template-columns:minmax(96px,34%) minmax(0,1fr);
    align-items:center;
    gap:8px;
    font-size:.84rem;
    flex-direction:unset;
  }
  .add-entity-page .modal-field > span,
  .edit-entity-page .modal-field > span{
    min-width:0;
  }
  .add-entity-page .modal-field input,
  .add-entity-page .modal-field textarea,
  .add-entity-page .modal-field .theme-select,
  .add-entity-page .modal-field .field-input,
  .add-entity-page .named-links-editor .field-input,
  .edit-entity-page .modal-field input,
  .edit-entity-page .modal-field textarea,
  .edit-entity-page .modal-field .theme-select,
  .edit-entity-page .modal-field .field-input,
  .edit-entity-page .named-links-editor .field-input{
    width:100%;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
    font-size:16px;
  }
  .add-entity-page input,
  .add-entity-page textarea,
  .add-entity-page select,
  .add-entity-page .field-input,
  .add-entity-page .theme-select,
  .edit-entity-page input,
  .edit-entity-page textarea,
  .edit-entity-page select,
  .edit-entity-page .field-input,
  .edit-entity-page .theme-select{
    font-size:16px;
  }
  .add-entity-page .add-entity-comments .modal-field,
  .edit-entity-page .add-entity-comments .modal-field{
    grid-template-columns:1fr;
  }
  .add-entity-page .add-entity-scroll-fields,
  .edit-entity-page .add-entity-scroll-fields{
    max-height:none;
    overflow:visible;
    flex:0 0 auto;
    min-height:initial;
    padding-right:0;
  }
  .add-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
  .edit-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
  .welcome-auth-page .welcome-auth-bubble.entityDetailsBubble.modal-form-group-bubble{
    margin:0;
    padding:12px 14px;
  }
  .edit-entity-page .portiva-flow-page__scroll,
  .welcome-auth-page .portiva-flow-page__scroll,
  .welcome-plans-page .portiva-flow-page__scroll{
    padding-bottom:max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  }
  .add-entity-page .portiva-flow-page__scroll{
    padding-bottom:max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  }
  .add-asset-page .portiva-flow-page__scroll,
  .asset-edit-page .portiva-flow-page__scroll{
    padding-bottom:max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  }
  .edit-entity-page .portiva-flow-page__footer,
  .add-entity-page .portiva-flow-page__footer,
  .add-asset-page .portiva-flow-page__footer,
  .asset-edit-page .portiva-flow-page__footer,
  .welcome-auth-page .portiva-flow-page__footer{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:120;
    margin:0;
    padding:10px 14px max(10px, env(safe-area-inset-bottom, 0px));
    border-top:1px solid rgba(255,255,255,.09);
    border-bottom:0;
    background:#000;
    box-shadow:0 -8px 22px rgba(0,0,0,.45);
  }
  .edit-entity-page .portiva-flow-page__footer-actions,
  .add-entity-page .portiva-flow-page__footer-actions,
  .add-asset-page .portiva-flow-page__footer-actions,
  .asset-edit-page .portiva-flow-page__footer-actions,
  .welcome-auth-page .portiva-flow-page__footer-actions,
  .welcome-plans-page .portiva-flow-page__footer-actions,
  .portiva-mobile-form-page .portiva-flow-page__footer-actions{
    gap:8px;
  }
  .portiva-mobile-form-page .portiva-flow-page__form,
  .portiva-mobile-form-page form.modal-form{
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:0;
  }
  .portiva-mobile-form-page .modal-field{
    display:grid;
    grid-template-columns:minmax(96px,34%) minmax(0,1fr);
    align-items:center;
    gap:8px;
    font-size:.84rem;
    flex-direction:unset;
  }
  .asset-edit-page #assetEditForm .modal-scroll-frame,
  .add-asset-page #formAddAsset .modal-scroll-frame,
  .add-entity-page .modal-scroll-frame,
  .edit-entity-page .modal-scroll-frame{
    overflow:visible;
    flex:0 0 auto;
    min-height:initial;
  }
  .portiva-mobile-form-page .modal-field > span{
    min-width:0;
  }
  .portiva-mobile-form-page .modal-field input,
  .portiva-mobile-form-page .modal-field textarea,
  .portiva-mobile-form-page .modal-field .theme-select,
  .portiva-mobile-form-page .modal-field .field-input,
  .portiva-mobile-form-page .named-links-editor .field-input{
    width:100%;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
    font-size:16px;
  }
  .portiva-mobile-form-page input,
  .portiva-mobile-form-page textarea,
  .portiva-mobile-form-page select,
  .portiva-mobile-form-page .field-input,
  .portiva-mobile-form-page .theme-select{
    font-size:16px;
  }
  .add-asset-page .add-asset-bubble--comments .modal-field,
  #addAssetModal.asset-mobile-page .add-asset-bubble--comments .modal-field,
  #addAssetModal .add-asset-bubble--comments .modal-field,
  .asset-edit-page .add-asset-bubble--comments .modal-field,
  #assetEditModal .add-asset-bubble--comments .modal-field{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    grid-template-columns:unset;
  }
  .add-asset-page .add-asset-bubble--comments .modal-field > span,
  #addAssetModal .add-asset-bubble--comments .modal-field > span,
  .asset-edit-page .add-asset-bubble--comments .modal-field > span,
  #assetEditModal .add-asset-bubble--comments .modal-field > span{
    width:100%;
  }
  .add-asset-page .add-asset-bubble--comments textarea,
  #addAssetModal .add-asset-bubble--comments textarea,
  .asset-edit-page .add-asset-bubble--comments textarea,
  #assetEditModal .add-asset-bubble--comments textarea{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  .portiva-mobile-form-page .portiva-flow-page__scroll{
    padding-bottom:max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  }
  .portiva-mobile-form-page .portiva-flow-page__footer{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:120;
    margin:0;
    padding:10px 14px max(10px, env(safe-area-inset-bottom, 0px));
    border-top:1px solid var(--stroke);
    border-bottom:0;
    background:var(--bg0);
    box-shadow:0 -8px 22px rgba(15,23,42,.12);
  }
  .welcome-auth-page.portiva-mobile-form-page .portiva-flow-page__footer{
    border-top-color:rgba(255,255,255,.09);
    background:#000;
    box-shadow:0 -8px 22px rgba(0,0,0,.45);
  }
  .add-asset-pick-page .add-asset-type-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  #addAssetTypePickerModal .add-asset-type-tile{
    flex-direction:row;
    justify-content:flex-start;
    min-height:50px;
    text-align:left;
  }
}
.modal-box--set-email-password{
  position:relative;
  width:min(calc(420px * 1.3),94vw);
  max-width:94vw;
}
.modal-box--welcome-auth{
  position:relative;
  width:min(1180px,96vw);
  max-width:96vw;
  max-height:min(86dvh,760px);
  overflow:auto;
}
.modal-box--welcome-auth-error{
  width:min(460px,92vw);
  max-width:92vw;
}
.welcome-auth-error-modal{
  z-index:6100;
}
.welcome-auth-error-modal__text{
  margin:0 0 14px;
  color:var(--text);
  line-height:1.45;
  font-size:.94rem;
}
.welcome-auth-inline-error{
  margin:2px 0 0;
  padding:9px 10px;
  border-radius:10px;
  border:1px solid rgba(220,38,38,.28);
  background:rgba(220,38,38,.08);
  color:#b91c1c;
  font-size:.84rem;
  line-height:1.4;
}
[data-theme="night"] .welcome-auth-inline-error,
[data-theme="dawn"] .welcome-auth-inline-error{
  color:#fca5a5;
}
.welcome-auth-modal__hint{
  margin-bottom:12px;
}
.welcome-auth-modal__err,
.welcome-auth-modal__offline{
  margin:0 0 12px;
  padding:10px 12px;
  border-radius:10px;
  font-size:.86rem;
  line-height:1.4;
}
.welcome-auth-modal__err{
  background:rgba(220,38,38,.08);
  border:1px solid rgba(220,38,38,.25);
  color:#b91c1c;
}
[data-theme="night"] .welcome-auth-modal__err,
[data-theme="dawn"] .welcome-auth-modal__err{
  color:#fca5a5;
}
.welcome-auth-modal__offline{
  background:rgba(251,191,36,.12);
  border:1px solid rgba(251,191,36,.35);
  color:var(--text);
}
.btn--danger{
  color:var(--danger, #f87171);
  border-color:rgba(248,113,113,.35);
}

/* Full-page flows: shared shell (CSV, backups, layout, summaries) */
.portiva-flow-page,
.csv-transfer-page{
  max-width:min(720px,100%);
  margin:0 auto;
  width:100%;
  padding:0 4px 0;
  --portiva-menu-surface:color-mix(in srgb, var(--surface-soft, rgba(255,255,255,.06)) 92%, #94a3b8 8%);
  --portiva-menu-surface-border:color-mix(in srgb, var(--stroke) 78%, #94a3b8);
  --portiva-menu-surface-hover:color-mix(in srgb, var(--surface-soft, rgba(255,255,255,.06)) 86%, #94a3b8 14%);
}
.portiva-flow-page__scroll,
.csv-transfer-page__scroll{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-bottom:8px;
}
.portiva-flow-page__hero,
.csv-transfer-page__hero{
  flex-shrink:0;
}
.portiva-flow-page__title,
.csv-transfer-page__title{
  margin:0 0 6px;
  font-size:clamp(1.35rem,2.5vw,1.65rem);
}
.portiva-flow-page__lead,
.csv-transfer-page__lead{
  margin:0;
  color:var(--muted);
  font-size:.92rem;
  line-height:1.45;
}
.portiva-flow-page__tabs,
.csv-transfer-page__tabs{
  flex-shrink:0;
}
.portiva-flow-page__body,
.csv-transfer-page__body{
  flex-shrink:0;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:12px;
  background:transparent;
  padding:0 14px 14px;
}
.portiva-flow-page__footer,
.csv-transfer-page__footer{
  flex-shrink:0;
  padding:12px 0 max(12px, env(safe-area-inset-bottom, 0px));
  border-top:1px solid var(--stroke);
  background:var(--portiva-canvas-bg, var(--bg0));
}
.portiva-flow-page__footer-actions,
.csv-transfer-page__footer-actions{
  display:flex;
  gap:12px;
  align-items:stretch;
}
.portiva-flow-page__footer-actions .btn,
.csv-transfer-page__footer-actions .btn{
  flex:1 1 0;
  min-width:0;
  min-height:44px;
}
.portiva-flow-page__footer-actions[hidden],
.csv-transfer-page__footer-actions[hidden]{
  display:none !important;
}

/* Desktop form flows (body.portiva-desktop-form-topbar set in app.js at min-width 900px):
   title + Help/Cancel/Save in topbar nav — hide duplicate page title/footer. */
body.portiva-desktop-form-topbar .add-entity-page .portiva-flow-page__footer,
body.portiva-desktop-form-topbar .edit-entity-page .portiva-flow-page__footer,
body.portiva-desktop-form-topbar .add-asset-page .portiva-flow-page__footer,
body.portiva-desktop-form-topbar .asset-edit-page .portiva-flow-page__footer,
body.portiva-desktop-form-topbar .rename-folder-page .portiva-flow-page__footer{
  display:none !important;
  visibility:hidden !important;
  pointer-events:none !important;
  position:static !important;
  height:0 !important;
  min-height:0 !important;
  overflow:hidden !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  box-shadow:none !important;
}
body.portiva-desktop-form-topbar .pm-page--deal-edit .portiva-flow-page__footer{
  display:none !important;
  visibility:hidden !important;
  pointer-events:none !important;
  position:static !important;
  height:0 !important;
  min-height:0 !important;
  overflow:hidden !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  box-shadow:none !important;
}
body.portiva-desktop-form-topbar .add-entity-page .portiva-flow-page__scroll > .portiva-flow-page__title,
body.portiva-desktop-form-topbar .add-entity-page .add-entity-page__mobile-title,
body.portiva-desktop-form-topbar .edit-entity-page .portiva-flow-page__scroll > .portiva-flow-page__title,
body.portiva-desktop-form-topbar .edit-entity-page .edit-entity-page__mobile-title,
body.portiva-desktop-form-topbar .edit-entity-page .edit-entity-page__mobile-lead,
body.portiva-desktop-form-topbar .add-asset-page .portiva-flow-page__scroll > .portiva-flow-page__title,
body.portiva-desktop-form-topbar .add-asset-page .add-asset-page__mobile-title,
body.portiva-desktop-form-topbar .add-asset-page .add-asset-page__mobile-lead,
body.portiva-desktop-form-topbar .asset-edit-page .portiva-flow-page__scroll > .portiva-flow-page__title,
body.portiva-desktop-form-topbar .asset-edit-page .asset-edit-page__mobile-title,
body.portiva-desktop-form-topbar .asset-edit-page .asset-edit-page__mobile-lead,
body.portiva-desktop-form-topbar .rename-folder-page .portiva-flow-page__scroll > .portiva-flow-page__title,
body.portiva-desktop-form-topbar .rename-folder-page .rename-folder-page__mobile-title{
  display:none !important;
}
body.portiva-desktop-form-topbar .topbar__navrow--add-entity .add-entity-page__nav-grid,
body.portiva-desktop-form-topbar .topbar__navrow--edit-entity .edit-entity-page__nav-grid,
body.portiva-desktop-form-topbar .topbar__navrow--add-asset .add-asset-page__nav-grid,
body.portiva-desktop-form-topbar .topbar__navrow--asset-edit .asset-edit-page__nav-grid,
body.portiva-desktop-form-topbar .topbar__navrow--rename-folder .rename-folder-page__nav-grid{
  display:grid !important;
}
body.portiva-desktop-form-topbar .add-entity-page .portiva-flow-page__scroll,
body.portiva-desktop-form-topbar .edit-entity-page .portiva-flow-page__scroll,
body.portiva-desktop-form-topbar .add-asset-page .portiva-flow-page__scroll,
body.portiva-desktop-form-topbar .asset-edit-page .portiva-flow-page__scroll,
body.portiva-desktop-form-topbar .rename-folder-page .portiva-flow-page__scroll{
  padding-bottom:var(--portiva-desktop-content-bottom-pad, 2rem) !important;
}
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.add-entity-page),
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.edit-entity-page),
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.add-asset-page),
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.asset-edit-page),
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.rename-folder-page){
  position:relative;
  z-index:3;
}
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.add-entity-page) .topbar__navrow,
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.edit-entity-page) .topbar__navrow,
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.add-asset-page) .topbar__navrow,
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.asset-edit-page) .topbar__navrow,
body.portiva-desktop-form-topbar #view > header.topbar:has(+ main.rename-folder-page) .topbar__navrow{
  flex-shrink:0;
  min-height:44px;
  overflow:visible;
  position:relative;
  z-index:2;
}

/* Form flows: from 768px title + actions live in topbar nav (mounted by JS); phone keeps bottom footer */
@media (min-width: 768px){
  .portiva-form-flow-desktop-toolbar{
    display:none !important;
  }
  .add-entity-page .portiva-flow-page__footer,
  .edit-entity-page .portiva-flow-page__footer,
  .add-asset-page .portiva-flow-page__footer,
  .asset-edit-page .portiva-flow-page__footer,
  .rename-folder-page .portiva-flow-page__footer{
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
    position:static !important;
    height:0 !important;
    min-height:0 !important;
    overflow:hidden !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
  }
  .add-entity-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .add-entity-page .add-entity-page__mobile-title,
  .edit-entity-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .edit-entity-page .edit-entity-page__mobile-title,
  .edit-entity-page .edit-entity-page__mobile-lead,
  .add-asset-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .add-asset-page .add-asset-page__mobile-title,
  .add-asset-page .add-asset-page__mobile-lead,
  .asset-edit-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .asset-edit-page .asset-edit-page__mobile-title,
  .asset-edit-page .asset-edit-page__mobile-lead,
  .rename-folder-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .rename-folder-page .rename-folder-page__mobile-title{
    display:none !important;
  }
  .topbar__navrow--add-entity .add-entity-page__nav-grid,
  .topbar__navrow--edit-entity .edit-entity-page__nav-grid,
  .topbar__navrow--add-asset .add-asset-page__nav-grid,
  .topbar__navrow--asset-edit .asset-edit-page__nav-grid,
  .topbar__navrow--rename-folder .rename-folder-page__nav-grid{
    display:grid !important;
  }
  .add-entity-page.portiva-flow-page,
  .edit-entity-page.portiva-flow-page,
  .add-asset-page.portiva-flow-page,
  .asset-edit-page.portiva-flow-page,
  .rename-folder-page.portiva-flow-page{
    margin-top:20px;
  }
  .add-entity-page .portiva-flow-page__scroll,
  .edit-entity-page .portiva-flow-page__scroll,
  .add-asset-page .portiva-flow-page__scroll,
  .asset-edit-page .portiva-flow-page__scroll,
  .rename-folder-page .portiva-flow-page__scroll{
    padding-bottom:var(--portiva-desktop-content-bottom-pad, 2rem) !important;
  }
}
@media (max-width: 767px){
  .portiva-form-flow-desktop-toolbar{
    display:none !important;
  }
}
.summaries-page .portiva-flow-page__footer-actions--solo-done{
  justify-content:center;
}
.summaries-page .portiva-flow-page__footer-actions--solo-done .btn{
  flex:0 0 calc((100% - 12px) / 2);
  max-width:calc((100% - 12px) / 2);
}
.portiva-flow-page.summaries-page .portiva-flow-page__footer{
  background:var(--portiva-canvas-bg, var(--bg0));
  border-top-color:transparent;
  box-shadow:none;
}
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn,
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary{
  background:transparent;
  background-image:none;
  border:1px solid rgba(255,255,255,.45);
  color:var(--text);
}
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn:hover:not(:disabled),
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:hover:not(:disabled){
  background:transparent;
  background-image:none;
  border-color:rgba(255,255,255,.65);
  opacity:.88;
}
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:disabled,
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:disabled:hover{
  background:transparent;
  background-image:none;
  border-color:rgba(255,255,255,.28);
}
[data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn,
[data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary,
[data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn,
[data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary,
[data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn,
[data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary{
  border-color:var(--stroke);
}
[data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn:hover:not(:disabled),
[data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:hover:not(:disabled),
[data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn:hover:not(:disabled),
[data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:hover:not(:disabled),
[data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn:hover:not(:disabled),
[data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:hover:not(:disabled){
  border-color:var(--stroke-hover);
}
/* Desktop only: viewport-height flex column + inner scroll (trackpad fix). Mobile uses flat document flow. */
@media (min-width:900px){
  :root{
    --portiva-desktop-content-bottom-pad:2rem;
  }
  #view{
    flex:1 1 0;
  }
  body.portiva-route-welcome #view:has(> main.welcome-page--overview){
    flex:0 1 auto;
    overflow:visible;
  }
  #view > main.portiva-flow-page,
  #view > main.csv-transfer-page,
  #view > main.home-hier-tree-page{
    flex:1 1 0;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .portiva-flow-page,
  .csv-transfer-page,
  .home-hier-tree-page{
    flex:1;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .home-hier-tree-page__foot{
    padding:6px 8px max(6px, env(safe-area-inset-bottom, 0px));
    max-height:min(32vh, 200px);
  }
  .home-hier-tree-page__foot .home-hier-tree__folder-grid{
    gap:6px;
  }
  #homeHierTreeFolderFooter button.home-hier-tree-node.home-hier-tree-node--folder.welcome-structure-node--folder,
  .home-hier-tree-page__foot button.home-hier-tree-node.home-hier-tree-node--folder.welcome-structure-node--folder{
    min-height:28px;
    height:28px;
    max-height:28px;
    padding:2px 8px;
    font-size:.68rem;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-bar{
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:8px 12px;
    margin-top:6px;
    padding-top:6px;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-toggle{
    flex:0 1 auto;
    width:auto;
    max-width:100%;
    gap:6px;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-toggle .home-hier-tree__mode-btn{
    flex:0 1 auto;
    min-width:5.5rem;
    min-height:28px;
    padding:3px 10px;
    font-size:.78rem;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-toggle .btn--compact{
    padding:3px 10px;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-options{
    flex:0 0 auto;
    width:auto;
    margin-top:0;
  }
  .home-hier-tree-page__foot .home-hier-tree__mode-check{
    font-size:.75rem;
    gap:6px;
  }
  .home-hier-tree-page__head--map-title{
    display:none;
  }
  .portiva-flow-page__scroll,
  .csv-transfer-page__scroll{
    flex:1 1 0;
    min-height:0;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  /* Neighborhood feed, watch, and map: document scroll (logo + content), no inner column scrollbar. */
  #view:has(> main.story-page),
  #view:has(> main.story-map-page){
    flex:0 1 auto;
    min-height:auto;
    overflow:visible;
  }
  #view > main.story-page.portiva-flow-page,
  #view > main.story-map-page.portiva-flow-page,
  .story-page.portiva-flow-page,
  .story-map-page.portiva-flow-page{
    flex:0 1 auto;
    min-height:auto;
    height:auto;
    overflow:visible;
  }
  .story-page .portiva-flow-page__scroll,
  .story-map-page .portiva-flow-page__scroll{
    flex:none;
    min-height:auto;
    max-height:none;
    overflow:visible;
    overscroll-behavior:auto;
    -webkit-overflow-scrolling:auto;
    touch-action:auto;
  }
  .summaries-list-body--page{
    flex:1;
    min-height:0;
    max-height:none;
    overflow:visible;
  }
  /* One scroll column; nested lists must not trap wheel on desktop. */
  .portiva-flow-page .summaries-list-body,
  .portiva-flow-page .home-equity-principal-modal__body{
    flex:0 0 auto;
    min-height:0;
    max-height:none;
    overflow:visible;
    overscroll-behavior:auto;
    -webkit-overflow-scrolling:auto;
    touch-action:auto;
    margin-bottom:0;
  }
  .portiva-flow-page.backup-page .restore-backup-list-mount{
    max-height:none;
    overflow:visible;
  }
  /* Desktop entity/asset form pages — scroll column carries full page content */
  .edit-entity-page .edit-entity-page__form,
  .add-asset-page #formAddAsset,
  .asset-edit-page #assetEditForm,
  .portiva-mobile-form-page.portiva-flow-page form.modal-form{
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:0;
    min-height:0;
  }
  .add-entity-page .modal-field,
  .edit-entity-page .modal-field,
  .add-asset-page .modal-field,
  .portiva-mobile-form-page .modal-field{
    display:grid;
    grid-template-columns:var(--add-entity-field-grid, minmax(96px,34%) minmax(0,1fr));
    align-items:center;
    gap:var(--add-entity-field-gap, 8px);
    font-size:.84rem;
    flex-direction:unset;
  }
  .add-entity-page .modal-field > span,
  .edit-entity-page .modal-field > span,
  .add-asset-page .modal-field > span,
  .portiva-mobile-form-page .modal-field > span{
    min-width:0;
  }
  .add-entity-page .modal-field input,
  .add-entity-page .modal-field textarea,
  .add-entity-page .modal-field .theme-select,
  .add-entity-page .modal-field .field-input,
  .add-entity-page .named-links-editor .field-input,
  .edit-entity-page .modal-field input,
  .edit-entity-page .modal-field textarea,
  .edit-entity-page .modal-field .theme-select,
  .edit-entity-page .modal-field .field-input,
  .edit-entity-page .named-links-editor .field-input,
  .add-asset-page .modal-field input,
  .add-asset-page .modal-field textarea,
  .add-asset-page .modal-field .theme-select,
  .add-asset-page .modal-field .field-input,
  .portiva-mobile-form-page .modal-field input,
  .portiva-mobile-form-page .modal-field textarea,
  .portiva-mobile-form-page .modal-field .theme-select,
  .portiva-mobile-form-page .modal-field .field-input,
  .portiva-mobile-form-page .named-links-editor .field-input{
    width:100%;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  .add-entity-page .add-entity-comments .modal-field,
  .edit-entity-page .add-entity-comments .modal-field{
    grid-template-columns:1fr;
  }
  .add-entity-page .add-entity-scroll-fields,
  .edit-entity-page .add-entity-scroll-fields{
    max-height:none;
    overflow:visible;
    flex:0 0 auto;
    min-height:initial;
    padding-right:0;
  }
  .add-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble,
  .edit-entity-page .add-entity-section.entityDetailsBubble.modal-form-group-bubble{
    margin:0;
    padding:12px 14px;
  }
  .add-entity-page .modal-scroll-frame,
  .edit-entity-page .modal-scroll-frame,
  .add-asset-page .modal-scroll-frame,
  .asset-edit-page .modal-scroll-frame{
    overflow:visible;
    flex:0 0 auto;
    min-height:initial;
  }
  .add-asset-page .add-asset-bubble--comments .modal-field,
  .asset-edit-page .add-asset-bubble--comments .modal-field{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    grid-template-columns:unset;
  }
  .add-asset-page .add-asset-bubble--comments .modal-field > span,
  .asset-edit-page .add-asset-bubble--comments .modal-field > span{
    width:100%;
  }
  .add-asset-page .add-asset-bubble--comments textarea,
  .asset-edit-page .add-asset-bubble--comments textarea{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  .add-asset-pick-page .add-asset-type-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  .add-asset-pick-page .add-asset-type-tile{
    flex-direction:row;
    justify-content:flex-start;
    min-height:50px;
    text-align:left;
  }
  .edit-entity-page .portiva-flow-page__scroll,
  .add-asset-page .portiva-flow-page__scroll,
  .add-asset-pick-page .portiva-flow-page__scroll,
  .asset-edit-page .portiva-flow-page__scroll,
  .welcome-auth-page .portiva-flow-page__scroll,
  .welcome-plans-page .portiva-flow-page__scroll{
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  .add-asset-pick-page .portiva-flow-page__footer,
  .welcome-auth-page .portiva-flow-page__footer{
    position:static;
    left:auto;
    right:auto;
    bottom:auto;
    z-index:auto;
    flex:0 0 auto;
    margin:0;
    padding:12px 0 max(20px, env(safe-area-inset-bottom, 0px));
    border-top:1px solid rgba(255,255,255,.09);
    box-shadow:none;
    background:#000;
  }
  .add-asset-pick-page .portiva-flow-page__footer-actions,
  .welcome-auth-page .portiva-flow-page__footer-actions,
  .welcome-plans-page .portiva-flow-page__footer-actions{
    gap:8px;
  }
  /* Add entity page: scroll column only (see global .add-entity-page rules) */
  .add-entity-page .portiva-flow-page__scroll{
    flex:1 1 0;
    min-height:0;
    overflow-x:hidden;
    overflow-y:auto;
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  #addEntityModal.modal-overlay{
    display:none !important;
  }
  .topbar__navrow--add-entity{
    --add-entity-field-grid:minmax(96px,34%) minmax(0,1fr);
    --add-entity-field-gap:8px;
    --add-entity-form-width:min(720px,100%);
    display:grid;
    grid-template-columns:1fr var(--add-entity-form-width) 1fr;
    align-items:center;
    column-gap:8px;
  }
  .topbar__navrow--add-entity #btnBack{
    grid-column:3;
    justify-self:end;
    margin-inline-start:0;
  }
  .topbar__navrow--add-entity .add-entity-page__nav-grid{
    grid-column:2;
    display:grid;
    grid-template-columns:var(--add-entity-field-grid);
    align-items:center;
    gap:var(--add-entity-field-gap);
    width:100%;
    min-width:0;
    box-sizing:border-box;
    padding:0 4px;
  }
  .topbar__navrow--add-entity .add-entity-page__nav-title{
    grid-column:1;
    margin:0;
    min-width:0;
    font-size:clamp(1.35rem,2.5vw,1.65rem);
    line-height:1.25;
    font-weight:600;
  }
  .topbar__navrow--add-entity .add-entity-page__nav-actions{
    grid-column:2;
    display:flex;
    flex-wrap:nowrap;
    justify-content:flex-end;
    align-items:center;
    gap:8px;
    min-width:0;
    width:100%;
  }
  .topbar__navrow--add-entity .add-entity-page__nav-actions .btn{
    flex:1 1 0;
    min-width:0;
    min-height:44px;
  }
  .topbar__navrow--add-entity .add-entity-page__nav-actions .formula-field-help-btn{
    min-width:0;
  }
  /* Desktop form flows: title + actions in topbar nav — hide duplicate page chrome */
  .add-entity-page .portiva-flow-page__footer,
  .edit-entity-page .portiva-flow-page__footer,
  .add-asset-page .portiva-flow-page__footer,
  .asset-edit-page .portiva-flow-page__footer,
  .rename-folder-page .portiva-flow-page__footer,
  .add-entity-page .add-entity-page__footer,
  .edit-entity-page .edit-entity-page__footer,
  .add-asset-page .add-asset-page__footer,
  .asset-edit-page .asset-edit-page__footer,
  .rename-folder-page .rename-folder-page__footer{
    display:none !important;
  }
  .add-entity-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .add-entity-page .add-entity-page__mobile-title,
  .edit-entity-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .edit-entity-page .edit-entity-page__mobile-title,
  .edit-entity-page .edit-entity-page__mobile-lead,
  .add-asset-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .add-asset-page .add-asset-page__mobile-title,
  .add-asset-page .add-asset-page__mobile-lead,
  .asset-edit-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .asset-edit-page .asset-edit-page__mobile-title,
  .asset-edit-page .asset-edit-page__mobile-lead,
  .rename-folder-page .portiva-flow-page__scroll > .portiva-flow-page__title,
  .rename-folder-page .rename-folder-page__mobile-title{
    display:none;
  }
  #view > header.topbar:has(+ main.add-entity-page),
  #view > header.topbar:has(+ main.edit-entity-page),
  #view > header.topbar:has(+ main.add-asset-page),
  #view > header.topbar:has(+ main.asset-edit-page),
  #view > header.topbar:has(+ main.rename-folder-page){
    position:relative;
    z-index:3;
  }
  #view > header.topbar:has(+ main.add-entity-page) .topbar__navrow,
  #view > header.topbar:has(+ main.edit-entity-page) .topbar__navrow,
  #view > header.topbar:has(+ main.add-asset-page) .topbar__navrow,
  #view > header.topbar:has(+ main.asset-edit-page) .topbar__navrow,
  #view > header.topbar:has(+ main.rename-folder-page) .topbar__navrow{
    flex-shrink:0;
    min-height:44px;
    overflow:visible;
    position:relative;
    z-index:2;
  }
  .topbar__navrow--add-entity .add-entity-page__nav-grid,
  .topbar__navrow--edit-entity .edit-entity-page__nav-grid,
  .topbar__navrow--add-asset .add-asset-page__nav-grid,
  .topbar__navrow--asset-edit .asset-edit-page__nav-grid,
  .topbar__navrow--rename-folder .rename-folder-page__nav-grid{
    display:grid;
  }
  #addAssetModal.modal-overlay,
  #assetEditModal.modal-overlay{
    display:none !important;
  }
  .rename-folder-page .portiva-flow-page__scroll,
  .edit-entity-page .portiva-flow-page__scroll,
  .add-asset-page .portiva-flow-page__scroll,
  .asset-edit-page .portiva-flow-page__scroll{
    flex:1 1 0;
    min-height:0;
    overflow-x:hidden;
    overflow-y:auto;
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  .topbar__navrow--edit-entity,
  .topbar__navrow--rename-folder,
  .topbar__navrow--add-asset,
  .topbar__navrow--asset-edit{
    --add-entity-field-grid:minmax(96px,34%) minmax(0,1fr);
    --add-entity-field-gap:8px;
    --add-entity-form-width:min(720px,100%);
    display:grid;
    grid-template-columns:1fr var(--add-entity-form-width) 1fr;
    align-items:center;
    column-gap:8px;
  }
  .topbar__navrow--edit-entity #btnBack,
  .topbar__navrow--rename-folder #btnBack,
  .topbar__navrow--add-asset #btnBack,
  .topbar__navrow--asset-edit #btnBack{
    grid-column:3;
    justify-self:end;
    margin-inline-start:0;
  }
  .topbar__navrow--edit-entity .edit-entity-page__nav-grid,
  .topbar__navrow--rename-folder .rename-folder-page__nav-grid,
  .topbar__navrow--add-asset .add-asset-page__nav-grid,
  .topbar__navrow--asset-edit .asset-edit-page__nav-grid{
    grid-column:2;
    display:grid;
    grid-template-columns:var(--add-entity-field-grid);
    align-items:center;
    gap:var(--add-entity-field-gap);
    width:100%;
    min-width:0;
    box-sizing:border-box;
    padding:0 4px;
  }
  .topbar__navrow--edit-entity .edit-entity-page__nav-title,
  .topbar__navrow--rename-folder .rename-folder-page__nav-title,
  .topbar__navrow--add-asset .add-asset-page__nav-title,
  .topbar__navrow--asset-edit .asset-edit-page__nav-title{
    grid-column:1;
    margin:0;
    min-width:0;
    font-size:clamp(1.35rem,2.5vw,1.65rem);
    line-height:1.25;
    font-weight:600;
  }
  .topbar__navrow--edit-entity .edit-entity-page__nav-actions,
  .topbar__navrow--rename-folder .rename-folder-page__nav-actions,
  .topbar__navrow--add-asset .add-asset-page__nav-actions,
  .topbar__navrow--asset-edit .asset-edit-page__nav-actions{
    grid-column:2;
    display:flex;
    flex-wrap:nowrap;
    justify-content:flex-end;
    align-items:center;
    gap:8px;
    min-width:0;
    width:100%;
  }
  .topbar__navrow--edit-entity .edit-entity-page__nav-actions .btn,
  .topbar__navrow--rename-folder .rename-folder-page__nav-actions .btn,
  .topbar__navrow--add-asset .add-asset-page__nav-actions .btn,
  .topbar__navrow--asset-edit .asset-edit-page__nav-actions .btn{
    flex:1 1 0;
    min-width:0;
    min-height:44px;
  }
  .topbar__navrow--edit-entity .edit-entity-page__nav-actions .formula-field-help-btn,
  .topbar__navrow--add-asset .add-asset-page__nav-actions .formula-field-help-btn,
  .topbar__navrow--asset-edit .asset-edit-page__nav-actions .formula-field-help-btn{
    min-width:0;
  }
  .topbar__navrow--summaries-detail{
    --summaries-detail-form-width:min(720px,100%);
    display:grid;
    grid-template-columns:1fr var(--summaries-detail-form-width) 1fr;
    align-items:center;
    column-gap:8px;
  }
  .topbar__navrow--summaries-detail #btnBack{
    grid-column:3;
    justify-self:end;
    margin-inline-start:0;
  }
  .topbar__navrow--summaries-detail .summaries-detail-page__nav-actions{
    grid-column:2;
    display:flex;
    justify-content:flex-end;
    align-items:center;
    width:100%;
    min-width:0;
    box-sizing:border-box;
    padding:0 4px;
    margin-left:0;
  }
  .topbar__navrow--summaries-detail .summaries-detail-page__done-btn{
    min-width:7.5rem;
    min-height:44px;
    background:transparent;
    background-image:none;
    border:1px solid rgba(255,255,255,.45);
    color:var(--text);
  }
  .topbar__navrow--summaries-detail .summaries-detail-page__done-btn:hover:not(:disabled){
    background:transparent;
    background-image:none;
    border-color:rgba(255,255,255,.65);
    opacity:.88;
  }
  [data-theme="dawn"] .topbar__navrow--summaries-detail .summaries-detail-page__done-btn,
  [data-theme="day"] .topbar__navrow--summaries-detail .summaries-detail-page__done-btn,
  [data-theme="classic"] .topbar__navrow--summaries-detail .summaries-detail-page__done-btn{
    border-color:var(--stroke);
  }
  [data-theme="dawn"] .topbar__navrow--summaries-detail .summaries-detail-page__done-btn:hover:not(:disabled),
  [data-theme="day"] .topbar__navrow--summaries-detail .summaries-detail-page__done-btn:hover:not(:disabled),
  [data-theme="classic"] .topbar__navrow--summaries-detail .summaries-detail-page__done-btn:hover:not(:disabled){
    border-color:var(--stroke-hover);
  }
  .portiva-flow-page.summaries-page:not(.summaries-page--hub) .portiva-flow-page__footer{
    display:none;
  }
  .portiva-flow-page.summaries-page:not(.summaries-page--hub) .portiva-flow-page__scroll{
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  /* Desktop: breathing room below page content (all themes) */
  /* Portfolio drill-down pages scroll the document — main must grow with content. */
  body.portiva-route-app #view:has(> main.home-main),
  body.portiva-route-app #view:has(> main.entity-page),
  body.portiva-route-app #view:has(> main.asset-page),
  body.portiva-route-app #view:has(> main.entity-details-main),
  body.portiva-route-app #view:has(> main:not(.portiva-flow-page):not(.csv-transfer-page):not(.home-hier-tree-page):not(.support-page)){
    flex:0 1 auto;
    overflow:visible;
  }
  body.portiva-route-app #view > main.home-main,
  body.portiva-route-app #view > main.entity-page,
  body.portiva-route-app #view > main.asset-page,
  body.portiva-route-app #view > main.entity-details-main,
  body.portiva-route-app #view > main:not(.portiva-flow-page):not(.csv-transfer-page):not(.home-hier-tree-page):not(.support-page){
    flex:0 1 auto;
    min-height:0;
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  body.portiva-route-welcome #view > main.welcome-page--overview{
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  .support-page{
    padding-bottom:calc(16px + var(--portiva-desktop-content-bottom-pad));
  }
  body:has(main.privacy-page){
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  .portiva-flow-page__footer,
  .csv-transfer-page__footer{
    padding-bottom:max(12px, calc(12px + var(--portiva-desktop-content-bottom-pad)));
  }
  .add-asset-pick-page .portiva-flow-page__footer,
  .welcome-auth-page .portiva-flow-page__footer,
  .welcome-plans-page .portiva-flow-page__footer,
  .plan-details-page .portiva-flow-page__footer{
    padding-bottom:max(20px, calc(20px + var(--portiva-desktop-content-bottom-pad)));
  }
}
@media (max-width:899px){
  .summaries-detail-page__nav-actions{
    display:none;
  }
  .topbar__navrow--add-entity .add-entity-page__nav-grid,
  .topbar__navrow--edit-entity .edit-entity-page__nav-grid,
  .topbar__navrow--rename-folder .rename-folder-page__nav-grid,
  .topbar__navrow--add-asset .add-asset-page__nav-grid,
  .topbar__navrow--asset-edit .asset-edit-page__nav-grid{
    display:none;
  }
  .portiva-flow-page,
  .csv-transfer-page,
  .portiva-flow-page__scroll,
  .csv-transfer-page__scroll{
    overflow:visible;
  }
  .portiva-flow-page .summaries-list-body,
  .portiva-flow-page .summaries-list-body--page,
  .portiva-flow-page .home-equity-principal-modal__body{
    flex:none;
    min-height:unset;
    max-height:none;
    overflow:visible;
    margin-bottom:16px;
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__scroll{
    padding-bottom:max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  }
  .portiva-flow-page.portiva-menu-surface-page .portiva-flow-page__scroll{
    padding-bottom:max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  }
  .story-page.portiva-flow-page .portiva-flow-page__scroll{
    padding-bottom:16px;
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__footer{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:120;
    margin:0;
    padding:10px 14px max(10px, env(safe-area-inset-bottom, 0px));
    background:var(--portiva-canvas-bg, var(--bg0));
    border-top-color:transparent;
    border-bottom:0;
    box-shadow:none;
  }
  .portiva-flow-page.portiva-menu-surface-page .portiva-flow-page__footer{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:120;
    margin:0;
    padding:10px 14px max(10px, env(safe-area-inset-bottom, 0px));
    background:var(--portiva-canvas-bg, var(--bg0));
    border-top-color:transparent;
    border-bottom:0;
    box-shadow:none;
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions{
    gap:8px;
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn,
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary,
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--ghost{
    background:var(--portiva-menu-surface);
    border:1px solid var(--portiva-menu-surface-border);
    color:var(--text);
    background-image:none;
    opacity:1;
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn:hover:not(:disabled),
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:hover:not(:disabled),
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--ghost:hover:not(:disabled){
    background:var(--portiva-menu-surface-hover);
    border-color:var(--portiva-menu-surface-border);
    color:var(--text);
    opacity:1;
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:disabled,
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:disabled:hover{
    opacity:.48;
    background:var(--portiva-menu-surface);
    border-color:var(--portiva-menu-surface-border);
    color:var(--text);
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn,
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary{
    background:transparent;
    background-image:none;
    border:1px solid rgba(255,255,255,.45);
    color:var(--text);
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn:hover:not(:disabled),
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:hover:not(:disabled){
    background:transparent;
    background-image:none;
    border-color:rgba(255,255,255,.65);
    opacity:.88;
  }
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:disabled,
  .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:disabled:hover{
    background:transparent;
    background-image:none;
    border-color:rgba(255,255,255,.28);
  }
  [data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn,
  [data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary,
  [data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn,
  [data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary,
  [data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn,
  [data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary{
    border-color:var(--stroke);
  }
  [data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn:hover:not(:disabled),
  [data-theme="dawn"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:hover:not(:disabled),
  [data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn:hover:not(:disabled),
  [data-theme="day"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:hover:not(:disabled),
  [data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn:hover:not(:disabled),
  [data-theme="classic"] .portiva-flow-page.summaries-page .portiva-flow-page__footer-actions .btn--primary:hover:not(:disabled){
    border-color:var(--stroke-hover);
  }
  .portiva-flow-page.summaries-page--investor-shares{
    padding-left:0;
    padding-right:0;
  }
  body.portiva-route-app:has(main.summaries-page--investor-shares) .app-shell{
    padding-left:max(4px, env(safe-area-inset-left, 0px));
    padding-right:max(4px, env(safe-area-inset-right, 0px));
  }
  .portiva-flow-page.summaries-page--investor-shares .summaries-metric-panel{
    padding-left:0;
    padding-right:0;
  }
  .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section{
    padding-left:0;
    padding-right:0;
    border-left:0;
    border-right:0;
    border-radius:0;
  }
  .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-investor-block .summaries-entity-block__toggle,
  .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-entity-block .summaries-entity-block__toggle{
    padding-left:8px;
    padding-right:4px;
  }
  .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-investor-block .summaries-entity-block__body-inner,
  .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-entity-block .summaries-entity-block__body-inner{
    padding-left:0;
    padding-right:0;
  }
  .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-entity-row__link{
    padding-left:8px;
    padding-right:8px;
  }
  .portiva-flow-page.summaries-page--investor-shares .home-equity-principal-modal__row{
    padding-left:8px;
    padding-right:8px;
  }
}
.summaries-page--hub .summaries-hub-search-section{
  flex-shrink:0;
  margin-top:0;
  padding:12px 4px 4px;
}
.summaries-page--hub .summaries-hub-search-section .summaries-search-field{
  margin-bottom:8px;
}
.summaries-page--hub .summaries-hub-recent-mount{
  padding:0;
}
.summaries-hub-recent-mount .summaries-search-recent{
  margin-top:0;
}
@media (max-width:899px){
  .summaries-page--hub .portiva-flow-page__scroll{
    padding-bottom:max(73px, calc(57px + env(safe-area-inset-bottom, 0px)));
  }
}
.summaries-hub-footer-actions .btn{
  flex:0 0 calc((100% - 12px) / 2);
  max-width:calc((100% - 12px) / 2);
}
.summaries-hub-search-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.summaries-hub-search-btn__label{
  line-height:1.2;
}
.summaries-page--hub .summaries-hub-actions{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:10px;
}
.summaries-hub-story-shortcut{
  display:flex;
  justify-content:center;
  align-items:center;
  flex-shrink:0;
  padding:10px 4px 4px;
}
.summaries-hub-story-shortcut__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  margin:0;
  border:none;
  background:transparent;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.summaries-hub-story-shortcut__btn:focus{
  outline:none;
}
.summaries-hub-story-shortcut__btn:focus-visible .summaries-hub-story-shortcut__pill{
  box-shadow:0 0 0 2px var(--bg, #070a12), 0 0 0 3px var(--accent, #6eb5ff);
}
.summaries-hub-story-shortcut__pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:5.5rem;
  min-height:36px;
  padding:6px 18px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--accent, #6eb5ff) 42%, var(--border-strong, rgba(255,255,255,.28)));
  font-size:.84rem;
  font-weight:600;
  line-height:1.1;
  letter-spacing:.01em;
  color:var(--text);
  background:color-mix(in srgb, var(--accent, #6eb5ff) 14%, var(--surface-soft, rgba(255,255,255,.06)) 86%);
  transition:border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.summaries-hub-story-shortcut__btn:hover .summaries-hub-story-shortcut__pill,
.summaries-hub-story-shortcut__btn:focus-visible .summaries-hub-story-shortcut__pill{
  border-color:color-mix(in srgb, var(--accent, #6eb5ff) 65%, transparent);
  color:var(--accent, #6eb5ff);
  background:color-mix(in srgb, var(--accent, #6eb5ff) 22%, var(--surface-soft, rgba(255,255,255,.06)) 78%);
}
.summaries-hub-story-shortcut__btn--unread .summaries-hub-story-shortcut__pill{
  border-color:var(--accent, #6eb5ff);
  box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent),
    0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
}
.summaries-hub-feature-shortcuts{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
}
.summaries-hub-feature-shortcuts .summaries-hub-story-shortcut{
  padding-inline:0;
}
.summaries-hub-wealth-shortcut .summaries-hub-story-shortcut__pill{
  min-width:8.5rem;
}

.wealth-projection-page__body{
  width:min(980px,100%);
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.wealth-projection-page__surface .wealth-projection-page__body{
  width:100%;
  margin:0;
}
.wealth-projection-page__surface > .portiva-flow-page__lead{
  margin:0;
}
body.portiva-route-app:has(main.wealth-projection-page) .app-shell{
  display:block;
  min-height:100dvh;
  overflow:visible;
}
body.portiva-route-app:has(main.wealth-projection-page) #view{
  display:block;
  min-height:0;
  overflow:visible;
}
body.portiva-route-app:has(main.wealth-projection-page) #view > main.wealth-projection-page{
  display:block;
  min-height:0;
  overflow:visible;
}
body.portiva-route-app:has(main.wealth-projection-page) .wealth-projection-page > .portiva-flow-page__scroll{
  display:block;
  min-height:0;
  overflow:visible;
  padding-bottom:28px;
}
.wealth-projection-page__title-row{
  display:flex;
  align-items:center;
  gap:18px;
  width:100%;
  direction:ltr;
}
.wealth-projection-page__title-row .portiva-flow-page__title{
  flex:1 1 auto;
  min-width:0;
}
html[dir="rtl"] .wealth-projection-page__title-row .portiva-flow-page__title{
  direction:rtl;
  text-align:right;
}
.wealth-projection-page__title-row > .story-page__hero-actions.wealth-projection-page__title-actions{
  display:flex;
  align-items:center;
  gap:44px;
  margin-left:auto;
  direction:ltr;
  flex:0 0 auto;
}
.wealth-projection-page__text-action{
  appearance:none;
  padding:4px 0;
  border:0;
  background:transparent;
  color:var(--accent);
  font:inherit;
  font-size:.92rem;
  font-weight:600;
  cursor:pointer;
}
.wealth-projection-page__text-action:hover{
  text-decoration:underline;
}
.wealth-projection-page__text-action:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:4px;
  border-radius:2px;
}
.wealth-projection-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.wealth-projection-stats__mobile-title,
.wealth-projection-stat__mobile-label{
  display:none;
}
.wealth-projection-stat,
.wealth-projection-panel{
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius);
  background:var(--portiva-menu-surface);
  box-shadow:var(--shadow-soft);
}
.wealth-projection-stat{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  padding:14px 16px;
}
.wealth-projection-stat--projected{
  border-color:color-mix(in srgb,#43c889 72%,var(--portiva-menu-surface-border));
  background:color-mix(in srgb,#43c889 28%,var(--portiva-menu-surface) 72%);
}
.wealth-projection-stat span{
  color:var(--muted);
  font-size:.85rem;
}
.wealth-projection-stat strong{
  color:var(--text);
  font-size:clamp(1.12rem,2.4vw,1.5rem);
  line-height:1.2;
  overflow-wrap:anywhere;
}
.wealth-projection-stat strong.is-negative{
  color:#ef6f6c;
}
.wealth-projection-panel{
  padding:16px;
}
.wealth-projection-panel h2,
.wealth-projection-panel h3{
  margin:0 0 14px;
  color:var(--text);
  font-size:1.05rem;
  line-height:1.3;
}
.wealth-projection-assumptions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px 24px;
}
.wealth-projection-assumptions h2,
.wealth-projection-assumptions h3{
  grid-column:1 / -1;
  margin-bottom:0;
}
.wealth-projection-range{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px 14px;
  align-items:center;
  color:var(--text);
}
.wealth-projection-range output{
  color:var(--accent);
  font-size:.9rem;
  font-weight:650;
}
.wealth-projection-range input[type="range"]{
  width:100%;
  margin:0;
  accent-color:var(--accent);
}
.wealth-projection-range__control{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 38px;
  align-items:center;
  gap:10px;
  direction:ltr;
}
.wealth-projection-range__step{
  width:38px;
  height:38px;
  padding:0;
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:50%;
  background:var(--surface-btn);
  color:var(--text);
  font:inherit;
  font-size:1.25rem;
  line-height:1;
  cursor:pointer;
}
.wealth-projection-range__step:hover{
  border-color:var(--stroke-hover);
  background:var(--surface-btn-hover);
}
.wealth-projection-range__step:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.wealth-projection-chart__legend{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px 18px;
  margin-bottom:8px;
  color:var(--muted);
  font-size:.82rem;
}
.wealth-projection-chart__legend-item::before{
  content:"";
  display:inline-block;
  width:10px;
  height:10px;
  margin-inline-end:6px;
  border-radius:50%;
  background:currentColor;
}
.wealth-projection-chart__legend-item--assets{color:#5b9cff}
.wealth-projection-chart__legend-item--debt{color:#ef7b73}
.wealth-projection-chart__legend-item--equity{color:#43c889}
.wealth-projection-chart__scroller{
  width:100%;
  overflow:visible;
}
.wealth-projection-chart{
  display:block;
  width:100%;
  min-width:0;
  height:auto;
}
.wealth-projection-chart__grid-row line{
  stroke:color-mix(in srgb,var(--portiva-menu-surface-border) 72%,transparent);
  stroke-width:1;
}
.wealth-projection-chart text{
  fill:var(--muted);
  font-size:11px;
}
.wealth-projection-chart__axis{
  stroke:var(--portiva-menu-surface-border);
  stroke-width:1.2;
}
.wealth-projection-chart__line{
  fill:none;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.wealth-projection-chart__line--assets{stroke:#5b9cff}
.wealth-projection-chart__line--debt{stroke:#ef7b73}
.wealth-projection-chart__line--equity{stroke:#43c889}
.wealth-projection-chart__end-label circle{
  stroke:none;
}
.wealth-projection-chart__end-label line{
  fill:none;
  stroke-width:1.4;
}
.wealth-projection-chart__end-label text{
  font-size:11px;
  font-weight:700;
}
.wealth-projection-chart__end-label--assets circle{fill:#5b9cff}
.wealth-projection-chart__end-label--assets line{stroke:#5b9cff}
.wealth-projection-chart__end-label--assets text{fill:#5b9cff}
.wealth-projection-chart__end-label--debt circle{fill:#ef7b73}
.wealth-projection-chart__end-label--debt line{stroke:#ef7b73}
.wealth-projection-chart__end-label--debt text{fill:#ef7b73}
.wealth-projection-chart__end-label--equity circle{fill:#43c889}
.wealth-projection-chart__end-label--equity line{stroke:#43c889}
.wealth-projection-chart__end-label--equity text{fill:#43c889}
.wealth-projection-breakdown{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.wealth-projection-breakdown__row{
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  min-height:38px;
  padding:8px 10px;
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius-sm);
  background:color-mix(in srgb,var(--portiva-menu-surface) 86%,var(--bg) 14%);
}
.wealth-projection-breakdown__swatch{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#8b95a7;
}
.wealth-projection-breakdown__row--appreciation .wealth-projection-breakdown__swatch{
  background:#5b9cff;
}
.wealth-projection-breakdown__row--debt .wealth-projection-breakdown__swatch{
  background:#43c889;
}
.wealth-projection-breakdown__row strong{
  overflow-wrap:anywhere;
}
.wealth-projection-scenarios{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.wealth-projection-scenario{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  padding:12px;
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius-sm);
  background:color-mix(in srgb,var(--portiva-menu-surface) 86%,var(--bg) 14%);
}
.wealth-projection-scenario span,
.wealth-projection-scenario small{
  color:var(--muted);
}
.wealth-projection-scenario strong{
  color:var(--text);
  font-size:1.05rem;
  overflow-wrap:anywhere;
}
.wealth-projection-scenario--base{
  border-color:color-mix(in srgb,var(--accent) 64%,var(--portiva-menu-surface-border));
  background:color-mix(in srgb,var(--accent) 9%,var(--portiva-menu-surface) 91%);
}
.wealth-projection-details-page .wealth-projection-stats{
  grid-template-columns:1fr;
}
.wealth-projection-details-list{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.wealth-projection-detail-group{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius);
  background:var(--portiva-menu-surface);
  box-shadow:var(--shadow-soft);
}
.wealth-projection-detail-group + .wealth-projection-detail-group{
  padding-top:14px;
}
.wealth-projection-detail-group h2{
  margin:0;
  color:var(--text);
  font-size:1.05rem;
  line-height:1.3;
}
.wealth-projection-detail-group__columns,
.wealth-projection-detail-row__summary{
  display:grid;
  grid-template-columns:minmax(140px,1.4fr) repeat(3,minmax(90px,1fr));
  gap:12px;
  align-items:center;
}
.wealth-projection-detail-group__columns{
  padding:0 10px 8px;
  border-bottom:1px solid var(--portiva-menu-surface-border);
  color:var(--muted);
  font-size:.76rem;
  font-weight:650;
}
.wealth-projection-detail-group__columns span:not(:first-child){
  text-align:end;
}
.wealth-projection-detail-group__assets{
  display:flex;
  flex-direction:column;
  gap:0;
}
.wealth-projection-detail-row{
  padding:10px;
}
.wealth-projection-detail-row + .wealth-projection-detail-row{
  border-top:1px solid color-mix(in srgb,var(--portiva-menu-surface-border) 65%,transparent);
}
.wealth-projection-detail-row__heading{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.wealth-projection-detail-row__name{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  direction:ltr;
}
.wealth-projection-detail-row__name > strong{
  min-width:0;
}
html[dir="rtl"] .wealth-projection-detail-row__name > strong{
  direction:rtl;
  text-align:right;
}
.wealth-projection-detail-row__info{
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  width:22px;
  height:22px;
  padding:0;
  border:1px solid #047857;
  border-radius:50%;
  background:#047857;
  color:#fff;
  font:700 .78rem/1 serif;
  cursor:pointer;
}
.wealth-projection-detail-row__info[aria-expanded="true"]{
  color:#fff;
  border-color:#065f46;
  background:#065f46;
}
.wealth-projection-detail-row__info:focus-visible{
  outline:2px solid #047857;
  outline-offset:2px;
}
.wealth-projection-detail-row__heading strong,
.wealth-projection-detail-row__heading span{
  overflow-wrap:anywhere;
}
.wealth-projection-detail-row__heading span{
  color:var(--muted);
  font-size:.82rem;
}
.wealth-projection-detail-row__amount{
  min-width:0;
  color:var(--text);
  font-weight:650;
  text-align:end;
  overflow-wrap:anywhere;
}
.wealth-projection-detail-calculation{
  display:grid;
  gap:9px;
  margin-top:10px;
  padding:12px 10px 4px;
  border-top:1px dashed var(--portiva-menu-surface-border);
}
.wealth-projection-detail-calculation[hidden]{
  display:none;
}
.wealth-projection-detail-calculation h3{
  margin:0 0 2px;
  font-size:.9rem;
  color:var(--text);
}
.wealth-projection-detail-calculation__line{
  display:grid;
  grid-template-columns:minmax(120px,.45fr) minmax(0,1fr);
  gap:4px 12px;
  align-items:baseline;
  font-size:.84rem;
}
.wealth-projection-detail-calculation__line > strong{
  color:var(--muted);
  font-weight:650;
}
.wealth-projection-detail-calculation__line > span{
  direction:ltr;
  unicode-bidi:isolate;
  color:var(--text);
  overflow-wrap:anywhere;
}
.wealth-projection-detail-calculation__line > small{
  grid-column:2;
  color:var(--muted);
  line-height:1.4;
}
.wealth-projection-detail-calculation__breakdown{
  display:grid;
  gap:7px;
  margin-top:5px;
  padding-top:10px;
  border-top:1px solid var(--portiva-menu-surface-border);
}
.wealth-projection-detail-calculation__breakdown > div{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}
.wealth-projection-detail-calculation__breakdown span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
}
.wealth-projection-detail-calculation__breakdown i{
  color:#43c889;
  font-style:normal;
  font-weight:800;
}
.wealth-projection-detail-calculation__breakdown strong{
  direction:ltr;
  unicode-bidi:isolate;
  color:var(--text);
}
.wealth-projection-detail-calculation__breakdown > .wealth-projection-detail-calculation__total{
  margin-top:2px;
  padding-top:8px;
  border-top:1px solid var(--portiva-menu-surface-border);
}
.wealth-projection-detail-calculation__total span,
.wealth-projection-detail-calculation__total strong{
  color:var(--text);
  font-weight:750;
}
.wealth-projection-disclaimer{
  margin:0;
  padding:0 4px;
  color:var(--muted);
  font-size:.82rem;
  line-height:1.45;
}
/* Night-Gray mobile: darken Wealth Projection inner panels (not welcome demo). */
@media (max-width:900px){
  [data-theme="night-gray"] main.wealth-projection-page .wealth-projection-panel{
    background:#182233;
  }
}
@media (max-width:699px){
  .wealth-projection-stats{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
  }
  .wealth-projection-stats__mobile-title{
    display:block;
    grid-column:1 / -1;
    margin:0 0 2px;
    color:var(--text);
    font-size:1.05rem;
    line-height:1.3;
  }
  .wealth-projection-stat__desktop-label{
    display:none;
  }
  .wealth-projection-stat__mobile-label{
    display:inline;
  }
  .wealth-projection-stat{
    padding:10px 8px;
  }
  .wealth-projection-stat strong{
    font-size:clamp(.92rem,4.2vw,1.2rem);
    white-space:nowrap;
    overflow-wrap:normal;
  }
  .wealth-projection-chart text{
    font-size:18px;
  }
  .wealth-projection-chart__end-label text{
    font-size:22px;
  }
  .wealth-projection-assumptions{
    grid-template-columns:1fr;
  }
  .wealth-projection-scenarios{
    grid-template-columns:1fr;
  }
  .wealth-projection-page__title-row{
    align-items:flex-start;
  }
  .wealth-projection-page__title-row > .story-page__hero-actions.wealth-projection-page__title-actions{
    gap:32px;
  }
  .wealth-projection-detail-group__columns,
  .wealth-projection-detail-row__summary{
    grid-template-columns:minmax(92px,1.35fr) repeat(3,minmax(58px,1fr));
    gap:7px;
  }
  .wealth-projection-detail-group{
    padding:12px 8px;
  }
  .wealth-projection-detail-group__columns,
  .wealth-projection-detail-row{
    padding-inline:6px;
  }
  .wealth-projection-detail-row__amount{
    font-size:.82rem;
  }
  .wealth-projection-detail-calculation{
    padding-inline:6px;
  }
  .wealth-projection-detail-calculation__line{
    grid-template-columns:minmax(88px,.42fr) minmax(0,1fr);
    gap-inline:8px;
    font-size:.8rem;
  }
}

/* Summaries cashflow — same gray row cards as debt/principal */
.portiva-flow-page.summaries-page--cashflow .home-equity-principal-modal__list--cashflow .home-equity-principal-modal__row{
  background:var(--portiva-menu-surface);
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius-sm);
}
.summaries-investor-shares-by-investor{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section{
  background:#000;
  border:1px solid rgba(255,255,255,.2);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  box-sizing:border-box;
}
[data-theme="dawn"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section,
[data-theme="day"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section,
[data-theme="classic"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section{
  background:var(--portiva-menu-surface);
  border-color:var(--portiva-menu-surface-border);
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section__title{
  margin:0 0 2px;
  font-size:1.05rem;
  font-weight:600;
  line-height:1.3;
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section__content{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .home-equity-principal-modal__total{
  margin:0;
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .home-equity-principal-modal__body{
  margin:0;
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .home-equity-principal-modal__empty{
  margin:0;
  font-size:.95rem;
  line-height:1.35;
  color:var(--muted);
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar{
  margin:0;
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar .btn{
  border:1px solid rgba(255,255,255,.2);
  background:transparent;
}
.portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar .btn:hover:not(:disabled){
  border-color:rgba(255,255,255,.35);
  background:rgba(255,255,255,.06);
}
[data-theme="dawn"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar .btn,
[data-theme="day"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar .btn,
[data-theme="classic"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar .btn{
  border-color:var(--portiva-menu-surface-border);
  background:var(--surface-btn);
  color:var(--text);
}
[data-theme="dawn"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar .btn:hover:not(:disabled),
[data-theme="day"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar .btn:hover:not(:disabled),
[data-theme="classic"] .portiva-flow-page.summaries-page--investor-shares .summaries-investor-shares-section .summaries-list-toolbar .btn:hover:not(:disabled){
  border-color:var(--stroke-hover);
  background:var(--surface-btn-hover);
  color:var(--text);
}
.summaries-investor-shares-investor-block.summaries-entity-block{
  margin:0;
}
.summaries-investor-shares-entity-block.summaries-entity-block{
  margin:0;
}
.summaries-investor-shares-investor-block .summaries-entity-block__title{
  font-size:1rem;
  font-weight:600;
}
.summaries-investor-shares-investor-block .summaries-entity-block__body-inner{
  padding:0 14px 12px;
}
.summaries-investor-shares-entity-block .summaries-entity-block__body-inner{
  padding:0 14px 12px;
}
.summaries-investor-shares-entity-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.summaries-investor-shares-entity-row{
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
}
.summaries-investor-shares-entity-row__link{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 12px;
  width:100%;
  margin:0;
  padding:8px 10px;
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface);
  text-align:inherit;
  font:inherit;
  color:inherit;
  cursor:pointer;
}
.summaries-investor-shares-entity-row__link:hover{
  background:var(--portiva-menu-surface-hover, var(--portiva-menu-surface));
}
.summaries-investor-shares-entity-row__link:focus-visible{
  outline:2px solid var(--portiva-summaries-link, #10b981);
  outline-offset:2px;
}
.summaries-investor-shares-entity-row__link .summaries-investor-shares-entity-row__name{
  color:var(--portiva-summaries-link, #10b981);
  font-weight:600;
}
.summaries-investor-shares-entity-row__link:hover .summaries-investor-shares-entity-row__name{
  color:var(--portiva-summaries-link-hover, #34d399);
}
.summaries-investor-shares-entity-row__name{
  flex:1 1 140px;
  min-width:0;
  font-weight:500;
}
.summaries-investor-shares-entity-row__pct{
  font-variant-numeric:tabular-nums;
  color:var(--text-muted);
  font-size:.92rem;
}
.summaries-investor-shares-entity-row__access{
  flex:1 1 120px;
  min-width:0;
  color:var(--text-muted);
  font-size:.88rem;
}
.summaries-investor-shares-entity-row__status{
  flex:0 0 auto;
}
.summaries-investor-shares-entity-row--deal .summaries-investor-shares-entity-row__link{
  flex-direction:column;
  align-items:stretch;
  gap:.2rem;
}
.summaries-investor-shares-entity-row--deal .summaries-investor-shares-entity-row__deal-title{
  flex:none;
  width:100%;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.summaries-investor-shares-entity-row__from{
  display:block;
  width:100%;
  min-width:0;
  font-size:.88rem;
  line-height:1.35;
  font-weight:400;
  color:var(--danger, #f87171);
}
.portiva-flow-page.summaries-page--investor-shares button.home-equity-principal-modal__row-link{
  display:block;
  width:100%;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  text-align:inherit;
  font:inherit;
  color:inherit;
  cursor:pointer;
}
.portiva-flow-page.summaries-page--investor-shares button.home-equity-principal-modal__row-link .home-equity-principal-modal__asset{
  color:var(--portiva-summaries-link, #10b981);
  font-weight:600;
}
.portiva-flow-page.summaries-page--investor-shares button.home-equity-principal-modal__row-link:hover .home-equity-principal-modal__asset{
  color:var(--portiva-summaries-link-hover, #34d399);
}
.portiva-flow-page.summaries-page--investor-shares button.home-equity-principal-modal__row-link:focus-visible{
  outline:2px solid var(--portiva-summaries-link, #10b981);
  outline-offset:2px;
}
/* Overflow menu full pages — principal-style gray cards everywhere */
.portiva-flow-page .home-equity-principal-modal__row,
.portiva-flow-page.summaries-page .summaries-entity-block,
.portiva-flow-page.backup-page .restore-backup-item,
.portiva-flow-page.layout-settings-page .layout-settings-field:not(.layout-settings-currency-field),
.portiva-flow-page.layout-settings-page .layout-settings-currency-bubble,
.portiva-flow-page.layout-settings-page .layout-settings-signin-bubble,
.portiva-flow-page.layout-settings-page .layout-settings-device-cache-bubble,
.portiva-flow-page .export-csv-scope,
.portiva-flow-page.summaries-page .summaries-hub-actions .summaries-hub-btn,
.portiva-flow-page.summaries-page .summaries-hub-actions .btn--secondary{
  background:var(--portiva-menu-surface);
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius-sm);
}
.portiva-flow-page.help-page,
.portiva-flow-page.legal-page{
  --portiva-help-bubble-bg:#f8fafc;
  --portiva-help-bubble-hover:#ffffff;
  --portiva-help-bubble-border:rgba(148,163,184,.32);
  --portiva-help-bubble-fg:#0f172a;
  --portiva-help-bubble-shadow:0 2px 10px rgba(0,0,0,.2);
}
[data-theme="night"] .portiva-flow-page.help-page,
[data-theme="night"] .portiva-flow-page.legal-page{
  --portiva-help-bubble-bg:var(--portiva-menu-surface);
  --portiva-help-bubble-hover:var(--portiva-menu-surface-hover);
  --portiva-help-bubble-border:var(--portiva-menu-surface-border, var(--stroke));
  --portiva-help-bubble-fg:var(--text, #e2e8f0);
  --portiva-help-bubble-shadow:0 1px 2px rgba(15,23,42,.06);
}
[data-theme="night-gray"] .portiva-flow-page.help-page,
[data-theme="night-gray"] .portiva-flow-page.legal-page,
[data-theme="gray-night"] .portiva-flow-page.help-page,
[data-theme="gray-night"] .portiva-flow-page.legal-page{
  --portiva-help-bubble-bg:color-mix(in srgb, var(--surface-card, #1f2937) 82%, #0b1220 18%);
  --portiva-help-bubble-hover:color-mix(in srgb, var(--surface-card-hover, #334155) 78%, #111827 22%);
  --portiva-help-bubble-border:var(--stroke, rgba(148,163,184,.28));
  --portiva-help-bubble-fg:var(--text, #e2e8f0);
  --portiva-help-bubble-shadow:0 2px 14px rgba(0,0,0,.38);
}
[data-theme="dawn"] .portiva-flow-page.help-page,
[data-theme="dawn"] .portiva-flow-page.legal-page,
[data-theme="day"] .portiva-flow-page.help-page,
[data-theme="day"] .portiva-flow-page.legal-page,
[data-theme="classic"] .portiva-flow-page.help-page,
[data-theme="classic"] .portiva-flow-page.legal-page{
  --portiva-help-bubble-bg:#ffffff;
  --portiva-help-bubble-hover:#f8fafc;
  --portiva-help-bubble-border:var(--stroke);
  --portiva-help-bubble-fg:var(--text);
  --portiva-help-bubble-shadow:0 1px 3px rgba(15,23,42,.07), 0 4px 14px rgba(15,23,42,.08);
}
.portiva-flow-page.help-page .help-page-top-nav__link.btn,
.portiva-flow-page.help-page .help-guide-btn.btn{
  background:var(--portiva-help-bubble-bg);
  background-image:none;
  border:1px solid var(--portiva-help-bubble-border);
  border-radius:var(--radius-sm);
  color:var(--portiva-help-bubble-fg);
  box-shadow:var(--portiva-help-bubble-shadow);
}
.portiva-flow-page.help-page .help-page-top-nav__link.btn:hover,
.portiva-flow-page.help-page .help-guide-btn.btn:hover:not(:disabled){
  background:var(--portiva-help-bubble-hover);
  background-image:none;
  border-color:var(--portiva-help-bubble-border);
  color:var(--portiva-help-bubble-fg);
}
.portiva-flow-page.help-page .help-guide-btn.btn:disabled,
.portiva-flow-page.help-page .help-guide-btn.btn:disabled:hover{
  opacity:.48;
  background:var(--portiva-help-bubble-bg);
  background-image:none;
  border-color:var(--portiva-help-bubble-border);
  color:var(--portiva-help-bubble-fg);
}
.portiva-flow-page.help-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn,
.portiva-flow-page.help-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary,
.portiva-flow-page.legal-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn,
.portiva-flow-page.legal-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary{
  background:var(--portiva-help-bubble-bg);
  background-image:none;
  border:1px solid var(--portiva-help-bubble-border);
  color:var(--portiva-help-bubble-fg);
  box-shadow:var(--portiva-help-bubble-shadow);
}
.portiva-flow-page.help-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn:hover:not(:disabled),
.portiva-flow-page.help-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:hover:not(:disabled),
.portiva-flow-page.legal-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn:hover:not(:disabled),
.portiva-flow-page.legal-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:hover:not(:disabled){
  background:var(--portiva-help-bubble-hover);
  background-image:none;
  border-color:var(--portiva-help-bubble-border);
  color:var(--portiva-help-bubble-fg);
}
.portiva-flow-page.help-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:disabled,
.portiva-flow-page.help-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:disabled:hover,
.portiva-flow-page.legal-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:disabled,
.portiva-flow-page.legal-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:disabled:hover{
  opacity:.48;
  background:var(--portiva-help-bubble-bg);
  background-image:none;
  border-color:var(--portiva-help-bubble-border);
  color:var(--portiva-help-bubble-fg);
}
.portiva-flow-page.backup-page .restore-backup-item{
  margin:0 0 10px;
  padding:10px 12px;
  box-sizing:border-box;
}
.portiva-flow-page.backup-page .restore-backup-item:hover{
  background:var(--portiva-menu-surface-hover);
}
.portiva-flow-page.backup-page .restore-backup-item--readonly:hover{
  background:var(--portiva-menu-surface);
}
.portiva-flow-page.backup-page .restore-backup-list-mount{
  border-color:var(--portiva-menu-surface-border);
  background:transparent;
}
.portiva-flow-page.layout-settings-page .layout-settings-field:not(.layout-settings-currency-field){
  padding:10px 12px;
  box-sizing:border-box;
}
.layout-settings-signin-bubble{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  padding:12px 14px;
  box-sizing:border-box;
}
.layout-settings-signin-bubble__copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.layout-settings-signin-bubble__hint{
  margin:0;
}
.layout-settings-signin-bubble__action{
  align-self:flex-start;
  width:auto;
  max-width:100%;
}
@media (min-width:641px){
  .layout-settings-signin-bubble{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:14px;
  }
  .layout-settings-signin-bubble__action{
    flex:0 0 auto;
    align-self:center;
  }
}
.portiva-flow-page.summaries-page .summaries-entity-block__toggle{
  background:transparent;
}
.portiva-flow-page.summaries-page .summaries-entity-block__toggle:hover{
  background:var(--portiva-menu-surface-hover);
}
.portiva-flow-page.summaries-page .summaries-mgmt-asset{
  border-bottom-color:var(--portiva-menu-surface-border);
}
.portiva-flow-page.summaries-page .summaries-hub-actions .summaries-hub-btn:hover,
.portiva-flow-page.summaries-page .summaries-hub-actions .btn--secondary:hover{
  background:var(--portiva-menu-surface-hover);
  border-color:var(--portiva-menu-surface-border);
}
body:has(main.help-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.help-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  overflow:visible;
}
.help-page .portiva-flow-page__scroll{
  flex:none;
  min-height:auto;
  max-height:none;
  height:auto;
  gap:0;
  padding-bottom:16px;
  overflow:visible;
  overscroll-behavior:auto;
  touch-action:auto;
}
.help-page-top-nav{
  margin:0 0 12px;
}
.help-page-top-nav__list{
  display:flex;
  flex-direction:column;
  gap:10px;
  list-style:none;
  padding:0;
  margin:0;
}
.help-page-top-nav__link{
  width:100%;
  justify-content:flex-start;
  text-align:left;
  height:auto;
  padding:10px 14px;
  white-space:normal;
  text-decoration:none;
}
html[dir="rtl"] .help-page-top-nav__link{
  text-align:right;
}
.story-page__budget{
  margin:0;
  font-size:.84rem;
  color:var(--muted);
}
.story-page__market-note{
  margin:0 0 10px;
  font-size:.74rem;
  line-height:1.4;
  color:var(--muted);
}
.story-page__hero-actions{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.story-page__hero-head > .story-page__hero-actions{
  margin-top:0;
  flex-wrap:nowrap;
  gap:10px;
}
.story-page__feed-radius-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 8px;
  position:relative;
  z-index:50;
}
.story-page__radius-menu{
  position:relative;
  display:inline-flex;
  flex:0 0 auto;
  max-width:100%;
}
.story-page__radius-menu-panel{
  position:absolute;
  top:calc(100% + 6px);
  inset-inline-end:0;
  z-index:40;
  display:flex;
  flex-direction:column;
  min-width:max(100%, 12.5rem);
  max-width:min(100vw - 2rem, 18rem);
  padding:6px;
  border:1px solid var(--accent-border, #cbd5e1);
  border-radius:10px;
  background:var(--card, #fff);
  box-shadow:0 10px 28px rgba(15, 23, 42, .14);
}
.story-page__radius-menu-panel--start{
  inset-inline-end:auto;
  inset-inline-start:0;
}
.story-page__radius-menu-panel[hidden]{
  display:none !important;
}
.story-page__radius-menu-item{
  appearance:none;
  display:block;
  width:100%;
  margin:0;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:.88rem;
  font-weight:500;
  line-height:1.25;
  text-align:start;
  cursor:pointer;
}
.story-page__radius-menu-item:hover,
.story-page__radius-menu-item:focus-visible{
  background:var(--accent-soft, rgba(37, 99, 235, .08));
  outline:none;
}
.story-page__radius-menu-item--on{
  color:var(--accent, #2563eb);
  font-weight:600;
}
.story-page__hero-actions .btn{
  min-height:40px;
  padding:8px 20px;
}
.story-page.portiva-flow-page .portiva-flow-page__scroll{
  padding-bottom:16px;
}
.story-page--white.portiva-flow-page{
  max-width:none;
  width:100%;
  margin:0;
  padding:0;
  background:#fff;
  color:var(--text);
}
.story-page--white.portiva-flow-page .portiva-flow-page__scroll{
  max-width:min(720px, 100%);
  margin:0 auto;
  width:100%;
  box-sizing:border-box;
  padding-inline:max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
}
/* Feed + Watch layout bubble — same chrome as Neighborhood map `.story-map-page__layout`. */
.story-page:not(.story-logs-page) .story-page__layout{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px 16px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:#000;
  box-sizing:border-box;
}
[data-theme="dawn"] .story-page:not(.story-logs-page) .story-page__layout,
[data-theme="day"] .story-page:not(.story-logs-page) .story-page__layout,
[data-theme="classic"] .story-page:not(.story-logs-page) .story-page__layout{
  background:#fff;
}
[data-theme="night-gray"] .story-page:not(.story-logs-page) .story-page__layout,
[data-theme="gray-night"] .story-page:not(.story-logs-page) .story-page__layout{
  background:var(--surface-card, var(--bg1));
}
[data-theme="night"] .story-page:not(.story-logs-page) .story-page__layout{
  background:var(--portiva-menu-surface);
  border-color:var(--portiva-menu-surface-border, var(--stroke));
}
.story-page:not(.story-logs-page) .story-page__body.portiva-flow-page__body,
.story-page:not(.story-logs-page) .portiva-flow-page__body.story-page__body{
  padding:12px 14px 14px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  display:flex;
  flex-direction:column;
  gap:12px;
}
/* Titles + Watch / Save slots sit above the white bubble. */
.story-page:not(.story-logs-page) .story-page__hero{
  margin:0;
  padding:0;
  flex:0 0 auto;
}
.story-page:not(.story-logs-page) .story-page__hero .portiva-flow-page__lead{
  margin-bottom:0;
}
/* Mobile Feed + Watch: same single white bubble as Neighborhood map (2px gutters — no outer page chrome). */
@media (max-width:899px){
  #view > main.portiva-flow-page.story-page.story-page--white:not(.story-logs-page){
    max-width:none !important;
    width:100% !important;
    margin:0 !important;
    padding-left:2px !important;
    padding-right:2px !important;
    box-sizing:border-box !important;
    background:transparent !important;
  }
  .story-page.story-page--white:not(.story-logs-page) .portiva-flow-page__scroll{
    max-width:none !important;
    margin:0 !important;
    width:100% !important;
    padding-inline:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
  }
  .story-page:not(.story-logs-page) .story-page__body.portiva-flow-page__body,
  .story-page:not(.story-logs-page) .portiva-flow-page__body.story-page__body{
    padding:12px 0 14px !important;
  }
  .story-page:not(.story-logs-page) .story-page__hero{
    padding-inline:10px;
    box-sizing:border-box;
  }
  .story-page:not(.story-logs-page) .story-page__layout{
    padding:14px 12px !important;
  }
}
/* Desktop Feed + Watch: identical width track as Neighborhood map (1400px page → padded scroll → layout bubble). */
@media (min-width:900px){
  .story-page.story-page--white.portiva-flow-page:not(.story-logs-page){
    max-width:min(1400px, 100%);
    padding:0;
    margin:0 auto;
    width:100%;
    background:transparent;
  }
  .story-page.story-page--white:not(.story-logs-page) .portiva-flow-page__scroll{
    max-width:none;
    margin:0;
    gap:0;
    padding-top:0;
    padding-inline:max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
    border:0;
    border-radius:0;
    background:transparent;
  }
  .story-page:not(.story-logs-page) .story-page__body.portiva-flow-page__body,
  .story-page:not(.story-logs-page) .portiva-flow-page__body.story-page__body{
    padding:12px 18px 18px;
    margin-top:0;
  }
  .story-watch-page .story-page__hero-head,
  .story-watch-page__title-row{
    width:100%;
    margin-bottom:0;
  }
  .story-watch-page .story-page__hero-head .portiva-flow-page__title,
  .story-watch-page__title-row .portiva-flow-page__title{
    text-align:start;
  }
  .story-watch-page .story-page__hero-head .story-page__text-action,
  .story-watch-page__title-row .story-page__text-action{
    margin-inline-start:auto;
  }
}
.story-watch-page .story-page__hero-head,
.story-watch-page__title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:0;
}
.story-watch-page__section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.story-watch-page__lead{
  margin:0;
  flex:1 1 auto;
  min-width:0;
  font-size:.92rem;
  line-height:1.35;
  color:var(--muted);
}
.story-watch-page .story-page__hero-head .portiva-flow-page__title{
  margin:0;
  flex:1 1 auto;
  min-width:0;
}
.story-watch-page__section-head .story-page__section-title{
  margin:0;
  min-width:0;
  flex:1 1 auto;
}
.story-watch-page__budget-count{
  flex:0 0 auto;
  font-size:.84rem;
  line-height:1.2;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.story-page__text-action,
.story-watch-page__text-action{
  appearance:none;
  flex:0 0 auto;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:var(--accent, #2563eb);
  font:inherit;
  font-size:.92rem;
  font-weight:600;
  line-height:1.2;
  cursor:pointer;
  text-decoration:none;
}
.story-page__text-action:hover,
.story-page__text-action:focus-visible,
.story-watch-page__text-action:hover,
.story-watch-page__text-action:focus-visible{
  text-decoration:underline;
  outline:none;
}
.story-page__text-action[hidden],
.story-watch-page__text-action[hidden]{
  display:none !important;
}
.story-page__text-action:disabled,
.story-watch-page__text-action:disabled{
  opacity:.48;
  cursor:not-allowed;
  text-decoration:none;
}
a.story-page__text-action{
  display:inline-flex;
  align-items:center;
}
.story-menu-page__actions{
  display:flex;
  margin-top:2px;
}
.story-menu-page__actions[hidden]{
  display:none !important;
}
.story-menu-page__actions .btn{
  flex:1 1 auto;
  width:100%;
  min-height:44px;
}
.story-page__watch-link,
#btnStoryWatchSaveSlots{
  transform:translateX(-10px);
}
.story-page__watch-link--disabled{
  opacity:.45;
  cursor:not-allowed;
  text-decoration:none;
}
.story-watch-page__hero-actions{
  display:none;
}
.story-watch-page__hero-actions .btn,
.story-watch-page__hero-actions .story-watch-page__accuracy-select{
  flex:1 1 0;
  min-width:0;
  min-height:40px;
}
.story-watch-page__accuracy-select{
  padding:8px 12px;
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  background:var(--surface-card, #fff);
  color:var(--text);
  font:inherit;
  font-weight:600;
  cursor:pointer;
}
[data-theme="night-gray"] .story-watch-page__accuracy-select,
[data-theme="gray-night"] .story-watch-page__accuracy-select{
  background:var(--surface-card, var(--bg));
}
[data-theme="night-gray"] .story-page--white.portiva-flow-page,
[data-theme="gray-night"] .story-page--white.portiva-flow-page,
[data-theme="night"] .story-page--white.portiva-flow-page{
  background:var(--portiva-canvas-bg, var(--bg0));
  color:var(--text);
}
@media (min-width:900px){
  [data-theme="night-gray"] .story-page.story-page--white.portiva-flow-page:not(.story-logs-page),
  [data-theme="gray-night"] .story-page.story-page--white.portiva-flow-page:not(.story-logs-page),
  [data-theme="night"] .story-page.story-page--white.portiva-flow-page:not(.story-logs-page),
  [data-theme="dawn"] .story-page.story-page--white.portiva-flow-page:not(.story-logs-page),
  [data-theme="day"] .story-page.story-page--white.portiva-flow-page:not(.story-logs-page),
  [data-theme="classic"] .story-page.story-page--white.portiva-flow-page:not(.story-logs-page){
    background:transparent;
  }
}
.story-page__hero-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.story-page__hero-head .portiva-flow-page__title{
  margin:0;
  flex:1 1 auto;
  min-width:0;
}
.story-page__hero-actions{
  display:flex;
  flex:0 0 auto;
  gap:10px;
  align-items:center;
}
.story-page__scan-now,
.story-page__watch-link,
.story-page__radius-btn,
.story-page__radius-menu{
  flex:0 0 auto;
}
.story-page--white .story-page__asset-list{
  gap:14px;
}
.story-watch-page.story-page--white .story-page__asset-list{
  gap:6px;
}
.story-watch-page .story-page__asset{
  padding:4px 8px;
  gap:8px;
  min-height:0;
}
.story-watch-page .story-page__asset-main{
  font-size:.78rem;
  line-height:1.25;
}
.story-watch-page .story-page__watch-btn{
  min-height:26px;
  padding:2px 10px;
  font-size:.78rem;
  line-height:1.2;
}
.story-page__watch-kinds{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  justify-content:flex-end;
}
.story-page__watch-kind{
  min-height:26px;
  padding:2px 8px;
  font-size:.72rem;
  line-height:1.2;
  background:var(--portiva-menu-surface);
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius-sm);
}
.story-page__watch-kind:hover:not(:disabled){
  background:var(--portiva-menu-surface-hover);
}
.story-page__watch-kind--on,
.portiva-flow-page.story-page .story-page__watch-kind--on{
  background:var(--portiva-tab-indicator, #10b981);
  border-color:var(--portiva-tab-indicator, #10b981);
  color:#fff;
}
.story-page__watch-kind--on:hover:not(:disabled),
.portiva-flow-page.story-page .story-page__watch-kind--on:hover:not(:disabled){
  background:#059669;
  border-color:#059669;
  color:#fff;
}
.story-page__watch-kind--locked,
.portiva-flow-page.story-page .story-page__watch-kind--locked{
  outline:1px solid #000;
  outline-offset:1px;
}
.story-page__watch-kind--on.story-page__watch-kind--pending,
.portiva-flow-page.story-page .story-page__watch-kind--on.story-page__watch-kind--pending{
  background:#d1fae5;
  border-color:#6ee7b7;
  color:#065f46;
}
.story-page__watch-kind--on.story-page__watch-kind--pending:hover:not(:disabled),
.portiva-flow-page.story-page .story-page__watch-kind--on.story-page__watch-kind--pending:hover:not(:disabled){
  background:#a7f3d0;
  border-color:#34d399;
  color:#065f46;
}
.story-page__watch-kind--muted,
.portiva-flow-page.story-page .story-page__watch-kind--muted{
  text-decoration:line-through;
  text-decoration-color:#dc2626;
  text-decoration-thickness:3px;
  text-decoration-skip-ink:none;
}
.story-page__watch-kind--on.story-page__watch-kind--muted,
.portiva-flow-page.story-page .story-page__watch-kind--on.story-page__watch-kind--muted{
  text-decoration-color:#dc2626;
}
.story-watch-save-slots__lock-lead{
  margin-bottom:1rem;
}
.story-watch-page .story-page__asset-actions{
  flex:0 1 auto;
  max-width:min(100%, 280px);
}
.story-watch-page .story-page__watch-unavailable{
  font-size:.72rem;
  line-height:1.2;
}
.story-page--white .story-page__entity-group + .story-page__entity-group{
  margin-top:4px;
}
.story-page__feed-area{
  margin:0 0 22px;
}
.story-page__feed-map-bar{
  margin:0 0 10px;
}
.story-page__feed-map-all-btn{
  min-height:40px;
  padding:8px 14px;
  font-weight:600;
}
.story-page__watch-unavailable{
  font-size:.78rem;
  color:var(--muted);
}
.story-page__asset--unavailable{
  opacity:.85;
}
.story-page__feed-batch-heading{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  margin:0 0 8px;
  font-size:.92rem;
  font-weight:700;
  width:100%;
  box-sizing:border-box;
}
.story-page__feed-area-title{
  margin:0;
  font-size:inherit;
  font-weight:700;
  min-width:0;
  flex:1 1 auto;
}
.story-page__feed-area-map{
  appearance:none;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
  margin-inline-start:auto;
  padding:4px;
  border:0;
  border-radius:6px;
  background:transparent;
  box-shadow:none;
  font:inherit;
  line-height:0;
  cursor:pointer;
  color:var(--muted);
}
.story-page__feed-area-map-svg{
  display:block;
  width:18px;
  height:18px;
}
.story-page__feed-area-map:hover,
.story-page__feed-area-map:focus-visible{
  outline:none;
  color:var(--accent, #3d8bfd);
  background:color-mix(in srgb, var(--accent, #3d8bfd) 12%, transparent);
}
.story-map-loading[hidden]{
  display:none !important;
}
.story-map-loading{
  position:fixed;
  inset:0;
  z-index:240;
  pointer-events:none;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1.25rem;
  background:color-mix(in srgb, var(--bg0, #fff) 72%, transparent);
  backdrop-filter:blur(2px);
}
#storyMapLoadingOverlay{
  position:static;
  inset:auto;
  z-index:auto;
  width:100%;
  padding:12px 0;
  background:transparent;
  backdrop-filter:none;
}
#storyMapLoadingOverlay .story-map-loading__card{
  margin:0 auto;
}
.story-map-loading *{
  pointer-events:none;
}
.story-map-loading__card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.85rem;
  min-width:min(100%, 220px);
  padding:1.35rem 1.5rem;
  border-radius:12px;
  background:var(--bg0, #fff);
  border:1px solid var(--portiva-menu-surface-border, #e2e8f0);
  box-shadow:0 10px 28px rgba(15, 23, 42, .12);
}
.story-map-loading__spinner{
  width:2rem;
  height:2rem;
  border:3px solid var(--accent-border, #cbd5e1);
  border-top-color:var(--accent, #0f766e);
  border-radius:50%;
  animation:story-map-loading-spin .75s linear infinite;
}
.story-map-loading__label{
  margin:0;
  font-size:.95rem;
  line-height:1.35;
  color:var(--text, #0f172a);
  text-align:center;
}
@keyframes story-map-loading-spin{
  to{ transform:rotate(360deg); }
}
.story-scan-progress[hidden]{
  display:none !important;
}
/* Never let current or cached legacy scan markup become a full-page input layer. */
#storyScanningOverlay{
  position:static !important;
  inset:auto !important;
  z-index:auto !important;
  pointer-events:none !important;
  padding:0 !important;
  background:transparent !important;
  backdrop-filter:none !important;
}
.story-scan-progress{
  width:min(70%, 360px);
  margin:12px auto 16px;
  text-align:center;
  pointer-events:none;
}
.story-scan-progress__label{
  margin:0 0 7px;
  font-size:.88rem;
  font-weight:600;
  line-height:1.25;
  color:var(--text);
}
.story-scan-progress__track{
  position:relative;
  width:100%;
  height:5px;
  overflow:hidden;
  border-radius:999px;
  background:var(--accent-border, #cbd5e1);
}
.story-scan-progress__bar{
  position:absolute;
  inset-block:0;
  inset-inline-start:0;
  width:38%;
  border-radius:inherit;
  background:var(--portiva-tab-indicator, #10b981);
  animation:story-scan-progress-slide 1.15s ease-in-out infinite;
}
@keyframes story-scan-progress-slide{
  from{ transform:translateX(-110%); }
  to{ transform:translateX(365%); }
}
.story-page__feed-batch{
  margin:0 0 12px;
}
.story-page__feed-batch + .story-page__feed-batch{
  margin-top:1.45em;
}
.story-page__feed-date{
  margin:0;
  font-size:inherit;
  font-weight:700;
  color:var(--text);
}
.story-page__feed-date-sep{
  font-weight:700;
  color:var(--text);
}
.story-page__feed-matched{
  display:flex;
  flex-direction:column;
  gap:2px;
  list-style:none;
  padding:0;
  margin:0 0 8px;
  margin-inline-start:10px;
  font-size:.84rem;
  color:var(--muted);
}
.story-page__feed-matched-line{
  margin:0;
  line-height:1.4;
}
.story-page__feed-matched-link{
  color:inherit;
  font-weight:600;
  text-decoration:underline;
  text-underline-offset:2px;
  cursor:pointer;
}
.story-page__feed-matched-link:hover,
.story-page__feed-matched-link:focus-visible{
  color:var(--accent, #3d8bfd);
  outline:none;
}
.story-page__feed-lines{
  display:flex;
  flex-direction:column;
  gap:6px;
  list-style:none;
  padding:0;
  margin:0;
  margin-inline-start:10px;
}
.story-page__feed-line{
  position:relative;
  padding-inline-start:1.05em;
  font-size:.88rem;
  line-height:1.45;
}
.story-page__feed-line::before{
  content:"•";
  position:absolute;
  inset-inline-start:0;
  top:0;
  color:var(--muted, #64748b);
  font-weight:700;
  line-height:1.45;
  pointer-events:none;
}
.story-page__feed-line--forSale::before{
  color:#22c55e;
}
.story-page__feed-line--sold::before{
  color:#a855f7;
}
.story-page__feed-line--forRent::before{
  color:#3b82f6;
}
.story-page__feed-line-row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  direction:ltr;
}
.story-page__feed-line-row .story-page__feed-line-link,
.story-page__feed-line-row .story-page__feed-line-text{
  flex:0 1 auto;
  min-width:0;
  max-width:100%;
  width:fit-content;
}
.story-page__feed-distance{
  flex:0 0 auto;
  margin-left:auto;
  text-align:right;
  white-space:nowrap;
  font-size:.78rem;
  line-height:1.45;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.story-page__feed-from-list{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:.28rem 0 0 .35rem;
  padding-inline-start:.35rem;
}
.story-page__feed-from-row{
  display:flex;
  align-items:center;
  gap:8px;
  direction:ltr;
  font-size:.78rem;
  line-height:1.35;
}
.story-page__feed-from-label{
  flex:1 1 auto;
  min-width:0;
  color:var(--muted);
}
.story-page__feed-from-row .story-page__feed-distance{
  margin-left:0;
}
@media (min-width:900px){
  /* Listings sit 10px further in than “Near your property…” lines. */
  .story-page__feed-lines{
    margin-inline-start:20px;
  }
  /* Pull miles off the right edge. */
  .story-page__feed-line-row .story-page__feed-distance,
  .story-page__feed-from-row .story-page__feed-distance{
    margin-inline-end:20px;
  }
}
.story-page__feed-pin{
  appearance:none;
  flex:0 0 auto;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  font:inherit;
  font-size:1rem;
  line-height:1;
  cursor:pointer;
  color:inherit;
}
.story-page__feed-pin:hover,
.story-page__feed-pin:focus-visible{
  outline:none;
  opacity:.85;
}
.story-page__feed-line--on-map .story-page__feed-pin,
.story-page__feed-pin--on{
  filter:none;
}
.story-page__feed-map-btn{
  flex:0 0 auto;
  padding:.2rem .55rem;
  font-size:.75rem;
  line-height:1.3;
  white-space:nowrap;
}
.story-page__feed-line--on-map .story-page__feed-map-btn{
  border-color:var(--accent, #3d8bfd);
  color:var(--accent, #3d8bfd);
}
.story-page__feed-line-link{
  color:#22c55e;
  text-decoration:underline;
  cursor:pointer;
  display:inline;
  text-shadow:none;
}
.story-page__feed-line-link:hover,
.story-page__feed-line-link:focus-visible{
  text-decoration:underline;
  color:#16a34a;
  text-shadow:none;
  opacity:1;
}
.story-page__feed-line--forSale .story-page__feed-line-link{
  color:#22c55e;
}
.story-page__feed-line--forSale .story-page__feed-line-link:hover,
.story-page__feed-line--forSale .story-page__feed-line-link:focus-visible{
  color:#16a34a;
}
.story-page__feed-line--sold .story-page__feed-line-link{
  color:#a855f7;
}
.story-page__feed-line--sold .story-page__feed-line-link:hover,
.story-page__feed-line--sold .story-page__feed-line-link:focus-visible{
  color:#9333ea;
}
.story-page__feed-line--forRent .story-page__feed-line-link{
  color:#3b82f6;
}
.story-page__feed-line--forRent .story-page__feed-line-link:hover,
.story-page__feed-line--forRent .story-page__feed-line-link:focus-visible{
  color:#2563eb;
}
.story-page__feed-line-link:hover .story-page__feed-kind,
.story-page__feed-line-link:focus-visible .story-page__feed-kind{
  text-decoration:inherit;
}
.story-page__feed-line--seen,
.story-page__feed-line--seen .story-page__feed-line-link{
  color:var(--muted);
  text-shadow:none;
}
.story-page__feed-line--seen .story-page__feed-line-link{
  text-decoration:underline;
}
.story-page__feed-line--seen .story-page__feed-line-link:hover,
.story-page__feed-line--seen .story-page__feed-line-link:focus-visible{
  color:var(--muted);
  text-shadow:none;
  opacity:.9;
}
.story-page__feed-line--seen .story-page__feed-kind{
  font-weight:400;
}
.story-page__feed-line-text{
  display:inline;
}
.story-page__feed-kind,
.story-page__feed-price{
  font-weight:700;
}
.story-page__feed-source{
  font-weight:700;
}
.story-page__feed-source--new{
  color:var(--portiva-tab-indicator, #10b981);
}
.story-page__feed-source--central{
  color:var(--muted, #64748b);
}
.story-page__feed-line--new-ai .story-page__feed-kind{
  color:var(--portiva-tab-indicator, #10b981);
}
.story-page--white .story-page__entity-details{
  background:#fff;
  border-color:var(--stroke);
}
.story-page--white .story-page__asset,
.story-watch-page.story-page--white .story-page__asset{
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
  border-color:var(--portiva-menu-surface-border, var(--stroke));
}
[data-theme="night-gray"] .story-page--white .story-page__entity-details,
[data-theme="night-gray"] .story-page--white .story-page__asset,
[data-theme="gray-night"] .story-page--white .story-page__entity-details,
[data-theme="gray-night"] .story-page--white .story-page__asset{
  background:var(--surface-card, var(--bg));
}
.story-page__section{
  margin:0 0 16px;
}
.story-page__section-title{
  margin:0 0 8px;
  font-size:.92rem;
  font-weight:600;
}
.story-page__list-toolbar{
  margin:0 0 10px;
}
.story-page__hint{
  margin:0 0 10px;
  color:var(--danger, #f87171);
  font-size:.84rem;
}
.story-page__asset-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  list-style:none;
  padding:0;
  margin:0;
}
.story-page__entity-group{
  list-style:none;
}
.story-page__entity-details{
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
  overflow:hidden;
}
.story-page__entity-details--watching{
  border-color:var(--portiva-tab-indicator, #10b981);
}
.story-page__entity-summary{
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  font-size:.84rem;
  list-style:none;
}
.story-page__entity-summary::-webkit-details-marker{
  display:none;
}
.story-page__entity-summary-main{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.story-page__entity-chevron{
  flex:0 0 auto;
  width:.45rem;
  height:.45rem;
  border-right:2px solid var(--muted);
  border-bottom:2px solid var(--muted);
  transform:rotate(-45deg);
  transition:transform .15s ease;
  margin-top:-.15rem;
}
.story-page__entity-details[open] > .story-page__entity-summary .story-page__entity-chevron{
  transform:rotate(45deg);
  margin-top:.1rem;
}
.story-page__entity-name{
  font-weight:600;
  color:var(--text);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.story-page__entity-meta{
  flex:0 0 auto;
  font-size:.74rem;
  color:var(--muted);
  white-space:nowrap;
}
.story-page__entity-assets{
  display:flex;
  flex-direction:column;
  gap:8px;
  list-style:none;
  margin:0;
  padding:8px 10px 10px;
  border-top:1px solid var(--portiva-menu-surface-border, var(--stroke));
}
.story-page__asset{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
  min-width:0;
}
.story-page__asset--watching{
  border-color:var(--portiva-tab-indicator, #10b981);
}
.story-page__asset--orphan{
  border-color:var(--warn, #f59e0b);
}
.story-page__asset-main{
  display:flex;
  flex:1 1 auto;
  align-items:center;
  gap:6px;
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  font-size:.82rem;
  line-height:1.35;
}
.story-page__asset-name{
  flex:0 1 auto;
  font-weight:600;
  color:var(--text);
  overflow:hidden;
  text-overflow:ellipsis;
}
.story-page__asset-name-link{
  color:inherit;
  font-weight:inherit;
  text-decoration:none;
}
.story-page__asset-name-link:hover,
.story-page__asset-name-link:focus-visible{
  text-decoration:underline;
  text-underline-offset:2px;
  color:var(--accent, #3d8bfd);
  outline:none;
}
.story-page__asset-sep{
  flex:0 0 auto;
  color:var(--muted);
  opacity:.72;
}
.story-page__asset-entity,
.story-page__asset-address,
.story-page__asset-status{
  flex:0 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--muted);
}
.story-page__asset-address{
  flex:1 1 auto;
  min-width:3em;
}
.story-page__asset-status{
  flex:0 0 auto;
  max-width:42%;
}
.story-page__asset-status--scanning{
  color:var(--portiva-tab-indicator, #10b981);
}
.story-page__asset-status--err{
  color:var(--danger, #f87171);
}
.story-page__asset-actions{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:6px;
}
.story-page__watch-btn{
  min-height:32px;
  padding:4px 12px;
  white-space:nowrap;
}
.story-page__asset-empty,
.story-page__empty{
  margin:0;
  color:var(--muted);
  font-size:.86rem;
}
.story-page__debug-bubble{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 10px;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface-2, var(--bg));
  font-size:.78rem;
  line-height:1.3;
}
.story-page__debug-bubble-summary{
  flex:1;
  min-width:0;
  overflow:auto;
  max-height:4.5em;
  white-space:pre-line;
  color:var(--muted);
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.story-page__debug-bubble-copy{
  flex-shrink:0;
}
.home-settings-fp-debug{
  margin:8px 0 0;
  font-size:0.75rem;
  line-height:1.35;
  color:var(--muted);
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align:left;
}
.home-gallery-debug{
  margin:12px 0 0;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface-2, var(--bg));
  text-align:left;
}
.home-gallery-debug__summary-toggle{
  cursor:pointer;
  font-size:.84rem;
  font-weight:600;
}
.home-gallery-debug__summary{
  margin:8px 0 6px;
  font-size:.78rem;
  color:var(--muted);
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.home-gallery-debug__log{
  margin:0 0 8px;
  max-height:min(42vh, 320px);
  overflow:auto;
  padding:8px;
  border-radius:8px;
  background:var(--bg);
  border:1px solid var(--border);
  font-size:.68rem;
  line-height:1.35;
  white-space:pre-wrap;
  word-break:break-word;
  color:var(--text);
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.home-gallery-debug__copy{
  margin:0;
}
.story-page__feed-meta{
  margin:0 0 10px;
  font-size:.82rem;
  color:var(--muted);
}
.story-page__feed-item-meta{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:0 0 6px;
  font-size:.78rem;
  color:var(--muted);
  line-height:1.35;
}
.story-page__feed-item-head{
  font-weight:600;
  color:var(--text);
}
.story-page__feed-item-covers{
  display:flex;
  flex-direction:column;
  gap:2px;
  font-size:.76rem;
}
.story-page__feed-item-for{
  display:block;
}
.story-page__feed-item-received{
  display:block;
  font-size:.74rem;
  color:var(--muted);
}
.story-map-page__layout{
  display:flex;
  flex-direction:column;
  gap:1rem;
  padding:12px 0;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:#000;
  box-sizing:border-box;
}
[data-theme="dawn"] .story-map-page__layout,
[data-theme="day"] .story-map-page__layout,
[data-theme="classic"] .story-map-page__layout{
  background:#fff;
}
[data-theme="night-gray"] .story-map-page__layout,
[data-theme="gray-night"] .story-map-page__layout{
  /* Less black than Night — same lift as other bubbles. */
  background:var(--surface-card, var(--bg1));
}
[data-theme="night"] .story-map-page__layout{
  background:var(--portiva-menu-surface);
  border-color:var(--portiva-menu-surface-border, var(--stroke));
}
.story-map-page .portiva-flow-page__scroll{
  gap:8px;
  padding-top:0;
  padding-inline:0;
}
/* Mobile probe: 2px gutters — if this is not visible, the device is on a cached/hosted CSS build. */
@media (max-width:899px){
  #view > main.portiva-flow-page.story-map-page{
    max-width:none !important;
    width:100% !important;
    margin:0 !important;
    padding-left:2px !important;
    padding-right:2px !important;
    box-sizing:border-box !important;
  }
  .story-map-page__body.portiva-flow-page__body,
  .story-map-page .portiva-flow-page__body{
    padding:12px 0 14px !important;
  }
  /* Map 2px inset from the white bubble on each side. */
  .story-map-page__layout{
    padding-left:0 !important;
    padding-right:0 !important;
  }
  .story-map-page .story-map-page__hero,
  .story-map-page__approx-note,
  .story-map-page__pins{
    padding-inline:10px;
    box-sizing:border-box;
  }
  .story-map-page__canvas{
    width:calc(100% - 4px) !important;
    max-width:calc(100% - 4px) !important;
    margin-left:2px !important;
    margin-right:2px !important;
    box-sizing:border-box !important;
  }
}
.story-map-page__body.portiva-flow-page__body,
.story-map-page .portiva-flow-page__body{
  /* No outer flow-page chrome — title above bubble, layout is the bubble. */
  padding:12px 0 14px;
  border:0;
  border-radius:0;
  background:transparent;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.story-map-page__page-title{
  margin:0;
  flex:0 0 auto;
}
.story-map-page__hero{
  margin:0;
  padding:0;
  flex:0 0 auto;
}
.story-map-page__map-col{
  order:1;
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
  width:100%;
}
.story-map-page__approx-note{
  margin:0;
  font-size:.78rem;
  line-height:1.35;
  color:var(--muted);
  text-align:center;
}
.story-map-page__canvas{
  order:unset;
  width:100%;
  /* Mobile: square map (same width and height). Desktop overrides below. */
  aspect-ratio:1 / 1;
  height:auto;
  min-height:0;
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  background:transparent;
  margin:0;
  z-index:0;
}
.story-map-page__pins{
  order:2;
  min-width:0;
}
.story-map-page__canvas--empty{
  display:flex;
  align-items:center;
  justify-content:center;
}
.story-map-page__pins-title{
  font-size:.95rem;
  margin:0 0 .5rem;
}
.story-map-page__pin-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
@media (min-width:900px){
  .portiva-flow-page.story-map-page{
    max-width:min(1400px, 100%);
    padding:0;
    margin:0 auto;
    width:100%;
  }
  /* Match Neighborhood feed: content starts high under the topbar. */
  .story-map-page .portiva-flow-page__scroll{
    gap:0;
    padding-top:0;
    padding-inline:max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
  }
  .story-map-page .portiva-flow-page__body{
    padding:12px 18px 18px;
    margin-top:0;
  }
  .story-map-page__layout{
    display:grid;
    grid-template-columns:minmax(0, min(440px, 34%)) minmax(0, 1fr);
    grid-template-rows:minmax(0, 1fr);
    grid-template-areas:
      "pins map";
    align-items:start;
    gap:1.5rem;
    padding:14px 16px;
    min-height:min(72vh, 765px);
  }
  .story-map-page__page-title{
    order:unset;
    margin:0;
  }
  .story-map-page__pins{
    grid-area:pins;
    order:unset;
    flex:unset;
    max-width:520px;
    /* Grow with pin rows — page scroll, not an inner right scrollbar. */
    height:auto;
    max-height:none;
    overflow:visible;
  }
  .story-map-page__map-col{
    grid-area:map;
    order:unset;
    flex:1 1 auto;
    min-width:0;
    position:sticky;
    top:12px;
  }
  .story-map-page__canvas{
    order:unset;
    flex:unset;
    width:100%;
    aspect-ratio:1 / 1;
    height:auto;
    min-height:0;
    position:static;
    top:auto;
  }
}
.story-map-page__pin-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:.85rem;
}
.story-map-page__pin-group{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:.85rem;
}
.story-map-page__pin-group-head{
  display:flex;
  gap:10px;
  align-items:center;
}
.story-map-page__pin-addresses{
  list-style:none;
  margin:0;
  padding:0 0 0 1.85rem;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.story-map-page__pin-addr-item{
  display:flex;
  gap:8px;
  align-items:flex-start;
  margin:0;
  line-height:1.35;
  color:var(--text);
}
.story-map-page__pin-dot{
  flex:0 0 auto;
  width:8px;
  height:8px;
  margin-top:.45em;
  border-radius:50%;
  background:var(--muted, #64748b);
}
.story-map-page__pin-dot--home{
  background:#22c55e;
}
.story-map-page__pin-dot--listing,
.story-map-page__pin-dot--forSale{
  background:#22c55e;
}
.story-map-page__pin-dot--sold{
  background:#a855f7;
}
.story-map-page__pin-dot--forRent{
  background:#3b82f6;
}
.story-map-page__pin-addr-text{
  min-width:0;
  flex:1 1 auto;
}
.story-map-page__pin-icon{
  flex:0 0 auto;
  font-size:1.1rem;
  line-height:1.3;
}
.story-map-page__pin-body{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.story-map-page__pin-role{
  font-size:.72rem;
  color:var(--text, #f1f5f9);
  text-transform:uppercase;
  letter-spacing:.02em;
}
[data-theme="night"] .story-map-page__pin-role,
[data-theme="night-gray"] .story-map-page__pin-role,
[data-theme="gray-night"] .story-map-page__pin-role{
  color:#fff;
}
.story-map-page__pin-label{
  font-weight:600;
}
.story-map-page__pin-primary{
  font-weight:600;
  word-break:break-word;
}
.story-map-page__pin-addr{
  color:var(--muted);
  font-size:.8rem;
  word-break:break-word;
}
.story-map-page__pin-link{
  color:var(--accent, #3d8bfd);
  text-decoration:underline;
  word-break:break-word;
}
.story-map-page__pin-link:hover,
.story-map-page__pin-link:focus-visible{
  text-decoration:underline;
}
.leaflet-popup-content .story-map-page__pin-link{
  color:inherit;
  text-decoration:underline;
}
.story-map-page__pin-empty{
  color:var(--muted);
  font-size:.85rem;
}
.story-map-page__div-icon{
  background:transparent;
  border:0;
}
.story-map-page__marker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:1.35rem;
  line-height:1;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.45));
}
.story-map-page__marker--forSale,
.story-map-page__marker--sold,
.story-map-page__marker--forRent{
  width:16px;
  height:16px;
  border:2px solid #fff;
  border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,.45);
  font-size:0;
}
.story-map-page__marker--forSale{
  background:#22c55e;
}
.story-map-page__marker--sold{
  background:#a855f7;
}
.story-map-page__marker--forRent{
  background:#3b82f6;
}
.story-page__feed-bubble{
  padding:10px 12px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
  list-style:none;
}
.story-page__feed-bubble-lines{
  display:flex;
  flex-direction:column;
  gap:8px;
  list-style:none;
  padding:0;
  margin:8px 0 0;
}
.story-page__feed-bubble-line{
  padding:0;
  border:none;
  background:transparent;
}
.story-page__feed-line-body{
  display:block;
  line-height:1.4;
}
.story-page__feed-line-body .story-page__feed-text{
  display:inline;
  margin-bottom:0;
}
.story-page__pipeline-wrap{
  margin:14px 0 0;
}
.story-page__pipeline-toggle{
  cursor:pointer;
  font-size:.82rem;
  font-weight:600;
  color:var(--muted);
  list-style:none;
}
.story-page__pipeline-toggle::-webkit-details-marker{
  display:none;
}
.story-page__pipeline-wrap[open] > .story-page__pipeline{
  margin-top:10px;
}
.story-page__pipeline{
  margin:0 0 14px;
}
.story-page__pipeline-panel{
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
  padding:10px 12px;
}
.story-page__pipeline-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px 12px;
  margin-bottom:10px;
}
.story-page__pipeline-toolbar--multi{
  margin:0 0 10px;
  padding-bottom:8px;
  border-bottom:1px solid var(--portiva-menu-surface-border, var(--stroke));
}
.story-page__pipeline-intro{
  flex:1 1 12rem;
  min-width:0;
}
.story-page__pipeline-steps{
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-field-bg, var(--bg));
  overflow:hidden;
}
.story-page__pipeline-step{
  border-bottom:1px solid var(--portiva-menu-surface-border, var(--stroke));
}
.story-page__pipeline-step:last-child{
  border-bottom:none;
}
.story-page__pipeline-step-head{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:6px 8px;
  padding:8px 10px;
  font-size:.8rem;
  background:var(--portiva-menu-surface, var(--stroke));
}
.story-page__pipeline-step--skipped .story-page__pipeline-step-head{
  opacity:.72;
}
.story-page__pipeline-multi .story-page__pipeline-group{
  margin-bottom:12px;
}
.story-page__pipeline-multi .story-page__pipeline-group:last-child{
  margin-bottom:0;
}
.story-page__pipeline-heading{
  margin:0 0 4px;
  font-size:.84rem;
  font-weight:600;
}
.story-page__pipeline-lead{
  margin:0 0 10px;
  font-size:.78rem;
  color:var(--muted);
  line-height:1.4;
}
.story-page__pipeline-box{
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  margin:0 0 8px;
  background:var(--portiva-field-bg, var(--bg));
}
.story-page__pipeline-box:last-child{
  margin-bottom:0;
}
.story-page__pipeline-summary{
  cursor:pointer;
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:6px 8px;
  padding:8px 10px;
  font-size:.8rem;
  list-style:none;
}
.story-page__pipeline-summary::-webkit-details-marker{
  display:none;
}
.story-page__pipeline-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:1.35rem;
  height:1.35rem;
  border-radius:999px;
  font-size:.72rem;
  font-weight:700;
  background:var(--portiva-menu-surface, var(--stroke));
}
.story-page__pipeline-label{
  font-weight:600;
}
.story-page__pipeline-meta{
  font-size:.74rem;
  color:var(--muted);
}
.story-page__pipeline-body{
  margin:0;
  padding:8px 10px 10px;
  font-size:.68rem;
  line-height:1.35;
  max-height:min(28vh, 220px);
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
}
.story-page__pipeline-panel--missing .story-page__empty{
  margin:0;
}
.story-page__ai-feed{
  margin:0 0 14px;
}
.story-page__ai-feed-details{
  margin:0 0 14px;
}
.story-page__ai-feed-summary{
  cursor:pointer;
  font-size:.82rem;
  font-weight:600;
  color:var(--muted);
  list-style:none;
}
.story-page__ai-feed-summary::-webkit-details-marker{
  display:none;
}
.story-page__sqft-filter{
  margin:0 0 8px;
  font-size:.78rem;
  color:var(--muted);
}
.story-page__feed-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 12px;
  margin:0 0 10px;
}
.story-page__feed-head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px 12px;
  margin:0 0 4px;
}
.story-page__feed-head .story-page__section-title{
  margin:0;
}
.story-page__dev-actions{
  flex:0 0 auto;
}
.story-page__force-rescan-btn{
  font-size:.78rem;
}
.story-page__dev-hint{
  margin:0 0 10px;
  font-size:.74rem;
  color:var(--muted);
}
.story-page__refresh-status{
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
}
.story-page__refresh-status-intro{
  margin:0 0 8px;
  font-size:.78rem;
  color:var(--text);
}
.story-page__refresh-status-intro--done{
  color:var(--portiva-accent, var(--accent));
  font-weight:600;
}
.story-page__refresh-steps{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.story-page__refresh-step{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  font-size:.76rem;
}
.story-page__refresh-step-label{
  color:var(--text);
}
.story-page__refresh-step-state{
  flex:0 0 auto;
  color:var(--muted);
  font-size:.72rem;
}
.story-page__refresh-step--done .story-page__refresh-step-state{
  color:var(--accent, var(--primary));
}
.story-page__refresh-step--active .story-page__refresh-step-label{
  font-weight:600;
}
.story-page__refresh-step--skipped .story-page__refresh-step-label,
.story-page__refresh-step--skipped .story-page__refresh-step-state{
  opacity:.65;
}
.story-page__feed-text--new-ai,
.story-page__feed-bubble-line--new-ai .story-page__feed-text{
  font-weight:700;
}
.story-page__results-bubble{
  margin:0;
  padding:10px 12px 14px;
  border:1px solid var(--stroke);
  border-radius:14px;
  background:#000;
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}
[data-theme="dawn"] .story-page__results-bubble,
[data-theme="day"] .story-page__results-bubble,
[data-theme="classic"] .story-page__results-bubble{
  background:#fff;
  border-color:rgba(100,116,139,.22);
}
[data-theme="night-gray"] .story-page__results-bubble,
[data-theme="gray-night"] .story-page__results-bubble{
  background:color-mix(in srgb, var(--surface-card, var(--bg1)) 88%, #000 12%);
  border-color:var(--stroke);
  box-shadow:none;
}
[data-theme="night"] .story-page__results-bubble{
  background:var(--portiva-menu-surface);
  border-color:var(--portiva-menu-surface-border, var(--stroke));
  box-shadow:none;
}
.story-page #storyFeedKindToolbarMount{
  position:relative;
  z-index:2;
  margin:0 0 12px;
}
.story-page #storyFeedKindToolbarMount:has(+ .story-scan-progress:not([hidden])){
  margin-bottom:0;
}
.story-page__feed-tabs.welcome-auth-tabs{
  margin:0;
  gap:0;
  border-bottom:1px solid var(--stroke, rgba(100,116,139,.22));
}
.story-page__feed-tabs .welcome-auth-tabs__tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex:1 1 0;
  min-width:0;
  border-radius:0;
  margin-bottom:-1px;
  border-bottom:2px solid transparent;
  background:transparent;
  color:var(--muted);
  font-weight:500;
}
.story-page__feed-kind-dot{
  flex:0 0 auto;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--muted, #64748b);
}
.story-page__feed-kind-dot--forSale{
  background:#22c55e;
}
.story-page__feed-kind-dot--sold{
  background:#a855f7;
}
.story-page__feed-kind-dot--forRent{
  background:#3b82f6;
}
.story-page__feed-tabs .welcome-auth-tabs__tab:hover:not(:disabled):not(.welcome-auth-tabs__tab--active){
  background:transparent;
  color:var(--text);
}
.story-page__feed-tabs .welcome-auth-tabs__tab--active,
.story-page__feed-tabs .welcome-auth-tabs__tab--active:hover:not(:disabled){
  background:transparent;
  color:var(--text);
  font-weight:600;
  border-bottom-color:color-mix(in srgb, var(--text) 55%, transparent);
}
[data-theme="dawn"] .story-page__feed-tabs .welcome-auth-tabs__tab--active,
[data-theme="day"] .story-page__feed-tabs .welcome-auth-tabs__tab--active,
[data-theme="classic"] .story-page__feed-tabs .welcome-auth-tabs__tab--active,
[data-theme="dawn"] .story-page__feed-tabs .welcome-auth-tabs__tab--active:hover:not(:disabled),
[data-theme="day"] .story-page__feed-tabs .welcome-auth-tabs__tab--active:hover:not(:disabled),
[data-theme="classic"] .story-page__feed-tabs .welcome-auth-tabs__tab--active:hover:not(:disabled){
  border-bottom-color:#475569;
}
.story-page__feed-toolbar .story-page__sqft-filter{
  flex:1 1 200px;
  margin:0;
}
.story-page__feed-filter-btn{
  flex:0 0 auto;
  font-size:.78rem;
  color:var(--muted, #64748b);
  font-weight:500;
  padding:6px 12px;
  border-radius:6px;
  border:1px solid transparent;
}
.story-page__feed-filter-btn:hover:not(.story-page__feed-filter-btn--on){
  color:var(--text, #111);
}
.story-page__feed-filter-btn--on{
  color:var(--text, #111);
  font-weight:700;
  background:#e2e8f0;
  border-color:rgba(100,116,139,.45);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55);
}
.story-page--white .story-page__feed-filter-btn--on{
  background:#dbe4ef;
  color:#0f172a;
  border-color:rgba(71,85,105,.35);
}
.story-page__ai-feed-panel{
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
  padding:10px 12px;
}
.story-page__ai-feed-title-main{
  margin:0 0 6px;
  font-size:.84rem;
  font-weight:600;
}
.story-page__ai-feed-meta{
  margin:0 0 10px;
  font-size:.78rem;
  color:var(--muted);
  line-height:1.4;
}
.story-page__ai-feed-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  list-style:none;
  padding:0;
  margin:0;
}
.story-page__ai-feed-item{
  padding:8px 10px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-field-bg, var(--bg));
}
.story-page__ai-feed-item-head{
  font-size:.78rem;
  font-weight:600;
  color:var(--text);
  margin-bottom:4px;
}
.story-page__ai-feed-query{
  display:block;
  margin-top:2px;
  font-weight:500;
  color:var(--muted);
}
.story-page__ai-feed-title{
  font-size:.8rem;
  margin-bottom:4px;
  line-height:1.35;
}
.story-page__ai-feed-content{
  margin:0 0 6px;
  padding:8px;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:.72rem;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, rgba(0,0,0,.12));
  color:var(--text);
}
.story-page__ai-feed-link{
  font-size:.78rem;
  font-weight:600;
}
.story-page__ai-feed-panel--missing .story-page__empty{
  margin:0;
}
.story-page__neighborhood{
  margin:0 0 10px;
  font-weight:600;
}
.story-page__feed-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  list-style:none;
  padding:0;
  margin:0 0 12px;
}
.story-page__feed-item{
  padding:10px 12px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
}
.story-page__feed-text{
  line-height:1.4;
}
.story-page__feed-link{
  font-size:.82rem;
  font-weight:600;
  white-space:nowrap;
}
.story-page__feed-link-sep{
  color:var(--muted);
}
.story-page__news-block{
  margin-top:12px;
}
.story-page__news-title{
  margin:0 0 8px;
  font-size:.84rem;
  font-weight:600;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.portiva-flow-page.story-page .story-page__watch-btn{
  background:var(--portiva-menu-surface);
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius-sm);
}
.portiva-flow-page.story-page .story-page__watch-btn:hover:not(:disabled){
  background:var(--portiva-menu-surface-hover);
}
/* Watched → Stop: green so active watches read clearly */
.portiva-flow-page.story-page .story-page__watch-btn[data-story-watch="0"]{
  background:var(--portiva-tab-indicator, #10b981);
  border-color:var(--portiva-tab-indicator, #10b981);
  color:#fff;
}
.portiva-flow-page.story-page .story-page__watch-btn[data-story-watch="0"]:hover:not(:disabled){
  background:#059669;
  border-color:#059669;
  color:#fff;
}
/* Story — white list cards on bright themes (gray canvas, white entity groups) */
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__entity-details,
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__pipeline-box,
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__feed-item,
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__ai-feed-panel,
[data-theme="dawn"] .asset-story-watch,
[data-theme="day"] .portiva-flow-page.story-page .story-page__entity-details,
[data-theme="day"] .portiva-flow-page.story-page .story-page__pipeline-box,
[data-theme="day"] .portiva-flow-page.story-page .story-page__feed-item,
[data-theme="day"] .portiva-flow-page.story-page .story-page__ai-feed-panel,
[data-theme="day"] .asset-story-watch,
[data-theme="classic"] .portiva-flow-page.story-page .story-page__entity-details,
[data-theme="classic"] .portiva-flow-page.story-page .story-page__pipeline-box,
[data-theme="classic"] .portiva-flow-page.story-page .story-page__feed-item,
[data-theme="classic"] .portiva-flow-page.story-page .story-page__ai-feed-panel,
[data-theme="classic"] .asset-story-watch{
  background:#ffffff;
  border-color:var(--stroke);
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__entity-details .story-page__asset,
[data-theme="day"] .portiva-flow-page.story-page .story-page__entity-details .story-page__asset,
[data-theme="classic"] .portiva-flow-page.story-page .story-page__entity-details .story-page__asset{
  background:var(--surface-btn, #f1f5f9);
  border-color:var(--stroke);
  box-shadow:none;
}
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn,
[data-theme="day"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn,
[data-theme="classic"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn{
  background:var(--surface-btn-hover, #e9f0f7);
  border-color:var(--stroke);
}
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn:hover:not(:disabled),
[data-theme="day"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn:hover:not(:disabled),
[data-theme="classic"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn:hover:not(:disabled){
  background:var(--surface-list-hover, #f8fafc);
  border-color:var(--stroke);
}
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__watch-btn,
[data-theme="day"] .portiva-flow-page.story-page .story-page__watch-btn,
[data-theme="classic"] .portiva-flow-page.story-page .story-page__watch-btn{
  background:#ffffff;
  border-color:var(--stroke);
}
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__watch-btn:hover:not(:disabled),
[data-theme="day"] .portiva-flow-page.story-page .story-page__watch-btn:hover:not(:disabled),
[data-theme="classic"] .portiva-flow-page.story-page .story-page__watch-btn:hover:not(:disabled){
  background:var(--surface-list-hover, #f8fafc);
  border-color:var(--stroke);
}
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__watch-btn[data-story-watch="0"],
[data-theme="day"] .portiva-flow-page.story-page .story-page__watch-btn[data-story-watch="0"],
[data-theme="classic"] .portiva-flow-page.story-page .story-page__watch-btn[data-story-watch="0"],
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn[data-story-watch="0"],
[data-theme="day"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn[data-story-watch="0"],
[data-theme="classic"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn[data-story-watch="0"]{
  background:var(--portiva-tab-indicator, #10b981);
  border-color:var(--portiva-tab-indicator, #10b981);
  color:#fff;
}
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__watch-btn[data-story-watch="0"]:hover:not(:disabled),
[data-theme="day"] .portiva-flow-page.story-page .story-page__watch-btn[data-story-watch="0"]:hover:not(:disabled),
[data-theme="classic"] .portiva-flow-page.story-page .story-page__watch-btn[data-story-watch="0"]:hover:not(:disabled),
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn[data-story-watch="0"]:hover:not(:disabled),
[data-theme="day"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn[data-story-watch="0"]:hover:not(:disabled),
[data-theme="classic"] .portiva-flow-page.story-page .story-page__entity-details .story-page__watch-btn[data-story-watch="0"]:hover:not(:disabled){
  background:#059669;
  border-color:#059669;
  color:#fff;
}
[data-theme="dawn"] .portiva-flow-page.story-page .story-page__entity-assets,
[data-theme="day"] .portiva-flow-page.story-page .story-page__entity-assets,
[data-theme="classic"] .portiva-flow-page.story-page .story-page__entity-assets{
  border-top-color:var(--stroke);
}
.story-page__pipeline-group{
  margin-bottom:1.25rem;
}
.story-page__pipeline-group:last-child{
  margin-bottom:0;
}
.story-page__pipeline-asset-title{
  margin:0 0 .5rem;
  font-size:.95rem;
  font-weight:600;
}
.story-page__feed-asset-tag{
  display:inline-block;
  margin-inline-end:.35rem;
  font-size:.78rem;
  font-weight:600;
  color:var(--muted);
}
.asset-story-watch-mount{
  margin:0 0 1rem;
}
.asset-story-watch{
  margin:0 0 1.25rem;
  padding:1rem 1.1rem;
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:var(--radius-md);
  background:var(--portiva-menu-surface);
}
.asset-story-watch__title{
  margin:0 0 .35rem;
  font-size:1rem;
}
.asset-story-watch__lead{
  margin:0 0 .65rem;
  font-size:.9rem;
  color:var(--muted);
}
.asset-story-watch__status{
  margin:0 0 .75rem;
  font-size:.9rem;
}
.asset-story-watch__status--scanning{
  color:var(--accent);
}
.asset-story-watch__status--err{
  color:var(--danger, #c0392b);
}
.asset-story-watch__actions{
  margin:0;
}
.asset-story-watch__hint{
  margin:.75rem 0 0;
}
.story-watch-page__hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  justify-content:flex-end;
}
.story-watch-debug-section{
  margin-top:8px;
  padding-top:12px;
  border-top:1px dashed var(--portiva-menu-surface-border, var(--stroke));
}
.story-portiva-results-section{
  margin-top:4px;
  margin-bottom:16px;
  padding:12px 14px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--portiva-menu-surface, var(--portiva-field-bg)) 94%, #000 6%);
}
.story-portiva-results-section__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.story-portiva-results-section__actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
}
.story-portiva-results-section__lead{
  margin:0 0 12px;
  font-size:.8rem;
  color:var(--muted);
}
.story-portiva-results__toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.story-portiva-results__meta{
  margin:0;
  font-size:.8rem;
  color:var(--muted);
}
.story-portiva-results__group + .story-portiva-results__group{
  margin-top:14px;
  padding-top:12px;
  border-top:1px dashed var(--portiva-menu-surface-border, var(--stroke));
}
.story-portiva-results__asset{
  margin:0 0 4px;
  font-size:.95rem;
}
.story-portiva-results__summary{
  margin:0 0 8px;
  font-size:.8rem;
  color:var(--muted);
}
.story-portiva-results__body{
  margin:0;
  max-height:280px;
  overflow:auto;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--portiva-field-bg, #fff) 88%, #000 12%);
  font-size:.72rem;
  line-height:1.35;
  white-space:pre-wrap;
  word-break:break-word;
}
.story-portiva-results__placeholder{
  margin:0;
  padding:12px 0;
  font-size:.9rem;
}
.story-tavily-investigation{
  margin-top:4px;
  margin-bottom:16px;
  padding:12px 14px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--portiva-menu-surface, var(--portiva-field-bg)) 94%, #000 6%);
}
.story-tavily-investigation__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.story-tavily-investigation__actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
}
.story-tavily-investigation__lead{
  margin:0 0 12px;
  font-size:.8rem;
  color:var(--muted);
}
.story-tavily-investigation__form{
  margin-bottom:10px;
}
.story-tavily-investigation__form-actions{
  margin-bottom:12px;
}
.story-tavily-investigation__subheading{
  margin:12px 0 6px;
  font-size:.8rem;
  font-weight:600;
}
.story-tavily-investigation__hint{
  margin-bottom:8px;
}
.story-tavily-investigation__box{
  margin:0 0 4px;
  padding:10px 12px;
  max-height:min(36vh, 320px);
  overflow:auto;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:.72rem;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--portiva-menu-surface, var(--portiva-field-bg)) 88%, #000 12%);
  color:var(--text);
}
.story-watch-debug-section__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.story-watch-debug-section__actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
}
.story-watch-debug-section__title{
  margin:0;
  font-size:.9rem;
}
.story-watch-debug-section__hint{
  margin:0 0 8px;
  font-size:.75rem;
  color:var(--muted);
}
.story-watch-debug{
  margin:0;
  padding:10px 12px;
  max-height:min(42vh, 360px);
  overflow:auto;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:.72rem;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--portiva-menu-surface, var(--portiva-field-bg)) 88%, #000 12%);
  color:var(--text);
}
.help-page-top-nav__toggle{
  display:inline-flex;
  align-items:center;
}
.help-page-top-nav__toggle::after{
  content:"";
  display:inline-block;
  width:.45em;
  height:.45em;
  margin-inline-start:auto;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  transition:transform .15s ease;
  flex-shrink:0;
}
.help-page-top-nav__toggle--open::after{
  transform:rotate(-135deg);
  margin-top:.2em;
}
.help-tours-panel{
  margin-top:4px;
}
.help-tours-panel__lead{
  margin:0 0 12px;
}
/* Overflow menu footers: Cancel / Search use same surface as Done (all palettes). */
.portiva-menu-footer-actions .btn,
.portiva-menu-footer-actions .btn--primary,
.portiva-menu-footer-actions .btn--ghost{
  background:var(--portiva-menu-surface);
  border:1px solid var(--portiva-menu-surface-border);
  color:var(--text);
  background-image:none;
  opacity:1;
}
.portiva-menu-footer-actions .btn:hover:not(:disabled),
.portiva-menu-footer-actions .btn--primary:hover:not(:disabled),
.portiva-menu-footer-actions .btn--ghost:hover:not(:disabled){
  background:var(--portiva-menu-surface-hover);
  border-color:var(--portiva-menu-surface-border);
  color:var(--text);
  opacity:1;
}
.portiva-menu-footer-actions .btn--primary:disabled,
.portiva-menu-footer-actions .btn--primary:disabled:hover{
  opacity:.48;
  background:var(--portiva-menu-surface);
  border-color:var(--portiva-menu-surface-border);
  color:var(--text);
}
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn,
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary,
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--ghost{
  background:var(--portiva-menu-surface);
  border:1px solid var(--portiva-menu-surface-border);
  color:var(--text);
  background-image:none;
  opacity:1;
}
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn:hover:not(:disabled),
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:hover:not(:disabled),
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--ghost:hover:not(:disabled){
  background:var(--portiva-menu-surface-hover);
  border-color:var(--portiva-menu-surface-border);
  color:var(--text);
  opacity:1;
}
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:disabled,
.portiva-flow-page.summaries-page .portiva-flow-page__footer-actions.portiva-menu-footer-actions .btn--primary:disabled:hover{
  opacity:.48;
  background:var(--portiva-menu-surface);
  border-color:var(--portiva-menu-surface-border);
  color:var(--text);
}
.portiva-flow-page.summaries-page .btn-icon-nav.summaries-entity-block__open-details,
.portiva-flow-page.summaries-page .btn-icon-nav.summaries-mgmt-asset__open-details,
.portiva-flow-page.summaries-page .btn-icon-copy.btnCopySummariesBank,
.portiva-flow-page.summaries-page .btn-icon-copy.btnCopySummariesAccess,
.portiva-flow-page.summaries-page .btn-icon-copy.btnCopySummariesIds,
.portiva-flow-page.summaries-page .btn-icon-copy.btnCopySummariesManagement{
  background:transparent;
  border:1px solid var(--portiva-menu-surface-border);
}
.portiva-flow-page.summaries-page .btn-icon-nav.summaries-entity-block__open-details:hover,
.portiva-flow-page.summaries-page .btn-icon-nav.summaries-mgmt-asset__open-details:hover,
.portiva-flow-page.summaries-page .btn-icon-copy.btnCopySummariesBank:hover,
.portiva-flow-page.summaries-page .btn-icon-copy.btnCopySummariesAccess:hover,
.portiva-flow-page.summaries-page .btn-icon-copy.btnCopySummariesIds:hover,
.portiva-flow-page.summaries-page .btn-icon-copy.btnCopySummariesManagement:hover{
  background:var(--portiva-menu-surface-hover);
}

.layout-settings-page .layout-settings-stack{
  border:none;
  background:transparent;
  padding:0;
}
.portiva-flow-page.layout-settings-page .portiva-flow-page__body{
  background:var(--portiva-canvas-bg, var(--bg0));
  border-color:transparent;
  box-shadow:none;
}
body:has(main.layout-settings-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.layout-settings-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  overflow:visible;
}
.layout-settings-page .portiva-flow-page__scroll{
  flex:none;
  min-height:auto;
  max-height:none;
  height:auto;
  gap:0;
  padding-bottom:16px;
  overflow:visible;
  overscroll-behavior:auto;
  touch-action:auto;
}
.portiva-flow-page .portiva-flow-page__body .portiva-flow-page__tabs{
  margin:0 -14px 10px;
  padding:0 14px;
}

/* CSV transfer page — compact desktop, inline mobile scope rows */
.csv-transfer-page .csv-transfer-page__body .csv-transfer-page__tabs{
  margin:0 -14px 10px;
  padding:0 14px;
}
.csv-import-stack{
  margin:0;
}
.csv-transfer-page .csv-import-stack .modal-hint--compact,
.csv-transfer-page .csv-import-stack .import-csv-check,
.csv-transfer-page .csv-import-stack .import-csv-file-field{
  margin:0;
}
.csv-transfer-page .csv-export-kind{
  margin-bottom:10px;
}
.csv-transfer-page .csv-export-kind-panel{
  margin:0;
}
@media (max-width:899px){
  .csv-transfer-page__scroll{
    gap:12px;
    padding-bottom:4px;
  }
  .csv-transfer-page__title{
    font-size:clamp(1.35rem,2.5vw,1.65rem);
    margin:0;
  }
  .csv-transfer-page__lead{
    font-size:.84rem;
    line-height:1.35;
  }
  .csv-transfer-page__body{
    padding:0 10px 10px;
  }
  .csv-transfer-page .csv-transfer-page__body .csv-transfer-page__tabs{
    margin:0 -10px 8px;
    padding:0 10px;
  }
  .csv-transfer-page .welcome-auth-tabs__tab,
  .csv-transfer-page .modal-tabs__tab{
    padding:8px 10px 9px;
    font-size:.88rem;
  }
  .csv-transfer-page .export-csv-scope{
    margin:0 0 10px;
    padding:8px 10px;
    gap:6px;
  }
  .csv-transfer-page .export-csv-scope--dual .export-csv-scope__field{
    display:grid;
    grid-template-columns:minmax(72px,auto) minmax(0,1fr);
    align-items:center;
    gap:6px 8px;
  }
  .csv-transfer-page .export-csv-scope--dual .export-csv-scope__field span{
    margin:0;
    white-space:nowrap;
  }
  .csv-transfer-page .export-csv-scope__select{
    flex:1 1 auto;
    min-width:0;
    max-width:none;
    width:100%;
    font-size:.84rem;
    padding:6px 8px;
  }
  .csv-transfer-page .modal-hint--compact{
    margin:0 0 8px;
    font-size:.78rem;
    line-height:1.35;
  }
  .csv-transfer-page .import-csv-check{
    margin:0 0 8px;
    font-size:.84rem;
  }
  .csv-transfer-page .import-csv-file-field{
    margin:0;
  }
  .csv-transfer-page .modal-field--compact{
    margin:0;
  }
  .csv-transfer-page .modal-field--compact span{
    font-size:.84rem;
  }
  .csv-transfer-page .field-input{
    font-size:.84rem;
    padding:6px 8px;
  }
  .csv-transfer-page__footer{
    padding:8px 0 max(8px, env(safe-area-inset-bottom, 0px));
  }
  .csv-transfer-page__footer-actions{
    gap:8px;
  }
  .csv-transfer-page__footer-actions .btn{
    min-height:40px;
    font-size:.88rem;
  }
}
@media (min-width:900px){
  #view:has(> main.csv-transfer-page) > header.topbar,
  #view:has(> main.backup-page) > header.topbar,
  #view:has(> main.story-page:not(.csv-transfer-page):not(.backup-page)) > header.topbar,
  #view:has(> main.story-map-page) > header.topbar{
    margin-bottom:4px;
  }
  .csv-transfer-page{
    max-width:min(1400px,100%);
    padding:0;
  }
  .csv-transfer-page__scroll{
    gap:0;
    padding-bottom:var(--portiva-desktop-content-bottom-pad);
  }
  .csv-transfer-page__title{
    font-size:clamp(1.35rem,2.5vw,1.65rem);
    margin:0;
    line-height:normal;
  }
  .csv-transfer-page__lead{
    font-size:.78rem;
    line-height:1.3;
  }
  .csv-transfer-page__body{
    padding:0 10px 10px;
    border-radius:10px;
  }
  .csv-transfer-page .csv-transfer-page__body .csv-transfer-page__tabs{
    margin:0 -10px 6px;
    padding:0 10px;
  }
  .csv-transfer-page .welcome-auth-tabs__tab,
  .csv-transfer-page .modal-tabs__tab{
    padding:6px 10px 7px;
    font-size:.82rem;
  }
  .csv-transfer-page .export-csv-scope{
    margin:0 0 8px;
    padding:8px 10px;
    gap:6px;
  }
  .csv-transfer-page .export-csv-scope__legend{
    font-size:.66rem;
    margin-bottom:2px;
  }
  .csv-transfer-page .export-csv-scope__select{
    flex:1 1 min(180px,100%);
    font-size:.8rem;
    padding:5px 8px;
  }
  .csv-transfer-page #modernExportCsvEntityTreeHint{
    display:none;
  }
  .csv-transfer-page .modal-hint--compact{
    margin:0 0 6px;
    font-size:.76rem;
    line-height:1.3;
  }
  .csv-transfer-page .modal-field--compact{
    margin:0;
    gap:4px;
  }
  .csv-transfer-page .modal-field--compact span{
    font-size:.78rem;
  }
  .csv-transfer-page .field-input{
    font-size:.8rem;
    padding:5px 8px;
  }
  .csv-transfer-page .import-csv-check{
    margin:0 0 6px;
    font-size:.8rem;
  }
  .csv-transfer-page .import-csv-file-picker__btn{
    font-size:.8rem;
    padding:6px 10px;
  }
  .csv-transfer-page .import-csv-file-picker__name{
    font-size:.78rem;
  }
  .csv-transfer-page__footer{
    padding:8px 0 max(8px, env(safe-area-inset-bottom, 0px));
  }
  .csv-transfer-page__footer-actions{
    gap:8px;
  }
  .csv-transfer-page__footer-actions .btn{
    min-height:36px;
    font-size:.82rem;
    padding:6px 12px;
  }
}
.csv-transfer-page .export-csv-scope{
  margin-bottom:1em;
  background:var(--portiva-menu-surface);
  border:1px solid var(--stroke);
  color:var(--text);
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
.csv-transfer-page .csv-import-bubble{
  margin-top:0;
}
.csv-transfer-page .csv-import-bubble__description{
  margin:0 0 1em;
  font-size:.95rem;
  line-height:1.5;
}
.csv-transfer-page .csv-import-bubble .import-csv-file-field{
  margin-top:14px;
}
.csv-transfer-page .csv-export-kind{
  margin-bottom:24px;
}
.csv-transfer-page .export-csv-scope__legend{
  color:#64748b;
}
[data-theme="classic"] .csv-transfer-page fieldset.export-csv-scope{
  min-inline-size:0;
}
[data-theme="classic"] .csv-transfer-page .export-csv-scope__legend{
  float:left;
  width:100%;
  box-sizing:border-box;
  margin:0 0 8px;
  padding:0;
}
[data-theme="classic"] .csv-transfer-page .export-csv-scope__legend + *{
  clear:both;
}
.csv-transfer-page .export-csv-scope--dual .export-csv-scope__field{
  display:grid;
  grid-template-columns:minmax(72px,auto) minmax(0,1fr);
  align-items:center;
  gap:6px 8px;
}
.csv-transfer-page .export-csv-scope--dual .export-csv-scope__field > span{
  margin:0;
  white-space:nowrap;
}
.csv-transfer-page .export-csv-scope--dual .export-csv-scope__select{
  width:100%;
  min-width:0;
  max-width:none;
  background:var(--portiva-menu-surface);
  border-color:var(--portiva-menu-surface-border);
  color:var(--text);
}
.csv-transfer-page .export-csv-scope--dual .export-csv-scope__select option{
  background:var(--portiva-menu-surface);
  color:var(--text);
}

/* Support inbox pages (#/support, #/support/admin) */
.support-page{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:0 4px 16px;
  max-width:min(1120px,100%);
  margin:0 auto;
  width:100%;
  --portiva-menu-surface:color-mix(in srgb, var(--surface-soft, rgba(255,255,255,.06)) 92%, #94a3b8 8%);
  --portiva-menu-surface-border:color-mix(in srgb, var(--stroke) 78%, #94a3b8);
  --portiva-menu-surface-hover:color-mix(in srgb, var(--surface-soft, rgba(255,255,255,.06)) 86%, #94a3b8 14%);
}
.support-page__hero{
  flex-shrink:0;
}
.support-page__title{
  margin:0 0 6px;
  font-size:clamp(1.35rem,2.5vw,1.65rem);
}
.support-page__lead{
  margin:0;
  color:var(--muted);
  font-size:.92rem;
  line-height:1.45;
}
.support-page__section-title{
  margin:0 0 8px;
  font-size:1rem;
}
.support-page__tabs{
  display:flex;
  gap:8px;
  flex-shrink:0;
}
.support-page__tab{
  flex:1;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid var(--portiva-menu-surface-border);
  background:var(--portiva-menu-surface);
  color:inherit;
  font:inherit;
  cursor:pointer;
}
.support-page__tab:not(.support-page__tab--active):hover{
  background:var(--portiva-menu-surface-hover);
}
.support-page__tab--active{
  border-color:var(--accent);
  background:rgba(96,165,250,.12);
}
.support-page__body{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  border:1px solid var(--portiva-menu-surface-border);
  border-radius:12px;
  background:transparent;
  padding:14px;
}
.support-page__panel{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.support-page__panel[hidden]{
  display:none !important;
}
.support-inbox-hint{
  margin:0 0 10px;
  font-size:.84rem;
  line-height:1.45;
  color:var(--muted);
}
body:has(main.support-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.support-page.story-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  overflow:visible;
}
.support-page.story-page{
  max-width:min(1400px,100%);
  gap:0;
  padding:0;
}
.support-page .portiva-flow-page__scroll{
  flex:none;
  min-height:auto;
  max-height:none;
  height:auto;
  gap:0;
  padding-bottom:16px;
  overflow:visible;
  overscroll-behavior:auto;
  touch-action:auto;
}
.welcome-auth-privacy-note{
  margin:10px 0 0;
  font-size:.82rem;
  line-height:1.45;
  color:var(--muted);
  text-align:center;
}
.welcome-auth-privacy-note__link,
.welcome-auth-privacy-consent__link{
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:2px;
}
.welcome-auth-privacy-consent{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:12px 0 4px;
  cursor:pointer;
  font-size:.86rem;
  line-height:1.45;
  color:var(--muted);
}
.welcome-auth-privacy-consent__input{
  margin-top:3px;
  flex-shrink:0;
  width:1rem;
  height:1rem;
  accent-color:var(--accent);
}
.welcome-auth-privacy-consent__text{
  flex:1 1 auto;
}
.welcome-auth-modal__grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.welcome-auth-modal__card{
  display:flex;
  flex-direction:column;
  gap:9px;
  min-width:0;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(148,163,184,.08);
}
.welcome-auth-modal__card h4{
  margin:0;
  font-size:1rem;
}
.welcome-auth-modal__card p{
  margin:0 0 4px;
  color:var(--muted);
  font-size:.85rem;
  line-height:1.4;
}
.welcome-auth-modal__card .btn{
  margin-top:4px;
}
.welcome-auth-forgot{
  margin:6px 0 0;
  text-align:center;
}
.welcome-auth-forgot__link{
  padding:0;
  border:0;
  background:transparent;
  color:var(--accent);
  font:inherit;
  font-size:.84rem;
  font-weight:500;
  text-decoration:underline;
  text-underline-offset:2px;
  cursor:pointer;
}
.welcome-auth-forgot__link:hover{
  color:var(--text);
}
.welcome-auth-forgot__link:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.welcome-auth-forgot-panel[hidden]:not(.welcome-auth-forgot-panel--open){
  display:none !important;
}
.welcome-auth-forgot-panel__hint{
  margin:0;
  color:var(--muted);
  font-size:.82rem;
  line-height:1.4;
}
.welcome-auth-forgot-panel__ok{
  margin:0;
  padding:9px 10px;
  border-radius:10px;
  border:1px solid rgba(52,211,153,.35);
  background:rgba(52,211,153,.1);
  color:var(--good);
  font-size:.84rem;
  line-height:1.4;
}
.welcome-auth-modal__foot{
  margin:12px 0 0;
  font-size:.82rem;
  line-height:1.45;
  color:var(--muted);
}
.welcome-auth-guest-contact{
  margin:0;
  padding:0;
  border:0;
  font-size:.84rem;
  line-height:1.45;
  color:var(--muted);
}
.welcome-auth-guest-contact__link{
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:2px;
}
.welcome-auth-guest-contact__link:hover{
  color:var(--text);
}
.welcome-auth-guest-contact__summary{
  cursor:pointer;
  list-style:none;
  font-weight:500;
  color:var(--muted);
  text-decoration:underline;
  text-decoration-color:color-mix(in srgb, var(--muted) 42%, transparent);
  text-underline-offset:2px;
}
.welcome-auth-guest-contact__summary::-webkit-details-marker{
  display:none;
}
.welcome-auth-guest-contact__summary:hover,
.welcome-auth-guest-contact[open] > .welcome-auth-guest-contact__summary{
  color:var(--text);
}
.welcome-auth-guest-contact__hint{
  margin:8px 0 0;
  font-size:.82rem;
  line-height:1.45;
}
.welcome-auth-guest-contact .welcome-page__label{
  margin-top:8px;
}
.welcome-auth-guest-contact .btn{
  margin-top:10px;
  width:100%;
}
@media (max-width:700px){
  .modal-box--welcome-auth{
    width:min(94vw,520px);
    max-height:86dvh;
  }
  .welcome-auth-modal__grid{
    grid-template-columns:1fr;
  }
}
.modal-box--stock-portfolio{
  width:min(720px,96vw);
  max-width:96vw;
  max-height:min(86vh,720px);
  overflow:auto;
  text-align:left;
}
.modern-holdings-table{
  width:100%;
  border-collapse:collapse;
  font-size:.86rem;
  margin-top:6px;
}
.modern-holdings-table th,
.modern-holdings-table td{
  border:1px solid rgba(148,163,184,.38);
  padding:6px 8px;
  vertical-align:middle;
}
.modern-holdings-caption{
  caption-side:top;
  text-align:left;
  font-size:.78rem;
  color:var(--muted);
  margin-bottom:8px;
  line-height:1.45;
}
.modern-holdings-readonly-wrap{
  margin:0 0 8px;
  overflow:auto;
  max-width:100%;
}
.modern-holdings-readonly-table{
  width:100%;
  border-collapse:collapse;
  font-size:.86rem;
}
.modern-holdings-readonly-table th,
.modern-holdings-readonly-table td{
  border:1px solid rgba(148,163,184,.38);
  padding:6px 8px;
  text-align:left;
  vertical-align:middle;
}
.modern-holdings-readonly-table th{
  font-weight:600;
  color:var(--muted);
  font-size:.78rem;
}
.modern-holding-input{
  width:100%;
  max-width:10.5rem;
  box-sizing:border-box;
  padding:6px 8px;
  border-radius:8px;
  border:1px solid var(--stroke);
  background:var(--surface);
  color:var(--text);
  font-size:.86rem;
}
.modern-holding-input--num{
  max-width:7rem;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.modern-holding-input--live{
  opacity:.88;
}
.modern-holding-remove{
  min-width:36px;
  padding:4px 8px;
}
.modern-holdings-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  font-weight:650;
  font-size:.9rem;
}
.modern-holding-total{
  font-variant-numeric:tabular-nums;
}
.modern-stock-table-actions{
  display:flex;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap;
}
.modern-stock-holdings-hint{
  margin:0 0 10px;
  font-size:.82rem;
  color:var(--muted);
  line-height:1.45;
}
.asset-stock-readonly__actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.modern-stock-quote-status{
  margin:0;
  font-size:.82rem;
  color:var(--muted);
}
.modern-stock-quote-status--err{
  color:#b91c1c;
}
.modern-stock-quote-debug{
  margin:8px 0 0;
  padding:8px 10px;
  font-family:ui-monospace,Consolas,monospace;
  font-size:.72rem;
  line-height:1.45;
  color:var(--muted);
  background:var(--surface-2,rgba(0,0,0,.04));
  border-radius:6px;
  white-space:pre-wrap;
  word-break:break-word;
  max-height:12rem;
  overflow:auto;
}
.asset-stock-basis{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:14px;
}
.asset-stock-basis--add,
.modal-form-group-bubble__inner > .asset-stock-basis--add,
.modern-stock-basis.asset-stock-basis--add{
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  margin-bottom:10px;
}
.asset-stock-basis--add .asset-stock-basis__opt,
.modern-stock-basis.asset-stock-basis--add .asset-stock-basis__opt{
  flex:0 0 auto;
  width:100%;
}
.modern-stock-basis.asset-stock-basis--add .add-asset-section__title{
  flex:1 1 100%;
  width:100%;
  margin:0 0 4px;
}
.asset-stock-basis__opt{
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:.9rem;
  font-weight:500;
  color:var(--text);
  cursor:pointer;
  flex:0 0 auto;
  min-width:0;
  max-width:100%;
}
.asset-stock-basis--edit{
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  gap:12px 20px;
}
.asset-stock-basis--edit .asset-stock-basis__opt{
  align-items:center;
}
.asset-stock-basis__opt input[type="radio"]{
  flex:0 0 auto;
  margin:0;
}
.asset-stock-basis__label{
  display:inline;
  line-height:1.4;
  white-space:normal;
  word-break:normal;
}
.asset-stock-holdings-panel{
  margin-bottom:8px;
  width:100%;
  max-width:100%;
  min-width:0;
}
#assetStockTableWrap{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.detail-field--stock-portfolio{
  width:100%;
}
.detail-field--stock-portfolio dd{
  width:100%;
  max-width:100%;
  min-width:0;
}
.asset-stock-holdings-panel .modern-holdings-table{
  width:100%;
  min-width:260px;
  table-layout:auto;
  margin-bottom:10px;
}
.asset-stock-holdings-panel .modern-holdings-table thead{
  display:table-header-group;
}
.asset-stock-holdings-panel .modern-holdings-table tbody{
  display:table-row-group;
}
.asset-stock-holdings-panel .modern-holdings-table tfoot{
  display:table-footer-group;
}
.asset-stock-holdings-panel .modern-holdings-table tr{
  display:table-row;
}
.asset-stock-holdings-panel .modern-holdings-table th,
.asset-stock-holdings-panel .modern-holdings-table td{
  display:table-cell;
}
.asset-stock-holdings-panel .modern-holdings-table th:nth-child(1),
.asset-stock-holdings-panel .modern-holdings-table td:nth-child(1){
  width:42%;
}
.asset-stock-holdings-panel .modern-holdings-table th:nth-child(2),
.asset-stock-holdings-panel .modern-holdings-table td:nth-child(2){
  width:auto;
  min-width:9rem;
}
.asset-stock-holdings-panel .modern-holding-input--shares{
  max-width:none;
  min-width:7.5rem;
  width:100%;
}
/* Radio rows must not use the two-column label grid (breaks text one letter per line). */
#addAssetModal .modal-field--radio,
.add-asset-page .modal-field--radio,
#assetEditModal .modal-field--radio,
.asset-edit-page .modal-field--radio,
.portiva-mobile-form-page .modal-field--radio{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:10px;
  grid-template-columns:unset;
  width:100%;
  font-weight:500;
  color:var(--text);
}
#addAssetModal .modal-field--radio > span,
.add-asset-page .modal-field--radio > span,
#assetEditModal .modal-field--radio > span,
.asset-edit-page .modal-field--radio > span,
.portiva-mobile-form-page .modal-field--radio > span{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  min-width:0;
  line-height:1.4;
  white-space:normal;
  grid-template-columns:unset;
}
.asset-stock-manual-section{
  margin-bottom:14px;
}
.asset-stock-manual-section .detail-field__sub{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:6px;
}
.asset-stock-holdings-panel{
  margin-bottom:8px;
}
#btnAssetStockAddPosition{
  margin-top:4px;
}
.modern-holding-gain.gainPos{ color:#059669; }
.modern-holding-gain.gainNeg{ color:#b91c1c; }
.modern-holding-gain.gainNeu{ color:var(--muted); }
.layout-settings-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:4px;
}
.layout-settings-field{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(170px,240px);
  grid-template-areas:"label select" "hint select";
  align-items:center;
  column-gap:14px;
  row-gap:3px;
  margin:0;
}
.layout-settings-label{
  grid-area:label;
  font-size:.82rem;
  font-weight:700;
  color:var(--text);
  letter-spacing:.02em;
}
.layout-settings-hint{
  grid-area:hint;
  font-size:.8rem;
  line-height:1.45;
  color:var(--muted);
  margin:0;
  white-space:pre-line;
}
.theme-select--layout-settings{
  grid-area:select;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  padding:7px 34px 7px 10px;
  font-size:16px;
  min-height:38px;
}
.modern-layout-settings--signed-out .layout-settings-field,
.modern-layout-settings--signed-out .layout-settings-signin-bubble,
.modern-layout-settings--signed-out .form-actions{
  display:none;
}
.modern-layout-settings--signed-out .layout-settings-stack{
  gap:0;
}
@media (max-width:640px){
  .layout-settings-stack{
    gap:9px;
  }
  .layout-settings-field{
    grid-template-columns:minmax(0,1fr) minmax(124px,42vw);
    grid-template-areas:"label select";
    column-gap:10px;
  }
  .layout-settings-field .layout-settings-hint{
    display:none;
  }
  .theme-select--layout-settings{
    min-height:36px;
    padding-top:6px;
    padding-bottom:6px;
    font-size:16px;
  }
}
.layout-settings-page .layout-settings-stack{
  gap:18px;
  margin-top:4px;
}
.portiva-flow-page.layout-settings-page .layout-settings-stack > .layout-settings-field,
.portiva-flow-page.layout-settings-page .layout-settings-stack > .layout-settings-currency-bubble,
.portiva-flow-page.layout-settings-page .layout-settings-stack > .layout-settings-signin-bubble{
  position:relative;
  padding:14px;
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface);
  color:var(--text);
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
.layout-settings-page .layout-settings-field{
  grid-template-areas:"hint select";
}
.layout-settings-page .layout-settings-currency-bubble{
  position:relative;
  padding:16px 14px 14px;
  box-sizing:border-box;
}
.layout-settings-page .layout-settings-currency-bubble__fields{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.portiva-flow-page.layout-settings-page .layout-settings-currency-field{
  grid-template-areas:"label select" "hint select";
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.layout-settings-page .layout-settings-currency-field .layout-settings-label{
  position:static;
  grid-area:label;
  padding:0;
  background:transparent;
  color:var(--text);
  font-size:.82rem;
  letter-spacing:.02em;
  line-height:normal;
  text-transform:none;
}
.layout-settings-page .layout-settings-label{
  position:absolute;
  top:-.62em;
  inset-inline-start:10px;
  z-index:1;
  padding:0 6px;
  background:var(--portiva-menu-surface);
  color:#64748b;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  line-height:1.25;
  text-transform:uppercase;
}
[data-theme="night"] .csv-transfer-page .export-csv-scope__legend,
[data-theme="night-gray"] .csv-transfer-page .export-csv-scope__legend,
[data-theme="night"] .layout-settings-page .layout-settings-label,
[data-theme="night-gray"] .layout-settings-page .layout-settings-label{
  color:#fff;
}
[data-theme="classic"] .csv-transfer-page .export-csv-scope,
[data-theme="classic"] .portiva-flow-page.layout-settings-page .layout-settings-stack > .layout-settings-field,
[data-theme="classic"] .portiva-flow-page.layout-settings-page .layout-settings-stack > .layout-settings-currency-bubble,
[data-theme="classic"] .portiva-flow-page.layout-settings-page .layout-settings-stack > .layout-settings-signin-bubble,
[data-theme="classic"] .layout-settings-page .layout-settings-label{
  background:#fff;
}
[data-theme="classic"] .layout-settings-page .layout-settings-currency-field .layout-settings-label{
  background:transparent;
}
@media (max-width:640px){
  .layout-settings-page .layout-settings-field{
    grid-template-columns:1fr;
    grid-template-areas:"select";
  }
  .layout-settings-page .layout-settings-currency-field{
    grid-template-columns:minmax(0,1fr) minmax(124px,42vw);
    grid-template-areas:"label select";
  }
}
.modal-box--entity-overview{
  position:relative;
  max-width:min(480px,94vw);
}
.entity-overview-exclude-modal__body{
  font-size:.9rem;
  line-height:1.55;
  color:var(--text);
  margin-bottom:4px;
}
.entity-overview-exclude-modal__body > p:first-child{
  margin-top:0;
}
.entity-overview-exclude-modal__list{
  margin:10px 0 0;
  padding-left:1.15rem;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.5;
}
.entity-overview-exclude-modal__list li{
  margin-bottom:8px;
}
.entity-overview-exclude-modal__list li:last-child{
  margin-bottom:0;
}
.modal-box--loan-balance-consent{
  max-width:min(34rem, calc(100vw - 2rem));
}
.loan-balance-consent-modal__body{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.modal-hint--asset-display{
  margin-top:0;
  margin-bottom:14px;
}
.restore-backup-toolbar{
  margin:0 0 8px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.restore-backup-list-mount{
  max-height:min(44vh,320px);
  overflow:auto;
  margin:10px 0;
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  padding:5px 8px 4px;
  box-sizing:border-box;
}
.restore-backup-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 6px;
  border-radius:var(--radius-sm);
  cursor:pointer;
  font-size:.86rem;
  line-height:1.45;
  color:var(--text);
}
.restore-backup-item:hover{
  background:var(--surface-btn-hover);
}
.restore-backup-item input{
  margin-top:4px;
  flex-shrink:0;
}
.restore-backup-item--readonly{
  cursor:default;
  padding-left:12px;
}
.restore-backup-item--readonly:hover{
  background:transparent;
}
.restore-backup-list-mount--readonly{
  margin-top:0;
}
.restore-backup-item__lab{
  flex:1;
  min-width:0;
}
.restore-backup-error{
  color:#f87171;
  font-size:.84rem;
  margin:8px 0 0;
}
.modal-hint--restore-replace-danger{
  color:var(--danger, #c62828);
  font-weight:600;
  line-height:1.45;
  white-space:pre-wrap;
}

.modal-box{
  width:100%;
  max-width:420px;
  padding:22px 22px 18px;
  border-radius:var(--radius);
  border:1px solid var(--stroke);
  background:var(--glass);
  box-shadow:var(--shadow);
}
.modal-box.modal-box--welcome-auth{
  width:min(1180px,96vw);
  max-width:96vw;
}
.modal-box.modal-box--welcome-auth-error{
  width:min(460px,92vw);
  max-width:92vw;
}
.modal-box.modal-box--layout-settings{
  position:relative;
  width:min(680px,94vw);
  max-width:min(680px,94vw);
  max-height:calc(100dvh - 40px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
@media (min-width:901px){
  .modal-box.modal-box--layout-settings{
    width:min(1120px,94vw);
    max-width:min(1120px,94vw);
    padding:28px 36px 24px;
  }
  .layout-settings-field{
    grid-template-columns:minmax(0,1fr) minmax(300px,420px);
    column-gap:28px;
    row-gap:4px;
  }
  .layout-settings-hint{
    font-size:.84rem;
  }
}
.modal-title{
  margin:0 0 16px;
  font-size:1.1rem;
}
.modal-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.modal-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:.85rem;
  font-weight:600;
  color:var(--muted);
}
.modal-field input{
  font-family:inherit;
  font-size:16px;
  font-weight:500;
  color:var(--text);
  padding:10px 12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-btn);
}
.modal-overlay .modal-field textarea,
.modal-overlay .modal-field select,
.modal-overlay .modal-field .field-input,
.modal-overlay .modal-field .theme-select,
.modal-overlay .field-input{
  font-size:16px;
}
@media (max-width:899px){
  /* iOS Safari zooms the viewport when focused inputs use a font-size below 16px. */
  .add-entity-page .field-input,
  .add-entity-page .modal-field input,
  .add-entity-page .modal-field textarea,
  .add-entity-page .modal-field .theme-select,
  .add-entity-page .named-links-editor .field-input,
  .add-entity-page #newEntityParent,
  .add-entity-page #newEntityDomain,
  .edit-entity-page .field-input,
  .edit-entity-page .modal-field input,
  .edit-entity-page .modal-field textarea,
  .edit-entity-page .modal-field .theme-select,
  .edit-entity-page .named-links-editor .field-input,
  .edit-entity-page #newEntityParent,
  .edit-entity-page #newEntityDomain{
    font-size:16px;
  }
  .modal-overlay .modal-field input,
  .modal-overlay .modal-field textarea,
  .modal-overlay .modal-field select,
  .modal-overlay .modal-field .field-input,
  .modal-overlay .modal-field .theme-select,
  .modal-overlay .field-input{
    font-size:16px;
  }
}
.modal-box--add-entity .modal-field .theme-select,
.modal-box--add-entity .modal-field .field-input,
#formAddEntity .modal-field .field-input,
#formAddEntity .modal-field .theme-select,
.add-entity-page .modal-field .field-input,
.edit-entity-page .modal-field .field-input,
#newEntityParent,
#newEntityDomain{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}

[data-theme="dawn"] .modal-overlay,
[data-theme="day"] .modal-overlay,
[data-theme="classic"] .modal-overlay{
  background:rgba(15,23,42,.28);
}
.empty{
  padding:40px 20px;
  text-align:center;
  color:var(--muted);
  border:1px dashed var(--stroke);
  border-radius:var(--radius-sm);
  line-height:1.55;
}

.footer-note{
  margin-top:auto;
  padding-top:32px;
  font-size:.75rem;
  color:var(--muted);
  text-align:center;
}

.entity-screen-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.entity-details-main{
  display:flex;
  flex-direction:column;
  gap:0;
}
.details-display-currency{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:16px;
}
.details-display-currency-label{
  font-size:.78rem;
  font-weight:600;
  color:var(--muted);
}
.details-rollup-toggle{
  margin-bottom:16px;
  padding:14px 16px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--glass);
  backdrop-filter:blur(12px);
  box-shadow:0 1px 3px rgba(0,0,0,.12);
}
.details-rollup-toggle__title{
  margin:0 0 10px;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
.details-rollup-toggle__label{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:0;
  cursor:pointer;
  font-size:.9rem;
  line-height:1.45;
  color:var(--text);
}
.details-rollup-toggle__label input{
  margin:4px 0 0;
  flex-shrink:0;
  width:1.05rem;
  height:1.05rem;
  accent-color:var(--accent, #0f766e);
}
.details-rollup-toggle__hint{
  margin:10px 0 0;
  padding-left:calc(1.05rem + 12px);
  font-size:.78rem;
  color:var(--muted);
  line-height:1.45;
}
.theme-select--currency{
  max-width:min(120px,36vw);
}
.details-charts-mount{
  margin-bottom:20px;
}
.details-charts-mount--loading .details-loading-note{
  margin:0;
  padding:18px 16px;
  border-radius:var(--radius-sm);
  border:1px dashed var(--stroke);
  color:var(--muted);
  font-size:.9rem;
}
.entity-details-meta-mount{
  margin-bottom:8px;
}
.entity-details-inline > .entity-details-meta-mount{
  margin-bottom:0;
}

/* Details charts + pies (shared markup; themed for glass UI) */
.detailsPieStack{
  display:flex;
  flex-direction:column;
  gap:72px;
}
.detailsChartSection{
  padding:14px 16px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--glass);
  backdrop-filter:blur(12px);
  box-shadow:0 1px 3px rgba(0,0,0,.12);
}
.detailsChartSection .pieChartBlock{
  margin:0;
  width:100%;
  box-sizing:border-box;
  overflow:visible;
}
.detailsChartSection .pieChartBlockTitle{
  text-align:left;
  font-size:.72rem;
  font-weight:700;
  color:var(--muted);
  margin:0 0 4px;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.detailsChartSection .pieChartBlockTitle + .pieWrap{
  margin-top:22px;
}
.detailsChartSection .pieWrap{
  display:flex;
  flex-direction:column;
  flex-wrap:nowrap;
  align-items:stretch;
  width:100%;
  max-width:min(560px,100%);
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}
.detailsChartSection .pieLegend{
  flex:none;
  align-self:stretch;
  width:100%;
  min-width:0;
  text-align:left;
  margin-top:0;
  box-sizing:border-box;
}
.detailsChartSection--asset .details-asset-pie--legend-wrap .pieLegendAssetText,
.detailsChartSection--asset .details-asset-pie--legend-wrap .pieLegendAssetLink{
  white-space:normal;
  word-break:break-word;
  overflow:visible;
  text-overflow:clip;
}
.detailsChartSection--asset .details-asset-pie--legend-wrap .pieLegendAssetLink{
  display:block;
  width:100%;
  text-decoration:none;
  color:inherit;
}
.detailsChartSection--asset .details-asset-pie--legend-wrap .pieLegendAssetLink:hover{
  text-decoration:underline;
}
.pieChartSvgWrap{
  width:100%;
  overflow:visible;
}
.detailsChartSection .pieChartSvgWrap{
  display:flex;
  justify-content:center;
  overflow:visible;
  padding:36px 0 44px;
  box-sizing:border-box;
}
.detailsChartSection .pieChartSvgWrap .pieSvg{
  width:100%;
  max-width:100%;
  height:auto;
  display:block;
  overflow:visible;
}
.panel.details .pieChartSvgWrap .pieSvg{
  width:118%;
  max-width:none;
  margin-left:-9%;
}

/* Entity page inline charts: taller bubble for meta; pie shell matches folder. */
.entity-details-inline .detailsChartSection:not(.detailsChartSection--folder-entity){
  padding-top:18px;
  padding-bottom:18px;
}
.entity-details-inline .detailsChartSection:not(.detailsChartSection--folder-entity):not(.portiva-overview-pie-layout) .pieChartBlockTitle + .pieWrap{
  margin-top:30px;
}
.entity-details-inline .detailsChartSection:not(.detailsChartSection--folder-entity):not(.portiva-overview-pie-layout) .pieChartSvgWrap{
  padding-top:44px;
  padding-bottom:48px;
}
.portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading + .pieWrap,
.portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockSubtitle + .pieWrap,
.portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle + .pieWrap{
  margin-top:0;
}
.portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap{
  padding-top:18px;
  padding-bottom:22px;
}
.detailsChartSection:not(.portiva-overview-pie-layout) .home-overview-pie-analyst .pieChartBlockTitle + .pieWrap{
  margin-top:10px;
}
.pieLegend{
  flex:1;
  min-width:140px;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  font-size:.88rem;
  color:var(--text);
}
.pieLegendRow{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-bottom:6px;
}
.pieLegendRowMain{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:8px;
  flex:1 1 auto;
  min-width:0;
  max-width:100%;
}
.pieLegendRowMain > .pieSwatch{
  flex-shrink:0;
}
.pieLegendAssetText{
  flex:1 1 auto;
  min-width:0;
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
  line-height:1.35;
}
.pieLegendRow.pieLegendRow--otherMerge,
.pieLegendRow.pieLegendRow--cashflow{
  align-items:flex-start;
}
.pieLegendRow.pieLegendRow--cashflow .pieSwatch{
  background:hsl(152 62% 42%);
}
.pieLegendMerged{
  flex:1;
  min-width:0;
}
.pieOtherAssetList{
  list-style:none;
  margin:6px 0 0;
  padding:0 0 0 14px;
  font-size:.78rem;
  line-height:1.4;
  color:var(--muted);
}
.pieOtherAssetList .pieOtherAssetLink,
.pieOtherAssetList .pieLegendAssetLink{
  display:block;
  margin:0 0 4px;
  padding:4px 0;
  text-decoration:none;
  color:var(--text);
  border-radius:4px;
}
.pieOtherAssetList .pieOtherAssetLink:hover,
.pieOtherAssetList .pieLegendAssetLink:hover{
  text-decoration:underline;
  background:color-mix(in srgb, var(--surface-list-hover) 40%, transparent);
}
.pieOtherAssetList li:last-child .pieOtherAssetLink,
.pieOtherAssetList li:last-child .pieLegendAssetLink{
  margin-bottom:0;
}
.pieSwatch{
  width:12px;
  height:12px;
  border-radius:3px;
  flex-shrink:0;
  display:block;
  box-sizing:border-box;
}
.folderHeader{
  font-size:.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--muted);
  margin:10px 0 4px;
}
.folderHeader:first-child{
  margin-top:0;
}

.detailsHierarchyGraphToolbar{
  display:flex;
  justify-content:flex-end;
  margin-bottom:8px;
}
.detailsHierarchyGraphWrap .detailsHierarchyGraph{
  margin-bottom:0;
}
.detailsHierarchyGraph{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.detailsHierarchyGraphSvg{
  display:block;
  width:100%;
  min-width:280px;
  height:auto;
}
.detailsHierarchyGraphSvg text{
  font-family:var(--font),system-ui,sans-serif;
  pointer-events:none;
}
.detailsHierarchyGraphSvg .dhRootText{
  font-weight:700;
  fill:var(--accent);
}
.detailsHierarchyGraphSvg:not(.detailsHierarchyGraphSvg--modal) .dhRootText{
  font-size:14px;
}
.detailsHierarchyGraphSvg:not(.detailsHierarchyGraphSvg--modal) .dhChildName{
  font-size:12px;
  fill:var(--text);
}
.detailsHierarchyGraphSvg:not(.detailsHierarchyGraphSvg--modal) .dhChildPct{
  font-size:11px;
  fill:var(--muted);
}
.detailsHierarchyEdge{
  fill:none;
  stroke:var(--muted);
  stroke-width:1.5;
  stroke-linecap:round;
}

/* Entity meta bubbles (readonly) */
.entityDetailsBubble{
  padding:12px 14px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--surface-list);
  margin-bottom:12px;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.entityDetailsBubble:last-child{
  margin-bottom:0;
}
.entityDetailsBubbleHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  width:100%;
  box-sizing:border-box;
}
.modal-form-group-bubble > .entityDetailsBubbleTitleHint{
  margin:4px 0 10px;
  font-size:.75rem;
  font-weight:400;
  line-height:1.4;
  text-align:left;
  color:var(--muted);
}
.entityDetailsBubbleTitle{
  margin:0;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}
.entityDetailsDl{
  margin:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:6px 14px;
  font-size:.88rem;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  align-items:baseline;
}
.entityDetailsDl dt{
  margin:0;
  color:var(--muted);
  font-weight:600;
  min-width:0;
  overflow-wrap:break-word;
  word-break:normal;
}
.entityDetailsDl dd{
  margin:0;
  min-width:0;
  color:var(--text);
  font-variant-numeric:tabular-nums;
  word-break:normal;
  overflow-wrap:break-word;
}
.entityDetailsDl dd.entityDetailsDd--text{
  font-weight:500;
  text-align:left;
  justify-self:start;
  white-space:normal;
}
.entityDetailsDl dt.entityDetailsDt--linkOnly{
  display:none;
}
.entityDetailsDl dd.entityDetailsDd--linkOnly{
  grid-column:1 / -1;
  justify-self:start;
}
.entityDetailsDl dd.entityDetailsDd--num{
  font-weight:600;
  text-align:right;
  justify-self:end;
  white-space:nowrap;
}
.entityDetailsDl dd a{
  white-space:normal;
  word-break:break-all;
  overflow-wrap:anywhere;
  color:var(--accent);
}
.assetDetailsPanel .entityDetailsDl{
  grid-template-columns:minmax(0,1fr) minmax(0,2fr);
}
.assetDetailsPanel .entityDetailsDl dd.entityDetailsDd--text{
  white-space:normal;
  overflow-wrap:break-word;
}
.assetDetailsPanel .entityDetailsDl dd.entityDetailsDd--num{
  white-space:nowrap;
  overflow-wrap:normal;
}
.assetDetailsPanel .entityDetailsDl dd,
.assetDetailsPanel .entityDetailsDl dd.entityDetailsDd--num,
.assetDetailsPanel .entityDetailsDl dd.entityDetailsDd--text{
  text-align:left;
  justify-self:start;
}
@media (max-width:620px){
  .assetDetailsPanel .entityDetailsDl dd,
  .assetDetailsPanel .entityDetailsDl dd.entityDetailsDd--num,
  .assetDetailsPanel .entityDetailsDl dd.entityDetailsDd--text{
    text-align:left;
    justify-self:start;
  }
}
.loan-update-status,
.assetDetailsPanel .entityDetailsDl dd .loan-update-status{
  margin-top:6px;
  max-width:min(260px,58vw);
  color:var(--muted);
  opacity:.78;
  font-size:.68rem;
  font-weight:500;
  line-height:1.35;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
  font-variant-numeric:normal;
}
.assetDetailsPanel .entityDetailsDl dd.entityDetailsDd--num:has(.loan-update-status){
  white-space:normal;
}
.entityDetailsDl--entityCopy dd.entityDetailsDdWithCopy{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  justify-self:stretch;
}
.entityDetailsDl--entityCopy .entityDetailsDdWithCopy .entityDetailsDdVal{
  min-width:0;
  text-align:left;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  word-break:normal;
  overflow-wrap:break-word;
}
.entityDetailsDl--entityCopy .entityDetailsDdWithCopy .btn-icon-copy{
  margin-left:0;
  justify-self:end;
  flex-shrink:0;
}
.entityDetailsDdVal{
  min-width:0;
}
.btn-icon-copy{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  padding:0;
  border:none;
  border-radius:10px;
  background:var(--surface-btn);
  color:var(--muted);
  cursor:pointer;
  transition:background .15s,color .15s;
}
.btn-icon-copy:hover{
  background:var(--surface-btn-hover);
  color:var(--accent);
}
.entityDetailsCommentsBody{
  font-size:.88rem;
  line-height:1.45;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
  max-width:100%;
  min-width:0;
}
.entityDetailsCommentsBody[dir="rtl"],
.field-input--comments[dir="rtl"]{
  direction:rtl;
  text-align:right;
}
.entity-details-placeholder-title{
  margin:0 0 8px;
  font-size:1rem;
}
.entityDetailsEmptyNote{
  margin:0;
  font-size:.85rem;
  color:var(--muted);
  line-height:1.5;
}

.modal-title--sr{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.modal-close-btn{
  position:absolute;
  top:10px;
  right:10px;
  z-index:2;
  width:36px;
  height:36px;
  padding:0;
  margin:0;
  border:none;
  border-radius:10px;
  background:transparent;
  color:var(--muted);
  font-size:1.25rem;
  line-height:1;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.modal-close-btn:hover{
  background:var(--surface-btn-hover);
  color:var(--text);
}
.modal-box--hierarchy{
  position:relative;
  max-width:min(96vw,440px);
  width:min(96vw,440px);
  max-height:90vh;
  overflow:auto;
  padding:36px 16px 18px;
}
.hierarchy-modal-body{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

/* Firebase (same RTDB schema as classic) */
#view > .home-page-footer{
  flex:0 0 auto;
  width:100%;
  margin-top:auto;
  padding:28px 16px max(24px, env(safe-area-inset-bottom, 0px));
  border-top:1px solid var(--stroke);
}
.home-app-version{
  margin:0 auto 10px;
  padding:0;
  max-width:36rem;
  text-align:center;
  font-family:var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size:.72rem;
  font-weight:500;
  letter-spacing:.04em;
  line-height:1.4;
  color:var(--muted);
}
.home-beta-notice,
.home-visit-downloads,
.home-visit-download{
  margin:0 auto;
  padding:0;
  max-width:36rem;
  text-align:center;
  font-size:.78rem;
  line-height:1.5;
  color:var(--muted);
}
.home-page-footer:has(.home-beta-notice) .home-app-version{
  margin-bottom:1.5em;
}
.home-visit-downloads{
  margin-top:0.75em;
  display:flex;
  flex-direction:column;
  gap:0.2em;
}
.home-visit-download{
  margin-top:0;
}
.firebase-chip{
  appearance:none;
  font-size:.78rem;
  font-weight:600;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--surface-btn);
  color:var(--muted);
  max-width:min(160px,38vw);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
button.firebase-chip{
  cursor:pointer;
  font:inherit;
}
button.firebase-chip:hover{
  border-color:var(--stroke-hover);
  background:var(--surface-btn-hover);
}
.firebase-chip--ok{
  color:var(--good);
  border-color:rgba(52,211,153,.35);
}
.firebase-chip--pending{
  animation:pulse-soft 1.2s ease-in-out infinite;
}
@keyframes pulse-soft{
  50%{ opacity:.65; }
}

.firebase-connectivity-gate.modal-overlay{
  z-index:5000;
  opacity:0;
  pointer-events:none;
  transition:opacity .16s ease;
}
.firebase-connectivity-gate.modal-overlay:not([hidden]){
  opacity:1;
  pointer-events:auto;
}
.firebase-connectivity-gate[hidden]{
  display:none !important;
}

.portiva-auth-pending-overlay{
  position:fixed;
  inset:0;
  z-index:5500;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:max(24px, env(safe-area-inset-top, 0px)) 20px max(40px, env(safe-area-inset-bottom, 0px));
  background:#000;
  color:var(--text);
}
.portiva-auth-pending-overlay[hidden]{
  display:none !important;
}
.portiva-auth-pending-overlay__inner{
  text-align:center;
  max-width:360px;
}
.portiva-auth-pending-overlay__brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(14px, 4vw, 22px);
  margin-bottom:clamp(18px, 4vw, 24px);
}
.portiva-auth-pending-overlay__spinner{
  width:2rem;
  height:2rem;
  margin:0 auto 12px;
  border:3px solid rgba(255,255,255,.18);
  border-top-color:#22d3ee;
  border-radius:50%;
  animation:portiva-auth-pending-spin .75s linear infinite;
}
@keyframes portiva-auth-pending-spin{
  to{ transform:rotate(360deg); }
}
.portiva-auth-pending-overlay__mark{
  width:clamp(76px, 19vw, 126px);
  height:clamp(76px, 19vw, 126px);
  border-radius:clamp(19px, 4.8vw, 32px);
  background:var(--brand-mark-bg);
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:clamp(2.45rem, 6vw, 3.65rem);
  line-height:1;
  color:var(--brand-mark-fg);
  box-shadow:0 12px 48px var(--brand-mark-shadow);
}
.portiva-auth-pending-overlay__word strong{
  font-size:clamp(1.5rem, 4.5vw, 2.25rem);
  letter-spacing:-0.03em;
  font-weight:700;
}
.portiva-auth-pending-overlay__sub{
  margin:0;
  font-size:.92rem;
  color:var(--muted);
  opacity:.92;
}
body.portiva-auth-pending{
  overflow:hidden;
}

html.modern-firebase-blocked{
  background:var(--bg0);
}

body.portiva-route-welcome,
body.portiva-route-welcome #view,
body:has(main.privacy-page){
  color-scheme:dark;
  --bg0:#0b0f18;
  --bg1:#111827;
  --bg-linear-end:#0f172a;
  --radial-1:rgba(13,148,136,.11);
  --radial-2:rgba(180,83,9,.09);
  --glass:rgba(31,41,55,.78);
  --stroke:rgba(203,213,225,.13);
  --portiva-border:var(--stroke);
  --text:#f1f5f9;
  --muted:#a7b3c5;
  --text-muted:#a7b3c5;
  --accent:#0f766e;
  --accent2:#b45309;
  --accent-border:rgba(15,118,110,.38);
  --accent-hover:rgba(15,118,110,.22);
  --surface:rgba(31,41,55,.78);
  --surface-card:rgba(51,65,85,.68);
  --surface-card-hover:rgba(71,85,105,.78);
  --surface-btn:rgba(51,65,85,.64);
  --surface-btn-hover:rgba(71,85,105,.82);
  --surface-list:rgba(51,65,85,.58);
  --surface-list-hover:rgba(71,85,105,.72);
  --surface-raised:rgba(51,65,85,.55);
  --border-strong:rgba(203,213,225,.28);
  --btn-primary-bg:var(--surface-btn);
  --stroke-hover:rgba(203,213,225,.28);
  --shadow:0 22px 64px rgba(0,0,0,.38);
  --portiva-canvas-bg:#050505;
  --portiva-panel-bg:rgba(51,65,85,.68);
  --portiva-field-bg:rgba(51,65,85,.64);
  --portiva-action-bg:var(--surface-btn-hover);
  --portiva-action-hover:var(--surface-card-hover);
  --portiva-action-fg:var(--text);
  --portiva-action-border:var(--stroke);
  --portiva-form-bubble-bg:#0a0e14;
  --portiva-form-field-bg:#1a2234;
  --portiva-form-footer-btn-bg:rgba(51,65,85,.82);
  --portiva-form-footer-btn-hover:rgba(71,85,105,.92);
  --portiva-form-footer-btn-fg:#f1f5f9;
  --portiva-form-footer-btn-border:rgba(203,213,225,.22);
  --portiva-tab-fg:rgba(255,255,255,.65);
  --portiva-tab-fg-hover:rgba(255,255,255,.88);
  --portiva-tab-fg-active:rgba(255,255,255,.95);
  --portiva-tab-bar-border:rgba(255,255,255,.14);
  --portiva-tab-indicator:#0f766e;
  --portiva-map-link-stroke:rgba(148,163,184,.62);
  --portiva-map-link-arrow:rgba(148,163,184,.88);
}

/* Logo mark colors are fixed (cyan + violet) across themes and routes */
:root,
[data-theme="night"],
[data-theme="night-gray"],
[data-theme="gray-night"],
[data-theme="dawn"],
[data-theme="day"],
[data-theme="classic"],
body.portiva-route-welcome,
body.portiva-route-welcome #view,
body.portiva-route-app,
body:has(main.privacy-page){
  --brand-mark-bg:linear-gradient(135deg, #22d3ee, #a78bfa);
  --brand-mark-fg:#0f172a;
  --brand-mark-shadow:rgba(34,211,238,.25);
}

body.portiva-route-welcome,
body.portiva-route-welcome #view{
  background:#000;
}
body.portiva-route-welcome .app-shell{
  padding-bottom:max(72px, calc(env(safe-area-inset-bottom, 0px) + 56px));
}
body.portiva-route-welcome .app-shell:has(.welcome-plans-page),
body.portiva-route-welcome .app-shell:has(.plan-details-page),
body.portiva-route-app .app-shell:has(.plan-details-page){
  padding-bottom:max(8px, env(safe-area-inset-bottom, 0px));
}
body.portiva-route-welcome #view:has(> main.welcome-page--overview){
  flex:0 1 auto;
  overflow:visible;
}

body.portiva-route-main-currency-onboarding,
body.portiva-route-main-currency-onboarding #view,
body.portiva-route-main-currency-onboarding .app-shell{
  background:#000;
}
body.portiva-route-main-currency-onboarding .app-shell{
  min-height:100dvh;
  padding-bottom:max(12px, env(safe-area-inset-bottom, 0px));
}
body.portiva-route-main-currency-onboarding #view{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
}
body.portiva-route-main-currency-onboarding #view > main.main-currency-onboarding-page{
  flex:1;
  min-height:0;
}

.main-currency-onboarding-page{
  min-height:100dvh;
  min-height:100svh;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:0 max(20px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  background:#000;
  color:var(--text);
}
.main-currency-onboarding-page__welcome{
  margin:0;
  padding-top:20vh;
  width:100%;
  text-align:center;
  font-family:var(--font), system-ui, sans-serif;
  font-size:clamp(2rem, 5.8vw, 3.35rem);
  font-weight:600;
  letter-spacing:-0.03em;
  line-height:1.08;
  color:#f8fafc;
  flex-shrink:0;
}
.main-currency-onboarding-page__body{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:100%;
  max-width:44rem;
  gap:clamp(18px, 3.5vw, 28px);
  text-align:center;
  padding:clamp(20px, 5vh, 48px) 0;
  box-sizing:border-box;
}
.main-currency-onboarding-page__lead{
  margin:0;
  max-width:36rem;
  font-size:clamp(0.95rem, 2.2vw, 1.08rem);
  line-height:1.55;
  color:var(--muted);
}
.main-currency-onboarding-page__controls{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  width:100%;
}
.main-currency-onboarding-page__field-row{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  width:100%;
}
.main-currency-onboarding-page__select,
.main-currency-onboarding-page__done{
  min-width:min(320px, 100%);
  width:min(320px, 100%);
  max-width:100%;
  min-height:44px;
  box-sizing:border-box;
}
.main-currency-onboarding-page__select{
  flex:0 1 auto;
  padding:10px 2.25rem;
  font-size:1rem;
  text-align:center;
  text-align-last:center;
  background:rgba(15,23,42,.82);
  border-color:rgba(255,255,255,.22);
  color:rgba(255,255,255,.96);
}
.main-currency-onboarding-page__done{
  margin:0;
  font-size:1rem;
  font-weight:650;
}
.main-currency-onboarding-page__err{
  width:100%;
  max-width:min(320px, 100%);
  text-align:center;
}
.partner-code-onboarding-page__body{
  max-width:42rem;
  gap:20px;
}
.partner-code-onboarding-page__intro{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
}
.partner-code-onboarding-page__created{
  margin:0;
  color:#f8fafc;
  font-size:clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight:650;
}
.partner-code-onboarding-page__label{
  color:#f8fafc;
  font-size:.95rem;
  font-weight:650;
}
.partner-code-onboarding-page__input{
  width:min(320px, 100%);
  min-height:44px;
  box-sizing:border-box;
  border-color:rgba(255,255,255,.22);
  background:rgba(15,23,42,.82);
  color:#f8fafc;
  text-align:center;
  text-transform:uppercase;
  font-size:16px;
}
.partner-code-onboarding-page__actions{
  display:flex;
  gap:12px;
  width:min(320px, 100%);
}
.partner-code-onboarding-page__action{
  flex:1 1 0;
  min-height:44px;
  margin:0;
}
.partner-code-onboarding-page__status{
  display:flex;
  flex-direction:column;
  gap:5px;
  width:min(360px, 100%);
  line-height:1.45;
}
.partner-code-onboarding-page__status[hidden]{
  display:none;
}
.partner-code-onboarding-page__status--success{
  color:#86efac;
}
.partner-code-onboarding-page__status--error{
  color:#fca5a5;
}

/* Welcome auth hub + sign-in / create flows (onboarding-style layout) */
.welcome-auth-onboarding-page .welcome-auth-onboarding-page__controls{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  width:100%;
}
.welcome-auth-onboarding-page .welcome-auth-onboarding-page__form{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:min(440px, 100%);
  max-width:100%;
  text-align:left;
}
.welcome-auth-registration-coupon-hint{
  margin:-6px 0 0;
  color:var(--muted);
  font-size:.84rem;
  line-height:1.4;
}
.welcome-auth-onboarding-page .welcome-auth-onboarding-page__primary,
.welcome-auth-onboarding-page .welcome-auth-onboarding-page__google{
  min-width:min(440px, 100%);
  width:min(440px, 100%);
  max-width:100%;
  min-height:44px;
  box-sizing:border-box;
  margin:0;
  font-size:1rem;
  font-weight:650;
}
.welcome-auth-sign-in-page.main-currency-onboarding-page,
.welcome-auth-create-page.main-currency-onboarding-page{
  justify-content:flex-start;
}
.welcome-auth-sign-in-page .main-currency-onboarding-page__welcome,
.welcome-auth-create-page .main-currency-onboarding-page__welcome{
  padding-top:clamp(28px, 5vh, 52px);
  margin-bottom:clamp(18px, 3vh, 32px);
  font-size:clamp(1.35rem, 3.4vw, 1.85rem);
  line-height:1.12;
}
.welcome-auth-sign-in-page .main-currency-onboarding-page__body,
.welcome-auth-create-page .main-currency-onboarding-page__body{
  flex:0 1 auto;
  min-height:0;
  justify-content:flex-start;
  padding:0 0 clamp(20px, 4vh, 36px);
}
.welcome-auth-sign-in-page .welcome-auth-onboarding-page__controls,
.welcome-auth-create-page .welcome-auth-onboarding-page__controls{
  flex:0 1 auto;
  min-height:0;
}
.welcome-verify-email-page.main-currency-onboarding-page{
  justify-content:flex-start;
}
.welcome-auth-sign-in-page .welcome-auth-onboarding-page__google,
.welcome-auth-create-page .welcome-auth-onboarding-page__google{
  margin-top:clamp(28px, 5vh, 48px);
}
.welcome-auth-onboarding-page:not(.welcome-auth-hub-page) .modal-field{
  display:grid;
  grid-template-columns:minmax(88px, 32%) minmax(0, 1fr);
  align-items:center;
  gap:8px 10px;
  font-size:.84rem;
}
.welcome-auth-onboarding-page:not(.welcome-auth-hub-page) .modal-field > span{
  display:inline;
  min-width:0;
  color:rgba(248,250,252,.88);
}
.welcome-auth-onboarding-page .field-input{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.16);
  color:rgba(248,250,252,.96);
}
.welcome-auth-onboarding-page .field-input:focus{
  background:rgba(255,255,255,.1);
  border-color:rgba(255,255,255,.24);
  box-shadow:none;
  outline:none;
}
.welcome-auth-onboarding-page .field-input:focus-visible{
  outline:2px solid rgba(255,255,255,.34);
  outline-offset:2px;
}
.welcome-auth-onboarding-page .btn--primary{
  border-color:rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:rgba(248,250,252,.96);
}
.welcome-auth-onboarding-page .btn--primary:hover:not(:disabled){
  background:rgba(255,255,255,.1);
  border-color:rgba(255,255,255,.24);
}
.welcome-auth-onboarding-page .btn--primary:focus-visible{
  outline:2px solid rgba(255,255,255,.34);
  outline-offset:2px;
  box-shadow:none;
}
.welcome-auth-onboarding-page .welcome-auth-privacy-consent__text{
  max-width:min(440px, 100%);
  text-align:left;
  font-size:.86rem;
  line-height:1.45;
  color:var(--muted);
}
.welcome-auth-onboarding-page .welcome-auth-privacy-note{
  width:100%;
  max-width:100%;
  margin:0;
  text-align:center;
  font-size:.86rem;
  line-height:1.45;
  color:var(--muted);
}
@media (min-width:720px){
  .welcome-auth-create-page .main-currency-onboarding-page__body{
    max-width:52rem;
  }
  .welcome-auth-onboarding-page .welcome-auth-privacy-note{
    font-size:.84rem;
  }
}
.welcome-auth-onboarding-page .welcome-auth-forgot{
  margin:0;
  text-align:center;
}
.welcome-auth-onboarding-page .welcome-auth-guest-contact{
  max-width:min(52rem, 100%);
  width:100%;
  text-align:center;
}
.welcome-auth-onboarding-page .welcome-auth-forgot-panel{
  width:min(440px, 100%);
  max-width:100%;
  text-align:left;
}
.welcome-auth-onboarding-page .welcome-auth-forgot-panel .modal-field{
  display:grid;
  grid-template-columns:minmax(88px, 32%) minmax(0, 1fr);
  align-items:center;
  gap:8px 10px;
}
.welcome-auth-onboarding-page .welcome-auth-onboarding-page__offline{
  margin:0;
  padding:10px 12px;
  border-radius:10px;
  font-size:.86rem;
  line-height:1.4;
  background:rgba(251,191,36,.12);
  border:1px solid rgba(251,191,36,.35);
  color:var(--muted);
  max-width:min(440px, 100%);
}
.welcome-auth-hub-page .welcome-auth-hub-page__body{
  padding-top:clamp(56px, 14vh, 120px);
}
@media (max-width:768px){
  .welcome-auth-hub-page .welcome-auth-hub-page__body{
    padding-top:clamp(96px, 24vh, 200px);
  }
}
.welcome-auth-hub-page__choices{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:clamp(16px, 3vh, 24px);
  width:100%;
}
.welcome-auth-hub-page__choice{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:#f8fafc;
  font-family:var(--font), system-ui, sans-serif;
  font-size:clamp(1.28rem, 4.2vw, 1.58rem);
  font-weight:600;
  line-height:1.3;
  letter-spacing:-0.01em;
  text-decoration:none;
  cursor:pointer;
}
.welcome-auth-hub-page__choice:hover:not(:disabled){
  color:var(--accent);
}
.welcome-auth-hub-page__choice:focus-visible{
  outline:2px solid rgba(255,255,255,.42);
  outline-offset:4px;
}
.welcome-auth-hub-page__choice:disabled{
  opacity:.45;
  cursor:not-allowed;
}

body:has(main.privacy-page){
  background:#000;
}
body.portiva-route-app:has(main.privacy-page),
body.portiva-route-app:has(main.privacy-page) #view{
  background:#000;
}
body.portiva-route-app:has(main.privacy-page) .app-shell{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}
body.portiva-route-app #view:has(> main.privacy-page){
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
}
body.portiva-route-app #view > header.topbar:has(+ main.privacy-page){
  flex-shrink:0;
}
body.portiva-route-app #view > main.privacy-page{
  flex:1;
  min-height:0;
}
@media (min-width:821px){
  body:has(main.privacy-page) #view > header.topbar:has(+ main.privacy-page){
    margin-bottom:4px;
  }
  body:has(main.privacy-page) #view > header.topbar:has(+ main.privacy-page) .topbar__inner{
    gap:4px;
    padding-top:4px;
    padding-bottom:8px;
  }
}

/* Light app themes must not restyle welcome / privacy surfaces */
[data-theme="dawn"] body.portiva-route-welcome .btn--primary,
[data-theme="day"] body.portiva-route-welcome .btn--primary,
[data-theme="classic"] body.portiva-route-welcome .btn--primary,
[data-theme="dawn"] body:has(main.privacy-page) .btn--primary,
[data-theme="day"] body:has(main.privacy-page) .btn--primary,
[data-theme="classic"] body:has(main.privacy-page) .btn--primary{
  background:var(--portiva-action-bg, var(--btn-primary-bg));
  background-image:none;
  border-color:var(--portiva-action-border, var(--accent-border));
  color:var(--portiva-action-fg, var(--text));
}
[data-theme="dawn"] body.portiva-route-welcome .btn--ghost,
[data-theme="day"] body.portiva-route-welcome .btn--ghost,
[data-theme="classic"] body.portiva-route-welcome .btn--ghost,
[data-theme="dawn"] body:has(main.privacy-page) .btn--ghost,
[data-theme="day"] body:has(main.privacy-page) .btn--ghost,
[data-theme="classic"] body:has(main.privacy-page) .btn--ghost{
  background:transparent;
  border-color:var(--stroke);
  color:var(--text);
}
[data-theme="dawn"] body.portiva-route-welcome .btn--ghost:hover:not(:disabled),
[data-theme="day"] body.portiva-route-welcome .btn--ghost:hover:not(:disabled),
[data-theme="classic"] body.portiva-route-welcome .btn--ghost:hover:not(:disabled),
[data-theme="dawn"] body:has(main.privacy-page) .btn--ghost:hover:not(:disabled),
[data-theme="day"] body:has(main.privacy-page) .btn--ghost:hover:not(:disabled),
[data-theme="classic"] body:has(main.privacy-page) .btn--ghost:hover:not(:disabled){
  background:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
  color:var(--text);
}
[data-theme="dawn"] body.portiva-route-welcome .field-input,
[data-theme="day"] body.portiva-route-welcome .field-input,
[data-theme="classic"] body.portiva-route-welcome .field-input,
[data-theme="dawn"] body:has(main.privacy-page) .field-input,
[data-theme="day"] body:has(main.privacy-page) .field-input,
[data-theme="classic"] body:has(main.privacy-page) .field-input,
[data-theme="dawn"] body.portiva-route-welcome .welcome-page__input,
[data-theme="day"] body.portiva-route-welcome .welcome-page__input,
[data-theme="classic"] body.portiva-route-welcome .welcome-page__input,
[data-theme="dawn"] body:has(main.privacy-page) .welcome-page__input,
[data-theme="day"] body:has(main.privacy-page) .welcome-page__input,
[data-theme="classic"] body:has(main.privacy-page) .welcome-page__input{
  background:var(--bg0);
  color:var(--text);
  border-color:var(--stroke);
}
body.portiva-route-welcome .welcome-structure-demo__link{
  stroke-width:1.5;
}
body.portiva-route-welcome .welcome-auth-inline-error,
body.portiva-route-welcome .welcome-auth-modal__err,
body.portiva-route-welcome .welcome-page__err{
  color:#fca5a5;
}

.welcome-page{
  min-height:min(100dvh, 100vh);
  box-sizing:border-box;
  padding:max(12px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(28px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  max-width:1100px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:20px;
}
.welcome-page--minimal{
  justify-content:center;
  align-items:center;
  text-align:center;
  gap:0;
  max-width:none;
  width:100%;
  background:var(--bg0);
}
.welcome-page__minimal-card{
  width:100%;
  max-width:min(420px,94vw);
  margin:0 auto;
  padding:clamp(28px,5vw,40px) clamp(22px,4vw,32px) clamp(24px,4vw,32px);
  box-sizing:border-box;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:var(--surface);
  box-shadow:0 16px 48px rgba(15,23,42,.08);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:clamp(18px,3.5vw,24px);
}
.welcome-page__hero-brand{
  margin:0;
}
.brand--welcome-hero{
  flex-direction:column;
  align-items:center;
  gap:14px;
}
.brand-mark--welcome{
  width:min(152px,38vw);
  height:min(152px,38vw);
  border-radius:28%;
  font-size:clamp(3rem,10vw,4.25rem);
  line-height:1;
}
.brand--welcome-hero .brand-text strong{
  font-size:clamp(1.4rem,4.5vw,1.85rem);
}
.welcome-page__hero-title{
  margin:0;
  font-size:1.06rem;
  font-weight:600;
  color:var(--muted);
  max-width:22rem;
  line-height:1.45;
}
.welcome-page__signin-actions{
  display:flex;
  flex-direction:row;
  width:100%;
  gap:10px;
  align-items:stretch;
  margin-top:0;
  position:relative;
  z-index:2;
}
.welcome-page--overview .welcome-structure-demo + .welcome-page__signin-actions{
  margin-top:12px;
}
.welcome-page__structure-copy{
  margin-top:clamp(14px, 3.5vw, 22px);
}
.welcome-page--overview .welcome-page__signin-actions + .welcome-page__structure-copy{
  margin-top:clamp(10px, 2.5vw, 16px);
}
.welcome-page__structure-title{
  margin:0 0 clamp(12px, 3vw, 18px);
  font-size:clamp(1.08rem, 2.8vw, 1.28rem);
  font-weight:650;
  line-height:1.15;
  letter-spacing:-0.02em;
  color:var(--text);
}
.welcome-page__structure-copy .welcome-page__intro{
  margin:0;
  max-width:22rem;
}
.welcome-structure-demo{
  width:100%;
  max-width:min(580px, 100%);
  margin-top:clamp(28px, 7vw, 44px);
  margin-left:auto;
  margin-right:auto;
}
.welcome-structure-demo--map{
  max-width:min(920px, 100%);
}
.welcome-structure-demo__heading{
  margin:calc(2 * 1.55em) 0 var(--welcome-title-bubble-gap, 10px);
  font-size:clamp(1.08rem, 2.8vw, 1.28rem);
  font-weight:650;
  line-height:1.2;
  letter-spacing:-0.02em;
  color:var(--text);
  text-align:center;
  width:100%;
}
.welcome-structure-demo__bubble{
  width:100%;
  padding:18px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:var(--glass);
  backdrop-filter:blur(12px);
  box-shadow:var(--shadow);
  box-sizing:border-box;
}
.welcome-structure-demo--map .welcome-structure-demo__layout{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:clamp(12px, 2.5vw, 18px);
}
.welcome-structure-demo__legend{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:clamp(10px, 2vw, 16px) clamp(14px, 3vw, 22px);
  padding-top:0;
  min-width:0;
}
.welcome-structure-demo__legend-item{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.welcome-structure-demo__legend-swatch{
  flex:0 0 auto;
  width:1.35rem;
  height:1.1rem;
  border-radius:5px;
  border:1.5px solid rgba(255,255,255,.22);
  box-sizing:border-box;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.welcome-structure-demo__legend-item--folder .welcome-structure-demo__legend-swatch{
  border-color:hsl(214 72% 64%);
  background:linear-gradient(165deg, hsl(214 68% 44%) 0%, hsl(214 62% 30%) 52%, hsl(214 55% 22%) 100%);
  box-shadow:
    0 2px 8px hsla(214, 75%, 38%, 0.35),
    inset 0 1px 0 hsla(214, 90%, 82%, 0.24);
}
.welcome-structure-demo__legend-item--entity .welcome-structure-demo__legend-swatch{
  border-color:hsl(8 62% 70%);
  background:linear-gradient(165deg, hsl(8 58% 50%) 0%, hsl(8 54% 36%) 52%, hsl(8 50% 26%) 100%);
  box-shadow:
    0 2px 8px hsla(8, 65%, 42%, 0.32),
    inset 0 1px 0 hsla(8, 85%, 82%, 0.22);
}
.welcome-structure-demo__legend-item--asset .welcome-structure-demo__legend-swatch{
  border-color:hsl(272 64% 72%);
  background:linear-gradient(165deg, hsl(272 60% 48%) 0%, hsl(272 55% 34%) 52%, hsl(272 50% 24%) 100%);
  box-shadow:
    0 2px 8px hsla(272, 60%, 42%, 0.34),
    inset 0 1px 0 hsla(272, 85%, 82%, 0.22);
}
.welcome-structure-demo__legend-label{
  font-size:clamp(0.62rem, 1.7vw, 0.74rem);
  font-weight:600;
  line-height:1.2;
  letter-spacing:0.02em;
  color:var(--muted);
  white-space:nowrap;
}
@media (max-width:900px){
  body.portiva-route-welcome #view > main.welcome-page--overview{
    padding-left:max(6px, env(safe-area-inset-left, 0px));
    padding-right:max(6px, env(safe-area-inset-right, 0px));
    gap:6px;
  }
  .welcome-structure-demo--map,
  .welcome-manager-maps{
    max-width:100%;
    min-width:0;
  }
  .welcome-manager-maps{
    align-items:center;
  }
  .welcome-story-scrolly,
  .welcome-story-scrolly__pies{
    max-width:none;
    width:100%;
  }
  .welcome-story-scrolly__visual{
    max-width:100%;
    min-width:0;
    overflow-x:visible;
    width:100%;
    margin-inline:0;
  }
  .welcome-story-scrolly__visual .welcome-structure-demo--map{
    max-width:none;
    width:100%;
  }
  .welcome-structure-demo--map .welcome-structure-demo__layout{
    gap:clamp(10px, 2.2vw, 14px);
  }
  .welcome-structure-demo__bubble{
    padding:14px 10px;
  }
  .welcome-overview-bubbles{
    max-width:none;
    width:100%;
    margin-inline:0;
  }
  .welcome-overview-bubbles .welcome-overview-bubble,
  .welcome-overview-bubbles .welcome-manager-plan{
    padding-inline:10px;
  }
  .welcome-feature-card{
    padding-inline:12px;
  }
  .welcome-structure-demo__map-host,
  .welcome-manager-maps__map-host{
    max-width:100%;
    min-width:0;
  }
  /* Structure map: clip to bubble and scroll horizontally when wider than the screen. */
  body.portiva-route-welcome .welcome-structure-demo__map-host.home-hier-tree-page,
  body.portiva-route-welcome .welcome-structure-demo__map-host.home-hier-tree-page > .home-hier-tree-panel{
    overflow:hidden;
    max-width:100%;
  }
  body.portiva-route-welcome .welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__main{
    overflow-x:auto;
    overflow-y:hidden;
    width:100%;
    max-width:100%;
    justify-content:flex-start;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    touch-action:pan-x pan-y;
    scrollbar-width:none;
  }
  body.portiva-route-welcome .welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__main.welcome-structure-map--auto-pan{
    overflow:hidden;
  }
  body.portiva-route-welcome .welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__main::-webkit-scrollbar{
    display:none;
  }
  body.portiva-route-welcome .welcome-structure-demo--map .home-hier-tree-panel .home-hier-tree__stage{
    margin-inline:0;
    will-change:transform;
  }
  .welcome-structure-demo--map .home-hier-tree__branch-stack{
    --home-hier-tier-height:clamp(46px, 9vw, 62px);
  }
  .welcome-structure-demo--map .home-hier-tree__branch-track{
    min-height:30px;
  }
  .welcome-structure-demo--map .home-hier-tree__branch-track--root{
    min-height:32px;
  }
  .welcome-structure-demo--map .home-hier-tree-node--folder{
    min-height:30px;
    height:30px;
    max-height:30px;
    padding:2px 6px;
    max-width:clamp(5.5rem, 30vw, 13rem);
    font-size:clamp(0.58rem, 2.05vw, 0.7rem);
  }
  .welcome-structure-demo--map .home-hier-tree__row--root .home-hier-tree-node--folder{
    min-height:34px;
    height:auto;
    max-height:42px;
    padding:4px 10px;
    max-width:clamp(6.5rem, 42vw, 14rem);
    font-size:clamp(0.84rem, 3.2vw, 1rem);
  }
  .welcome-structure-demo--map .home-hier-tree-node:not(.home-hier-tree-node--folder){
    min-height:24px;
    padding:2px 5px;
    max-width:clamp(4.75rem, 26vw, 11rem);
    font-size:clamp(0.58rem, 2.05vw, 0.7rem);
  }
  .welcome-structure-demo__map-host.welcome-embedded-map--scaled,
  .welcome-manager-maps__map-host.welcome-embedded-map--scaled{
    overflow:hidden;
  }
  .welcome-manager-maps__map-host .home-hier-tree-panel--investor-map-side-by-side .home-hier-tree__investor-map-col{
    min-width:5.75rem;
    max-width:7.5rem;
  }
  .welcome-manager-maps__map-host .home-hier-tree-panel--investor-map-side-by-side .home-hier-tree__investor-maps-row{
    gap:clamp(0.35rem, 1.6vw, 0.75rem);
  }
}
.welcome-structure-demo__map-host.home-hier-tree-page{
  flex:none;
  min-height:0;
  overflow:visible;
  background:transparent;
  display:flex;
  justify-content:center;
  width:100%;
}
.welcome-structure-demo__map-host.home-hier-tree-page > .home-hier-tree-panel{
  flex:none;
  min-height:0;
  overflow:visible;
  margin-inline:auto;
  max-width:100%;
}
.welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__main{
  flex:none;
  min-height:0;
  overflow:visible;
  touch-action:auto;
  display:flex;
  justify-content:center;
  width:100%;
  max-width:100%;
}
.welcome-structure-demo--map .home-hier-tree__view-root{
  display:none;
  margin:0;
}
.welcome-structure-demo--map .home-hier-tree-panel .home-hier-tree__stage{
  min-height:0;
  margin-inline:auto;
}
.welcome-structure-demo--map .home-hier-tree__branch-stack{
  padding-top:0 !important;
  padding-bottom:8px;
  --home-hier-tier-height:clamp(52px, 10vw, 68px);
}
.welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__row--root,
.welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__row--branch{
  padding-top:2px;
  padding-bottom:2px;
}
.welcome-structure-demo--map .home-hier-tree-node{
  pointer-events:none;
  cursor:default;
  opacity:1 !important;
  transform:none !important;
  box-shadow:none;
}
.welcome-structure-demo--map.welcome-structure-demo--highlighting .welcome-structure-node{
  opacity:1 !important;
  transform:none !important;
  box-shadow:none;
}
.welcome-structure-demo--map .home-hier-tree-panel,
.welcome-structure-demo--map .home-hier-tree__main,
.welcome-structure-demo--map .home-hier-tree__stage,
.welcome-structure-demo--map .home-hier-tree__layers,
.welcome-structure-demo--map .home-hier-tree__arrows{
  background:transparent !important;
}
.welcome-story-scrolly__visual .welcome-structure-demo--map{
  opacity:1;
  transform:none;
}
@media (max-width:900px){
  .welcome-story-scrolly__visual{
    overflow-x:visible;
    overflow-y:visible;
  }
  .welcome-structure-demo--map .welcome-structure-demo__map-host.home-hier-tree-page{
    overflow:visible;
    justify-content:stretch;
    touch-action:pan-x pan-y;
  }
  .welcome-structure-demo--map .welcome-structure-demo__map-host.home-hier-tree-page > .home-hier-tree-panel{
    width:100%;
    max-width:100%;
    margin-inline:0;
  }
  .welcome-structure-demo--map .welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__main{
    overflow-x:auto;
    overflow-y:visible;
    width:100%;
    max-width:100%;
    min-height:0;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    touch-action:pan-x pan-y;
    justify-content:flex-start;
  }
  .welcome-structure-demo--map .welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__stage,
  .welcome-structure-demo--map .welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__layers,
  .welcome-structure-demo--map .welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree__layout-wrap{
    width:max-content;
    max-width:none;
    min-width:0;
  }
  .welcome-structure-demo--map .welcome-structure-demo__map-host.home-hier-tree-page .home-hier-tree-panel .home-hier-tree__stage{
    min-width:max-content;
  }
}

.welcome-page__hero-signin,
.welcome-page__hero-plans{
  flex:1 1 0;
  width:auto;
  min-width:0;
  max-width:none;
  min-height:36px;
  padding:10px 16px;
  font-weight:650;
  font-size:0.95rem;
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  box-sizing:border-box;
}
.welcome-page__hero-signin:hover,
.welcome-page__hero-plans:hover{
  background:rgba(255,255,255,.11);
  border-color:rgba(255,255,255,.26);
}
.welcome-page__hero-signin:focus-visible,
.welcome-page__hero-plans:focus-visible{
  outline:2px solid rgba(255,255,255,.42);
  outline-offset:2px;
  box-shadow:none;
}
.welcome-structure-demo__stage{
  position:relative;
  width:100%;
  min-height:clamp(200px, 46vw, 300px);
}
.welcome-structure-demo__arrows{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  overflow:visible;
  z-index:0;
}
.welcome-structure-demo__layers,
.welcome-structure-demo__layout{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:auto 1fr;
  column-gap:clamp(8px, 2vw, 14px);
  row-gap:clamp(18px, 4.5vw, 28px);
}
.welcome-structure-demo__type-label{
  align-self:center;
  justify-self:end;
  padding-right:2px;
  font-size:clamp(0.58rem, 1.6vw, 0.72rem);
  font-weight:700;
  letter-spacing:0.08em;
  line-height:1.15;
  color:var(--muted);
  white-space:nowrap;
  text-align:right;
}
.welcome-structure-demo__type-label--folders{
  grid-column:1;
  grid-row:1;
}
.welcome-structure-demo__row--folders{
  grid-column:2;
  grid-row:1;
}
.welcome-structure-demo__type-label--entities{
  grid-column:1;
  grid-row:2 / 4;
}
.welcome-structure-demo__row--entities{
  grid-column:2;
  grid-row:2;
}
.welcome-structure-demo__row--entity-sub{
  grid-column:2;
  grid-row:3;
}
.welcome-structure-demo__type-label--assets{
  grid-column:1;
  grid-row:4;
}
.welcome-structure-demo__row--assets{
  grid-column:2;
  grid-row:4;
}
.welcome-structure-demo__row{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:clamp(6px, 1.5vw, 10px);
  align-items:stretch;
}
.welcome-structure-demo__row--folders{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}
.welcome-structure-node--span-2{
  grid-column:span 2;
}
.welcome-structure-demo__row--entity-sub{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}
.welcome-structure-node{
  box-sizing:border-box;
  min-height:34px;
  padding:7px 5px;
  border-radius:7px;
  border:1.5px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.05);
  color:var(--text);
  font-size:clamp(0.64rem, 2.4vw, 0.8rem);
  font-weight:600;
  line-height:1.15;
  text-align:center;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
.welcome-structure-node--folder{
  border-color:hsl(214 72% 64%);
  background:linear-gradient(165deg, hsl(214 68% 44%) 0%, hsl(214 62% 30%) 52%, hsl(214 55% 22%) 100%);
  color:hsl(214 25% 97%);
  box-shadow:
    0 3px 16px hsla(214, 75%, 38%, 0.42),
    inset 0 1px 0 hsla(214, 90%, 82%, 0.24);
}
.welcome-structure-node--entity{
  border-color:hsl(8 62% 70%);
  background:linear-gradient(165deg, hsl(8 58% 50%) 0%, hsl(8 54% 36%) 52%, hsl(8 50% 26%) 100%);
  color:hsl(8 30% 97%);
  box-shadow:
    0 3px 16px hsla(8, 65%, 42%, 0.38),
    inset 0 1px 0 hsla(8, 85%, 82%, 0.22);
}
.welcome-structure-node--asset{
  border-color:hsl(272 64% 72%);
  background:linear-gradient(165deg, hsl(272 60% 48%) 0%, hsl(272 55% 34%) 52%, hsl(272 50% 24%) 100%);
  color:hsl(272 28% 97%);
  box-shadow:
    0 3px 16px hsla(272, 60%, 42%, 0.4),
    inset 0 1px 0 hsla(272, 85%, 82%, 0.22);
}
.welcome-structure-node--spacer{
  visibility:hidden;
  border-color:transparent;
  background:transparent;
  min-height:0;
  padding:0;
}
/* Welcome overview scroll story */
.welcome-page--overview{
  gap:clamp(28px, 5vw, 44px);
}
.welcome-story--hero{
  display:flex;
  flex-direction:column;
  gap:clamp(16px, 3.5vw, 24px);
}
.welcome-story-hero__title{
  margin:0 0 clamp(10px, 2vw, 14px);
  font-size:clamp(1.35rem, 3.8vw, 1.85rem);
  font-weight:700;
  line-height:1.2;
  letter-spacing:-0.02em;
  color:var(--text);
  max-width:28rem;
}
.welcome-story-hero__note{
  margin:0 0 clamp(20px, 4vw, 32px);
  max-width:28rem;
  font-size:clamp(0.78rem, 1.8vw, 0.88rem);
  line-height:1.45;
  color:var(--muted);
}
.welcome-story-hero__intro{
  margin:0 0 clamp(20px, 4vw, 32px);
  max-width:28rem;
  font-size:clamp(0.92rem, 2.2vw, 1.02rem);
  line-height:1.5;
  color:var(--muted);
}
.welcome-story-hero__line{
  max-width:38rem;
  margin:0;
  line-height:1.45;
}
.welcome-story-hero__line--lead{
  color:var(--text);
  font-size:clamp(.94rem, 2.2vw, 1.08rem);
  font-weight:550;
}
.welcome-story-hero__lead--mobile{
  display:none;
}
@media (max-width:900px){
  .welcome-story-hero__line--lead{
    font-size:.846rem;
  }
  .welcome-story-hero__lead--desktop{
    display:none;
  }
  .welcome-story-hero__lead--mobile{
    display:inline;
  }
}
.welcome-story-hero__line--privacy{
  margin-top:6px;
  color:var(--muted);
  font-size:clamp(.8rem, 1.8vw, .9rem);
}
.welcome-story-hero__copy{
  width:100%;
  text-align:center;
}
.welcome-story-hero__title,
.welcome-story-hero__line{
  margin-inline:auto;
}
@media (min-width:821px){
  .welcome-story-hero__title,
  .welcome-story-hero__intro,
  .welcome-story-hero__note,
  .welcome-story-hero__line{
    max-width:none;
    margin-inline:auto;
  }
}
.welcome-feature-cards{
  display:grid;
  gap:12px;
  margin:0;
  padding:0;
  list-style:none;
}
@media (min-width:720px){
  .welcome-feature-cards{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:clamp(12px, 2.5vw, 20px);
  }
}
.welcome-feature-card{
  margin:0;
  padding:clamp(14px, 2.8vw, 18px);
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
}
.welcome-feature-card__title{
  margin:0 0 8px;
  font-size:clamp(0.88rem, 2.1vw, 0.98rem);
  font-weight:650;
  line-height:1.25;
  color:var(--text);
}
.welcome-feature-card__text{
  margin:0;
  font-size:clamp(0.82rem, 1.9vw, 0.9rem);
  line-height:1.45;
  color:var(--muted);
}
.welcome-scroll-hint{
  margin:4px 0 0;
  text-align:center;
  font-size:0.82rem;
  color:var(--muted);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.welcome-scroll-hint::after{
  content:"";
  width:10px;
  height:10px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  opacity:0.7;
  animation:welcome-scroll-hint-bob 1.8s ease-in-out infinite;
}
@keyframes welcome-scroll-hint-bob{
  0%,100%{ transform:translateY(0) rotate(45deg); }
  50%{ transform:translateY(5px) rotate(45deg); }
}
@media (prefers-reduced-motion:reduce){
  .welcome-scroll-hint::after{
    animation:none;
  }
}
.welcome-story-scrolly{
  --welcome-story-bubble-max:720px;
  --welcome-title-bubble-gap:10px;
  --welcome-story-section-gap:clamp(28px, 5vw, 48px);
  --welcome-next-title-margin:clamp(24px, 4vw, 36px);
  display:flex;
  flex-direction:column;
  gap:var(--welcome-story-section-gap);
  width:100%;
  max-width:min(980px, 100%);
  margin:0 auto;
}
.welcome-story-scrolly__pies,
.welcome-story-step[data-welcome-chapter="projection"],
.welcome-story-step[data-welcome-chapter="feed"],
.welcome-story-step[data-welcome-chapter="manager"]{
  width:min(var(--welcome-story-bubble-max), 100%);
  max-width:var(--welcome-story-bubble-max);
  margin-inline:auto;
  box-sizing:border-box;
}
.welcome-story-scrolly__visual{
  width:100%;
  max-width:min(720px, 100%);
  margin:clamp(8px, 2vw, 16px) auto 0;
}
.welcome-story-scrolly__visual .welcome-structure-demo{
  margin-top:0;
  max-width:none;
}
.welcome-story-scrolly__pies{
  width:100%;
  min-width:0;
}
.welcome-overview-pie-demo__summary{
  margin:0;
  padding-bottom:2px;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.welcome-overview-pie-demo__summary .welcome-overview-stats-demo{
  margin-top:0;
  max-width:none;
}
body.portiva-route-welcome .welcome-overview-pie-demo__summary .welcome-overview-stats-demo{
  display:grid !important;
  grid-template-columns:1.2fr 1fr;
  gap:8px;
  margin:0;
}
body.portiva-route-welcome .welcome-overview-pie-demo__summary .welcome-overview-stats-demo .stat-card--total,
body.portiva-route-welcome .welcome-overview-pie-demo__summary .welcome-overview-stats-demo .stat-card--mini{
  display:block !important;
}
.welcome-story-scrolly__pies .welcome-overview-pie-demo{
  margin-top:0;
  max-width:none;
}
.welcome-story-step__title{
  margin:0 0 10px;
  font-size:clamp(1.08rem, 2.8vw, 1.28rem);
  font-weight:650;
  line-height:1.2;
  letter-spacing:-0.02em;
  color:var(--text);
}
.welcome-story-step__title--center{
  text-align:center;
  width:100%;
  max-width:none;
  margin-bottom:0;
}
.welcome-wealth-projection-demo{
  width:100%;
  min-width:0;
}
.welcome-wealth-projection-demo .welcome-story-step__title{
  margin-top:var(--welcome-next-title-margin);
  margin-bottom:var(--welcome-title-bubble-gap);
}
.welcome-wealth-projection-demo__bubble{
  width:100%;
  padding:18px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:var(--glass);
  backdrop-filter:blur(12px);
  box-shadow:var(--shadow);
  box-sizing:border-box;
}
.welcome-wealth-projection-demo__lead{
  max-width:46rem;
  margin:0 auto 16px;
  color:var(--muted);
  line-height:1.55;
  text-align:center;
}
.welcome-wealth-projection-demo__body{
  max-width:980px;
  gap:10px;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-stat,
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-panel{
  border:1px solid rgba(255,255,255,.11);
  border-radius:10px;
  background:var(--glass);
  backdrop-filter:blur(12px);
  box-shadow:none;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-stat{
  gap:4px;
  padding:8px 12px;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-panel{
  padding:12px;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-stat span{
  font-size:.75rem;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-stat strong{
  font-size:1.05rem;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-panel h3{
  margin-bottom:8px;
  font-size:.9rem;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-assumptions{
  gap:8px 16px;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-range{
  gap:6px 10px;
  font-size:.8rem;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-range output{
  font-size:.78rem;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-range__control{
  grid-template-columns:32px minmax(0,1fr) 32px;
  gap:8px;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-range__step{
  width:32px;
  height:32px;
  font-size:1.05rem;
}
body.portiva-route-welcome .welcome-wealth-projection-demo .wealth-projection-stat--projected{
  border-color:color-mix(in srgb,#43c889 62%,rgba(255,255,255,.11));
  background:color-mix(in srgb,#43c889 18%,var(--glass) 82%);
}
@media (max-width:699px){
  .welcome-wealth-projection-demo__bubble{
    padding:14px 10px;
  }
}
.welcome-neighborhood-feed-demo{
  width:100%;
  min-width:0;
}
.welcome-neighborhood-feed-demo .welcome-story-step__title{
  margin-top:var(--welcome-next-title-margin);
  margin-bottom:var(--welcome-title-bubble-gap);
}
.welcome-neighborhood-feed-demo__bubble{
  width:100%;
  padding:18px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:var(--glass);
  backdrop-filter:blur(12px);
  box-shadow:var(--shadow);
  box-sizing:border-box;
}
.welcome-neighborhood-feed-demo__lead{
  margin:0 0 14px;
  color:var(--muted);
  line-height:1.5;
  text-align:center;
}
.welcome-neighborhood-feed-demo__layout{
  display:grid;
  grid-template-columns:minmax(220px, .42fr) minmax(0, 1fr);
  gap:14px;
  align-items:stretch;
  direction:ltr;
}
.welcome-neighborhood-feed-demo__list{
  grid-column:1;
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}
html[dir="rtl"] .welcome-neighborhood-feed-demo__list{
  direction:rtl;
}
.welcome-neighborhood-feed-demo__listing{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  min-width:0;
  padding:7px 9px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:10px;
  background:var(--glass);
  box-sizing:border-box;
}
.welcome-neighborhood-feed-demo__listing-pin{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:50% 50% 50% 0;
  transform:rotate(-45deg);
  background:#5b9cff;
  color:#fff;
  font-size:.76rem;
  font-weight:750;
}
.welcome-neighborhood-feed-demo__listing-pin > span{
  transform:rotate(45deg);
}
.welcome-neighborhood-feed-demo__listing-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.welcome-neighborhood-feed-demo__listing-copy strong{
  overflow:hidden;
  color:var(--text);
  font-size:.88rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.welcome-neighborhood-feed-demo__listing-copy small{
  color:var(--muted);
  font-size:.76rem;
}
.welcome-neighborhood-feed-demo__listing-kind{
  color:#5b9cff;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.welcome-neighborhood-feed-demo__listing-distance{
  color:var(--muted);
  font-size:.76rem;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.welcome-neighborhood-feed-demo__map{
  grid-column:2;
  position:relative;
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  background:#dce5df;
  user-select:none;
  pointer-events:none;
}
.welcome-neighborhood-feed-demo__map-canvas{
  width:100%;
  height:100%;
  min-height:300px;
}
.welcome-neighborhood-feed-demo__map-canvas--unavailable{
  display:grid;
  place-items:center;
  padding:20px;
  color:#334155;
  text-align:center;
}
.welcome-neighborhood-map__div-icon{
  border:0;
  background:transparent;
}
.welcome-neighborhood-map__leaflet-marker{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:2px solid #fff;
  border-radius:50% 50% 50% 0;
  background:#5b9cff;
  box-shadow:0 4px 12px rgba(15,23,42,.3);
  color:#fff;
  font-size:.78rem;
  font-weight:800;
  transform:rotate(-45deg);
}
.welcome-neighborhood-map__leaflet-marker--home{
  background:#7c3aed;
  font-size:1rem;
}
.welcome-neighborhood-map__leaflet-marker > span{
  transform:rotate(45deg);
}
.welcome-neighborhood-feed-demo__home-label{
  position:absolute;
  left:50%;
  bottom:12px;
  display:grid;
  grid-template-columns:auto auto;
  gap:1px 7px;
  align-items:center;
  max-width:calc(100% - 24px);
  padding:7px 11px;
  border:1px solid rgba(255,255,255,.8);
  border-radius:999px;
  background:rgba(23,26,29,.88);
  box-shadow:0 5px 18px rgba(15,23,42,.24);
  color:#fff;
  transform:translateX(-50%);
  white-space:nowrap;
}
.welcome-neighborhood-feed-demo__home-label > span{
  grid-row:1 / span 2;
  color:#c4b5fd;
  font-size:1.25rem;
}
.welcome-neighborhood-feed-demo__home-label strong{
  overflow:hidden;
  font-size:.8rem;
  text-overflow:ellipsis;
}
.welcome-neighborhood-feed-demo__home-label small{
  color:rgba(255,255,255,.72);
  font-size:.68rem;
}
@media (max-width:699px){
  .welcome-neighborhood-feed-demo__bubble{
    padding:14px 10px;
  }
  .welcome-neighborhood-feed-demo__layout{
    grid-template-columns:minmax(0,1fr);
  }
  .welcome-neighborhood-feed-demo__map{
    grid-column:1;
    grid-row:1;
  }
  .welcome-neighborhood-feed-demo__list{
    grid-column:1;
    grid-row:2;
  }
  .welcome-neighborhood-feed-demo__map-canvas{
    min-height:260px;
  }
}
.welcome-story-step[data-welcome-chapter="overview"] .welcome-story-step__title{
  margin-top:var(--welcome-next-title-margin);
}
.welcome-story-step[data-welcome-chapter="overview"] + .welcome-story-scrolly__pies{
  margin-top:calc(var(--welcome-title-bubble-gap) - var(--welcome-story-section-gap));
}
.welcome-story-step__lead{
  margin:0 0 14px;
  font-size:clamp(0.9rem, 2.1vw, 0.98rem);
  line-height:1.5;
  color:var(--muted);
  max-width:36rem;
}
.welcome-story-step__bubble{
  margin-top:0;
}
.welcome-story-step__section-title{
  margin:var(--welcome-next-title-margin) 0 var(--welcome-title-bubble-gap);
  font-size:clamp(1.08rem, 2.8vw, 1.28rem);
  font-weight:650;
  line-height:1.2;
  letter-spacing:-0.02em;
  color:var(--text);
  text-align:center;
  width:100%;
}
.welcome-manager-tools__section-title{
  margin-top:calc(var(--welcome-story-section-gap) + var(--welcome-next-title-margin));
}
.welcome-zipper-copy{
  display:none;
}
.welcome-story-reveal{
  opacity:0.16;
  transform:translateY(28px) scale(.985);
  transition:
    opacity .72s ease,
    transform .78s cubic-bezier(.2,.75,.2,1);
}
.welcome-story-reveal--visible{
  opacity:1;
  transform:none;
}
@media (prefers-reduced-motion:reduce){
  .welcome-story-reveal{
    opacity:1;
    transform:none;
    transition:none;
  }
}
.welcome-overview-stats-demo{
  margin-top:8px;
  max-width:min(420px, 100%);
}
body.portiva-route-welcome .welcome-overview-stats-demo .stat-card{
  border-color:rgba(255,255,255,.14);
  background:rgba(255,255,255,.05);
}
body.portiva-route-welcome .welcome-overview-stats-demo .label{
  color:var(--muted);
}
body.portiva-route-welcome .welcome-overview-stats-demo .value{
  color:var(--text);
}
.welcome-overview-pie-demo{
  margin-top:clamp(14px, 3vw, 20px);
  width:100%;
  min-width:0;
}
.welcome-overview-pie-demo .home-overview-chart-tabs{
  margin-bottom:8px;
}
.welcome-overview-pie-demo__stage{
  display:grid;
  grid-template-columns:1fr;
  width:100%;
}
.welcome-overview-pie-demo__pane{
  grid-column:1;
  grid-row:1;
  min-width:0;
  display:none;
  pointer-events:none;
}
.welcome-overview-pie-demo__pane--active{
  display:grid;
  pointer-events:auto;
  z-index:1;
}
.welcome-asset-tab-demo,
.welcome-asset-tab-demo__chart{
  display:contents;
}
.welcome-asset-tab-demo__chart[hidden],
.welcome-asset-gallery-demo[hidden]{
  display:none !important;
}
.welcome-overview-pie-demo .home-overview-chart-pane--asset-gallery-open.welcome-overview-pie-demo__pane--active{
  display:block;
  width:100%;
  min-width:0;
  min-height:0;
}
.welcome-overview-pie-demo .home-overview-chart-pane--asset-gallery-open .welcome-asset-tab-demo{
  display:block;
  width:100%;
  min-width:0;
}
.welcome-asset-gallery-demo{
  display:grid;
  place-items:center;
  width:100%;
  margin:0;
  box-sizing:border-box;
}
.welcome-asset-gallery-demo__image{
  display:block;
  width:auto;
  max-width:min(460px, 100%);
  max-height:min(260px, 48vw);
  height:auto;
  object-fit:contain;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  box-shadow:0 12px 28px rgba(0,0,0,.3);
  box-sizing:border-box;
}
.welcome-overview-pie-demo .home-overview-chart-tab{
  transition:background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
body.portiva-route-welcome .welcome-overview-pie-demo .pieChartBlock{
  margin:0;
}
body.portiva-route-welcome .welcome-overview-pie-demo .pieLegend{
  max-height:none;
}
body.portiva-route-welcome .welcome-overview-pie-demo .portiva-overview-pie-layout{
  min-width:0;
}
@media (min-width:901px){
  body.portiva-route-welcome .welcome-overview-pie-demo.detailsChartSection--overview-tabs{
    padding:14px 16px 12px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .welcome-asset-gallery-demo__image{
    max-width:min(480px, 100%);
    max-height:min(280px, calc(48vw + 20px));
  }
  body.portiva-route-welcome .welcome-overview-pie-demo .portiva-overview-pie-layout{
    --portiva-pie-chart-body-h:216px;
    --portiva-pie-chart-pad-top:10px;
    --portiva-pie-chart-pad-bottom:14px;
    --portiva-pie-chart-rail-gap:0px;
    --portiva-pie-chart-rail-h:0px;
    --portiva-pie-chart-rail-total-h:0px;
    grid-template-rows:auto auto var(--portiva-pie-chart-slot-h) 0;
  }
  body.portiva-route-welcome .welcome-overview-pie-demo .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap{
    padding:12px 4px 16px 10px;
  }
  body.portiva-route-welcome .welcome-overview-pie-demo .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading,
  body.portiva-route-welcome .welcome-overview-pie-demo .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle{
    margin-top:6px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout{
    --portiva-pie-legend-max-w:220px;
    --portiva-pie-chart-max-w:240px;
    --portiva-pie-chart-body-h:216px;
    grid-template-columns:minmax(0,220px) minmax(0,240px);
    grid-template-areas:
      "heading heading"
      "headingsub headingsub"
      "legend chartpie"
      ". chartrail";
    column-gap:8px;
    justify-content:start;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegend{
    width:210px;
    max-width:210px;
    margin:14px 0 0;
    padding-right:0;
    font-size:.78rem;
    transform:translateX(36px);
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupName,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupMeta,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupEq,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendFolderLink,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendEntityLink,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendAssetLink,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendAssetText{
    font-size:.78rem;
    line-height:1.35;
  }
  /* Welcome demo asset rows are unlinked — match entity/folder legend row height. */
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow--asset{
    padding:10px 2px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow--asset:has(> .pieLegendAssetLink){
    padding:0;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow--asset > .pieLegendAssetLink{
    padding:10px 2px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupMeta{
    min-width:0;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap{
    width:240px;
    max-width:240px;
    justify-self:start;
    padding-left:0;
    transform:translate(102px,-20px);
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan__visuals) .portiva-overview-pie-layout .home-overview-pie-analyst > .pieChartBlockSubtitle{
    transform:translateX(20px);
  }
  body.portiva-route-welcome .welcome-story-scrolly__visual{
    max-width:min(980px, 100%);
  }
  body.portiva-route-welcome .welcome-structure-demo__heading,
  body.portiva-route-welcome .welcome-structure-demo__bubble{
    width:min(var(--welcome-story-bubble-max), 100%);
    margin-left:0;
    margin-right:auto;
    box-sizing:border-box;
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="overview"]{
    width:min(var(--welcome-story-bubble-max), 100%);
    max-width:var(--welcome-story-bubble-max);
    box-sizing:border-box;
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="overview"],
  body.portiva-route-welcome .welcome-story-scrolly__pies,
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="feed"]{
    margin-left:auto;
    margin-right:0;
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="projection"]{
    margin-left:0;
    margin-right:auto;
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="manager"]{
    width:100%;
    max-width:none;
    margin-inline:0;
  }
  body.portiva-route-welcome #welcome-chapter-manager,
  body.portiva-route-welcome .welcome-manager-plan--pie{
    width:min(var(--welcome-story-bubble-max), 100%);
    margin-left:0;
    margin-right:auto;
    box-sizing:border-box;
  }
  body.portiva-route-welcome .welcome-manager-tools__section-title,
  body.portiva-route-welcome .welcome-manager-plan--tools{
    width:min(var(--welcome-story-bubble-max), 100%);
    margin-left:auto;
    margin-right:0;
    box-sizing:border-box;
  }
  body.portiva-route-welcome .welcome-structure-demo__bubble,
  body.portiva-route-welcome .welcome-story-scrolly__pies,
  body.portiva-route-welcome .welcome-wealth-projection-demo,
  body.portiva-route-welcome .welcome-neighborhood-feed-demo,
  body.portiva-route-welcome .welcome-manager-plan{
    position:relative;
  }
  body.portiva-route-welcome .welcome-zipper-copy{
    display:block;
    position:absolute;
    top:50%;
    z-index:2;
    width:clamp(110px, calc(100vw - 800px), 220px);
    margin:0;
    color:var(--text);
    font-size:clamp(.95rem, 1.55vw, 1.18rem);
    font-weight:650;
    line-height:1.65;
    letter-spacing:-.015em;
    opacity:0;
    text-wrap:balance;
    transition:
      opacity .58s ease .16s,
      transform .72s cubic-bezier(.2,.75,.2,1) .12s;
  }
  body.portiva-route-welcome .welcome-zipper-copy--right{
    left:calc(100% + 20px);
    text-align:center;
    transform:translate(34px,-50%);
  }
  body.portiva-route-welcome .welcome-zipper-copy--left{
    right:calc(100% + 20px);
    text-align:center;
    transform:translate(-34px,-50%);
  }
  html[dir="rtl"] body.portiva-route-welcome .welcome-zipper-copy--right{
    text-align:center;
  }
  html[dir="rtl"] body.portiva-route-welcome .welcome-zipper-copy--left{
    text-align:center;
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="tree"].welcome-story-reveal:not(.welcome-story-reveal--visible),
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="projection"].welcome-story-reveal:not(.welcome-story-reveal--visible){
    transform:translateX(-72px) scale(.97);
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="overview"].welcome-story-reveal:not(.welcome-story-reveal--visible),
  body.portiva-route-welcome .welcome-story-scrolly__pies.welcome-story-reveal:not(.welcome-story-reveal--visible),
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="feed"].welcome-story-reveal:not(.welcome-story-reveal--visible){
    transform:translateX(72px) scale(.97);
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="manager"].welcome-story-reveal:not(.welcome-story-reveal--visible){
    transform:translateY(28px) scale(.98);
  }
  body.portiva-route-welcome .welcome-story-reveal--visible .welcome-zipper-copy{
    opacity:1;
    transform:translateY(-50%);
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="manager"]:not(.welcome-story-reveal--visible) .welcome-manager-plan--pie{
    opacity:.12;
    transform:translateX(-64px) scale(.98);
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="manager"]:not(.welcome-story-reveal--visible) .welcome-manager-tools__section-title,
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="manager"]:not(.welcome-story-reveal--visible) .welcome-manager-plan--tools{
    opacity:.12;
    transform:translateX(64px) scale(.98);
  }
  body.portiva-route-welcome .welcome-manager-plan--pie,
  body.portiva-route-welcome .welcome-manager-tools__section-title,
  body.portiva-route-welcome .welcome-manager-plan--tools{
    transition:
      opacity .72s ease,
      transform .82s cubic-bezier(.2,.75,.2,1);
  }
}
@media (min-width:901px) and (prefers-reduced-motion:reduce){
  body.portiva-route-welcome .welcome-story-reveal,
  body.portiva-route-welcome .welcome-manager-plan--pie,
  body.portiva-route-welcome .welcome-manager-tools__section-title,
  body.portiva-route-welcome .welcome-manager-plan--tools{
    opacity:1 !important;
    transform:none !important;
    transition:none !important;
  }
  body.portiva-route-welcome .welcome-zipper-copy{
    opacity:1;
    transform:translateY(-50%);
    transition:none;
  }
}
@media (max-width:900px) and (prefers-reduced-motion:no-preference){
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="tree"].welcome-story-reveal:not(.welcome-story-reveal--visible),
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="projection"].welcome-story-reveal:not(.welcome-story-reveal--visible){
    transform:translateX(-42px) scale(.975);
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="overview"].welcome-story-reveal:not(.welcome-story-reveal--visible),
  body.portiva-route-welcome .welcome-story-scrolly__pies.welcome-story-reveal:not(.welcome-story-reveal--visible),
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="feed"].welcome-story-reveal:not(.welcome-story-reveal--visible){
    transform:translateX(42px) scale(.975);
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="manager"]:not(.welcome-story-reveal--visible) .welcome-manager-plan--pie{
    opacity:.16;
    transform:translateX(-38px) scale(.98);
  }
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="manager"]:not(.welcome-story-reveal--visible) .welcome-manager-tools__section-title,
  body.portiva-route-welcome .welcome-story-step[data-welcome-chapter="manager"]:not(.welcome-story-reveal--visible) .welcome-manager-plan--tools{
    opacity:.16;
    transform:translateX(38px) scale(.98);
  }
  body.portiva-route-welcome .welcome-manager-plan--pie,
  body.portiva-route-welcome .welcome-manager-tools__section-title,
  body.portiva-route-welcome .welcome-manager-plan--tools{
    transition:
      opacity .68s ease,
      transform .78s cubic-bezier(.2,.75,.2,1);
  }
}
body.portiva-route-welcome #welcomeStoryScrolly,
body.portiva-route-welcome #welcomeOverviewMain{
  overflow-x:clip;
}
.welcome-structure-demo--highlighting .welcome-structure-node{
  opacity:0.38;
  transition:opacity 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.welcome-structure-demo--highlighting .welcome-structure-node--active{
  opacity:1;
  transform:scale(1.03);
  box-shadow:0 0 0 2px rgba(255,255,255,.28), 0 8px 24px rgba(0,0,0,.35);
}
body.portiva-route-welcome .welcome-structure-demo--highlighting .welcome-structure-demo__link{
  opacity:0.22;
  transition:opacity 0.35s ease, stroke-width 0.35s ease;
}
body.portiva-route-welcome .welcome-structure-demo__link--active{
  opacity:1;
  stroke-width:2.2;
}
.welcome-sticky-cta{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:40;
  padding:12px max(20px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  background:linear-gradient(to top, rgba(0,0,0,.94) 65%, rgba(0,0,0,0));
  pointer-events:none;
}
.welcome-sticky-cta:not([hidden]){
  pointer-events:auto;
}
.welcome-sticky-cta__inner{
  max-width:1100px;
  margin:0 auto;
}
body:has(main.welcome-plans-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.welcome-plans-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  overflow:visible;
}
.welcome-plans-page__content{
  position:relative;
  width:100%;
  max-width:min(1100px,100%);
  margin:0 auto;
  padding:0 4px;
  box-sizing:border-box;
}
.welcome-plans-page__inline-actions{
  margin-top:16px;
}
.welcome-plans-page .portiva-flow-page__scroll{
  gap:8px;
}
.welcome-plans-page.story-page .portiva-flow-page__scroll{
  flex:none;
  min-height:auto;
  max-height:none;
  height:auto;
  gap:0;
  padding-bottom:16px;
  overflow:visible;
  overscroll-behavior:auto;
  touch-action:auto;
}
.welcome-plans-page .portiva-flow-page__hero{
  margin:0 0 1rem;
}
.welcome-plans-page.story-page .portiva-flow-page__hero{
  margin:0;
}
.welcome-plans-page .portiva-flow-page__title{
  margin:0 0 4px;
  font-size:clamp(1.2rem,2.2vw,1.45rem);
}
.welcome-plans-page.story-page .portiva-flow-page__title{
  margin:0;
  font-size:clamp(1.35rem,2.5vw,1.65rem);
}
.welcome-plans-page .portiva-flow-page__lead{
  font-size:.86rem;
  line-height:1.35;
  margin:0 0 14px;
}
.welcome-plans-page__intro{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin:0 0 10px;
  font-size:.84rem;
  line-height:1.4;
  color:var(--text);
}
.welcome-plans-page__intro p{
  margin:0;
}
.welcome-plans-page__intro-block{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.welcome-plans-page__intro-block[hidden],
.welcome-plans-page__guest-copy[hidden],
#welcomePlansUsageText[hidden]{
  display:none !important;
}
.welcome-plans-page__guest-copy{
  display:flex;
  flex-direction:column;
  gap:.75rem;
  margin:0 0 1rem;
  font-size:.84rem;
  line-height:1.45;
  color:var(--text);
}
.welcome-plans-page__guest-lead{
  margin:0;
}
.welcome-plans-page__contact{
  margin:0 0 1rem;
}
.welcome-plans-page__intro-title{
  margin:0 0 4px;
  line-height:1.2;
  color:var(--text);
  font-weight:700;
}
.welcome-plans-page__envelope{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 2px;
  margin:0 1px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:inherit;
  font:inherit;
  font-size:1.05em;
  line-height:1;
  vertical-align:-.08em;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:.15em;
}
.welcome-plans-page__envelope:hover{
  opacity:.85;
}
.welcome-plans-page__envelope:focus-visible{
  outline:2px solid rgba(255,255,255,.42);
  outline-offset:2px;
}
.welcome-plans-page__tiers{
  margin:0;
}
.welcome-plans-page__tiers-title{
  margin:0 0 7px;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--muted);
}
.welcome-plans-page__tier-list{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:7px;
}
.welcome-plans-page__tier{
  margin:0;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:10px;
  font-size:.84rem;
  line-height:1.38;
  color:var(--text);
}
.welcome-plans-page__tier-note{
  display:block;
  margin-top:3px;
  font-size:.76rem;
  line-height:1.35;
  color:var(--muted);
}
.welcome-plans-page__guide{
  margin:14px 0 0;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.welcome-plans-page__guide-title{
  margin:0;
  font-size:.92rem;
  font-weight:600;
  color:var(--text);
}
.welcome-plans-page__guide-block{
  margin:0;
  padding:10px 12px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:8px;
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
}
.welcome-plans-page__guide-heading{
  margin:0 0 6px;
  font-size:.8rem;
  font-weight:600;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--muted);
}
.welcome-plans-page__guide-block p,
.welcome-plans-page__guide-footnote{
  margin:0;
  font-size:.82rem;
  line-height:1.45;
  color:var(--text);
}
.welcome-plans-page__guide-list{
  margin:0;
  padding:0 0 0 1.1em;
  font-size:.82rem;
  line-height:1.45;
  color:var(--text);
}
.welcome-plans-page__guide-list li + li{
  margin-top:4px;
}
.welcome-plans-page__every-plan-includes{
  margin:1em 0;
}
.welcome-plans-page__every-plan-includes-text{
  margin:0;
  font-size:.9rem;
  line-height:1.5;
  color:var(--text);
}
.welcome-plans-page__guide-footnote{
  margin-top:8px;
  color:var(--muted);
  font-size:.78rem;
}
.welcome-plans-page__matrix-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.welcome-plans-page__matrix{
  width:100%;
  min-width:280px;
  border-collapse:collapse;
  font-size:.78rem;
  line-height:1.35;
}
.welcome-plans-page__matrix th,
.welcome-plans-page__matrix td{
  padding:6px 8px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  text-align:left;
  vertical-align:top;
}
.welcome-plans-page__matrix thead th{
  font-weight:600;
  color:var(--muted);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
}
.welcome-plans-page__matrix tbody th{
  font-weight:500;
  color:var(--text);
}
.welcome-plans-page__matrix--roles{
  min-width:240px;
}
.welcome-plans-page__compare-section{
  margin:14px 0 14px;
}
.welcome-plans-page__compare-title{
  margin:0 0 4px;
  line-height:1.2;
  color:var(--text);
  font-weight:700;
}
.welcome-plans-page__compare-lead{
  margin:0 0 10px;
  font-size:.82rem;
  line-height:1.4;
  color:var(--muted);
}
.welcome-plans-page__pricing-compare{
  display:block;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
}
.welcome-plans-page__pricing-grid{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  font-size:.82rem;
  line-height:1.35;
}
.welcome-plans-page__pricing-grid th,
.welcome-plans-page__pricing-grid td{
  padding:10px 8px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  text-align:center;
  vertical-align:middle;
}
.welcome-plans-page__pricing-grid .welcome-plans-page__feature-col,
.welcome-plans-page__pricing-grid .welcome-plans-page__feature-label{
  text-align:start;
  width:22%;
}
.welcome-plans-page__pricing-grid thead th{
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
  vertical-align:bottom;
}
.welcome-plans-page__plan-name{
  display:block;
  font-size:.95rem;
  font-weight:700;
  color:var(--text);
  margin-bottom:4px;
}
.welcome-plans-page__plan-price{
  display:block;
  font-size:1.05rem;
  font-weight:700;
  color:var(--text);
  line-height:1.2;
}
.welcome-plans-page__plan-price-sub{
  display:block;
  margin-top:2px;
  font-size:.72rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.25;
}
.welcome-plans-page{
  --portiva-plans-picker-bg:var(--surface-list);
}
@media (min-width:901px){
  [data-theme="dawn"] .welcome-plans-page,
  [data-theme="day"] .welcome-plans-page,
  [data-theme="classic"] .welcome-plans-page{
    --portiva-plans-picker-bg:var(--surface-card);
  }
}
.welcome-plans-page__plan-picker{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin:0 0 18px;
}
.welcome-plans-page__subscription-actions{
  position:absolute;
  top:0;
  inset-inline-end:4px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
  margin:0;
}
.welcome-plans-page__subscription-actions .btn{
  width:auto;
  min-height:28px;
  padding:3px 8px;
  border:1px solid var(--stroke);
  border-radius:8px;
  background:var(--portiva-plans-picker-bg);
  color:var(--text);
  box-shadow:none;
  font-size:.68rem;
  white-space:nowrap;
}
.welcome-plans-page__subscription-actions .btn:hover:not(:disabled){
  background:var(--surface-list-hover);
}
@media (max-width:640px){
  .welcome-plans-page__plan-picker{
    margin-bottom:8px;
  }
  .welcome-plans-page__subscription-actions{
    position:static;
    justify-content:stretch;
    margin:0 0 12px;
  }
  .welcome-plans-page__subscription-actions .btn{
    flex:1 1 0;
    white-space:normal;
  }
}
.modal-box--welcome-plans-cancellation{
  width:min(500px,94vw);
}
.welcome-plans-cancellation-modal__status{
  text-align:center;
}
.welcome-plans-cancellation-modal__status .form-actions{
  margin-top:20px;
}
.welcome-plans-cancellation-modal__status .btn{
  width:100%;
}
@media (max-width:640px){
  #welcomePlansCancellationConfirm .form-actions,
  #welcomePlansResumeConfirm .form-actions,
  #welcomePlansCancelDowngradeConfirm .form-actions{
    flex-wrap:nowrap;
    gap:8px;
  }
  #welcomePlansCancellationConfirm .form-actions .btn,
  #welcomePlansResumeConfirm .form-actions .btn,
  #welcomePlansCancelDowngradeConfirm .form-actions .btn{
    flex:1 1 0;
    min-width:0;
    padding-inline:6px;
    font-size:.78rem;
  }
}
.welcome-plans-page__picker-btn{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:4px;
  min-height:5.5rem;
  padding:12px 10px;
  border-radius:10px;
  border:1px solid var(--stroke);
  background:var(--portiva-plans-picker-bg);
  color:var(--text);
  text-align:center;
  cursor:pointer;
  font:inherit;
  line-height:1.25;
  box-shadow:none;
}
.welcome-plans-page__picker-btn:hover:not(:disabled){
  background:var(--surface-list-hover);
}
.welcome-plans-page__picker-btn:disabled{
  cursor:default;
}
.welcome-plans-page__picker-btn--muted{
  opacity:.55;
}
.welcome-plans-page__picker-btn--current{
  border-color:transparent;
  background:hsl(138 48% 25%);
  color:#fff;
}
.welcome-plans-page__picker-btn--current:hover:not(:disabled){
  background:hsl(138 48% 25%);
}
.welcome-plans-page__picker-btn--current .welcome-plans-page__plan-price,
.welcome-plans-page__picker-btn--current .welcome-plans-page__plan-price-sub,
.welcome-plans-page__picker-btn--current .welcome-plans-page__picker-cta{
  color:#fff;
}
.welcome-plans-page__picker-current-line{
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:5px;
  min-width:0;
}
.welcome-plans-page__picker-current-price{
  color:#fff;
  font-size:.82rem;
  font-weight:600;
  white-space:nowrap;
}
.welcome-plans-page__picker-current-label{
  margin-top:3px;
  color:color-mix(in srgb, #fff 82%, transparent);
  font-size:.68rem;
  line-height:1.2;
}
.welcome-plans-page__picker-current-label--heading{
  margin-top:0;
  color:#fff;
}
.welcome-plans-page__picker-current-value{
  color:#fff;
  font-size:.82rem;
  font-weight:600;
  line-height:1.2;
}
.welcome-plans-page__picker-current-value--trial-end{
  margin-top:5px;
}
.welcome-plans-page__picker-upcoming{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:4px -10px -12px;
  padding:5px 20px 6px;
  border-inline:5px solid hsl(138 48% 25%);
  border-bottom:5px solid hsl(138 48% 25%);
  border-radius:6px 6px 7px 7px;
  background:hsl(138 42% 36%);
}
.welcome-plans-page__picker-upcoming .welcome-plans-page__picker-current-label{
  margin-top:0;
}
.welcome-plans-page__picker-cancelled{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:4px -10px -12px;
  padding:5px 4px 6px;
  border-inline:5px solid hsl(138 48% 25%);
  border-bottom:5px solid hsl(138 48% 25%);
  border-radius:6px 6px 7px 7px;
  background:hsl(138 42% 36%);
}
.welcome-plans-page__picker-cancelled .welcome-plans-page__picker-current-label{
  margin-top:0;
}
.welcome-plans-page__picker-upcoming .welcome-plans-page__picker-current-value{
  font-size:.74rem;
}
.welcome-plans-page__picker-upcoming-cancel{
  position:absolute;
  inset-inline-end:6px;
  top:5px;
  width:18px;
  height:18px;
  padding:0;
  border:0;
  background:transparent;
  color:#050505;
  font-size:.92rem;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}
.welcome-plans-page__picker-btn--current .welcome-plans-page__picker-cta{
  margin-top:auto;
}
.welcome-plans-page__picker-btn--current .welcome-plans-page__picker-current-label{
  color:color-mix(in srgb, #fff 88%, transparent);
}
.welcome-plans-page__picker-btn--current .welcome-plans-page__picker-name{
  color:#fff;
}
.welcome-plans-page__picker-btn--action.welcome-plans-page__picker-btn--current:not(:disabled){
  cursor:pointer;
  box-shadow:0 0 0 2px color-mix(in srgb, #fff 35%, transparent);
}
.welcome-plans-page__picker-btn--action.welcome-plans-page__picker-btn--current:not(:disabled):hover{
  filter:brightness(1.06);
}
.welcome-plans-page__picker-btn--upgrade,
.welcome-plans-page__picker-btn--downgrade,
.welcome-plans-page__picker-btn--downgrade-preview{
  border-color:var(--stroke);
  background:var(--portiva-plans-picker-bg);
}
.welcome-plans-page__picker-btn--upgrade:hover:not(:disabled),
.welcome-plans-page__picker-btn--downgrade:hover:not(:disabled){
  background:var(--surface-list-hover);
}
.welcome-plans-downgrade-modal__list{
  margin:0 0 16px;
  padding-inline-start:1.25rem;
  color:var(--text);
  line-height:1.45;
}
.welcome-plans-downgrade-modal__list li{
  margin:0 0 8px;
}
.welcome-plans-page__picker-btn--blocked{
  opacity:.72;
}
.welcome-plans-page__details-link-wrap{
  margin:1rem 0 12px;
}
.welcome-plans-page__details-link{
  font-size:.9rem;
  font-weight:600;
}
.plan-details-page__rows{
  display:flex;
  flex-direction:column;
  gap:20px;
  padding:0 0 24px;
}
.plan-details-page__row{
  padding:14px 16px;
  border-radius:var(--radius-sm);
  border:1px solid var(--stroke);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
}
.plan-details-page__row-title{
  margin:0 0 8px;
  font-size:1rem;
  font-weight:700;
}
.plan-details-page__row-body p{
  margin:0;
  line-height:1.55;
  color:var(--text);
}
/* Plan details: Feed-style bubble with whole-document scrolling. */
body:has(main.plan-details-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.plan-details-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  overflow:visible;
}
.plan-details-page .portiva-flow-page__scroll{
  flex:none;
  min-height:auto;
  max-height:none;
  height:auto;
  gap:0;
  padding-bottom:16px;
  overflow:visible;
  overscroll-behavior:auto;
  touch-action:auto;
}
.plan-details-page .portiva-flow-page__hero{
  margin:0;
}
.plan-details-page .portiva-flow-page__title{
  margin:0;
  font-size:clamp(1.35rem,2.5vw,1.65rem);
}
.plan-details-page .portiva-flow-page__lead{
  margin:0;
  font-size:.86rem;
  line-height:1.35;
}
.welcome-plans-page__picker-name{
  display:block;
  font-size:.95rem;
  font-weight:700;
}
.welcome-plans-page__picker-cta{
  display:block;
  margin-top:auto;
  padding-top:6px;
  font-size:.78rem;
  font-weight:600;
  color:var(--muted);
}
.welcome-plans-page__picker-valid-through{
  display:block;
  font-size:.68rem;
  line-height:1.2;
  color:var(--muted);
}
.welcome-plans-page__picker-btn .welcome-plans-page__plan-price{
  font-size:.92rem;
}
.welcome-plans-page__picker-btn .welcome-plans-page__plan-price-sub{
  font-size:.68rem;
}
.welcome-plans-page__feature-label{
  font-weight:500;
  color:var(--text);
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
}
.welcome-plans-page__plan-cell{
  background:var(--portiva-menu-surface, var(--portiva-field-bg));
}
.welcome-plans-page__mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-width:1.5em;
  font-weight:700;
  line-height:1;
}
.welcome-plans-page__mark--yes{
  color:#4ade80;
  font-size:1.15rem;
}
.welcome-plans-page__mark--no{
  color:rgba(248,113,113,.88);
  font-size:1.1rem;
}
.welcome-plans-page__mark--dash{
  color:var(--muted);
  font-weight:500;
}
.welcome-plans-page__mark--text{
  font-size:.84rem;
  font-weight:600;
  color:var(--text);
}
.welcome-plans-page__usage{
  margin:0 0 10px;
  font-size:.84rem;
  line-height:1.45;
  color:var(--text);
}
.welcome-plans-page .portiva-flow-page__footer{
  background:var(--portiva-canvas-bg, var(--bg0));
  border-top-color:transparent;
  box-shadow:none;
}
.welcome-plans-page__footer-actions{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  gap:10px;
}
.welcome-plans-page .portiva-flow-page__footer-actions .welcome-page__hero-signin,
.welcome-plans-page .portiva-flow-page__footer-actions .welcome-page__hero-plans,
.plan-details-page .portiva-flow-page__footer-actions .welcome-page__hero-plans{
  width:auto;
  max-width:none;
}
.welcome-overview-page__footer{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:120;
  margin:0;
  padding:10px max(20px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  border-top:1px solid rgba(255,255,255,.09);
  background:#000;
  box-shadow:0 -8px 22px rgba(0,0,0,.45);
}
.welcome-overview-page__bottom-contact{
  position:relative;
  z-index:130;
  display:flex;
  flex-direction:column;
  align-items:center;
  margin:100px auto 80px;
  color:var(--muted);
  font-size:clamp(.9rem, 2vw, 1rem);
  line-height:1.5;
  text-align:center;
}
.welcome-overview-page__bottom-contact-label{
  display:block;
  width:100%;
  text-align:center;
}
.welcome-overview-page__bottom-contact a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 4px;
  color:var(--accent);
  font-weight:650;
  pointer-events:auto;
  text-decoration:underline;
  text-underline-offset:3px;
}
.welcome-overview-page__footer-actions{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  gap:10px;
}
.welcome-overview-page__footer-actions .welcome-page__hero-signin,
.welcome-overview-page__footer-actions .welcome-page__hero-plans{
  width:auto;
  max-width:none;
}
/* Plans page: long guide — inner scroll on desktop, document flow on mobile */
#view:has(> main.welcome-plans-page){
  display:flex;
  flex-direction:column;
  min-height:0;
}
#view > main.welcome-plans-page{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.welcome-plans-page .portiva-flow-page__footer{
  flex:0 0 auto;
  margin-top:0;
  padding:10px 0 max(10px, env(safe-area-inset-bottom, 0px));
}
@media (min-width:900px){
  #view > main.welcome-plans-page{
    flex:1 1 0;
    overflow:hidden;
  }
  .welcome-plans-page.portiva-flow-page{
    flex:1 1 0;
    min-height:0;
    overflow:hidden;
  }
  .welcome-plans-page .portiva-flow-page__scroll{
    flex:1 1 0;
    min-height:0;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
    padding-bottom:0;
  }
  .welcome-plans-page .portiva-flow-page__footer{
    padding:12px 0 max(12px, env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width:899px){
  .welcome-plans-page__plan-picker{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
  }
  .welcome-plans-page__picker-btn{
    min-height:5rem;
    padding:10px 8px;
  }
  .welcome-plans-page__pricing-compare{
    margin-inline:-4px;
  }
  .welcome-plans-page__pricing-grid{
    min-width:0;
    width:100%;
    font-size:.68rem;
    line-height:1.25;
  }
  .welcome-plans-page__pricing-grid th,
  .welcome-plans-page__pricing-grid td{
    padding:5px 3px;
  }
  .welcome-plans-page__pricing-grid .welcome-plans-page__feature-col,
  .welcome-plans-page__pricing-grid .welcome-plans-page__feature-label{
    width:21%;
    padding-inline-start:4px;
    padding-inline-end:3px;
  }
  .welcome-plans-page__pricing-grid .welcome-plans-page__plan-col{
    width:19.75%;
  }
  .welcome-plans-page__plan-name{
    font-size:.72rem;
    margin-bottom:2px;
    line-height:1.15;
  }
  .welcome-plans-page__plan-price{
    font-size:.76rem;
    line-height:1.15;
  }
  .welcome-plans-page__plan-price-sub{
    font-size:.58rem;
    margin-top:1px;
    line-height:1.15;
  }
  .welcome-plans-page__feature-label{
    font-size:.66rem;
    line-height:1.25;
  }
  .welcome-plans-page__mark--yes{
    font-size:.92rem;
  }
  .welcome-plans-page__mark--no{
    font-size:.88rem;
  }
  .welcome-plans-page__mark--text{
    font-size:.66rem;
    font-weight:600;
  }
  body.portiva-route-welcome #view:has(> main.welcome-plans-page){
    flex:0 1 auto;
    overflow:visible;
  }
  #view > main.welcome-plans-page{
    flex:0 1 auto;
    overflow:visible;
  }
  .welcome-plans-page.portiva-flow-page{
    flex:0 1 auto;
    overflow:visible;
  }
  .welcome-plans-page .portiva-flow-page__scroll{
    flex:0 1 auto;
    overflow:visible;
    padding-bottom:0;
  }
  .welcome-plans-page .portiva-flow-page__footer{
    position:static;
    left:auto;
    right:auto;
    bottom:auto;
    z-index:auto;
    box-shadow:none;
  }
}
.welcome-page__email-intro{
  margin:0;
  width:100%;
  text-align:center;
  font-size:.88rem;
  color:var(--muted);
  line-height:1.4;
}
.welcome-page__email-hint{
  margin:0;
  width:100%;
  text-align:center;
  font-size:.8rem;
  line-height:1.45;
  color:var(--muted);
  opacity:.92;
  max-width:26rem;
}
.welcome-page__email-form{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  text-align:left;
  margin:0;
}
.welcome-auth-pwa-hint{
  margin:0 0 12px;
  padding:10px 12px;
  font-size:.82rem;
  line-height:1.45;
  color:var(--muted);
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--surface) 88%, var(--bg0));
}
.welcome-page__label{
  display:block;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--muted);
}
.welcome-page__input{
  width:100%;
  box-sizing:border-box;
  min-height:44px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--stroke);
  background:var(--bg0);
  color:var(--text);
  font:inherit;
  font-size:1rem;
}
@media (max-width:899px){
  .welcome-auth-page .welcome-page__input{
    font-size:16px;
  }
}
.welcome-page__input:focus{
  outline:2px solid var(--accent);
  outline-offset:1px;
}
.welcome-page__input:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.welcome-page__email-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:4px;
}
.welcome-page__email-signin{
  min-height:46px;
  font-weight:650;
}
.welcome-page__email-create{
  min-height:44px;
  font-weight:500;
}
.welcome-page__hero-foot{
  margin:0;
  font-size:.84rem;
}
.welcome-page__minimal-card .welcome-page__offline,
.welcome-page__minimal-card .welcome-page__err{
  width:100%;
  box-sizing:border-box;
  text-align:left;
}
.welcome-page--overview{
  flex:1;
  min-height:auto;
  padding:max(12px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(88px, calc(72px + env(safe-area-inset-bottom, 0px))) max(20px, env(safe-area-inset-left, 0px));
  gap:clamp(10px, 2.5vw, 16px);
  position:relative;
  background:transparent;
}
.welcome-page--overview .welcome-overview-grid{
  padding-bottom:clamp(32px, 6vh, 56px);
}
.welcome-page--overview .welcome-hub-hero-title{
  margin-top:clamp(36px, 11vw, 80px);
  margin-bottom:clamp(32px, 7vw, 48px);
}
.welcome-page--overview .welcome-hub-hero-title__kicker{
  color:#fff;
  font-size:clamp(1.08rem, 4vw, 1.55rem);
  letter-spacing:0.12em;
}
@media (max-width:900px){
  .welcome-page--overview .welcome-hub-hero-title{
    margin-top:0;
    margin-bottom:clamp(8px, 2.8vw, 16px);
  }
  .welcome-story--hero{
    gap:clamp(10px, 2.4vw, 14px);
  }
  .welcome-story-hero__note{
    margin-bottom:clamp(10px, 2.5vw, 16px);
  }
  .welcome-story-scrolly{
    --welcome-story-section-gap:clamp(14px, 3.2vw, 24px);
    --welcome-next-title-margin:clamp(34px, 7vw, 46px);
  }
  .welcome-story-scrolly__visual{
    margin-top:0;
  }
  .welcome-story-scrolly__visual .welcome-structure-demo--map{
    margin-top:0;
  }
  .welcome-structure-demo--map .welcome-structure-demo__heading{
    margin-top:clamp(26px, 6vw, 36px);
    margin-bottom:var(--welcome-title-bubble-gap);
  }
  .welcome-story-step[data-welcome-chapter="overview"] .welcome-story-step__title{
    margin-top:var(--welcome-next-title-margin);
    margin-bottom:0;
  }
  .welcome-story-step[data-welcome-chapter="overview"] + .welcome-story-scrolly__pies{
    margin-top:calc(var(--welcome-title-bubble-gap) - var(--welcome-story-section-gap));
  }
}
.welcome-overview-pies{
  width:100%;
  max-width:min(720px, 100%);
  margin:clamp(12px, 3vw, 22px) auto clamp(32px, 8vw, 56px);
  flex-shrink:0;
}
.welcome-overview-pies__row{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  justify-content:center;
  gap:clamp(8px, 3.2vw, 22px);
  width:100%;
}
.welcome-overview-pie{
  flex:1 1 0;
  min-width:0;
  max-width:min(200px, 32vw);
}
.welcome-overview-pie__chart-wrap{
  position:relative;
  width:100%;
  aspect-ratio:1;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.welcome-overview-pie__svg{
  width:100%;
  height:100%;
  display:block;
  flex-shrink:0;
  overflow:visible;
}
.welcome-overview-pie__spin{
  transform-origin:0 0;
}
.welcome-overview-pie__slice{
  stroke:none;
}
.welcome-overview-pie__hole{
  fill:#000;
}
.welcome-overview-pie__label{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:26%;
  font-size:clamp(0.58rem, 3.1vw, 0.82rem);
  font-weight:700;
  letter-spacing:0.05em;
  line-height:1.15;
  color:var(--text);
  pointer-events:none;
  z-index:1;
}
.welcome-orbit-section--footer{
  margin-top:auto;
  padding-top:clamp(20px, 5vw, 40px);
  margin-bottom:clamp(12px, 3vw, 24px);
}
.welcome-auth-sign-in-stack{
  display:flex;
  flex-direction:column;
  gap:14px;
  width:100%;
  box-sizing:border-box;
}
.welcome-auth-page .welcome-auth-guest-contact{
  margin:0;
  padding:0;
  background:transparent;
  border:0;
}
.welcome-auth-page .welcome-auth-guest-contact__summary{
  font-size:.84rem;
}
.welcome-auth-page .welcome-auth-bubble{
  width:100%;
  box-sizing:border-box;
  background:#0a0e14;
  border-color:rgba(255,255,255,.2);
}
.welcome-auth-bubble__inner{
  gap:var(--portiva-form-bubble-row-gap,8px);
}
.welcome-auth-bubble__inner .welcome-auth-tabs{
  margin:0 0 4px;
  padding:0;
}
.welcome-auth-panel{
  padding-top:4px;
}
.welcome-auth-panel__form{
  display:flex;
  flex-direction:column;
  gap:var(--portiva-form-bubble-row-gap,8px);
}
.welcome-auth-panel__submit{
  width:100%;
  min-height:38px;
  margin-top:0;
}
.welcome-auth-page__google{
  width:100%;
  min-height:40px;
  margin-top:10px;
  font-weight:650;
}
.welcome-auth-page .portiva-flow-page__footer-actions .btn{
  flex:0 0 auto;
  width:auto;
  min-width:min(140px, 42vw);
  max-width:100%;
}
.welcome-auth-page__footer-actions{
  justify-content:center;
}
.welcome-auth-page .portiva-flow-page__footer{
  background:#000;
  border-top-color:rgba(255,255,255,.14);
}
.welcome-auth-page .welcome-auth-bubble .field-input{
  padding:6px 10px;
  min-height:32px;
  line-height:1.25;
  font-size:16px;
  background:rgba(15,23,42,.72);
  border-color:rgba(255,255,255,.2);
  color:rgba(255,255,255,.96);
}
.welcome-auth-page .welcome-auth-bubble .field-input:focus{
  background:rgba(15,23,42,.88);
  border-color:rgba(255,255,255,.38);
  box-shadow:0 0 0 2px rgba(255,255,255,.12);
  outline:none;
}
.welcome-auth-page .btn--primary{
  border-color:rgba(255,255,255,.24);
  background:rgba(255,255,255,.1);
  color:var(--text);
}
.welcome-auth-page .btn--primary:hover:not(:disabled){
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.34);
}
.welcome-auth-page .btn--primary:focus-visible{
  outline:2px solid rgba(255,255,255,.42);
  outline-offset:2px;
  box-shadow:none;
}
.welcome-auth-page .welcome-auth-tabs__tab--active{
  color:#fff;
  border-bottom-color:rgba(255,255,255,.75);
}
.welcome-auth-page .welcome-auth-tabs__tab:focus-visible{
  outline:2px solid rgba(255,255,255,.4);
  outline-offset:-2px;
}
.welcome-auth-page .welcome-auth-forgot__link:focus-visible{
  outline:2px solid rgba(255,255,255,.4);
  outline-offset:2px;
}
.welcome-auth-page .welcome-auth-privacy-consent{
  grid-column:1 / -1;
  margin:4px 0 0;
}
/* Sign-in page: natural height (no fixed footer) */
body.portiva-route-welcome .app-shell:has(.welcome-auth-page){
  padding-bottom:max(28px, env(safe-area-inset-bottom, 0px));
}
#view:has(> main.welcome-auth-page){
  display:flex;
  flex-direction:column;
  min-height:0;
}
#view > main.welcome-auth-page{
  display:flex;
  flex-direction:column;
  flex:0 1 auto;
  min-height:0;
}
.welcome-auth-page.portiva-flow-page{
  flex:0 1 auto;
  min-height:0;
}
.welcome-auth-page .portiva-flow-page__scroll{
  flex:0 1 auto;
  min-height:0;
  overflow:visible;
  padding-bottom:max(64px, calc(env(safe-area-inset-bottom, 0px) + 48px));
  gap:8px;
}
.welcome-auth-page__offline{
  margin:0;
}
.welcome-auth-page .welcome-auth-bubble .modal-field{
  gap:6px;
  font-size:.82rem;
}
.welcome-auth-page .welcome-page__input{
  padding:6px 10px;
  min-height:32px;
  line-height:1.25;
}
@media (max-width:899px){
  .welcome-auth-page .welcome-auth-bubble.entityDetailsBubble.modal-form-group-bubble{
    padding:10px 12px;
  }
  .welcome-auth-page .portiva-flow-page__scroll{
    padding-bottom:max(72px, calc(env(safe-area-inset-bottom, 0px) + 56px));
  }
}
@media (min-width:900px){
  #view:has(> main.welcome-auth-page){
    overflow:visible;
    flex:0 1 auto;
  }
  #view > main.welcome-auth-page{
    overflow:visible;
    flex:0 1 auto;
  }
  .welcome-auth-page.portiva-flow-page{
    overflow:visible;
    flex:0 1 auto;
  }
  .welcome-auth-page .portiva-flow-page__scroll{
    overflow:visible;
    flex:0 1 auto;
  }
}
.welcome-hub-hero-title{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  width:100%;
  margin:0 auto;
  padding:0;
  gap:4px;
  flex-shrink:0;
}
.welcome-hub-hero-title__kicker{
  margin:0;
  font-family:var(--font);
  font-size:clamp(0.78rem,2.4vw,0.92rem);
  font-weight:700;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--muted);
  line-height:1.2;
}
.welcome-hub-hero-title__name{
  margin:0;
  font-family:var(--font);
  font-size:clamp(2.1rem, 4.8vw, 2.95rem);
  font-weight:800;
  letter-spacing:-0.04em;
  line-height:1.05;
  color:var(--text);
}
.welcome-hub-hero-title__line{
  margin:0;
  font-family:var(--font);
  font-size:clamp(1.05rem, 2.2vw, 1.38rem);
  font-weight:600;
  letter-spacing:0.06em;
  text-transform:none;
  color:var(--muted);
  line-height:1.2;
}
.welcome-orbit-section{
  margin:0 auto;
  width:100%;
  max-width:min(960px,100%);
  flex-shrink:0;
}
.welcome-orbit{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0;
  margin-top:0;
}
.welcome-orbit--hub-only,
.welcome-orbit--hub-row{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  width:100%;
  margin-top:0;
}
.welcome-orbit__hub-column{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}
.welcome-orbit__svg{
  width:min(268px,34vw);
  max-width:300px;
  height:auto;
  display:block;
  overflow:visible;
}
.welcome-demo-pie-slot{
  flex:1 1 0;
  min-width:0;
  max-width:min(200px,28vw);
  display:flex;
  justify-content:center;
}
.welcome-demo-pie-slot--left{
  justify-content:flex-end;
  margin-right:clamp(-12px,-1.5vw,-4px);
}
.welcome-demo-pie-slot--right{
  justify-content:flex-start;
  margin-left:clamp(-12px,-1.5vw,-4px);
}
.welcome-demo-pie-slot .welcome-demo-pie-card{
  width:100%;
  max-width:min(210px,100%);
  flex:none;
}
@keyframes welcome-orbit-spin{
  to{ transform:rotate(360deg); }
}
@keyframes welcome-orbit-counter{
  to{ transform:rotate(-360deg); }
}
.welcome-orbit__spin{
  transform-box:fill-box;
  transform-origin:0 0;
  animation:welcome-orbit-spin 48s linear infinite;
}
.welcome-orbit__counter{
  transform-box:fill-box;
  transform-origin:0 0;
  animation:welcome-orbit-counter 48s linear infinite;
}
/* Spinning rays→icons: hidden on all breakpoints (hub + demo pies only). */
.welcome-orbit__mobile-only{
  display:none !important;
}
@media (min-width:721px){
  .welcome-overview-pie{
    max-width:min(220px, 28vw);
  }
  .welcome-overview-pie__label{
    font-size:clamp(0.72rem, 1.35vw, 0.92rem);
    letter-spacing:0.06em;
  }
}
@media (min-width:821px){
  .welcome-page--overview .welcome-hub-hero-title{
    margin-top:0;
    margin-bottom:10px;
  }
  .welcome-page--overview{
    gap:4px;
    padding-top:max(4px, env(safe-area-inset-top, 0px));
  }
  .welcome-story--hero{
    gap:clamp(10px, 2vw, 14px);
  }
  .welcome-story-hero__note{
    margin-bottom:clamp(10px, 2vw, 14px);
  }
  .welcome-story-scrolly{
    --welcome-story-section-gap:clamp(18px, 3.5vw, 32px);
    --welcome-next-title-margin:clamp(28px, 4.5vw, 40px);
  }
  .welcome-story-step[data-welcome-chapter="overview"] .welcome-story-step__title{
    margin-top:var(--welcome-next-title-margin);
  }
  .welcome-overview-pies{
    max-width:min(800px, 100%);
  }
  .welcome-overview-pie{
    max-width:240px;
  }
  .welcome-orbit-section--footer .welcome-orbit__svg{
    width:min(300px, 32vw);
    max-width:340px;
  }
  .welcome-overview-grid{
    margin-top:0;
    gap:12px;
  }
  .welcome-page--overview .welcome-structure-demo + .welcome-page__signin-actions{
    margin-top:-44px;
  }
  .welcome-page--overview .welcome-page__signin-actions{
    margin-top:0;
    max-width:min(340px, 58%);
    margin-left:auto;
    margin-right:auto;
  }
  .welcome-page--overview .welcome-structure-demo{
    margin-top:16px;
  }
  .welcome-page--overview .welcome-page__structure-copy{
    margin-top:10px;
  }
  .welcome-page--overview .welcome-page__signin-actions + .welcome-page__structure-copy{
    margin-top:8px;
  }
  .welcome-overview-grid .welcome-data-note{
    margin-top:16px;
  }
  .welcome-overview-grid .welcome-page__signin-card,
  .welcome-overview-grid .welcome-data-note{
    padding:0;
    border:none;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
}
@media (min-width:901px){
  .welcome-page--overview .welcome-page__copy-block{
    width:100%;
    max-width:100%;
    margin-left:auto;
    margin-right:auto;
    text-align:left;
  }
  .welcome-page--overview .welcome-page__copy-block h1{
    max-width:none;
    width:100%;
    text-align:center;
    white-space:nowrap;
  }
  .welcome-page--overview .welcome-page__copy-block .welcome-page__list{
    width:fit-content;
    max-width:100%;
    margin-left:auto;
    margin-right:auto;
    padding-left:1.15rem;
    text-align:left;
    list-style-position:outside;
  }
  .welcome-page--overview .welcome-page__copy-block .welcome-page__list li{
    white-space:nowrap;
  }
  .welcome-page--overview .welcome-page__copy-block > .welcome-page__intro{
    max-width:none;
    width:100%;
    text-align:center;
    white-space:nowrap;
  }
  .welcome-page--overview .welcome-page__structure-title{
    width:100%;
    text-align:center;
    white-space:nowrap;
    margin-bottom:4px;
  }
  .welcome-page--overview .welcome-page__structure-footnote{
    max-width:none;
    width:100%;
    text-align:center;
    white-space:nowrap;
    margin-top:0;
  }
  .welcome-page--overview .welcome-data-note__title,
  .welcome-page--overview .welcome-data-note > p{
    max-width:none;
    width:100%;
    text-align:center;
    white-space:nowrap;
  }
}
/* Hub demo pie: rotation is SMIL animateTransform (rotate … 0 0) so it spins in place on the logo, not CSS pivot. */
.welcome-orbit__ray{
  fill:none;
  stroke:color-mix(in srgb,var(--accent) 45%,var(--stroke) 55%);
  stroke-width:2.25;
  stroke-linecap:round;
  opacity:0.92;
}
.welcome-orbit__marker-path{
  fill:var(--accent);
}
.welcome-orbit__badge{
  fill:var(--surface-card);
  stroke:color-mix(in srgb,var(--accent) 55%,var(--stroke));
  stroke-width:2;
  filter:drop-shadow(0 4px 14px rgba(15,23,42,.14));
}
.welcome-orbit__hub{
  pointer-events:none;
}
.welcome-orbit__hub foreignObject{
  overflow:visible;
}
.welcome-orbit__brand-moat{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  box-sizing:border-box;
}
.welcome-orbit__brand-moat--hub-logo{
  align-items:center;
  justify-content:center;
}
.welcome-orbit__brand{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
  line-height:1.1;
  color:var(--text);
  max-width:100%;
}
.welcome-orbit__brand-mark{
  flex-shrink:0;
  width:34px;
  height:34px;
  border-radius:11px;
  background:var(--brand-mark-bg);
  display:grid;
  place-items:center;
  font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  font-weight:800;
  font-size:1.15rem;
  line-height:1;
  color:var(--brand-mark-fg);
  box-shadow:0 4px 18px var(--brand-mark-shadow);
}
.welcome-orbit__brand-mark.welcome-orbit__brand-mark--hub{
  width:var(--portiva-brand-mark-size);
  height:var(--portiva-brand-mark-size);
  border-radius:var(--portiva-brand-mark-radius);
  font-size:var(--portiva-brand-mark-font);
  line-height:1;
  letter-spacing:-0.02em;
}
.welcome-orbit__brand-text{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:0;
  text-align:left;
}
.welcome-orbit__brand-text strong{
  font-family:var(--font);
  font-size:0.78rem;
  font-weight:700;
  letter-spacing:-0.02em;
  color:var(--text);
}
.welcome-orbit__brand-tagline{
  font-family:var(--font);
  font-size:0.58rem;
  font-weight:500;
  letter-spacing:0.04em;
  color:var(--muted);
  line-height:1.15;
}
.welcome-orbit__sym{
  pointer-events:none;
  color:var(--text);
}
.welcome-orbit__sym-svg{
  display:block;
  overflow:visible;
}
.welcome-orbit__hub-pie-slice{
  stroke:#0f172a;
  stroke-width:1.45;
  paint-order:stroke fill;
}
@media (prefers-reduced-motion:reduce){
  .welcome-orbit__spin,
  .welcome-orbit__counter{
    animation:none !important;
  }
}
.welcome-overview-grid{
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:stretch;
  margin-top:0;
}
.welcome-overview-grid .welcome-data-note{
  margin-top:clamp(24px, 6vw, 40px);
}
.modal-tabs{
  display:flex;
  gap:0;
  margin:14px 0 0;
  padding:0;
  border-bottom:1px solid var(--stroke);
}
.modal-tabs__tab{
  flex:1;
  margin:0;
  padding:10px 12px 11px;
  border:0;
  border-radius:0;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:.9rem;
  font-weight:500;
  text-align:center;
  cursor:pointer;
  transition:color .15s ease, border-color .15s ease;
}
.modal-tabs__tab:hover:not(:disabled){
  color:var(--text);
}
.modal-tabs__tab--active{
  color:var(--text);
  font-weight:600;
  border-bottom-color:var(--accent);
  background:transparent;
}
.csv-transfer-panels,
.restore-backup-panels{
  display:grid;
  grid-template:1fr / 1fr;
  align-items:start;
}
.csv-transfer-panels > .csv-transfer-panel,
.restore-backup-panels > .restore-backup-panel{
  grid-area:1 / 1;
  min-width:0;
}
.csv-transfer-panels > .csv-transfer-panel[hidden],
.restore-backup-panels > .restore-backup-panel[hidden]{
  display:block !important;
  visibility:hidden;
  pointer-events:none;
  z-index:0;
}
.csv-transfer-panels > .csv-transfer-panel:not([hidden]),
.restore-backup-panels > .restore-backup-panel:not([hidden]){
  visibility:visible;
  pointer-events:auto;
  z-index:1;
}
.csv-transfer-panel,
.restore-backup-panel{
  padding-top:14px;
}
/* Welcome contact / auth-error modals (sign-in uses #/signin full page) */
#welcomeContactModal.modal-overlay,
#welcomeAuthErrorModal.modal-overlay{
  align-items:flex-start;
  justify-content:center;
  padding:max(16px, min(10vh, 72px)) 20px max(24px, 10vh);
  overflow-y:auto;
  overflow-x:hidden;
  background:rgba(2,6,14,.86);
  backdrop-filter:blur(10px);
}
[data-theme="dawn"] #welcomeContactModal.modal-overlay,
[data-theme="day"] #welcomeContactModal.modal-overlay,
[data-theme="classic"] #welcomeContactModal.modal-overlay,
[data-theme="dawn"] #welcomeAuthErrorModal.modal-overlay,
[data-theme="day"] #welcomeAuthErrorModal.modal-overlay,
[data-theme="classic"] #welcomeAuthErrorModal.modal-overlay{
  background:rgba(15,23,42,.78);
}
#welcomeContactModal .modal-box--welcome-contact,
#welcomeAuthErrorModal .modal-box--welcome-auth-error{
  width:min(440px, 94vw);
  max-width:94vw;
  max-height:none;
  margin:0;
  overflow:visible;
  overflow-anchor:none;
  background:rgba(8,12,22,.97);
  border-color:rgba(148,163,184,.22);
  box-shadow:0 28px 80px rgba(0,0,0,.68);
}
[data-theme="dawn"] #welcomeContactModal .modal-box--welcome-contact,
[data-theme="day"] #welcomeContactModal .modal-box--welcome-contact,
[data-theme="classic"] #welcomeContactModal .modal-box--welcome-contact,
[data-theme="dawn"] #welcomeAuthErrorModal .modal-box--welcome-auth-error,
[data-theme="day"] #welcomeAuthErrorModal .modal-box--welcome-auth-error,
[data-theme="classic"] #welcomeAuthErrorModal .modal-box--welcome-auth-error{
  background:rgba(15,23,42,.96);
}
.welcome-auth-panels{
  display:grid;
  grid-template:1fr / 1fr;
  align-items:start;
}
.welcome-auth-panels > .welcome-auth-panel{
  grid-area:1 / 1;
  min-width:0;
}
.welcome-auth-panels > .welcome-auth-panel[hidden]{
  display:block !important;
  visibility:hidden;
  pointer-events:none;
  z-index:0;
}
.welcome-auth-panels > .welcome-auth-panel:not([hidden]){
  visibility:visible;
  pointer-events:auto;
  z-index:1;
}
.welcome-auth-forgot-panel[hidden]:not(.welcome-auth-forgot-panel--open){
  display:none !important;
}
.welcome-auth-forgot-panel{
  display:grid;
  grid-template-rows:0fr;
  margin:0;
  overflow:hidden;
  transition:grid-template-rows .22s ease-out, margin .22s ease-out;
}
.welcome-auth-forgot-panel--open{
  grid-template-rows:1fr;
  margin:8px 0 0;
}
.welcome-auth-forgot-panel__inner{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-height:0;
  overflow:hidden;
  padding:0;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  transition:padding .22s ease-out, border-color .22s ease-out, background .22s ease-out;
}
.welcome-auth-forgot-panel--open .welcome-auth-forgot-panel__inner{
  padding:10px 12px;
  border-color:var(--stroke);
  background:rgba(34,211,238,.06);
}
.modal-box--welcome-auth{
  max-height:min(92vh, 920px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.modal-box--csv-transfer,
.modal-box--welcome-contact{
  max-height:min(90vh, 880px);
  overflow-y:auto;
}
.welcome-auth-tabs{
  display:flex;
  gap:0;
  margin:0;
  padding:0;
  border-bottom:1px solid var(--portiva-tab-bar-border, rgba(255,255,255,.14));
}
.welcome-auth-tabs__tab{
  flex:1;
  margin:0;
  padding:10px 12px 11px;
  border:0;
  border-radius:0;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
  background:transparent;
  color:var(--portiva-tab-fg, var(--muted));
  font:inherit;
  font-size:.9rem;
  font-weight:500;
  text-align:center;
  cursor:pointer;
  transition:color .15s ease, border-color .15s ease;
}
.welcome-auth-tabs__tab:hover:not(:disabled){
  color:var(--portiva-tab-fg-hover, var(--text));
}
.welcome-auth-tabs__tab--active{
  color:var(--portiva-tab-fg-active, rgba(255,255,255,.95));
  font-weight:600;
  border-bottom-color:var(--portiva-tab-indicator, var(--accent));
  background:transparent;
}
.welcome-auth-page .welcome-auth-tabs__tab--active{
  color:#fff;
  border-bottom-color:rgba(255,255,255,.75);
}
.welcome-auth-page .welcome-auth-tabs__tab{
  font-size:1rem;
  font-weight:600;
  color:rgba(255,255,255,.9);
}
.welcome-auth-page .welcome-auth-tabs__tab:hover:not(:disabled){
  color:#fff;
}
.welcome-auth-page .welcome-auth-privacy-note{
  color:rgba(255,255,255,.65);
  text-align:center;
}
.welcome-auth-tabs__tab:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:-2px;
}
.welcome-auth-page .welcome-auth-tabs__tab:focus-visible{
  outline:2px solid rgba(255,255,255,.4);
  outline-offset:-2px;
}
.welcome-billing-note{
  padding:18px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:var(--glass);
}
.welcome-billing-note__tiers{
  margin:8px 0 10px;
  padding-left:1.2rem;
}
.welcome-billing-note__fine{
  margin:0;
  font-size:.86rem;
  color:var(--muted);
}
.welcome-contact-fab{
  position:fixed;
  right:max(16px, env(safe-area-inset-right));
  bottom:max(16px, env(safe-area-inset-bottom));
  z-index:40;
  width:52px;
  height:52px;
  border-radius:50%;
  border:1px solid var(--stroke);
  background:var(--glass);
  box-shadow:var(--shadow);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:inherit;
}
.welcome-contact-fab__icon{
  font-size:1.35rem;
  line-height:1;
}
.support-user-group__usage{
  margin:0 0 10px;
  font-size:.82rem;
  color:var(--muted);
}
.modal-field-hint{
  display:block;
  margin-top:6px;
  font-size:.82rem;
  color:var(--muted);
}
.welcome-page__signin-card,
.welcome-demo-pie-card,
.welcome-data-note{
  padding:18px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:var(--glass);
  box-shadow:var(--shadow);
}
.welcome-page__signin-card{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  width:100%;
  gap:10px;
}
.welcome-page__signin-card h1{
  margin:0;
  max-width:66rem;
  font-size:clamp(1.3rem,2.2vw,1.5rem);
  line-height:1.12;
  letter-spacing:-.03em;
}
.welcome-page__copy-block h1{
  margin-bottom:1em;
}
.welcome-page__kicker{
  margin:0;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
.welcome-page__intro{
  margin:0;
  max-width:72rem;
  color:var(--muted);
  line-height:1.55;
}
.welcome-data-note{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.welcome-data-note h2,
.welcome-data-note__title{
  margin:0;
  font-size:clamp(1.15rem,1.9vw,1.35rem);
  line-height:1.15;
  letter-spacing:-.03em;
}
.welcome-data-note p{
  margin:0;
  max-width:72rem;
  color:var(--muted);
  line-height:1.55;
}
.welcome-data-note .welcome-page__kicker{
  color:var(--muted);
}
.welcome-overview-bubbles{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
  max-width:min(960px, calc(100% - 2rem));
  margin:clamp(20px, 4vw, 32px) auto clamp(24px, 5vw, 40px);
  box-sizing:border-box;
}
.welcome-overview-bubbles .welcome-overview-bubble{
  margin-bottom:0;
  padding:16px 18px;
  border-radius:14px;
  background:var(--glass);
  box-shadow:var(--shadow);
}
.welcome-overview-bubble__text{
  margin:0;
  max-width:72rem;
  color:var(--muted);
  line-height:1.55;
}
.welcome-overview-bubble__text + .welcome-overview-bubble__text{
  margin-top:8px;
}
.welcome-overview-bubbles .welcome-manager-plan{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0;
  max-width:none;
  padding:16px 18px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:var(--glass);
  box-shadow:var(--shadow);
  box-sizing:border-box;
}
.welcome-manager-plan__title{
  margin:0;
  font-size:clamp(1.15rem, 1.9vw, 1.35rem);
  line-height:1.15;
  letter-spacing:-.03em;
}
.welcome-manager-plan__lead,
.welcome-manager-plan__footnote{
  margin:0;
  max-width:72rem;
  color:var(--muted);
  line-height:1.55;
}
.welcome-manager-plan__example{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:4px;
  padding:14px 14px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:var(--surface);
}
.welcome-manager-plan__entity{
  margin:0;
  font-size:.92rem;
  font-weight:700;
  letter-spacing:-.02em;
}
.welcome-manager-plan__entity-total{
  margin:-4px 0 0;
  font-size:.84rem;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  color:var(--muted);
}
.welcome-manager-plan__shares{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.welcome-manager-plan__share-row{
  display:flex;
  align-items:center;
  gap:.65rem;
  min-width:0;
}
.welcome-manager-plan__share-name{
  flex:0 0 min(9.5rem, 38%);
  min-width:0;
  font-size:.88rem;
  font-weight:600;
  line-height:1.25;
}
.welcome-manager-plan__share-track{
  display:flex;
  align-items:center;
  gap:.45rem;
  flex:1 1 auto;
  min-width:0;
}
.welcome-manager-plan__share-bar{
  flex:1 1 auto;
  min-width:2.5rem;
  max-width:14rem;
  height:.55rem;
  border-radius:999px;
  background:var(--surface-btn);
  border:1px solid var(--stroke);
  overflow:hidden;
}
.welcome-manager-plan__share-bar-fill{
  display:block;
  width:0;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, #22c55e, #16a34a);
  transition:width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.welcome-manager-plan--animate .welcome-manager-plan__share-bar-fill{
  width:var(--share-target, 0%);
}
@media (prefers-reduced-motion:reduce){
  .welcome-manager-plan__share-bar-fill{
    width:var(--share-target, 0%);
    transition:none;
  }
}
.welcome-manager-plan__share-pct{
  flex:0 0 auto;
  min-width:2.5rem;
  text-align:end;
  font-size:.84rem;
  font-variant-numeric:tabular-nums;
  color:var(--muted);
}
.welcome-manager-plan__share-amt{
  flex:0 0 auto;
  min-width:4.75rem;
  text-align:end;
  font-size:.84rem;
  font-weight:600;
  font-variant-numeric:tabular-nums;
}
.welcome-manager-plan__visuals{
  display:flex;
  flex-direction:column;
  gap:14px;
  align-items:stretch;
  margin-top:4px;
  min-width:0;
}
.welcome-manager-plan__visuals .welcome-overview-pie-demo{
  margin-top:0;
  width:100%;
}
.welcome-manager-maps{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
  padding:10px 12px 8px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:var(--surface);
}
.welcome-manager-maps__title{
  margin:0 0 2px;
  font-size:.88rem;
  font-weight:700;
  letter-spacing:-.02em;
}
/* Mobile welcome: space between "Investor share map" title and the map graphic. */
@media (max-width:900px){
  body.portiva-route-welcome .welcome-manager-maps__title{
    margin:0 0 20px;
  }
  body.portiva-route-welcome .welcome-manager-maps{
    gap:0;
    padding:10px 12px 0;
  }
  body.portiva-route-welcome .welcome-manager-maps__map-host .home-hier-tree__branch-stack{
    padding-bottom:0 !important;
  }
  body.portiva-route-welcome .welcome-manager-maps__map-host.welcome-embedded-map--scaled{
    margin-bottom:-2px;
  }
  body.portiva-route-welcome .welcome-manager-plan__visuals{
    gap:14px;
    margin-bottom:0;
  }
  body.portiva-route-welcome .welcome-manager-plan__example{
    margin-top:14px;
  }
}
/* Embedded investor-map host: product map page rules apply; neutralize full-page chrome. */
.welcome-manager-maps__map-host.home-hier-tree-page{
  flex:none;
  min-height:0;
  margin:0;
  padding:0;
  overflow:visible;
  background:transparent;
  display:flex;
  justify-content:center;
  width:100%;
}
.welcome-manager-maps__map-host.home-hier-tree-page > .home-hier-tree-panel{
  flex:none;
  min-height:0;
  overflow:visible;
  margin-inline:auto;
  max-width:100%;
}
.welcome-manager-maps__map-host.home-hier-tree-page .home-hier-tree__main{
  flex:none;
  min-height:0;
  overflow:visible;
  touch-action:auto;
  overscroll-behavior:unset;
  display:flex;
  justify-content:center;
  width:100%;
  max-width:100%;
}
.welcome-manager-maps__map-host .home-hier-tree__view-root{
  display:none;
  margin:0;
}
.welcome-manager-maps__map-host .home-hier-tree-panel .home-hier-tree__stage{
  min-height:0;
  margin-inline:auto;
}
.welcome-manager-maps__map-host .home-hier-tree__layers{
  align-items:center;
  margin:0;
  padding:0;
}
.welcome-manager-maps__map-host .home-hier-tree__branch-stack{
  padding-top:0 !important;
  padding-bottom:6px;
  padding-left:0;
  padding-right:0;
  margin-inline:auto;
}
.welcome-manager-maps__map-host .home-hier-tree-panel--investor-map-side-by-side .home-hier-tree__investor-maps-row{
  gap:clamp(.5rem, 2vw, 1.25rem);
  margin-inline:auto;
  padding:0;
  justify-content:center;
}
/* Investor root chip — mirrors pm-sharing.css (#homeHierTreePanel rule). */
.welcome-manager-maps__map-host.home-hier-tree-page #welcomeManagerMapPanel.home-hier-tree-panel--investor-map-session .home-hier-tree__row--root button.home-hier-tree-node.home-hier-tree-node--folder.welcome-structure-node--folder{
  max-width:9.5rem;
  min-height:28px;
  height:auto;
  max-height:32px;
  padding:2px 8px;
  font-size:clamp(0.62rem, 2.2vw, 0.72rem);
  font-weight:500;
  background:hsl(82 26% 38% / 0.82);
  border:1px solid rgba(255,255,255,.58);
  color:var(--text, #f1f5f9);
  box-shadow:0 0 0 1px rgba(255,255,255,.22);
}
.welcome-manager-maps__map-host .home-hier-tree-node{
  pointer-events:none;
  cursor:default;
}
@media (max-width:900px){
  .welcome-manager-maps__map-host .home-hier-tree-panel--investor-map-side-by-side .home-hier-tree__investor-map-col{
    min-width:6.75rem;
    max-width:9.5rem;
  }
}
@media (min-width:901px){
  .welcome-manager-maps{
    align-items:center;
    padding-top:14px;
    padding-bottom:12px;
  }
  .welcome-manager-maps__title{
    width:100%;
    text-align:start;
    margin:0 0 14px;
  }
  .welcome-manager-maps__map-host.home-hier-tree-page{
    width:100%;
    display:flex;
    justify-content:center;
  }
  .welcome-manager-maps__map-host.home-hier-tree-page > .home-hier-tree-panel{
    margin-left:auto;
    margin-right:auto;
  }
  .welcome-manager-maps__map-host .home-hier-tree__main{
    display:flex;
    justify-content:center;
  }
  .welcome-manager-maps__map-host .home-hier-tree-panel .home-hier-tree__stage{
    margin-left:auto;
    margin-right:auto;
  }
  .welcome-manager-maps__map-host .home-hier-tree__layers{
    align-items:center;
  }
  .welcome-manager-maps__map-host .home-hier-tree__branch-stack{
    margin-left:auto;
    margin-right:auto;
  }
  .welcome-manager-maps__map-host .home-hier-tree-panel--investor-map-side-by-side .home-hier-tree__investor-maps-row{
    justify-content:center;
    margin-left:auto;
    margin-right:auto;
  }
  .welcome-manager-plan__example{
    align-items:center;
  }
  .welcome-manager-plan__example-heading{
    width:100%;
    align-self:stretch;
    text-align:start;
  }
  .welcome-manager-plan__entity,
  .welcome-manager-plan__entity-total{
    width:100%;
    text-align:center;
  }
  .welcome-manager-plan__shares{
    width:100%;
    max-width:min(32rem, 100%);
    margin-left:auto;
    margin-right:auto;
    align-items:stretch;
  }
  .welcome-manager-plan__share-row{
    justify-content:center;
  }
  .welcome-manager-plan__share-name{
    flex:0 0 min(8.5rem, 34%);
    text-align:start;
  }
  .welcome-manager-plan__share-track{
    flex:0 1 min(18rem, 58%);
    justify-content:center;
  }
}
.welcome-manager-plan__example-heading{
  margin:0;
  font-size:.95rem;
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.25;
}
.welcome-page__signin-card .welcome-page__email-form{
  max-width:430px;
}
.welcome-page__signin-card .welcome-page__email-intro,
.welcome-page__signin-card .welcome-page__email-hint{
  text-align:left;
}
.welcome-demo-pies{
  display:flex;
  flex-direction:row;
  gap:16px;
  margin-top:16px;
}
.welcome-demo-pie-card{
  flex:1 1 0;
  min-width:0;
}
.welcome-demo-pie{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.welcome-demo-pie__heading{
  margin:0;
  width:100%;
  text-align:center;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  line-height:1.15;
}
.welcome-demo-pie__chart{
  width:160px;
  height:160px;
  border-radius:50%;
  border:1px solid var(--stroke);
  box-shadow:inset 0 0 0 20px var(--bg0);
  flex-shrink:0;
}
.welcome-orbit--hub-row .welcome-demo-pie{
  gap:6px;
}
.welcome-orbit--hub-row .welcome-demo-pie__heading{
  font-size:.62rem;
  letter-spacing:.1em;
}
.welcome-orbit--hub-row .welcome-demo-pie__chart{
  width:92px;
  height:92px;
  box-shadow:inset 0 0 0 12px var(--bg0);
}
.welcome-orbit--hub-row .welcome-demo-pie-card{
  padding:12px 14px;
}
@media (max-width:820px){
  .welcome-page--overview{
    gap:6px;
    padding-top:max(0px, env(safe-area-inset-top, 0px));
  }
  .welcome-page--overview .welcome-hub-hero-title{
    margin-top:0;
    margin-bottom:clamp(8px, 2.8vw, 16px);
  }
  .welcome-overview-pies{
    max-width:100%;
    padding:0 clamp(2px, 1vw, 8px);
    box-sizing:border-box;
    margin-top:clamp(10px, 2.8vw, 18px);
    margin-bottom:clamp(28px, 7.5vw, 48px);
  }
  .welcome-orbit-section--footer{
    max-width:min(560px, 100%);
  }
  .welcome-orbit-section--footer .welcome-orbit__svg{
    width:min(280px, 76vw);
    max-width:320px;
  }
  .welcome-overview-grid{
    margin-top:0;
  }
  .welcome-overview-grid .welcome-page__signin-card,
  .welcome-overview-grid .welcome-data-note{
    padding:0;
    border:none;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
}
@media (max-width:520px){
  .welcome-page--overview{
    gap:4px;
  }
  .welcome-orbit__svg{
    width:min(360px,94vw);
  }
  .welcome-orbit__sym{
    transform:scale(0.92);
  }
  .welcome-overview-grid .welcome-page__signin-card,
  .welcome-overview-grid .welcome-data-note{
    padding:0;
    border:none;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
  .welcome-orbit--hub-row .welcome-demo-pie-card{
    border-radius:0;
  }
  .welcome-page__signin-card h1{
    font-size:1.14rem;
  }
  .welcome-page__intro{
    font-size:.86rem;
    line-height:1.45;
  }
  .welcome-data-note p{
    font-size:.86rem;
    line-height:1.45;
  }
  .welcome-demo-pies{
    gap:8px;
  }
}
.welcome-page--portal{
  max-width:1120px;
}
.welcome-page__mast{
  padding-bottom:4px;
  border-bottom:1px solid rgba(148,163,184,.28);
}
.welcome-page__brand-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px 20px;
}
.welcome-page__brand-row .brand{
  margin:0;
}
.welcome-page__signin{
  font-weight:600;
  min-height:40px;
  padding-left:18px;
  padding-right:18px;
}
.welcome-page__submast{
  margin:10px 0 0;
  font-size:.84rem;
  color:var(--muted);
  letter-spacing:0.01em;
}
.welcome-page__diagram{
  margin:0;
}
.welcome-page__diagram-note{
  margin:0 0 10px;
  font-size:.78rem;
  color:var(--muted);
  text-align:center;
  letter-spacing:0.02em;
}
.welcome-diagram{
  width:100%;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.35);
  background:linear-gradient(180deg, rgba(255,255,255,.04), transparent 40%);
  padding:12px 10px 8px;
  box-sizing:border-box;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.welcome-diagram svg{
  display:block;
  width:100%;
  min-width:420px;
  height:auto;
  vertical-align:top;
}
.welcome-diagram .wgate-zone{
  fill:rgba(148,163,184,.12);
  stroke:rgba(148,163,184,.28);
  stroke-width:1;
}
.welcome-diagram .wgate-region{
  fill:var(--muted);
  font-size:10px;
  font-weight:700;
  letter-spacing:0.16em;
  font-family:var(--font);
}
.welcome-diagram .wgate-entity{
  fill:var(--surface);
  stroke:rgba(59,130,246,.45);
  stroke-width:1.5;
}
.welcome-diagram .wgate-entity--sub{
  stroke:rgba(139,92,246,.55);
  stroke-dasharray:4 3;
}
.welcome-diagram .wgate-entity-t{
  fill:var(--text);
  font-size:12px;
  font-weight:650;
  font-family:var(--font);
}
.welcome-diagram .wgate-entity-sub{
  fill:var(--muted);
  font-size:10px;
  font-family:var(--font);
}
.welcome-diagram .wgate-asset{
  fill:rgba(16,185,129,.1);
  stroke:rgba(16,185,129,.42);
  stroke-width:1.25;
}
.welcome-diagram .wgate-asset-t{
  fill:var(--text);
  font-size:11px;
  font-weight:600;
  font-family:var(--font);
}
.welcome-diagram .wgate-asset-t2{
  fill:var(--muted);
  font-size:9.5px;
  font-family:var(--font);
}
.welcome-diagram .wgate-edge{
  fill:none;
  stroke:rgba(100,116,139,.55);
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.welcome-diagram .wgate-cap{
  fill:var(--muted);
  font-size:9px;
  font-weight:700;
  letter-spacing:0.12em;
  text-transform:uppercase;
  font-family:var(--font);
}
.welcome-page__columns{
  display:grid;
  grid-template-columns:1.25fr 0.95fr;
  gap:28px 32px;
  align-items:start;
}
.welcome-page__columns.welcome-page__columns--simple{
  grid-template-columns:1fr;
  max-width:52rem;
}
.welcome-page__col--full{
  max-width:40rem;
}
@media (max-width:820px){
  .welcome-page__columns{
    grid-template-columns:1fr;
  }
}
.welcome-page__col .welcome-page__title{
  margin:0 0 10px;
  font-size:1.35rem;
  font-weight:700;
  letter-spacing:-0.03em;
}
.welcome-page__lead{
  font-size:.98rem;
  line-height:1.55;
  margin:0 0 12px;
  color:var(--text);
}
.welcome-page__col p{
  margin:0 0 12px;
  line-height:1.55;
  color:var(--text);
  font-size:.9rem;
}
.welcome-page__h2{
  margin:0 0 10px;
  font-size:.95rem;
  font-weight:650;
}
.welcome-page__list{
  margin:0 0 12px;
  padding-left:1.15rem;
  line-height:1.55;
  color:var(--muted);
  font-size:.88rem;
}
.welcome-page__list strong{
  color:var(--text);
  font-weight:650;
}
.welcome-page__hint{
  margin:0;
  font-size:.82rem;
  color:var(--muted);
  line-height:1.45;
}
.welcome-page__offline,
.welcome-page__err{
  margin:0;
  padding:10px 12px;
  border-radius:10px;
  font-size:.86rem;
  line-height:1.45;
}
.welcome-page__offline{
  background:rgba(251,191,36,.12);
  border:1px solid rgba(251,191,36,.35);
  color:var(--text);
}
.welcome-page__err{
  background:rgba(220,38,38,.08);
  border:1px solid rgba(220,38,38,.25);
  color:#b91c1c;
}
[data-theme="night"] .welcome-page__err,
[data-theme="dawn"] .welcome-page__err{
  color:#fca5a5;
}
.welcome-page__foot{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(148,163,184,.22);
  font-size:.8rem;
  color:var(--muted);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
.welcome-page__link{
  color:var(--accent);
  font-weight:600;
  text-decoration:none;
}
.welcome-page__link:hover{ text-decoration:underline; }
.welcome-page__foot-sep{ opacity:.45; }
.welcome-page__muted{ opacity:.88; }

@media (max-width:520px){
  .stat-grid{ grid-template-columns:1fr; }
  .stat-card-total-value-row{
    flex-wrap:wrap;
    align-items:flex-start;
  }
  .stat-card-total-value-row .stat-card-total-fx{
    max-width:100%;
    align-items:flex-end;
    margin-left:auto;
  }
}

/* Narrow screens: flat document flow in #view (fixes iOS flex clipping), compact hero */
@media (max-width:768px){
  .app-shell{
    display:block;
    min-height:100dvh;
    min-height:100svh;
    padding-top:max(8px, env(safe-area-inset-top, 0px));
    padding-left:max(16px, env(safe-area-inset-left, 0px));
    padding-right:max(16px, env(safe-area-inset-right, 0px));
    padding-bottom:max(28px, env(safe-area-inset-bottom, 0px));
  }
  body.portiva-route-welcome .app-shell{
    padding-left:max(6px, env(safe-area-inset-left, 0px));
    padding-right:max(6px, env(safe-area-inset-right, 0px));
  }
  #view{
    display:block;
    flex:none;
    min-height:100vh;
    min-height:100dvh;
    min-height:100svh;
    overflow:visible;
  }
  #view > header.topbar{
    margin-bottom:6px;
  }
  #view > header.topbar--home{
    margin-bottom:6px;
  }
  .welcome-page--overview .welcome-overview-bubbles{
    width:100%;
    margin-inline:0;
  }
  #view > header.topbar .topbar__inner{
    gap:3px;
    padding-top:2px;
    padding-bottom:8px;
  }
  #view > header.topbar--home .topbar__inner{
    padding-bottom:6px;
  }
  #view > main:not(.home-main):not(.support-page):not(.home-hier-tree-page):not(.welcome-auth-sign-in-page):not(.welcome-auth-create-page):not(.welcome-verify-email-page){
    display:block;
    flex:none;
    min-height:unset;
  }
  #view > main.welcome-auth-sign-in-page,
  #view > main.welcome-auth-create-page,
  #view > main.welcome-verify-email-page{
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
    min-height:calc(100dvh - 7.5rem);
    min-height:calc(100svh - 7.5rem);
  }
  #view > main.welcome-auth-sign-in-page.main-currency-onboarding-page,
  #view > main.welcome-auth-create-page.main-currency-onboarding-page,
  #view > main.welcome-verify-email-page.main-currency-onboarding-page{
    min-height:calc(100dvh - 7.5rem);
    min-height:calc(100svh - 7.5rem);
    flex:1 1 auto;
    width:100%;
  }
  #view > main.support-page,
  #view > main.home-hier-tree-page{
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
    min-height:calc(100dvh - 7.5rem);
    min-height:calc(100svh - 7.5rem);
    overflow:hidden;
  }
  .home-hier-tree-page > .home-hier-tree-panel{
    flex:1 1 0;
    min-height:12rem;
  }
  #view > main.home-main{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    flex:none;
    min-height:unset;
  }
  #view > main.home-main > .home-hero{
    margin-bottom:0;
  }
  #view > main.home-main .hero-title-row--home{
    margin-bottom:0;
  }
  .hero-title-row--home .hero-title-row__middle,
  .hero-title-row--scoped-summary .hero-title-row__middle{
    display:none !important;
  }
  .hero-title-row--home .hero-title-row__actions{
    display:none !important;
  }
  .hero-title-row--folder .hero-title-row__actions{
    display:none !important;
  }
  .folder-hero-rail__buttons .btn{
    min-width:4.75rem;
    min-height:36px;
    padding-left:12px;
    padding-right:12px;
  }
  .hero-title-row--home .home-equity-action-stack--hero-desktop{
    display:none !important;
  }
  .hero-title-row--home{
    display:block !important;
    grid-template-columns:none;
    align-items:center;
    gap:6px;
    flex-wrap:nowrap !important;
    margin:0 0 8px;
  }
  #view > main.home-main .hero-title-row--home{
    margin-bottom:0;
  }
  .hero-title-row--scoped-summary{
    display:flex !important;
    flex-wrap:wrap;
    align-items:baseline;
    gap:6px 10px;
    margin:0 0 8px;
  }
  .hero-title-row--scoped-summary h1{
    order:1;
    flex:1 1 auto;
    min-width:0;
    text-align:left;
  }
  .hero-title-row--scoped-summary .hero-page-kind{
    order:2;
  }
  .hero-title-row--home h1,
  .hero-title-row--scoped-summary h1{
    font-size:clamp(1.2rem, 5.2vw, 1.55rem) !important;
    font-weight:700 !important;
    letter-spacing:-.025em;
    line-height:1.2;
    margin:0 !important;
    min-width:0;
    flex:none;
  }
  .hero-title-row--home .hero-title-row__actions{
    flex-shrink:0;
    justify-self:end;
    align-self:center;
  }
  .hero-title-row--home .home-usd-spot-rate{
    max-width:100%;
    text-align:center;
  }
  .hero-title-row--home .hero-title-row__actions .btn,
  .hero-title-row--home .home-hero-actions .btn{
    white-space:nowrap;
    padding:7px 12px;
    font-size:.8rem;
    min-height:36px;
  }
  .hero--entity .hero-title-row{
    gap:6px;
  }
  .hero--entity .hero-title-row h1,
  .hero--entity .entity-hero-grid__name{
    font-size:clamp(1rem, 5vw, 1.32rem);
    letter-spacing:-.025em;
  }
  .hero--entity .hero-title-share{
    font-size:.43em;
  }
  .hero--entity .hero-page-kind{
    font-size:.58rem;
    letter-spacing:.06em;
    padding-bottom:2px;
  }
  .home-main .home-summary--in-main:not(.home-summary--compact),
  #view > main.folder-page .home-summary--in-main:not(.home-summary--compact),
  #view > main.entity-page .home-summary--in-main:not(.home-summary--compact),
  #view > main.asset-page .home-summary--in-main:not(.home-summary--compact){
    margin-top:0;
    margin-bottom:18px;
    gap:12px;
  }
  #view > main.folder-page .home-summary.home-summary--in-main.home-summary--compact,
  #view > main.entity-page .home-summary.home-summary--in-main.home-summary--compact,
  #view > main.asset-page .home-summary.home-summary--in-main.home-summary--compact{
    margin-top:0;
    margin-bottom:8px;
    gap:8px;
  }
  .home-main > .home-page-charts-stack,
  .home-main > .home-folder-pie-wrap,
  #view > main.folder-page > .folder-page-charts-stack,
  #view > main.entity-page > .entity-details-inline > .entity-page-charts-stack{
    margin-top:0;
  }
  .stat-card--mini .hint{
    display:none;
  }
  .btn-long{ display:none !important; }
  .btn-short{ display:inline !important; }
  .theme-select{
    max-width:min(108px,28vw);
    padding-left:10px;
    padding-right:26px;
    font-size:.78rem;
  }

  .folder-card-list.card-grid{
    display:flex !important;
    flex-direction:column;
    grid-template-columns:unset !important;
    gap:12px;
  }
  .folder-card{
    width:100%;
    min-height:52px;
    flex-shrink:0;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }
  .folder-card::after{
    content:"";
    display:table;
    clear:both;
  }
}

/* Summaries hub + list modals (overflow menu) */
.modal-box.modal-box--summaries-hub{
  width:min(440px,94vw);
  max-width:min(440px,94vw);
}
.summaries-hub-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:8px 0 20px;
}
.summaries-hub-btn{
  width:100%;
  justify-content:flex-start;
  text-align:left;
}
.help-page-hint{
  margin:0 0 12px;
  color:var(--muted, #8a8f98);
  font-size:0.92rem;
}
.help-guide-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:8px 0 20px;
}
.help-guide-list--numbered{
  list-style:decimal;
  padding:0 0 0 1.35em;
}
.help-guide-list--numbered > li{
  display:list-item;
}
.help-guide-btn{
  width:100%;
  justify-content:flex-start;
  text-align:left;
  height:auto;
  padding:10px 14px;
  white-space:normal;
}
.help-guide-btn__title{
  font-weight:600;
}
.portiva-flow-page.portiva-menu-surface-page .portiva-flow-page__footer{
  background:var(--portiva-canvas-bg, var(--bg0));
  border-top-color:transparent;
  box-shadow:none;
}
.legal-hub-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  list-style:none;
  padding:0;
  margin:8px 0 20px;
}
.legal-hub-link{
  width:100%;
  justify-content:flex-start;
  text-align:left;
  height:auto;
  padding:10px 14px;
  white-space:normal;
  text-decoration:none;
}
html[dir="rtl"] .legal-hub-link{
  text-align:right;
}
body:has(main.legal-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.legal-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  overflow:visible;
}
.legal-page .portiva-flow-page__scroll{
  flex:none;
  min-height:auto;
  max-height:none;
  height:auto;
  gap:0;
  padding-bottom:16px;
  overflow:visible;
  overscroll-behavior:auto;
  touch-action:auto;
}
.legal-page__body.privacy-page{
  max-width:42rem;
  margin:0 auto;
  padding:0 0 1rem;
  line-height:1.6;
  color:var(--text);
  box-sizing:border-box;
}
.legal-page__body.privacy-page h1{
  font-size:clamp(1.5rem,4vw,2rem);
  margin:0 0 .5rem;
  line-height:1.2;
}
.legal-page__body.privacy-page .privacy-page__updated{
  color:var(--muted);
  font-size:.9rem;
  margin:0 0 2rem;
}
.legal-page__body.privacy-page h2{
  font-size:1.05rem;
  margin:1.75rem 0 .5rem;
}
.legal-page__body.privacy-page p,
.legal-page__body.privacy-page li{
  color:var(--muted);
  margin:0 0 .75rem;
}
.legal-page__body.privacy-page ul{
  margin:0 0 1rem 1.25rem;
  padding:0;
}
html[dir="rtl"] .legal-page__body.privacy-page{
  text-align:right;
}
html[dir="rtl"] .legal-page__body.privacy-page ul{
  margin:0 1.25rem 1rem 0;
}
.legal-page__body.privacy-page a{
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:2px;
}
/* Summaries modals: never scroll the overlay (only inner list / body) */
#modernSummariesHubModal.modal-overlay,
#modernSummariesBanksModal.modal-overlay,
#modernSummariesManagementModal.modal-overlay,
#homeEquityPrincipalModal.modal-overlay,
#incomeSummaryModal.modal-overlay{
  overflow:hidden;
  overscroll-behavior:none;
}
#modernSummariesBanksModal.modal-overlay,
#modernSummariesManagementModal.modal-overlay{
  align-items:flex-start;
}
.modal-box.modal-box--summaries-list{
  width:min(720px,94vw);
  max-width:min(720px,94vw);
  height:min(82dvh,calc(100dvh - 40px));
  max-height:min(82dvh,calc(100dvh - 40px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
  min-height:0;
}
.modal-box.modal-box--summaries-list > .modal-title,
.modal-box.modal-box--summaries-list > .modal-hint,
.modal-box.modal-box--summaries-list > .summaries-list-toolbar,
.modal-box.modal-box--summaries-list > .form-actions{
  flex-shrink:0;
}
.summaries-list-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0 0 10px;
}
.summaries-list-toolbar[hidden]{
  display:none;
}
.summaries-list-body{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  overflow-anchor:none;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  margin:0 0 16px;
  padding-right:4px;
}
.summaries-entity-block{
  margin:0 0 10px;
  padding:0;
  border-radius:12px;
  border:1px solid var(--border-subtle, rgba(255,255,255,.08));
  background:var(--surface-raised, rgba(255,255,255,.03));
  overflow:hidden;
}
.summaries-entity-block__summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 8px 0 0;
}
.summaries-entity-block__toggle{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  margin:0;
  padding:12px 6px 12px 14px;
  border:0;
  border-radius:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:left;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.summaries-entity-block__toggle:hover .summaries-entity-block__title{
  color:var(--accent, #6eb5ff);
}
.summaries-entity-block__chev{
  flex-shrink:0;
  width:14px;
  height:14px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.summaries-entity-block__chev::after{
  content:"";
  width:8px;
  height:8px;
  border-right:2px solid var(--muted);
  border-bottom:2px solid var(--muted);
  transform:rotate(45deg);
  transition:transform .15s ease;
}
.summaries-entity-block.is-open .summaries-entity-block__chev::after{
  transform:rotate(-135deg);
}
.summaries-entity-block__body{
  padding:0 14px 14px;
}
.summaries-entity-block__body[hidden]{
  display:none;
}
.summaries-entity-block__body-inner{
  min-height:0;
}
.summaries-mgmt-asset{
  margin:0 0 12px;
  padding:0 0 12px;
  border-bottom:1px solid var(--border-subtle, rgba(255,255,255,.08));
}
.summaries-mgmt-asset:last-child{
  margin-bottom:0;
  padding-bottom:0;
  border-bottom:0;
}
.summaries-mgmt-asset .summaries-entity-block__subhead{
  margin-bottom:8px;
}
.summaries-links-block{
  margin:0 0 10px;
  padding:8px 12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  background:var(--portiva-menu-surface, var(--surface-card));
  box-sizing:border-box;
}
.summaries-links-block:last-child{
  margin-bottom:0;
}
.summaries-links-block__head{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:0;
}
.summaries-links-block__line{
  flex:1 1 auto;
  min-width:0;
}
.summaries-links-block__title{
  display:inline;
  margin:0;
  font-size:.88rem;
  font-weight:600;
  line-height:1.45;
  padding-right:.35em;
}
.summaries-links-block__title--group{
  margin:0 0 8px;
}
.summaries-links-block__assets{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.portiva-flow-page.summaries-page,
.modal-box.modal-box--summaries-list{
  --portiva-summaries-link:#10b981;
  --portiva-summaries-link-hover:#34d399;
}
.summaries-links-inline{
  display:inline;
  margin:0;
  font-size:.78rem;
  line-height:1.45;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.btn-icon-nav.summaries-links-block__open-details,
.btn-icon-nav.summaries-links-asset__open-details{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  margin:0;
  padding:0;
  border:0;
  border-radius:8px;
  background:var(--portiva-menu-surface, var(--surface-card));
  color:var(--muted);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.btn-icon-nav.summaries-links-block__open-details:hover,
.btn-icon-nav.summaries-links-asset__open-details:hover{
  color:var(--accent, #6eb5ff);
  background:var(--surface-btn-hover);
}
.btn-icon-nav.summaries-links-block__open-details:focus-visible,
.btn-icon-nav.summaries-links-asset__open-details:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.summaries-links-inline__link{
  color:var(--portiva-summaries-link, #10b981);
  text-decoration:none;
}
.summaries-links-inline__link:hover{
  color:var(--portiva-summaries-link-hover, #34d399);
  text-decoration:none;
}
.summaries-links-inline__sep{
  color:#fff;
  font-weight:700;
}
.summaries-links-asset{
  margin:0;
  padding:0;
}
.summaries-links-asset__head{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 6px;
}
.summaries-links-asset__name{
  margin:0;
  font-size:.82rem;
  font-weight:600;
  line-height:1.3;
  flex:1 1 auto;
  min-width:0;
}
.summaries-links-page__tabs{
  margin-bottom:12px;
}
.summaries-page--links .summaries-links-panel[hidden]{
  display:none !important;
}
.summaries-page--links .summaries-list-body--page{
  padding-top:0;
}
.summaries-search-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0 0 12px;
}
.summaries-search-field__label{
  font-size:.78rem;
  font-weight:600;
  color:var(--muted);
}
.summaries-search-field__input{
  width:100%;
  box-sizing:border-box;
}
.summaries-search-recent{
  margin:0 0 12px;
}
.summaries-search-recent__title{
  margin:0 0 8px;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
.summaries-search-recent__list,
.summaries-search-results{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.summaries-search-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  margin:0;
  padding:8px 10px;
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius:var(--radius-sm);
  background:var(--portiva-menu-surface, var(--surface-card));
  color:var(--text);
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.summaries-search-row__label{
  flex:1 1 auto;
  min-width:0;
  font-size:.84rem;
  font-weight:600;
  line-height:1.3;
}
.summaries-search-row__pill{
  flex:0 0 auto;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#fff;
}
.summaries-search-row__pill--entity{
  background:hsl(8 58% 52%);
  border-color:hsl(8 52% 42%);
}
.summaries-search-row__pill--asset{
  background:hsl(272 62% 52%);
  border-color:hsl(272 52% 42%);
}
[data-theme="dawn"] .summaries-search-row__pill--entity,
[data-theme="day"] .summaries-search-row__pill--entity,
[data-theme="classic"] .summaries-search-row__pill--entity{
  background:hsl(8 58% 52%);
  border-color:hsl(8 52% 42%);
  color:#fff;
}
[data-theme="dawn"] .summaries-search-row__pill--asset,
[data-theme="day"] .summaries-search-row__pill--asset,
[data-theme="classic"] .summaries-search-row__pill--asset{
  background:hsl(272 62% 52%);
  border-color:hsl(272 52% 42%);
  color:#fff;
}
@media (min-width:901px){
  .home-hier-tree-page .home-hier-tree__mode-check{
    font-size:.92rem;
  }
  .home-hier-tree-page .home-hier-tree__mode-check span{
    font-size:inherit;
  }
  .home-hier-tree-page .home-hier-tree__mode-toggle .home-hier-tree__mode-btn{
    font-size:.88rem;
    min-height:32px;
  }
  .home-hier-tree-page .home-hier-tree__folder-grid button.home-hier-tree-node--folder{
    font-size:.78rem;
  }
  .summaries-links-block__head{
    align-items:center;
  }
  .summaries-links-block__open-details,
  .summaries-links-asset__open-details{
    position:relative;
    z-index:1;
  }
}
@media (max-width:899px){
  #modernSummariesBanksModal.modal-overlay,
  #modernSummariesManagementModal.modal-overlay,
  #homeEquityPrincipalModal.modal-overlay,
  #incomeSummaryModal.modal-overlay{
    align-items:center;
    justify-content:center;
    padding:
      max(16px, env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px))
      max(16px, env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left, 0px));
  }
  .modal-box.modal-box--summaries-list,
  .modal-box--home-equity-principal{
    width:100%;
    max-width:min(560px, 100%);
    height:auto;
    max-height:min(
      90dvh,
      calc(
        100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px
      )
    );
  }
  .modal-box.modal-box--summaries-list{
    height:min(
      90dvh,
      calc(
        100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px
      )
    );
  }
}
.summaries-entity-block__title{
  margin:0;
  flex:1 1 auto;
  min-width:0;
  font-size:1rem;
  font-weight:600;
  text-align:left;
}
.btn-icon-nav.summaries-entity-block__open-details{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  margin:0;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.btn-icon-nav.summaries-entity-block__open-details:hover{
  color:var(--accent, #6eb5ff);
  background:var(--surface-btn-hover);
}
.btn-icon-nav.summaries-entity-block__open-details:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.summaries-entity-block__subhead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 8px;
}
.summaries-entity-block__subtitle{
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}
.summaries-mgmt-asset .summaries-mgmt-asset__name{
  display:block;
  flex:1 1 auto;
  min-width:0;
  margin:0;
  font-size:1rem;
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.3;
  text-transform:none;
  color:var(--text);
}
.summaries-entity-block__sep{
  height:1px;
  margin:14px 0;
  background:var(--border-subtle, rgba(255,255,255,.1));
}
.summaries-entity-block__bank + .summaries-entity-block__access,
.summaries-entity-block__sep + .summaries-entity-block__access{
  margin-top:0;
}
.summaries-entity-block__dl{
  margin:0;
}
.summaries-dd--plain a{
  pointer-events:none;
  color:inherit;
  text-decoration:none;
  cursor:default;
}
.summaries-dd--access a{
  color:var(--portiva-summaries-link, #10b981);
  text-decoration:none;
  word-break:break-all;
}
.summaries-dd--access a:hover{
  color:var(--portiva-summaries-link-hover, #34d399);
  text-decoration:none;
}
.portiva-flow-page.summaries-page button.home-equity-principal-modal__entry-link{
  color:var(--portiva-summaries-link, #10b981);
  font-weight:600;
  text-decoration:none;
}
.portiva-flow-page.summaries-page button.home-equity-principal-modal__entry-link:hover{
  color:var(--portiva-summaries-link-hover, #34d399);
  text-decoration:none;
}
.portiva-flow-page.summaries-page button.home-equity-principal-modal__entry-link:focus-visible{
  outline-color:var(--portiva-summaries-link, #10b981);
}
.summaries-empty{
  margin:12px 0;
  color:var(--text-muted, rgba(255,255,255,.55));
  font-size:.9rem;
}

/* Hard-lock logo mark palette (not theme accent tokens) — text/"P" marks only */
.brand-mark:not(img),
.welcome-orbit__brand-mark:not(img),
.portiva-auth-pending-overlay__mark:not(img),
.portiva-intro-splash__mark.brand-mark:not(img),
.brand-mark--welcome:not(img){
  background:linear-gradient(135deg, #22d3ee, #a78bfa);
  color:#0f172a;
}
.brand-mark:not(img),
.portiva-intro-splash__mark.brand-mark:not(img),
.brand-mark--welcome:not(img){
  box-shadow:0 8px 32px rgba(34,211,238,.25);
}
.welcome-orbit__brand-mark:not(img){
  box-shadow:0 4px 18px rgba(34,211,238,.25);
}
.portiva-auth-pending-overlay__mark:not(img){
  box-shadow:0 12px 48px rgba(34,211,238,.25);
}
img.brand-mark,
img.brand-mark--logo,
img.welcome-orbit__brand-mark,
img.portiva-intro-splash__mark,
img.portiva-auth-pending-overlay__mark{
  background:none;
  box-shadow:none;
  color:transparent;
}

/* Desktop overview pie + inline map frame (Map toggle — not Full Map modal). */
@media (min-width:901px){
  .home-folder-pie-wrap .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap,
  .folder-page-pie-wrap .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap,
  .entity-page-pie-wrap .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap{
    --portiva-pie-chart-pad-top:12px;
    --portiva-pie-chart-pad-bottom:22px;
    --portiva-pie-chart-body-h:360px;
    --portiva-inline-map-scale:1.7;
    --portiva-inline-map-bleed-x:calc(var(--portiva-pie-chart-body-h) * (var(--portiva-inline-map-scale) - 1) / 2);
    --portiva-inline-map-bleed-left:var(--portiva-inline-map-bleed-x);
    --portiva-inline-map-bleed-right:var(--portiva-inline-map-bleed-x);
    --portiva-inline-map-content-pad-top:44px;
    --portiva-inline-map-body-h:var(--portiva-pie-chart-body-h);
    box-sizing:border-box;
    height:var(--portiva-pie-chart-slot-h);
    min-height:var(--portiva-pie-chart-slot-h);
    max-height:var(--portiva-pie-chart-slot-h);
    padding-top:var(--portiva-pie-chart-pad-top);
    padding-bottom:var(--portiva-pie-chart-pad-bottom);
    padding-left:8px;
    padding-right:8px;
  }
  .home-folder-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer,
  .folder-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer,
  .entity-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer{
    grid-area:chartrail;
    justify-self:start;
    align-self:start;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    width:100%;
    max-width:380px;
    box-sizing:border-box;
    z-index:5;
    height:var(--portiva-pie-chart-rail-total-h);
    min-height:var(--portiva-pie-chart-rail-total-h);
    max-height:var(--portiva-pie-chart-rail-total-h);
    margin:0;
    padding-top:var(--portiva-pie-chart-rail-gap);
    box-sizing:border-box;
    pointer-events:none;
  }
  .home-folder-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer > .home-pie-map-overlay-rail,
  .folder-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer > .home-pie-map-overlay-rail,
  .entity-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer > .home-pie-map-overlay-rail{
    display:flex;
    flex:0 0 auto;
    flex-direction:row;
    align-items:center;
    gap:8px;
    pointer-events:none;
  }
  .home-folder-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer .home-pie-map-overlay,
  .folder-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer .home-pie-map-overlay,
  .entity-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer .home-pie-map-overlay{
    position:static;
    right:auto;
    left:auto;
    bottom:auto;
    margin:0;
    flex:0 0 auto;
    pointer-events:auto;
  }
  .home-folder-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer .home-pie-shortcut-btn--home-toggle .home-pie-shortcut-btn__ring--map,
  .folder-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer .home-pie-shortcut-btn--folder-toggle .home-pie-shortcut-btn__ring--map,
  .entity-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer .home-pie-shortcut-btn--entity-toggle .home-pie-shortcut-btn__ring--map{
    box-sizing:border-box;
    width:auto;
    min-width:4.75rem;
    max-width:4.75rem;
    height:36px;
    min-height:36px;
    max-height:36px;
    padding:0 6px;
    border-radius:999px;
    font-size:.68rem;
    justify-content:center;
  }
  .home-folder-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer #btnHomeShortcutMap .home-pie-shortcut-btn__ring--map,
  .folder-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer #btnFolderPageFullMap .home-pie-shortcut-btn__ring--map,
  .entity-page-pie-wrap .portiva-overview-pie-layout > .home-pie-map-overlay-footer #btnEntityPageFullMap .home-pie-shortcut-btn__ring--map{
    box-sizing:border-box;
    width:auto;
    min-width:4.75rem;
    max-width:4.75rem;
    height:36px;
    min-height:36px;
    max-height:36px;
    padding:0 6px;
    border-radius:999px;
    justify-content:center;
  }
  /* Map mode: same wrap size as pie; map aligned to pie body band. */
  .home-folder-pie-wrap .portiva-overview-pie-layout.home-overview-chart-pane--home-map-mode .home-overview-pie-analyst .pieChartSvgWrap,
  .folder-page-pie-wrap .portiva-overview-pie-layout.home-overview-chart-pane--folder-map-mode .home-overview-pie-analyst .pieChartSvgWrap,
  .entity-page-pie-wrap .portiva-overview-pie-layout.home-overview-chart-pane--entity-map-mode .home-overview-pie-analyst .pieChartSvgWrap,
  .home-folder-pie-wrap .detailsChartSection--overview-tabs .portiva-overview-pie-layout.home-overview-chart-pane--home-map-mode .pieChartSvgWrap,
  .folder-page-pie-wrap .detailsChartSection--overview-tabs .portiva-overview-pie-layout.home-overview-chart-pane--folder-map-mode .pieChartSvgWrap,
  .entity-page-pie-wrap .detailsChartSection--overview-tabs .portiva-overview-pie-layout.home-overview-chart-pane--entity-map-mode .pieChartSvgWrap{
    grid-area:chartpie;
    position:relative;
    display:block;
    flex:none;
    width:calc(100% + var(--portiva-inline-map-bleed-left) + var(--portiva-inline-map-bleed-right));
    max-width:calc(380px * var(--portiva-inline-map-scale));
    min-width:0;
    box-sizing:border-box;
    height:var(--portiva-pie-chart-slot-h);
    min-height:var(--portiva-pie-chart-slot-h);
    max-height:var(--portiva-pie-chart-slot-h);
    justify-self:start;
    align-self:start;
    margin:0 calc(-1 * var(--portiva-inline-map-bleed-right)) 0 calc(-1 * var(--portiva-inline-map-bleed-left));
    overflow:visible;
  }
  .home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .pieChartSvgWrap > .pieSvg,
  .folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .pieChartSvgWrap > .pieSvg,
  .entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .pieChartSvgWrap > .pieSvg{
    visibility:hidden;
    pointer-events:none;
    display:block;
    width:100%;
    max-width:var(--portiva-pie-chart-body-h);
    height:auto;
    margin:0 auto;
  }
  .home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .folder-page-pie-map-slot,
  .folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .folder-page-pie-map-slot,
  .entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .folder-page-pie-map-slot{
    position:absolute;
    left:50%;
    right:auto;
    transform:translateX(-50%);
    width:calc(var(--portiva-pie-chart-body-h) * var(--portiva-inline-map-scale));
    top:var(--portiva-pie-chart-pad-top);
    height:var(--portiva-inline-map-body-h);
    bottom:auto;
    z-index:2;
    display:flex;
    align-items:stretch;
    justify-content:stretch;
    box-sizing:border-box;
    pointer-events:auto;
  }
  .home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .folder-page-pie-map-slot > .folder-page-map-bubble--in-chart-pane,
  .folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .folder-page-pie-map-slot > .folder-page-map-bubble--in-chart-pane,
  .entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .folder-page-pie-map-slot > .folder-page-map-bubble--in-chart-pane{
    flex:1 1 auto;
    width:100%;
    max-width:none;
    height:100%;
    max-height:none;
    margin:0;
    padding:0;
    align-self:stretch;
  }
  .home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__main,
  .folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__main,
  .entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__main{
    padding-top:0;
    padding-bottom:0;
  }
  .home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .folder-page-pie-map-slot .home-page-map-panel,
  .folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .folder-page-pie-map-slot .folder-page-map-panel,
  .entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .folder-page-pie-map-slot .entity-page-map-panel,
  .home-folder-pie-wrap .home-overview-chart-pane--home-map-mode .folder-page-pie-map-slot .folder-page-map-panel,
  .folder-page-pie-wrap .home-overview-chart-pane--folder-map-mode .folder-page-pie-map-slot .folder-page-map-panel,
  .entity-page-pie-wrap .home-overview-chart-pane--entity-map-mode .folder-page-pie-map-slot .entity-page-map-panel{
    flex:1 1 auto;
    width:100%;
    height:100%;
    max-height:none;
    min-height:0;
  }
  #home-folder-pie-mount .detailsChartSection--overview-tabs,
  #folder-entity-pie-mount .detailsChartSection--overview-tabs,
  #entityInlineChartsMount .detailsChartSection--overview-tabs,
  .folder-page-pie-wrap .detailsChartSection--folder-entity.detailsChartSection--overview-tabs,
  .entity-page-pie-wrap .detailsChartSection--folder-entity.detailsChartSection--overview-tabs{
    padding-bottom:18px;
  }
  /* Chart-pane mini map (home / folder / entity): one shared frame + node scale. */
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane{
    max-height:none;
    min-height:0;
    height:100%;
    padding:0;
    border:none;
    border-radius:var(--radius-sm);
    background:var(--portiva-map-bg);
    align-self:stretch;
  }
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__main,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__main,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__main{
    padding:0;
    height:100%;
    max-height:none;
  }
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--inline-chart-pane,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--inline-chart-pane,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--inline-chart-pane,
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-page-map-panel,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .folder-page-map-panel,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .entity-page-map-panel{
    flex:1 1 auto;
    width:100%;
    height:100%;
    max-height:none;
    min-height:0;
  }
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__branch-stack,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__branch-stack,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree__branch-stack{
    --home-hier-tier-height:82px;
    padding:var(--portiva-inline-map-content-pad-top) 4px 0;
  }
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--compact .home-hier-tree__brick-band,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--compact .home-hier-tree__brick-band,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--compact .home-hier-tree__brick-band{
    gap:14px;
  }
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--compact .home-hier-tree__child-slot,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--compact .home-hier-tree__child-slot,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-panel--compact .home-hier-tree__child-slot{
    max-width:none;
  }
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .welcome-structure-node,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .welcome-structure-node,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .welcome-structure-node{
    min-height:38px;
    height:auto;
    padding:8px 6px;
    font-size:0.88rem;
  }
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-node:not(.home-hier-tree-node--folder),
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-node:not(.home-hier-tree-node--folder),
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-node:not(.home-hier-tree-node--folder){
    max-width:none;
    font-size:0.86rem;
    min-height:30px;
    height:auto;
    padding:4px 9px;
  }
  .home-folder-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-node--entity,
  .folder-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-node--entity,
  .entity-page-pie-wrap .folder-page-pie-map-slot .folder-page-map-bubble--in-chart-pane .home-hier-tree-node--entity{
    max-width:none;
  }
}

.flex-loan-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.flex-loan-toggle input[type="checkbox"]{
  width:auto;
  flex:0 0 auto;
}
input[type="date"].field-input,
input.field-input--date{
  -webkit-appearance:none;
  appearance:none;
  display:flex;
  align-items:center;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  text-align:left;
  overflow:hidden;
  color:var(--text);
}
input[type="date"].field-input::-webkit-datetime-edit,
input.field-input--date::-webkit-datetime-edit{
  display:flex;
  align-items:center;
  flex:1 1 auto;
  min-width:0;
  height:100%;
  padding:0;
  margin:0;
  line-height:1.25;
}
input[type="date"].field-input::-webkit-datetime-edit-fields-wrapper,
input.field-input--date::-webkit-datetime-edit-fields-wrapper{
  display:flex;
  align-items:center;
  height:100%;
  padding:0;
}
input[type="date"].field-input::-webkit-date-and-time-value,
input.field-input--date::-webkit-date-and-time-value{
  display:flex;
  align-items:center;
  text-align:left;
}
input[type="date"].field-input::-webkit-calendar-picker-indicator,
input.field-input--date::-webkit-calendar-picker-indicator{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  margin:0;
  padding:0;
  width:1.1rem;
  height:1.1rem;
  opacity:1;
  cursor:pointer;
}
input[type="date"].field-input.field-input--picker-only,
input.field-input--date.field-input--picker-only{
  cursor:pointer;
  caret-color:transparent;
  position:relative;
  user-select:none;
}
input[type="date"].field-input.field-input--picker-only::-webkit-datetime-edit,
input.field-input--date.field-input--picker-only::-webkit-datetime-edit,
input[type="date"].field-input.field-input--picker-only::-webkit-datetime-edit-fields-wrapper,
input.field-input--date.field-input--picker-only::-webkit-datetime-edit-fields-wrapper,
input[type="date"].field-input.field-input--picker-only::-webkit-date-and-time-value,
input.field-input--date.field-input--picker-only::-webkit-date-and-time-value{
  pointer-events:none;
}
input[type="date"].field-input.field-input--picker-only::-webkit-calendar-picker-indicator,
input.field-input--date.field-input--picker-only::-webkit-calendar-picker-indicator{
  left:0;
  top:0;
  right:auto;
  transform:none;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
input[type="number"]{
  -moz-appearance:textfield;
  appearance:textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.flex-loan-hint{
  margin:0 0 12px;
  font-size:0.9rem;
  color:var(--portiva-muted, #6b7280);
}
.flex-loan-summary__grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px 16px;
  margin-bottom:12px;
}
.flex-loan-summary__item--total{
  grid-column:1 / -1;
}
.flex-loan-summary__item--total .flex-loan-summary__value{
  font-size:1.15rem;
}
.flex-loan-readonly--owed{
  font-weight:600;
}
.flex-loan-readonly--owed .entityDetailsDdVal{
  font-size:1.05rem;
}
.flex-loan-summary__grid > .flex-loan-amount-owed-note,
.flex-loan-amount-owed-note{
  grid-column:1 / -1;
  margin-top:8px;
  max-width:36rem;
}
.flex-loan-amount-owed-note .loan-update-status{
  margin-top:0;
  margin-bottom:4px;
  max-width:none;
}
.flex-loan-amount-owed-note .loan-update-status:last-child{
  margin-bottom:0;
}
.flex-loan-summary__item .flex-loan-amount-owed-note{
  margin-top:4px;
}
.asset-readonly-panel .entityDetailsDl dt.flex-loan-payments-heading{
  grid-column:1 / -1;
  margin-top:10px;
}
.asset-readonly-panel .entityDetailsDl dd.flex-loan-payments-body{
  grid-column:1 / -1;
}
.flex-loan-payments__title{
  margin:0 0 8px;
  font-size:0.82rem;
  font-weight:600;
  color:var(--portiva-muted, #6b7280);
}
.flex-loan-payments-section{
  margin-top:12px;
}
.flex-loan-payments-section .flex-loan-payments-wrap{
  margin-top:0;
}
.flex-loan-summary__label{
  display:block;
  font-size:0.82rem;
  color:var(--portiva-muted, #6b7280);
}
.flex-loan-summary__value{
  display:block;
  font-weight:600;
}
.flex-loan-payments-wrap{
  margin-top:12px;
  overflow-x:auto;
}
.flex-loan-payments-table{
  width:100%;
  border-collapse:collapse;
  font-size:0.9rem;
}
.flex-loan-payments-table th,
.flex-loan-payments-table td{
  padding:6px 8px;
  text-align:left;
  border-bottom:1px solid var(--stroke);
  vertical-align:top;
}
.flex-loan-payments-table--selectable .flex-loan-payment-row--selectable{
  cursor:pointer;
}
.flex-loan-payments-table--selectable .flex-loan-payment-row--selectable:hover{
  background:var(--portiva-surface-muted, rgba(0, 0, 0, 0.03));
}
.flex-loan-payment-row--selected{
  background:var(--portiva-surface-muted, rgba(0, 0, 0, 0.05));
}
.flex-loan-payment-explain-row[hidden]{
  display:none;
}
.flex-loan-payment-explain-row .flex-loan-payment-explain-cell{
  padding:8px 12px;
  border-bottom:1px solid var(--stroke);
  background:var(--portiva-surface-muted, rgba(0, 0, 0, 0.03));
}
.flex-loan-payment-explain__title{
  margin:0 0 6px;
  font-size:0.88rem;
  font-weight:600;
}
.flex-loan-payment-explain__dl{
  display:grid;
  grid-template-columns:35% 65%;
  column-gap:12px;
  row-gap:5px;
  align-items:baseline;
  margin:0;
  font-size:0.82rem;
  line-height:1.35;
}
.flex-loan-payment-explain__row{
  display:contents;
}
.flex-loan-payment-explain__row dt{
  margin:0;
  font-weight:600;
  color:var(--portiva-muted, #6b7280);
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.flex-loan-payment-explain__row dd{
  margin:0;
  min-width:0;
  text-align:end;
  justify-self:stretch;
}
.flex-loan-payment-explain__row--after dd strong{
  font-weight:700;
}
.flex-loan-add-payment{
  margin-top:16px;
  padding-top:12px;
  border-top:1px solid var(--stroke);
}
.flex-loan-add-payment__title{
  margin:0 0 10px;
  font-size:0.95rem;
}
.flex-loan-add-payment__hint{
  margin:0 0 10px;
}
.flex-loan-add-payment__fields{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px 12px;
  align-items:end;
  margin-bottom:10px;
}
.flex-loan-add-payment__field{
  min-width:0;
  margin:0;
}
.flex-loan-add-payment__field .field-input{
  width:100%;
  box-sizing:border-box;
}
.flex-loan-add-payment__btn{
  margin-top:0;
}
@media (max-width: 520px){
  .flex-loan-add-payment__fields{
    grid-template-columns:1fr;
  }
}
.flex-loan-readonly-payments-title{
  margin:12px 0 8px;
  font-size:0.95rem;
}

/* First-run guided product tour — above modals and native date-picker popups */
.portiva-product-tour{
  position:fixed;
  inset:0;
  z-index:6200;
  pointer-events:none;
}
.portiva-product-tour__spotlight{
  position:fixed;
  z-index:6201;
  border-radius:10px;
  box-shadow:0 0 0 9999px rgba(15,23,42,.58);
  pointer-events:none;
  transition:left .16s ease, top .16s ease, width .16s ease, height .16s ease;
  outline:2px solid rgba(96,165,250,.95);
  outline-offset:0;
}
.portiva-product-tour__callout{
  position:fixed;
  z-index:6202;
  max-width:min(300px, calc(100vw - 20px));
  padding:10px 12px 8px;
  border-radius:10px;
  background:var(--portiva-menu-surface, var(--surface-card, var(--glass)));
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  box-shadow:0 12px 28px rgba(15,23,42,.18);
  pointer-events:auto;
  opacity:1;
}
[data-theme="night"] .portiva-product-tour__callout,
[data-theme="night-gray"] .portiva-product-tour__callout,
[data-theme="gray-night"] .portiva-product-tour__callout{
  box-shadow:0 12px 28px rgba(0,0,0,.45);
}
.portiva-product-tour__callout--enter{
  animation:portiva-tour-callout-fade-in .34s ease forwards;
}
@keyframes portiva-tour-callout-fade-in{
  from{ opacity:0; }
  to{ opacity:1; }
}
@media (prefers-reduced-motion: reduce){
  .portiva-product-tour__callout--enter{
    animation:none;
  }
}
.portiva-product-tour__head{
  display:flex;
  align-items:flex-start;
  gap:6px;
  margin:0 0 4px;
}
.portiva-product-tour__head .portiva-product-tour__title{
  flex:1 1 auto;
  min-width:0;
  margin:0;
}
.portiva-product-tour__quit--icon{
  flex:0 0 auto;
  min-width:28px;
  width:28px;
  height:28px;
  padding:0;
  margin:-2px -2px 0 0;
  font-size:1.15rem;
  line-height:1;
  border-radius:8px;
}
.portiva-product-tour__title{
  margin:0 0 4px;
  font-size:0.9rem;
  font-weight:650;
  line-height:1.25;
  color:var(--text);
}
.portiva-product-tour__callout--orphan .portiva-product-tour__arrow{
  display:none;
}
.portiva-product-tour__body{
  margin:0 0 8px;
  font-size:0.8rem;
  line-height:1.35;
  color:var(--muted, var(--text-muted, #475569));
}
.portiva-product-tour__actions{
  margin:0;
}
.portiva-product-tour__actions.form-actions--tour{
  margin-top:0;
  gap:8px;
  flex-wrap:nowrap;
}
.portiva-product-tour__actions.form-actions--tour:has(.portiva-product-tour__next[hidden]){
  justify-content:flex-end;
}
.portiva-product-tour__actions .portiva-product-tour__quit--footer{
  flex:1 1 auto;
  min-width:0;
}
.portiva-product-tour__actions .portiva-product-tour__next{
  flex:1 1 auto;
  min-width:0;
}
.portiva-product-tour__actions.form-actions--tour:has(.portiva-product-tour__next:not([hidden])) .portiva-product-tour__quit--footer{
  flex:0 1 auto;
}
.portiva-product-tour__actions.form-actions--tour:has(.portiva-product-tour__next:not([hidden])) .portiva-product-tour__next{
  flex:0 1 auto;
}
.portiva-product-tour__actions .btn--compact{
  padding:6px 10px;
  font-size:0.78rem;
  min-height:32px;
}
.portiva-product-tour__arrow{
  position:absolute;
  width:12px;
  height:12px;
  background:var(--portiva-menu-surface, var(--surface-card, var(--glass)));
  border:1px solid var(--portiva-menu-surface-border, var(--stroke));
  transform:rotate(45deg);
}
.portiva-product-tour__arrow--top{
  top:-7px;
  left:50%;
  margin-left:-6px;
  border-bottom:none;
  border-right:none;
}
.portiva-product-tour__arrow--bottom{
  bottom:-7px;
  left:50%;
  margin-left:-6px;
  border-top:none;
  border-left:none;
}
.portiva-product-tour__arrow--left{
  left:-7px;
  top:50%;
  margin-top:-6px;
  border-top:none;
  border-right:none;
}
.portiva-product-tour__arrow--right{
  right:-7px;
  top:50%;
  margin-top:-6px;
  border-bottom:none;
  border-left:none;
}
.modal-box--product-tour-invite,
.modal-box--product-tour-done{
  max-width:min(340px, calc(100vw - 24px));
  padding:16px 16px 14px;
}
.modal-box--product-tour-invite .modal-title,
.modal-box--product-tour-done .modal-title{
  margin:0 0 8px;
  font-size:1rem;
  line-height:1.25;
}
.modal-box--product-tour-invite .modal-hint--compact,
.modal-box--product-tour-done .modal-hint--compact{
  margin:0 0 10px;
  font-size:0.8rem;
  line-height:1.35;
}
.modal-box--product-tour-invite .form-actions--tour,
.modal-box--product-tour-done .form-actions--tour{
  margin-top:8px;
  gap:8px;
}
.form-actions--tour .btn--compact{
  padding:6px 12px;
  font-size:0.78rem;
  min-height:32px;
}
@media (max-width:600px){
  .portiva-product-tour__callout{
    max-width:min(268px, calc(100vw - 16px));
    padding:8px 10px 7px;
    border-radius:9px;
    box-shadow:0 10px 22px rgba(15,23,42,.16);
  }
  .portiva-product-tour__title{
    font-size:0.84rem;
    margin-bottom:3px;
  }
  .portiva-product-tour__body{
    font-size:0.76rem;
    line-height:1.32;
    margin-bottom:7px;
  }
  .portiva-product-tour__actions .btn--compact{
    padding:5px 8px;
    font-size:0.74rem;
    min-height:30px;
  }
  .modal-box--product-tour-invite,
  .modal-box--product-tour-done{
    max-width:min(300px, calc(100vw - 20px));
    padding:14px 14px 12px;
  }
  .modal-box--product-tour-invite .modal-title,
  .modal-box--product-tour-done .modal-title{
    font-size:0.92rem;
    margin-bottom:6px;
  }
  .modal-box--product-tour-invite .modal-hint--compact,
  .modal-box--product-tour-done .modal-hint--compact{
    font-size:0.76rem;
    margin-bottom:8px;
  }
}

/* — Asset photo (Storage path on RTDB row; bytes in Firebase Storage) — */
.asset-photo-readonly-mount,
.asset-photo-edit-mount{
  padding:0 1rem 0.5rem;
}
.asset-photo-panel{
  margin:0 auto 0.75rem;
  max-width:min(720px, 100%);
}
.asset-photo-panel__img{
  display:block;
  width:100%;
  max-height:min(52vh, 420px);
  object-fit:contain;
  object-position:center center;
  border-radius:12px;
  background:var(--surface-2, #0f172a);
}
/* Asset page readonly photo — same bubble shell as detail bubbles below. */
.asset-page > .asset-photo-readonly-mount{
  padding:0;
  margin:0 0 12px;
}
.asset-page > .asset-photo-readonly-mount .asset-photo-panel{
  margin:0;
  max-width:none;
  width:100%;
  padding:12px 14px;
  border-radius:var(--radius-sm);
  box-sizing:border-box;
}
.asset-page > .asset-photo-readonly-mount .asset-photo-panel__img{
  border-radius:8px;
}
.asset-page > .asset-photo-readonly-mount .asset-photo-panel--busy{
  min-height:8rem;
}
.asset-photo-panel__placeholder{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.5rem;
  min-height:8rem;
  border:1px dashed var(--accent-border, #334155);
  border-radius:12px;
  color:var(--text-muted, #94a3b8);
  font-size:0.95rem;
  text-align:center;
  padding:0.75rem;
  box-sizing:border-box;
  background:#000;
}
[data-theme="classic"] .asset-photo-panel__placeholder{
  background:#fff;
}
.asset-photo-panel--readonly .asset-photo-panel__open{
  display:block;
  width:100%;
  padding:0;
  margin:0;
  border:none;
  background:transparent;
  border-radius:12px;
  overflow:hidden;
  cursor:pointer;
  text-align:inherit;
  font:inherit;
  color:inherit;
  text-decoration:none;
}
.asset-photo-panel__media{
  position:relative;
  display:block;
}
.asset-photo-panel__size{
  position:absolute;
  left:8px;
  bottom:8px;
  z-index:1;
  padding:2px 6px;
  border-radius:4px;
  background:rgba(255,255,255,.82);
  color:#000;
  font-size:.65rem;
  font-weight:600;
  line-height:1.2;
  letter-spacing:.01em;
  pointer-events:none;
}
[data-theme="dawn"] .asset-photo-panel__size,
[data-theme="day"] .asset-photo-panel__size,
[data-theme="classic"] .asset-photo-panel__size{
  color:#000;
}
.asset-photo-panel--readonly .asset-photo-panel__open:focus-visible{
  outline:2px solid var(--accent, #0f766e);
  outline-offset:2px;
}
.asset-photo-viewer{
  position:fixed;
  inset:0;
  z-index:150;
  width:100%;
  height:100%;
  overflow:hidden;
  background:#000;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
.asset-photo-viewer:not([hidden]){
  display:block;
}
.asset-photo-viewer--open{
  opacity:1;
  pointer-events:auto;
}
body.asset-photo-viewer-open{
  position:fixed;
  left:0;
  right:0;
  width:100%;
  overflow:hidden;
  overscroll-behavior:none;
}
body.asset-photo-viewer-open #view{
  visibility:hidden;
}
.asset-photo-viewer__chrome{
  position:absolute;
  top:0;
  left:0;
  right:0;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:max(10px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
  pointer-events:none;
}
.asset-photo-viewer__size{
  pointer-events:none;
  font-family:var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size:.78rem;
  font-weight:600;
  line-height:1.2;
  letter-spacing:.03em;
  color:#fff;
  text-shadow:0 1px 8px rgba(0,0,0,.65);
  padding:8px 4px;
}
.asset-photo-viewer__close{
  pointer-events:auto;
  flex:0 0 auto;
  width:44px;
  height:44px;
  padding:0;
  margin:0;
  border:none;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:1.65rem;
  line-height:1;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.asset-photo-viewer__close:hover{
  background:rgba(255,255,255,.16);
}
.asset-photo-viewer__close:focus-visible{
  outline:2px solid rgba(255,255,255,.85);
  outline-offset:2px;
}
.asset-photo-viewer__stage{
  position:absolute;
  inset:0;
  box-sizing:border-box;
  overflow:hidden;
  touch-action:none;
  padding:
    max(52px, calc(env(safe-area-inset-top, 0px) + 44px))
    max(8px, env(safe-area-inset-right, 0px))
    max(8px, env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
}
.asset-photo-viewer__zoom{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  transform-origin:center center;
  will-change:transform;
}
.asset-photo-viewer__img{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  object-position:center center;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  touch-action:none;
}
.asset-photo-panel--edit .asset-photo-panel__placeholder--empty,
.asset-photo-panel--edit .asset-photo-panel__placeholder--loading{
  width:100%;
  background:var(--surface-2, #0f172a);
}
.asset-photo-panel--readonly .asset-photo-panel__placeholder--empty{
  width:100%;
  box-sizing:border-box;
  min-height:10rem;
  background:transparent;
}
.asset-photo-panel__placeholder-label{
  display:block;
}
.asset-photo-panel__browse-hint--inline{
  margin:0;
  font-size:0.88rem;
  line-height:1.45;
}
.asset-photo-panel__browse-link{
  font-weight:600;
  text-decoration:underline;
  text-underline-offset:2px;
}
.field-input--asset-url{
  cursor:text;
  font-size:0.95rem;
  word-break:break-all;
}
.asset-photo-panel__actions{
  margin-top:0.65rem;
}
.asset-photo-panel__add-row{
  display:flex;
  align-items:center;
  gap:0.4rem;
  flex:1 1 0;
  min-width:0;
}
.asset-photo-panel__file-label{
  cursor:pointer;
  margin:0;
  flex:1 1 0;
  min-width:0;
}
.asset-photo-panel__info-btn{
  flex:0 0 auto;
  min-width:2.5rem;
  padding-inline:0.65rem;
  font-weight:700;
}
.asset-photo-panel--busy,
.asset-photo-panel__busy-inline{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.65rem;
  min-height:8rem;
  color:var(--text-muted, #94a3b8);
}
.asset-photo-panel__busy-inline{
  flex-direction:row;
  min-height:8rem;
}
.asset-photo-panel__spinner{
  width:2rem;
  height:2rem;
  border:3px solid var(--accent-border, #cbd5e1);
  border-top-color:var(--accent, #0f766e);
  border-radius:50%;
  animation:asset-photo-spin .75s linear infinite;
}
@keyframes asset-photo-spin{
  to{ transform:rotate(360deg); }
}
.billing-feature-blocked-page .portiva-flow-page__body{
  padding-top:0.5rem;
}
.billing-renewal-page.portiva-billing-shell{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:#0a0a0a;
  color:#f5f5f5;
}
[data-theme="dawn"] .billing-renewal-page.portiva-billing-shell,
[data-theme="day"] .billing-renewal-page.portiva-billing-shell,
[data-theme="classic"] .billing-renewal-page.portiva-billing-shell{
  background:#fafafa;
  color:#111;
}
body.portiva-route-billing-shell #view{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
}
body.portiva-route-billing-shell #view > header.topbar{
  display:none !important;
}
.billing-renewal-page__scroll{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  padding:max(72px, calc(48px + env(safe-area-inset-top, 0px))) 20px 24px;
  max-width:36rem;
  margin:0 auto;
  width:100%;
  box-sizing:border-box;
}
.billing-downgrade-page .billing-renewal-page__scroll{
  padding-top:max(42px, calc(18px + env(safe-area-inset-top, 0px)));
}
[data-theme="classic"] .welcome-plans-page .welcome-plans-page__picker-btn,
[data-theme="classic"] .welcome-plans-page .btn{
  border-color:rgba(51,65,85,.62);
}
[data-theme="classic"] .welcome-plans-page .welcome-plans-page__pricing-grid th,
[data-theme="classic"] .welcome-plans-page .welcome-plans-page__pricing-grid td{
  border-color:rgba(51,65,85,.46);
}
[data-theme="classic"] .welcome-plans-page .welcome-plans-page__mark--yes{
  color:#166534;
}
.billing-renewal-page__title{
  margin:0 0 12px;
  font-size:1.35rem;
  font-weight:600;
  line-height:1.3;
  letter-spacing:-.02em;
}
.billing-renewal-page__lead{
  margin:0 0 16px;
  font-size:.95rem;
  line-height:1.55;
  opacity:.88;
}
.billing-renewal-page__days{
  margin:0 0 20px;
  font-size:.88rem;
  font-weight:600;
  letter-spacing:.02em;
  opacity:.75;
}
.billing-continue-page__interval{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 20px;
  font-size:.92rem;
  font-weight:600;
}
.billing-continue-page__interval .theme-select{
  width:min(260px, 64%);
  min-height:44px;
  color:var(--text);
  background-color:var(--portiva-menu-surface);
  border-color:var(--stroke);
}
.billing-continue-page__radio-options{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:4px 0 22px;
}
.billing-continue-page__radio-label{
  margin-bottom:2px;
  font-size:.92rem;
  font-weight:600;
}
.billing-continue-page__radio-option{
  min-height:58px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid var(--stroke);
  border-radius:10px;
  background:var(--portiva-menu-surface);
  color:var(--text);
  cursor:pointer;
  transition:border-color .15s,background .15s;
}
.billing-continue-page__radio-option:hover{
  border-color:var(--stroke-hover);
  background:var(--surface-list-hover);
}
.billing-continue-page__radio-option:has(input:checked){
  border-color:var(--accent);
}
.billing-continue-page__radio-option input{
  flex:0 0 auto;
  width:18px;
  height:18px;
  margin:0;
  accent-color:var(--accent);
}
.billing-continue-page__radio-option:has(input:focus-visible){
  outline:2px solid var(--focus);
  outline-offset:3px;
}
.billing-continue-page__radio-copy{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.billing-continue-page__option-heading{
  display:flex;
  align-items:center;
  gap:8px;
}
.billing-continue-page__option-name{
  font-size:1.05rem;
  font-weight:700;
}
.billing-continue-page__option-price{
  font-size:.96rem;
  font-weight:600;
  opacity:.86;
}
.billing-continue-page__option-badge{
  padding:4px 7px;
  border-radius:999px;
  background:color-mix(in srgb,var(--accent) 18%,transparent);
  color:var(--accent);
  font-size:.7rem;
  font-weight:700;
  white-space:nowrap;
}
.billing-renewal-page__block{
  margin:0 0 20px;
}
.billing-renewal-page__heading{
  margin:0 0 8px;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  opacity:.65;
}
.billing-renewal-page__list{
  margin:0;
  padding:0 0 0 1.1em;
  font-size:.92rem;
  line-height:1.55;
}
.billing-renewal-page__list li{
  margin:0 0 6px;
}
.billing-renewal-page__note{
  margin:0;
  font-size:.88rem;
  line-height:1.5;
  opacity:.75;
}
.billing-downgrade-page__billing-note{
  margin-top:10px;
}
.billing-trial-expired-page__retention{
  margin-bottom:16px;
  font-weight:600;
  opacity:.9;
}
.billing-renewal-page__footer{
  flex:0 0 auto;
  padding:12px 16px max(16px, env(safe-area-inset-bottom, 0px));
}
.billing-renewal-page__actions{
  max-width:36rem;
  margin:0 auto;
}
.billing-renewal-page__actions .btn{
  flex:1 1 0;
  min-width:0;
}
[data-theme="dawn"] .billing-renewal-page .btn--ghost,
[data-theme="day"] .billing-renewal-page .btn--ghost,
[data-theme="classic"] .billing-renewal-page .btn--ghost{
  color:inherit;
  border-color:rgba(0,0,0,.2);
}
.billing-renewal-page .btn--primary{
  background:#f5f5f5;
  color:#111;
  border-color:transparent;
}
[data-theme="dawn"] .billing-renewal-page .btn--primary,
[data-theme="day"] .billing-renewal-page .btn--primary,
[data-theme="classic"] .billing-renewal-page .btn--primary{
  background:#111;
  color:#fafafa;
}
.billing-upgrade-status__box{
  width:min(420px,94vw);
  text-align:center;
}
.billing-upgrade-status__spinner{
  width:42px;
  height:42px;
  margin:0 auto 18px;
  border:4px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-top-color:var(--text);
  border-radius:50%;
  animation:billing-upgrade-spin .8s linear infinite;
}
.billing-upgrade-status__box .form-actions{
  margin-top:20px;
}
.billing-upgrade-status__box .form-actions .btn{
  width:100%;
}
@keyframes billing-upgrade-spin{
  to{ transform:rotate(360deg); }
}
@media (prefers-reduced-motion:reduce){
  .billing-upgrade-status__spinner{ animation-duration:1.6s; }
}

/* Rename folder uses the same document-scrolling story-page layout as other menu flows. */
body:has(main.rename-folder-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.rename-folder-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  margin-top:0;
  overflow:visible;
}
.rename-folder-page .portiva-flow-page__scroll{
  flex:none !important;
  min-height:auto !important;
  max-height:none;
  height:auto;
  overflow:visible !important;
  overscroll-behavior:auto;
  touch-action:auto;
  padding-bottom:16px !important;
}
.rename-folder-page .rename-folder-page__mobile-title{
  display:block !important;
}
.rename-folder-page .rename-folder-page__nav-actions{
  flex:0 0 auto;
  flex-wrap:nowrap;
  gap:16px;
  width:auto;
}

/* Add/edit entity now use the shared theme-aware bubble and document scrolling. */
body:has(main.add-entity-page) #view,
body:has(main.edit-entity-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.add-entity-page.portiva-flow-page,
#view > main.edit-entity-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  margin-top:0;
  overflow:visible;
}
.add-entity-page .portiva-flow-page__scroll,
.edit-entity-page .portiva-flow-page__scroll{
  flex:none !important;
  min-height:auto !important;
  max-height:none;
  height:auto;
  overflow:visible !important;
  overscroll-behavior:auto;
  touch-action:auto;
  padding-bottom:16px !important;
}
.add-entity-page .add-entity-page__mobile-title,
.edit-entity-page .edit-entity-page__mobile-title,
.edit-entity-page .edit-entity-page__mobile-lead{
  display:block !important;
}
.add-entity-page .modal-scroll-frame,
.add-entity-page .add-entity-scroll-fields,
.edit-entity-page .modal-scroll-frame,
.edit-entity-page .add-entity-scroll-fields{
  max-height:none !important;
  height:auto;
  overflow:visible !important;
}
.add-entity-page .add-entity-page__nav-actions,
.edit-entity-page .edit-entity-page__nav-actions{
  flex:0 0 auto;
  flex-wrap:nowrap;
  gap:18px;
  width:auto;
  transform:translateX(-10px);
}
.add-entity-page fieldset.add-entity-section--legend,
.edit-entity-page fieldset.add-entity-section--legend{
  min-width:0;
}
.add-entity-page .add-entity-section--legend > .entityDetailsBubbleTitle,
.edit-entity-page .add-entity-section--legend > .entityDetailsBubbleTitle{
  margin:0;
  padding:0 6px;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  line-height:1.2;
  text-transform:uppercase;
  color:#64748b;
}
[data-theme="classic"] .add-entity-page .add-entity-section--legend > .entityDetailsBubbleTitle,
[data-theme="classic"] .edit-entity-page .add-entity-section--legend > .entityDetailsBubbleTitle{
  color:#64748b;
}
[data-theme="classic"] .add-entity-page .add-entity-section--legend,
[data-theme="classic"] .edit-entity-page .add-entity-section--legend{
  background:#f8fafc;
}
[data-theme="night"] .add-entity-page .add-entity-section--legend > .entityDetailsBubbleTitle,
[data-theme="night-gray"] .add-entity-page .add-entity-section--legend > .entityDetailsBubbleTitle,
[data-theme="night"] .edit-entity-page .add-entity-section--legend > .entityDetailsBubbleTitle,
[data-theme="night-gray"] .edit-entity-page .add-entity-section--legend > .entityDetailsBubbleTitle{
  color:#fff;
}

/* Add/edit asset use the same outer bubble, text actions, and document scrolling. */
body:has(main.add-asset-page) #view,
body:has(main.asset-edit-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.add-asset-page.portiva-flow-page,
#view > main.asset-edit-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  margin-top:0;
  overflow:visible;
}
.add-asset-page .portiva-flow-page__scroll,
.asset-edit-page .portiva-flow-page__scroll{
  flex:none !important;
  min-height:auto !important;
  max-height:none;
  height:auto;
  overflow:visible !important;
  overscroll-behavior:auto;
  touch-action:auto;
  padding-bottom:16px !important;
}
.add-asset-page .add-asset-page__mobile-title,
.add-asset-page .add-asset-page__mobile-lead,
.asset-edit-page .asset-edit-page__mobile-title,
.asset-edit-page .asset-edit-page__mobile-lead{
  display:block !important;
}
.add-asset-page .modal-scroll-frame,
.asset-edit-page .modal-scroll-frame,
.asset-edit-page .detail-dl--form{
  max-height:none !important;
  height:auto;
  overflow:visible !important;
}
.add-asset-page .add-asset-page__nav-actions,
.asset-edit-page .asset-edit-page__nav-actions{
  flex:0 0 auto;
  flex-wrap:nowrap;
  gap:18px;
  width:auto;
  transform:translateX(-10px);
}
.add-asset-page .entityDetailsBubbleTitle,
.asset-edit-page .entityDetailsBubbleTitle{
  position:absolute;
  top:0;
  inset-inline-start:12px;
  z-index:1;
  margin:0;
  padding:0 6px;
  transform:translateY(-50%);
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  line-height:1.2;
  text-transform:uppercase;
  color:#64748b;
}
.add-asset-page .entityDetailsBubble,
.asset-edit-page .entityDetailsBubble{
  position:relative;
  margin-top:16px;
}
[data-theme="classic"] .add-asset-page .entityDetailsBubble,
[data-theme="classic"] .asset-edit-page .entityDetailsBubble{
  background:#f8fafc;
}
[data-theme="classic"] .add-asset-page .entityDetailsBubbleTitle,
[data-theme="classic"] .asset-edit-page .entityDetailsBubbleTitle{
  background:#f8fafc;
  color:#64748b;
}
[data-theme="night"] .add-asset-page .entityDetailsBubbleTitle,
[data-theme="night"] .asset-edit-page .entityDetailsBubbleTitle{
  background:var(--portiva-menu-surface);
  color:#fff;
}
[data-theme="night-gray"] .add-asset-page .entityDetailsBubbleTitle,
[data-theme="night-gray"] .asset-edit-page .entityDetailsBubbleTitle{
  background:#1a2234;
  color:#fff;
}
.add-asset-page .asset-photo-panel__actions,
.asset-edit-page .asset-photo-panel__actions{
  align-items:center;
  gap:18px;
}
.add-asset-page .asset-photo-panel__file-label,
.asset-edit-page .asset-photo-panel__file-label{
  display:inline-flex;
  align-items:center;
  width:auto;
}
.add-asset-type-field[hidden]{
  display:none !important;
}
[data-theme="classic"] .add-asset-page .asset-photo-panel--edit .asset-photo-panel__placeholder,
[data-theme="classic"] .asset-edit-page .asset-photo-panel--edit .asset-photo-panel__placeholder{
  background:#f1f5f9;
}
[data-theme="night"] .add-asset-page .asset-photo-panel--edit .asset-photo-panel__placeholder,
[data-theme="night-gray"] .add-asset-page .asset-photo-panel--edit .asset-photo-panel__placeholder,
[data-theme="night"] .asset-edit-page .asset-photo-panel--edit .asset-photo-panel__placeholder,
[data-theme="night-gray"] .asset-edit-page .asset-photo-panel--edit .asset-photo-panel__placeholder{
  background:#000;
}
.add-asset-page .entityDetailsBubble button.btn,
.asset-edit-page .entityDetailsBubble button.btn{
  flex:0 0 auto;
  width:auto;
  min-width:0;
  min-height:auto;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:var(--accent);
  font:inherit;
  font-weight:600;
}
.add-asset-page .entityDetailsBubble button.btn:hover,
.asset-edit-page .entityDetailsBubble button.btn:hover{
  background:transparent;
  box-shadow:none;
  text-decoration:underline;
}
body:has(main.add-asset-pick-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.add-asset-pick-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  margin-top:0;
  overflow:visible;
}
.add-asset-pick-page .portiva-flow-page__scroll{
  flex:none !important;
  min-height:auto !important;
  max-height:none;
  height:auto;
  overflow:visible !important;
  overscroll-behavior:auto;
  touch-action:auto;
  padding-bottom:16px !important;
}
body:has(main.formula-help-page) #view{
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
#view > main.formula-help-page.portiva-flow-page{
  flex:none;
  min-height:auto;
  height:auto;
  margin-top:0;
  overflow:visible;
}
.formula-help-page .portiva-flow-page__scroll{
  flex:none !important;
  min-height:auto !important;
  max-height:none;
  height:auto;
  overflow:visible !important;
  overscroll-behavior:auto;
  touch-action:auto;
  padding-bottom:16px !important;
}
.formula-help-page .formula-field-help-page__entries{
  display:grid;
  gap:16px;
  max-height:none;
  overflow:visible;
}
.formula-help-page .formula-field-help-entry--page,
.formula-help-page .formula-field-help-entry--page:last-child{
  min-width:0;
  margin:0;
  padding:14px;
  border:1px solid var(--stroke);
}
.formula-help-page .formula-field-help-entry--page > .formula-field-help-entry__title{
  margin:0;
  padding:0 6px;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  line-height:1.2;
  text-transform:uppercase;
  color:#64748b;
}
[data-theme="classic"] .formula-help-page .formula-field-help-entry--page{
  background:#f8fafc;
}
[data-theme="classic"] .formula-help-page .formula-field-help-entry--page > .formula-field-help-entry__title{
  color:#64748b;
}
[data-theme="night"] .formula-help-page .formula-field-help-entry--page,
[data-theme="night-gray"] .formula-help-page .formula-field-help-entry--page{
  background:#1a2234;
  border-width:2px;
  border-color:rgba(255,255,255,.28);
}
[data-theme="night"] .formula-help-page .formula-field-help-entry--page > .formula-field-help-entry__title,
[data-theme="night-gray"] .formula-help-page .formula-field-help-entry--page > .formula-field-help-entry__title{
  color:#fff;
}

/* Mobile search mode: move the focused search to the top and keep its results stable. */
@media (max-width:899px){
  .summaries-page--hub:has(#summariesSearchInput:focus, .summaries-search-results:focus-within) .story-page__hero,
  .summaries-page--hub:has(#summariesSearchInput:focus, .summaries-search-results:focus-within) .summaries-hub-layout > .portiva-flow-page__lead,
  .summaries-page--hub:has(#summariesSearchInput:focus, .summaries-search-results:focus-within) .summaries-hub-actions,
  .summaries-page--hub:has(#summariesSearchInput:focus, .summaries-search-results:focus-within) .summaries-hub-story-shortcut{
    display:none;
  }
  .summaries-page--hub:has(#summariesSearchInput:focus, .summaries-search-results:focus-within) .summaries-hub-search-section{
    min-height:calc(100dvh - 112px);
    padding-top:0;
    overflow-anchor:none;
  }
  .summaries-page--hub:has(#summariesSearchInput:focus, .summaries-search-results:focus-within) .summaries-search-field,
  .summaries-page--hub:has(#summariesSearchInput:focus, .summaries-search-results:focus-within) .summaries-search-results,
  .summaries-page--hub:has(#summariesSearchInput:focus, .summaries-search-results:focus-within) .summaries-hub-recent-mount{
    overflow-anchor:none;
  }
  .edit-entity-page .edit-entity-page__nav-actions #btnDeleteEntity,
  .asset-edit-page .asset-edit-page__nav-actions #btnDeleteAsset{
    width:min-content;
    max-width:48px;
    white-space:normal;
    text-align:center;
    line-height:1.05;
  }
}

.layout-settings-page :is(
  #layoutSettingsThemeSelect,
  #layoutSettingsMainCur,
  #layoutSettingsSecondaryCur,
  #btnLayoutSettingsClearDeviceCache,
  #btnLayoutSettingsAddEmailSignIn
){
  width:170px;
  max-width:100%;
  min-height:40px;
  box-sizing:border-box;
  border:1px solid var(--stroke);
  border-radius:999px;
  background-color:var(--surface-btn);
  color:var(--text);
}
.layout-settings-page :is(
  #layoutSettingsThemeSelect,
  #layoutSettingsMainCur,
  #layoutSettingsSecondaryCur
){
  justify-self:end;
  padding:9px 34px 9px 16px;
}
.layout-settings-page :is(
  #layoutSettingsThemeSelect,
  #layoutSettingsMainCur,
  #layoutSettingsSecondaryCur
):hover{
  background-color:var(--surface-btn-hover);
  border-color:var(--stroke-hover);
}
.layout-settings-page :is(
  #btnLayoutSettingsClearDeviceCache,
  #btnLayoutSettingsAddEmailSignIn
){
  align-self:flex-end;
}

[data-theme="classic"] .home-hier-tree-page--structure-map{
  --portiva-map-bg:#fff;
  background:#fff;
}

.asset-page > .asset-photo-readonly-mount .asset-photo-panel__placeholder--empty{
  min-height:5rem;
}

.add-asset-pick-page .add-asset-type-tile{
  min-height:64px;
  padding:6px 8px;
}
.story-page__radius-menu-panel{
  background:#fff !important;
  background-color:#fff !important;
  background-image:none !important;
  opacity:1 !important;
  backdrop-filter:none !important;
}
.story-page__radius-menu-item{
  background-color:#fff;
}
[data-theme="classic"] .story-page__radius-menu-panel,
[data-theme="day"] .story-page__radius-menu-panel,
[data-theme="dawn"] .story-page__radius-menu-panel{
  background:#fff !important;
  background-color:#fff !important;
  opacity:1;
  backdrop-filter:none;
}
[data-theme="night"] .story-page__radius-menu-panel,
[data-theme="night-gray"] .story-page__radius-menu-panel,
[data-theme="gray-night"] .story-page__radius-menu-panel{
  background:#1a2234 !important;
  background-color:#1a2234 !important;
  border-color:rgba(255,255,255,.28);
  opacity:1;
  backdrop-filter:none;
}
[data-theme="night"] .story-page__radius-menu-item,
[data-theme="night-gray"] .story-page__radius-menu-item,
[data-theme="gray-night"] .story-page__radius-menu-item{
  background-color:#1a2234;
}
[data-theme="night"] .story-page__radius-menu-item,
[data-theme="night-gray"] .story-page__radius-menu-item,
[data-theme="gray-night"] .story-page__radius-menu-item{
  color:#fff;
}
[data-theme="night"] .story-page__radius-menu-item--on,
[data-theme="night-gray"] .story-page__radius-menu-item--on,
[data-theme="gray-night"] .story-page__radius-menu-item--on{
  color:#5eead4;
}
[data-theme="night"] .story-page__radius-menu-item:hover,
[data-theme="night"] .story-page__radius-menu-item:focus-visible,
[data-theme="night-gray"] .story-page__radius-menu-item:hover,
[data-theme="night-gray"] .story-page__radius-menu-item:focus-visible,
[data-theme="gray-night"] .story-page__radius-menu-item:hover,
[data-theme="gray-night"] .story-page__radius-menu-item:focus-visible{
  background:rgba(255,255,255,.1);
}
.story-page__watch-kind--muted,
.portiva-flow-page.story-page .story-page__watch-kind--muted{
  text-decoration-thickness:4px;
}
@media (max-width:899px){
  .add-asset-pick-page .add-asset-type-tile{
    min-height:42px;
    padding:4px 8px;
  }
  .story-page__watch-kind--muted,
  .portiva-flow-page.story-page .story-page__watch-kind--muted{
    text-decoration-thickness:4px;
  }
}

/* Welcome mobile: keep the Equity / Debt / Value demo compact. */
@media (max-width:900px){
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .welcome-overview-pie-demo.detailsChartSection--overview-tabs{
    padding:8px 10px 5px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .welcome-overview-pie-demo.detailsChartSection--overview-tabs:has(.home-overview-chart-pane--asset-gallery-open){
    padding-bottom:22px;
    overflow:visible;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .welcome-overview-pie-demo__summary{
    margin-top:5px;
    padding-bottom:0;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .home-overview-chart-tabs{
    margin:-6px 0 2px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockHeading,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartBlockTitle{
    margin:0 0 1px;
    font-size:.78rem;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieWrap{
    margin-top:0;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieChartSvgWrap{
    align-self:center;
    width:min(250px,72vw);
    padding:0;
    margin:-4px auto 0;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegend{
    margin:-10px 0 0;
    font-size:.74rem;
    line-height:1.2;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow--asset{
    padding:4px 2px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow--asset:has(> .pieLegendAssetLink){
    padding:0;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRow--asset > .pieLegendAssetLink{
    padding:4px 2px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupRow{
    gap:8px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupMeta,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendRollupEq,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendFolderLink,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendEntityLink,
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .portiva-overview-pie-layout .home-overview-pie-analyst .pieLegendAssetLink{
    font-size:.74rem;
    line-height:1.2;
  }
  /* Gallery photo: full content width on mobile (10px in from bubble edges). */
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .welcome-asset-gallery-demo{
    width:100%;
    margin:10px 0 8px;
    padding-bottom:4px;
  }
  body.portiva-route-welcome :is(.welcome-story-scrolly__pies, .welcome-manager-plan--pie) .welcome-asset-gallery-demo__image{
    width:100%;
    max-width:none;
    height:auto;
    max-height:none;
    aspect-ratio:530 / 391;
    object-fit:fill;
    border-radius:8px;
    box-shadow:none;
  }
}

/* Sync log (debug UID menu page) */
.sync-log-page__toolbar{
  margin: 0 0 10px;
}
.sync-log-page__status{
  margin: 0 0 10px;
}
.sync-log-page__pre{
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--portiva-menu-surface-border, var(--stroke));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--portiva-menu-surface, var(--portiva-field-bg)) 94%, #000 6%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 12rem;
  /* Structured log lines (timestamps, arrows) stay source → dest in Hebrew UI. */
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}
.sync-log-page__pre strong{
  font-weight: 700;
}

/* Activity log (signed-in overflow menu) */
.activity-log-page__filters{
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 12px;
}
.activity-log-page__filter{
  padding: 5px 10px;
  font-size: 0.75rem;
  line-height: 1.2;
  min-height: 0;
}
.activity-log-page__filter[aria-pressed="true"],
.activity-log-page__filter.activity-log-page__filter--active{
  border-color: #022c15;
  background: #052e16;
  color: #fff;
}
.activity-log-page__pre .activity-log-page__time{
  font-weight: 700;
  color: #166534;
}
html[data-theme="night"] .activity-log-page__pre .activity-log-page__time,
html[data-theme="night-gray"] .activity-log-page__pre .activity-log-page__time,
html[data-theme="gray-night"] .activity-log-page__pre .activity-log-page__time{
  color: #2ea043;
}
.activity-log-page__pre .activity-log-page__size{
  font-weight: 700;
  font-size: 0.9rem;
}
.activity-log-page__support{
  margin: 14px 0 0;
}
.activity-log-page__support-link{
  font-size: inherit;
}
