/* Shared interface layer. Financial values and alert thresholds stay in roi.js. */
.account-shell .demo-snapshot-banner:has(.ui-demo-details){padding:10px 16px;margin-bottom:12px}
.account-shell .ui-demo-details{width:100%;font-size:12px;line-height:1.55;margin:0;padding:0;border:0;background:transparent}
.ui-demo-details summary{cursor:pointer;font-weight:650;color:#39664f}
.ui-demo-details> b,.ui-demo-details>span{display:block;margin-top:8px}
.account-shell .ui-demo-period .period-panel-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.account-shell .ui-demo-period .period-form{margin:0;width:auto;flex:none}
.account-shell .ui-demo-period .hint{margin:5px 0 0}
.ui-funnel-presets{display:flex;align-items:center;gap:6px;flex-wrap:wrap;width:100%;padding:8px 0}
.ui-funnel-presets>span{font-size:12px;color:#64748b;margin-right:6px}
.ui-funnel-presets button{padding:8px 12px!important;min-height:36px;font-size:12px!important;background:#f3f6fc!important;color:#374b6a!important;border:1px solid #dce4f0!important;border-radius:8px!important}
.ui-funnel-presets button[aria-pressed="true"]{background:#eaf1ff!important;color:#174fc4!important;border-color:#7aa5ee!important}
.ui-funnel-presets button:focus-visible,.ui-demo-details summary:focus-visible{outline:2px solid #2563eb;outline-offset:3px}
.funnel-summary>thead>tr>th[hidden],.funnel-summary>tbody>.funnel-product-row>td[hidden]{display:none!important}
@media(max-width:760px){.account-shell .ui-demo-period .period-panel-top{align-items:flex-start;flex-direction:column}.account-shell .ui-demo-period .period-form,.account-shell .ui-demo-period .button{width:100%}.ui-funnel-presets{gap:5px}.ui-funnel-presets>span{width:100%}}
:root { --ui-ink:#17243b; --ui-muted:#64748b; --ui-line:#e3e9f2; --ui-canvas:#f5f7fb; --ui-radius:14px; }
.account-shell { background:var(--ui-canvas); grid-template-columns:240px minmax(0,1fr); }
.account-shell .panel { border:1px solid var(--ui-line); border-radius:var(--ui-radius); box-shadow:0 3px 14px #14284b04; background:#fff; }
.account-shell .dashboard-page { padding:24px 28px 48px; min-width:0; }
.account-shell button,.account-shell .button { box-shadow:none; }
.account-shell .account-sidebar { padding:26px 16px 18px; gap:22px; box-shadow:none; }
.account-sidebar-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.account-menu-toggle { display:none; }
.account-shell .account-sidebar-nav { gap:5px; }
.account-shell .account-sidebar-link { min-height:53px; border-radius:10px; }
.account-shell .account-sidebar-link b { font-size:13px; line-height:1.4; }
.account-shell .account-sidebar-link.active { background:#2563eb; box-shadow:none; }
.account-shell .account-sidebar-secondary { margin-top:auto; padding-top:18px; border-top:1px solid #ffffff18; }
.account-shell .account-sidebar-home { margin-top:0; }
.account-shell .account-section-heading h1 { font-size:28px; letter-spacing:-.7px; }
.account-shell .account-section-heading { margin-bottom:20px; }
.account-shell .dashboard-account-header { position:relative; min-height:60px; height:auto; padding:12px 28px; z-index:25; }
.account-shell .online-user { flex-wrap:wrap; gap:8px; justify-content:flex-end; min-width:0; }
.account-shell .online-user > span { overflow-wrap:anywhere; }
.account-shell .header-link,.account-shell .online-user summary { background:transparent; font-size:12px; }
.account-shell .period-panel { padding:18px 20px; }
.account-shell .period-panel h2 { font-size:16px; }
.account-shell .period-panel .hint { max-width:440px; font-size:12px; }
.report-requirements { font-size:12px; color:var(--ui-muted); max-width:320px; }
.report-requirements summary { cursor:pointer; padding:5px 0; }
.account-shell .period-form { align-items:flex-start; }
.account-shell .build-report-action { display:flex; flex-direction:column; gap:5px; padding-top:19px; min-height:0; align-self:flex-start; }
.account-shell .report-requirements { margin:0; padding:0; }
.report-requirements small { display:block; padding:8px 0; line-height:1.5; }
.ui-context { position:sticky; top:0; z-index:24; padding:14px 18px 0; margin:16px 0; background:#fffffffa; border:1px solid var(--ui-line); border-radius:14px; box-shadow:0 6px 18px #13284908; backdrop-filter:blur(12px); }
.ui-context-top { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.ui-cabinet { display:flex; gap:9px; align-items:center; font-size:12px; color:var(--ui-muted); min-width:0; }
.ui-cabinet select { max-width:340px; min-width:0; font-weight:650; background:#f8faff; padding:9px 30px 9px 12px; border:1px solid var(--ui-line); border-radius:8px; color:var(--ui-ink); }
.ui-period { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:13px; color:var(--ui-ink); }
.ui-period a { font-size:12px; text-decoration:none; }
.ui-freshness { display:flex; gap:12px; flex-wrap:wrap; align-items:center; color:var(--ui-muted); font-size:12px; padding:10px 0; line-height:1.5; }
.ui-freshness a { color:#975b08; text-decoration:none; }
.ui-tabs { display:flex; gap:5px; overflow-x:auto; scrollbar-width:thin; margin-top:5px; }
.ui-tabs a { display:block; padding:12px 14px; flex-shrink:0; text-decoration:none; border-bottom:3px solid transparent; color:#65748a; font-size:13px; font-weight:650; }
.ui-tabs a[aria-current="page"] { color:#1557d2; border-bottom-color:#2563eb; }
.ui-section-hidden,.ui-context-original { display:none!important; }
.ui-section-empty[hidden] { display:none!important; }
.account-shell .parity-status { display:none; }
.account-shell .portfolio-block { display:block; padding:20px; margin-bottom:12px; border:1px solid var(--ui-line); border-radius:12px; background:#fff; }
.account-shell .portfolio-name { display:flex; align-items:baseline; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.account-shell .portfolio-name b { font-size:16px; color:var(--ui-ink); }
.account-shell .portfolio-name span { font-size:11px; color:var(--ui-muted); }
.account-shell .portfolio-cards { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.account-shell .portfolio-cards .card { min-width:0; padding:12px; border:1px solid var(--ui-line); border-radius:9px; box-shadow:none; font-size:15px; line-height:1.5; overflow-wrap:anywhere; }
.account-shell .portfolio-cards .card b { font-size:11px; font-weight:550; line-height:1.45; display:block; margin-bottom:5px; }
.account-shell .portfolio-cards .portfolio-primary { order:-1; font-size:24px; font-weight:700; grid-column:span 2; }
.account-shell .portfolio-cards .portfolio-profit { background:#f1f6ff; border-color:#dfe9fd; }
.account-shell .portfolio-cards .portfolio-roi { grid-column:span 1; }
.account-shell .portfolio-cards .portfolio-profit strong { font-weight:700; font-variant-numeric:tabular-nums; }
.portfolio-alerts,.portfolio-notice { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0 0; font-size:12px; line-height:1.5; }
.portfolio-alerts span { background:#fff7e5; color:#8a530c; border-radius:6px; padding:4px 8px; }
.portfolio-alerts a { margin-left:auto; text-decoration:none; white-space:nowrap; }
.portfolio-notice { display:block; color:#85570f; background:#fffbef; padding:8px 11px; border-radius:8px; }
.portfolio-notice summary { cursor:pointer; }
.portfolio-notice p { overflow-wrap:anywhere; margin:8px 0 0; }
.account-shell .recommendations-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.account-shell .recommendation-card { padding:18px; box-shadow:none; border:1px solid var(--ui-line); border-top:3px solid #a3b2c8; border-radius:12px; background:#fff; display:flex; flex-direction:column; }
.account-shell .recommendation-card[hidden] { display:none; }
.account-shell .recommendation-critical { border-top-color:#df4c52; }
.account-shell .recommendation-warning { border-top-color:#e7a53d; }
.account-shell .recommendation-opportunity { border-top-color:#337be4; }
.account-shell .recommendation-card h4 { font-size:15px; line-height:1.4; margin:12px 0 8px; }
.account-shell .recommendation-card p { font-size:13px; line-height:1.65; }
.account-shell .recommendation-data-link { margin-top:auto; padding-top:12px; text-decoration:none; font-weight:650; }
.account-shell .recommendation-top { flex-wrap:wrap; gap:7px; }
.account-shell .recommendation-top b { font-size:12px; }
.ui-task-notes-link { display:inline-flex; text-decoration:none; padding:8px 0; margin-bottom:8px; font-size:13px; }
.account-shell .financial-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px; background:#f8faff; border:1px solid var(--ui-line); border-radius:10px; }
.ui-table-controls { display:flex; flex:1 1 490px; flex-wrap:wrap; gap:10px; align-items:center; min-width:0; }
.ui-table-actions { display:flex; flex:0 1 auto; gap:10px; align-items:center; margin-left:auto; }
.account-shell .financial-toolbar #export-xlsx { margin:0!important; order:initial!important; white-space:nowrap; }
.account-shell .financial-toolbar .scale-control { margin:0; }
.account-shell .financial-toolbar .table-search { min-width:0; }
.account-shell .search-count { font-size:11px; color:var(--ui-muted); }
.cost-update-menu { position:relative; font-size:13px; }
.account-shell .cost-update-menu { margin:0; padding:0; border:0; }
.cost-update-menu > summary { cursor:pointer; list-style:none; padding:10px 14px; border:1px solid #ccd8ea; border-radius:8px; background:white; font-weight:650; color:#365071; }
.cost-update-menu > summary::after { content:" ▾"; }
.cost-update-menu .cost-update-actions { position:absolute; z-index:40; top:calc(100% + 6px); right:0; width:290px; max-width:80vw; padding:12px; display:grid; gap:10px; border:1px solid var(--ui-line); background:#fff; border-radius:10px; box-shadow:0 12px 28px #19334a20; }
.cost-update-menu .cost-update-actions button { width:100%; text-align:left; white-space:normal; font-size:12px; margin:0; }
.account-shell .financial-panel .product-report-tabs { padding:0 0 14px; margin-bottom:12px; border:0; }
.account-shell .table-wrap { max-width:100%; }
.account-shell #report-table { font-variant-numeric:tabular-nums; }
.account-shell #report-table thead th,.account-shell #report-table tfoot th,.account-shell .funnel-summary th { text-transform:none; letter-spacing:0; font-size:max(11px,.88em); line-height:1.4; padding-top:12px; padding-bottom:12px; }
.account-shell #report-table .article { overflow:hidden; text-overflow:ellipsis; }
.account-shell #report-table tbody td { padding-top:9px; padding-bottom:9px; }
.account-shell .financial-data-quality > details { background:#f9fbff; }
.account-shell .panel-heading { flex-wrap:wrap; gap:8px; }
.account-shell .panel-heading h3 { font-size:18px; letter-spacing:-.3px; }
.account-shell .notes-feed-tools,.account-shell .funnel-tools { gap:12px; flex-wrap:wrap; }
.account-shell .notes-feed-tools input,.account-shell .funnel-tools input { min-width:0; max-width:100%; }
.account-shell .funnel-note-cell textarea { width:100%; min-width:0; box-sizing:border-box; resize:vertical; }
.account-shell .funnel-note-actions { flex-wrap:wrap; }
.account-shell .note-feed-item { min-width:0; }
.ui-ctr-timeline { width:var(--funnel-detail-width,100%); max-width:100%; background:#fff; border:1px solid var(--ui-line); border-radius:12px; padding:16px; margin:12px 0; white-space:normal; text-align:left; }
.ui-ctr-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.ui-ctr-heading h4 { margin:0; font-size:16px; }
.ui-ctr-timeline p { font-size:12px; color:var(--ui-muted); margin:6px 0 12px; }
.ui-ctr-timeline svg { width:100%; max-height:220px; display:block; overflow:visible; }
.ui-ctr-timeline .ctr-line { fill:none; stroke:#2563eb; stroke-width:2.5; }
.ui-ctr-timeline .ctr-grid { stroke:#e9edf5; stroke-width:1; }
.ui-ctr-timeline .ctr-dot { fill:#2563eb; stroke:white; stroke-width:1.5; }
.ui-ctr-timeline .ctr-note-marker { stroke:#c08830; stroke-dasharray:4 4; }
.ui-ctr-timeline svg text { font:11px system-ui,sans-serif; fill:#64748b; }
.ui-ctr-note-list { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.account-shell .ui-ctr-note-list button { max-width:100%; white-space:normal; text-align:left; padding:7px 10px; background:#fff8e6; border:1px solid #f1e1bb; color:#79531b; font-size:12px; border-radius:8px; }
.ui-ctr-empty { padding:20px 0; }
.account-shell .panel,.account-shell #report-table,.account-shell .funnel-product-row { scroll-margin-top:155px; }
/* Landing: fewer navigation items and a readable, clearly labelled example. */
.landing-header .landing-features { position:relative; margin:0; padding:0; border:0; }
.landing-features > summary { cursor:pointer; font-size:13px; font-weight:650; }
.landing-feature-links { position:absolute; z-index:60; top:30px; left:0; width:210px; display:grid; gap:2px; background:#fff; border:1px solid var(--ui-line); padding:10px; border-radius:12px; box-shadow:0 15px 30px #20385818; }
.landing-feature-links a { padding:9px 10px; text-decoration:none; font-size:13px; }
.landing-main .hero-lead { max-width:540px; }
.landing-main .hero-benefits { display:grid; gap:12px; }
.landing-main .hero-benefits li { line-height:1.5; }
.landing-main .hero-product-preview { transform:none; padding:26px; background:#fff; border:1px solid #dfe7f4; border-radius:20px; box-shadow:0 24px 60px #12358420; color:#17243b; }
.hero-preview-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-bottom:20px; font-size:17px; }
.hero-preview-heading span { font-size:11px; color:var(--ui-muted); }
.hero-preview-metrics { display:grid; grid-template-columns:1.4fr 1fr; gap:12px; }
.hero-preview-metrics div { background:#f1f6ff; border:1px solid #e0e9fa; border-radius:12px; padding:18px; display:grid; gap:8px; }
.hero-preview-metrics small { font-size:12px; color:var(--ui-muted); }
.hero-preview-metrics strong { font-size:30px; letter-spacing:-.8px; }
.hero-preview-event { margin:18px 0; padding:16px; background:#fff8e7; border-radius:10px; font-size:13px; line-height:1.7; }
.hero-preview-event b { display:block; }
.hero-preview-flow { display:grid; gap:10px; margin:18px 0; }
.hero-preview-flow span { display:flex; justify-content:space-between; gap:8px; font-size:13px; padding-bottom:10px; border-bottom:1px solid var(--ui-line); }
.hero-product-preview figcaption { margin-top:16px; font-size:11px; color:var(--ui-muted); line-height:1.6; text-align:left; }
.hero-product-preview > a { display:inline-block; font-size:13px; font-weight:650; text-decoration:none; }
@media(min-width:1600px) { .account-shell .portfolio-cards { grid-template-columns:repeat(7,minmax(0,1fr)); } }
@media(max-width:1200px) {
  .account-shell .portfolio-cards { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .account-shell .recommendations-grid { grid-template-columns:1fr; }
  .account-shell .period-panel-top { flex-direction:column; align-items:stretch; }
  .account-shell .period-form { justify-content:flex-start; flex-wrap:wrap; min-width:0; }
}
@media(max-width:900px) {
  .account-shell { grid-template-columns:210px minmax(0,1fr); }
  .account-shell .dashboard-page { padding:20px 16px; }
  .account-shell .portfolio-block { padding:14px; }
  .account-shell .portfolio-cards .portfolio-primary { font-size:21px; }
  .ui-cabinet { width:100%; }
  .ui-cabinet select { flex:1; max-width:100%; }
  .ui-context { padding:12px 12px 0; }
  .ui-period { font-size:12px; }
}
@media(max-width:760px) {
  .account-shell { display:block; }
  .account-shell .account-sidebar { position:relative; height:auto; width:100%; padding:14px 16px; gap:0; }
  .account-shell .account-sidebar-top { width:100%; }
  .account-shell .account-sidebar-brand { display:grid; padding:0; gap:4px; }
  .account-menu-toggle { display:flex; align-items:center; gap:7px; background:#ffffff15!important; color:white!important; border:1px solid #ffffff28!important; padding:10px 13px; border-radius:9px; font-size:13px; }
  .account-shell .account-sidebar-nav { display:grid; grid-template-columns:minmax(0,1fr); padding-top:12px; }
  .account-shell .account-sidebar.is-enhanced:not(.is-menu-open) .account-sidebar-nav { display:none; }
  .account-shell .account-sidebar.is-menu-open .account-sidebar-nav { display:grid; }
  .account-shell .account-sidebar-secondary { margin-top:12px; }
  .account-shell .account-sidebar.is-enhanced:not(.is-menu-open) .account-sidebar-secondary { margin:0; padding:0; border:0; }
  .account-shell .account-sidebar-link b { font-size:14px; }
  .account-shell .account-sidebar-link small { display:block; }
  .account-shell .dashboard-account-header { min-height:46px; padding:8px 12px; }
  .account-shell .dashboard-page { padding:18px 12px 36px; }
  .account-shell .account-section-heading h1 { font-size:24px; }
  .account-shell .period-form { width:100%; display:flex; flex-wrap:wrap; gap:10px; }
  .account-shell .period-form > label { flex:1 1 115px; min-width:0; }
  .account-shell .period-form input { width:100%; min-width:0; }
  .account-shell .build-report-action { min-width:0; width:100%; }
  .account-shell .build-report-action button { width:100%; }
  .account-shell .panel { padding:14px; }
  .account-shell .portfolio-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .account-shell .portfolio-cards .portfolio-primary { grid-column:span 1; font-size:20px; }
  .account-shell .portfolio-cards .portfolio-profit { grid-column:span 2; }
  .account-shell .portfolio-cards .card { padding:10px; font-size:14px; }
  .account-shell .portfolio-cards .portfolio-profit strong { font-size:26px; }
  .portfolio-alerts a { margin-left:0; }
  .ui-context { position:relative; }
  .ui-table-actions { width:100%; justify-content:flex-end; flex-wrap:wrap; }
  .ui-table-controls { flex-basis:100%; }
  .account-shell .financial-toolbar .table-search { width:100%; flex-wrap:wrap; }
  .account-shell .financial-toolbar .table-search input { width:100%; min-width:0; }
  .account-shell .product-report-tabs .account-tab { max-width:100%; }
  .account-shell #report-table [data-column-index="1"] { position:static!important; width:160px!important; min-width:160px!important; max-width:160px!important; white-space:normal!important; }
  .account-shell .finance-methodology-tooltip { position:fixed; left:14px; right:14px; bottom:20px; top:auto; width:auto; max-height:70vh; overflow:auto; }
  .account-shell .demo-snapshot-banner { font-size:12px; }
  .account-shell .panel,.account-shell #report-table { scroll-margin-top:20px; }
  .account-shell .column-popover { max-width:calc(100vw - 40px); }
  .landing-header { flex-wrap:wrap; gap:10px; padding:12px 16px; }
  .landing-header nav { display:flex; flex-wrap:wrap; gap:12px; min-width:0; }
  .landing-header nav > a { font-size:12px; }
  .landing-header nav > a[href="/login"], .landing-header nav > a[href="/demo"] { display:inline-flex; }
  .landing-main .hero-product-preview { padding:18px; margin:16px 0; width:100%; }
  .hero-preview-metrics strong { font-size:23px; }
  .hero-preview-metrics div { padding:12px; }
}
@media(prefers-reduced-motion:reduce) { .account-shell * { scroll-behavior:auto!important; transition:none!important; } }
