:root { --v2-rail: 248px; --accent: #167b91; --accent-dark: #126b7e; --accent-soft: #f1f7f8; --text: #172333; --muted: #65758a; --border: #dce4ec; --bg: #fff; --font: Arial, sans-serif; }
body { padding-left: var(--v2-rail); background: #fff; transition: padding-left .2s; }
body.v2-compact { padding-left:66px; }
body.v2-compact #v2-sidebar { width:66px; }
#v2-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--v2-rail); background: white; border-right: 1px solid #dce4ec; z-index: 980; display: flex; flex-direction: column; overflow: hidden; }
.v2-brand { height: 66px; display: flex; align-items: center; gap: 6px; padding: 0 10px; flex: none; white-space: nowrap; font: 750 21px Inter, 'Segoe UI', sans-serif; letter-spacing: -1px; color: #172333; text-decoration: none; }
.v2-brand svg { width: 34px; height: 34px; flex: none; } .v2-brand b { color: #0e9295; }
.v2-brand .v2-word { display: inline-flex; align-items: baseline; gap: 2px; }
.v2-brand .v2-word small { font-size: 12px; font-weight: 600; letter-spacing: 0; margin-left: -1px; }
.site-acct-btn svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#siteMLinks { display: none !important; }
#dqCard > h2, #dqCard > .sec-body > .sec-help { display: none !important; }
.v2-filter-frame { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0 0 18px; padding: 12px; border: 1px solid #ddd; border-radius: 8px; background: #f7f7f7; }
.v2-filter-frame[hidden] { display: none; }
.v2-filter-frame #account-bar, .v2-filter-frame #dq-mine-bar, .v2-filter-frame #company-filter, .v2-filter-frame #overlap-filter, .v2-filter-frame #dq-filter, .v2-filter-frame #dq-iss-filter, .v2-filter-frame .hv .controls, .v2-filter-frame > .controls { width: 100%; box-sizing: border-box; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.v2-original-apply { display: none !important; }
.v2-currency-button { padding: 10px 14px; border: 1px solid #dce4ec; border-radius: 6px; background: #fff; color: #172333; font: 15px Arial,sans-serif; cursor: pointer; }
.v2-currency-dialog { box-sizing: border-box; width: min(560px, calc(100% - 30px)); max-height: calc(100% - 30px); padding: 24px; border: 1px solid #dce4ec; border-radius: 10px; background: #fff; color: #172333; }
.v2-currency-dialog::backdrop { background: rgba(0,0,0,.5); }
.v2-currency-overlay { position: fixed; inset: 0; z-index: 10002; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); }
.v2-currency-overlay[hidden] { display: none; }
.v2-currency-overlay .v2-currency-dialog { position: relative; overflow: auto; box-shadow: 0 8px 24px rgba(14,23,38,.16); }
.v2-currency-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2-currency-header h2 { margin: 0; font: 700 22px Arial,sans-serif; }
.v2-currency-close { padding: 0 4px; border: 0; background: transparent; font: 26px Arial,sans-serif; cursor: pointer; }
.v2-currency-dialog p { font: 15px/1.5 Arial,sans-serif; }
.v2-currency-fields select { max-width: 100%; }
#v2-links { overflow-y: auto; padding: 8px 9px; flex: 1; }
#v2-links a, #v2-links button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 7px; background: transparent; color: #172333; padding: 11px 12px; text-align: left; text-decoration: none; font: 14px Arial, sans-serif; white-space: nowrap; box-sizing: border-box; }
#v2-links a:hover, #v2-links button:hover, #v2-links a.on { background: #f1f7f8; color: #167b91; }
#v2-links svg, .v2-toggle svg, .v2-ai svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.v2-sub { margin: 3px 0 7px 23px; padding-left: 9px; border-left: 2px solid #9dc9d2; } .v2-sub[hidden] { display: none; } #v2-links .v2-sub a { padding: 9px 8px; font-size: 13px; white-space: normal; }
.v2-ai[hidden], #v2-links [hidden] { display: none !important; }
.v2-label { flex: 1; } body.v2-compact .v2-label, body.v2-compact .v2-word, body.v2-compact .v2-sub, body.v2-compact .v2-chevron { display: none; }
.site-nav-in { max-width: none; padding: 0 22px; } .site-nav .topbrand, .site-links, .site-burger { display: none !important; } .site-right { margin-left: auto; } .v2-toggle, .v2-ai { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #167b91; padding: 8px; } .v2-ai { background: #f1f7f8; border-radius: 7px; }
#v2-shade { display: none; } .site-main { max-width: 1260px; }
.hero { padding: 78px 0 48px; } .hero h1 { font-size: clamp(42px, 6vw, 82px); line-height: .97; letter-spacing: -.065em; text-transform: none; } .hero h1 em { color: inherit; } .hero p.lead { color: #65758a; max-width: 660px; font-size: 20px; } .btn-hero { border-radius: 6px; font-size: 15px; padding: 15px 24px; }
.home-sec > h2 { text-align: left; text-transform: none; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; } .home-sec > h2 em { color: inherit; }
.feat-grid { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; } .feat { border-radius: 10px; padding: 18px; } .feat .h { font-size: 15px; text-transform: none; } .feat .n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: #167b91; background: #e1f1f4; margin-bottom: 10px; } .feat .n svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
@media (max-width: 800px) { body, body.v2-compact { padding-left: 0; --v2-rail: 270px; } body.v2-compact #v2-sidebar { width:270px; } #v2-sidebar { transform: translateX(-100%); transition: transform .2s; } body.v2-drawer #v2-sidebar { transform: translateX(0); } body.v2-drawer #v2-shade { display: block; position: fixed; inset: 0; z-index: 979; background: #0006; } body.v2-compact .v2-label, body.v2-compact .v2-word, body.v2-compact .v2-chevron { display: initial; } body.v2-compact .v2-sub:not([hidden]) { display: block; } .v2-ai span { display: none; } }
@media (max-width: 600px) { .hero { padding: 40px 0; } .hero h1 { font-size: 44px; } .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feat { padding: 13px; } }
@media (prefers-reduced-motion: reduce) { body, #v2-sidebar { transition: none; } }
@media print { body, body.v2-compact { padding-left: 0 !important; } #v2-sidebar, #v2-shade, .v2-toggle, .v2-ai { display: none !important; } }

/* V6 reference shell and home layout */
body { font: 15px Arial,sans-serif; color: #172333; }
.site-nav { height: auto; min-height: 56px; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-nav-in { min-height: 56px; height: auto; padding: 10px 22px; gap: 12px; }
.v2-toggle { padding: 7px; color: #172333; font: 15px Arial,sans-serif; }
.v2-ai { margin-left: auto; padding: 10px 14px; font: 15px Arial,sans-serif; border: 1px solid #dce4ec; border-radius: 6px; }
.v2-ai svg { width: 20px; height: 20px; }
.v2-theme, .site-acct-btn { padding: 10px 14px !important; width: auto; height: auto; min-width: 42px; border: 1px solid #dce4ec !important; border-radius: 6px !important; background: white !important; color: #172333 !important; font: 15px Arial,sans-serif; }
.site-right { margin-left: 0; }
.v2-group-label { margin: 17px 10px 7px; font: 11px Arial,sans-serif; text-transform: uppercase; letter-spacing: .07em; color: #65758a; white-space: nowrap; }
#v2-links a.on, #v2-links button[aria-expanded=true] { color: #167b91; font-weight: 600; }
#v2-links button, #v2-bottom button, .v2-close { border-radius: 7px !important; }
#v2-links button[aria-expanded=true] .v2-chevron { transform: rotate(180deg); }
#v2-bottom { padding: 9px; border-top: 1px solid #dce4ec; }
#v2-bottom a, #v2-bottom button, .v2-close { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 11px 12px; border: 0; border-radius: 7px; background: transparent; color: #172333; text-decoration: none; text-align: left; white-space: nowrap; font: 14px Arial,sans-serif; }
#v2-bottom svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#v2-bottom a:hover, #v2-bottom button:hover { background: #f1f7f8; color: #167b91; }
.v2-close { display: none; }
body.v2-compact .v2-group-label { display: none; }
.site-main { max-width: 1260px; padding: 0 24px; }
#page-home .hero { padding: 78px 0 48px; text-align: center; }
#page-home .hero .eyebrow { margin: 0; color: #65758a; font: 16px Arial,sans-serif; }
#page-home .hero h1 { margin: 24px 0; font: 800 clamp(38px,6vw,82px)/.97 Arial,sans-serif; letter-spacing: -.065em; text-transform: none; }
#page-home .hero p.lead { font: 20px/1.55 Arial,sans-serif; color: #65758a; max-width: 660px; margin: 20px auto 26px; }
#page-home .btn-hero { font: 600 15px Arial,sans-serif; padding: 15px 24px; border-radius: 6px; }
#page-home .v2-features { margin: 0; }
#page-home .v2-features > h2 { display: none; }
.feat-grid { grid-template-columns: repeat(auto-fit,minmax(185px,1fr)); gap: 14px; }
.feat { display: flex; flex-direction: column; position: relative; gap: 9px; padding: 18px; border: 1px solid #dce4ec; border-radius: 10px; text-align: left; }
.feat .n { margin: 0; }
.feat .h { margin: 0; color: #172333; font: 600 15px Arial,sans-serif; }
.feat .d { color: #65758a; font: 12px Arial,sans-serif; }
.feat:nth-child(2) .n { background:#e8e9fb; color:#6357ad; } .feat:nth-child(3) .n { background:#e1f3e8; color:#28825c; } .feat:nth-child(4) .n { background:#fff0d9; color:#a76b18; } .feat:nth-child(5) .n { background:#e5edf9; color:#416ab1; }
.v2-card-arrow { position: absolute; right: 15px; top: 20px; color: #65758a; }
@media(max-width:800px) { .site-nav-in { padding: 9px 12px; } .v2-close { display: flex; } body.v2-compact .v2-group-label { display: block; } .site-main { padding: 0 15px; } #page-home .hero h1 { font-size: 44px; } .v2-ai { padding: 8px; } .v2-theme, .site-acct-btn { padding: 8px !important; } .feat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .feat { padding: 13px; } .feat .h { font-size: 13px; } }
@media(max-width:750px) { #page-home .hero { padding: 40px 0; } }
@media(max-width:600px) { .feat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .feat { padding: 13px; } .feat .h { font-size: 13px; } }

/* Use the available workspace width and the V6 table presentation. */
.site-main { max-width: none; width: 100%; }
.v2-ai[hidden] + .v2-theme { margin-left: auto; }
.v2-theme { min-width: 32px; padding: 8px !important; border: 0 !important; background: transparent !important; }
.v2-theme svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sitefoot { max-width: none; width: auto; margin: 40px 0 0 !important; padding: 24px !important; text-align: left; align-items: flex-start; }
.sitefoot .footlinks { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 24px; }
.legal-page { padding: 36px 0 80px; }
.legal-content { max-width: 100%; color: #172333; font: 15px/1.55 Arial,sans-serif; }
.legal-content h1 { font: 800 42px/1.1 Arial,sans-serif; letter-spacing: -2px; }
.legal-content h2 { font: 700 20px Arial,sans-serif; margin: 24px 0 6px; }
.legal-content p, .legal-content li { font: 15px/1.55 Arial,sans-serif; }
.legal-content .box { border: 1px solid #b00020; background: #fff6f6; padding: 10px 14px; border-radius: 6px; }
.v2-embedded-tool { display: block; width: 100%; height: 80vh; min-height: 500px; border: 0; background: #fff; }
#brokerage-panel { min-height: 0; }
#exchange-content table { width: 100%; }
#exchange-content .note { color: #65758a; padding-top: 14px; }
#api-documentation-content nav.side { border: 1px solid #dce4ec; border-radius: 10px; padding: 18px; margin-bottom: 24px; }
#api-documentation-content nav.side a { display: inline-block; margin: 4px 14px 4px 0; }
#api-documentation-content pre { overflow: auto; padding: 14px 16px; border-radius: 10px; background: #0f1b33; color: #e6edf9; }
.v2-view-hidden { display: none !important; }
.v2-promoted-title > h2, .v2-description-source { display: none !important; }
.page-head .v2-report-help { color: #65758a; font: 15px/1.55 Arial,sans-serif; margin-top: 12px; }
.page-head .v2-report-help p { margin: 0; }
#reportsCard > h2 { display: none; }
#reportsIdleNote { display: block; margin: 0 0 16px; color: #c62828; font-size: 14px; }
#reports:not(.reports-idle) > #reportsIdleNote { display: none; }
#reports.v2-settings-view > #reportsIdleNote { display: none; }
#reports.reports-idle #reportsCard { display: none; }
#accountBar .card.subcard > h2 .sec-arrow, #prefsCard .card.subcard > h2 .sec-arrow, #ownerWsCard .card.subcard > h2 .sec-arrow { display: none !important; }
#accountBar .card.subcard > h2, #prefsCard .card.subcard > h2, #ownerWsCard .card.subcard > h2 { cursor: default; }
#reportsCard > .sec-body > .site-tabs, #dqCard > .sec-body > .site-tabs, #ownerCard > .sec-body > .site-tabs { display: none; }
#siteMain .page-head h1 { font: 800 42px/1.1 Arial,sans-serif; letter-spacing: -2px; text-transform: none; }
#siteMain .page-head p { font: 15px/1.55 Arial,sans-serif; color: #65758a; }
#siteMain table { font: 14px Arial,sans-serif; border-collapse: collapse; border-spacing: 0; }
#siteMain #portfolio-table { min-width: 1560px; }
#siteMain table th, #siteMain table td { font-family: Arial,sans-serif; font-size: 14px; text-align: left !important; border: 0 !important; border-bottom: 1px solid #dce4ec !important; padding: 13px !important; }
#siteMain table th { background: #f1f7f8 !important; color: #172333; }
#siteMain table .rpt-sortable::after { content: '↕'; display: block; text-align: center; font: inherit; color: inherit; }
#siteMain table .rpt-sort-asc::after, #siteMain table .rpt-sort-desc::after { content: ' ↕'; display: inline; font: inherit; color: #167b91; }
@media(max-width:800px) { #siteMain .page-head h1 { font-size: 32px; } }

/* Shared spacing and navigation conventions. */
:root { --v2-space-xs: 4px; --v2-space-sm: 8px; --v2-space-md: 16px; --v2-space-lg: 24px; }
#siteMain .page-head { margin: var(--v2-space-md) 0 var(--v2-space-lg); }
#siteMain .page-head h1 { margin: 0 0 var(--v2-space-sm); }
#siteMain .card { box-sizing: border-box; }
#siteMain .card > .sec-body > .sec-help:first-child, #siteMain .card > .sec-help:first-child { margin-top: 0; }
#siteMain .sec-help p { margin: 0 0 var(--v2-space-md); }
#siteMain .table-scroll { max-width: 100%; }
#wsEmpty { color: #c62828 !important; margin: var(--v2-space-md) 0 !important; padding: 0 !important; }
#v2-links .v2-chevron { font-size: 0; display: inline-block; line-height: 1; transform-origin: center; }
#v2-links .v2-chevron::before { content: '▶'; font: 10px Arial,sans-serif; }
#v2-links button[aria-expanded=true] .v2-chevron { transform: rotate(-90deg); }
.print-btn, #txPopPrint, button[onclick*="printSection"], button[onclick*="window.print"] { display: none !important; }
#chatFab { display: none !important; }
.sitefoot { margin-left: var(--v2-space-lg) !important; margin-right: var(--v2-space-lg) !important; padding-left: 0 !important; padding-right: 0 !important; }
.v2-footer-theme { display: inline-flex; align-items: center; gap: var(--v2-space-sm); border: 0 !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important; background: transparent !important; color: #167b91 !important; font: 600 13px Arial,sans-serif; }
.v2-footer-theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .sitefoot, html[data-theme="dark"] .sitefoot .copyright, html[data-theme="dark"] .sitefoot .contact { color: #333 !important; }
@media(max-width:800px) { .sitefoot { margin-left: 15px !important; margin-right: 15px !important; } }
.v2-theme { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; min-width: 0; padding: 6px 10px !important; border: 1px solid #252525 !important; border-radius: 999px !important; background: #252525 !important; color: #fff !important; font: 13px Arial,sans-serif; }
.v2-theme svg { width: 16px; height: 16px; flex: none; }
html[data-theme="dark"] .v2-theme { filter: invert(1) hue-rotate(180deg) brightness(1.111); }
html[data-theme="dark"] .v2-theme svg { color: #ffd400; }
.v2-base-currency { margin: 0 0 20px; }
.v2-base-currency h2 { font-size: 20px; margin: 0 0 8px; }
#ownerStatsCard #supplementalSources { margin-top: 24px; }
@media(max-width:800px) { .v2-theme { padding: 6px 8px !important; font-size: 12px; } }
/* Keep the footer at the bottom while letting long pages grow normally. */
body { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 0; }
.site-main { flex: 1 0 auto; }
.sitefoot { margin-top: auto !important; }
.sitefoot { padding-bottom: 0 !important; }
#authCodeForm label { display: block; margin-bottom: 14px !important; }
#authCodeBtn { margin-top: 4px; margin-bottom: 6px; }
/* Keep the complete heading visible while either axis of a table scrolls. */
.table-scroll, .tblwrap, .cc-scroll, #dq-iss-scroll { max-height: 85vh; overflow: auto; }
.table-scroll table thead, .tblwrap table thead, .cc-scroll table thead { position: sticky; top: 0; z-index: 10; }
@media print { .table-scroll, .tblwrap, .cc-scroll, #dq-iss-scroll { max-height: none; overflow: visible; } .table-scroll table thead, .tblwrap table thead, .cc-scroll table thead { position: static; } }
body table th, #siteMain table th { text-align: center !important; }
@media(max-width:800px) { .site-nav-in { gap: 5px; padding-left: 10px; padding-right: 10px; } .v2-theme { flex-shrink: 0; gap: 4px; padding: 6px 5px !important; font-size: 11px; } .v2-currency-button { padding: 8px; } }
@media(max-width:420px) { .site-nav-in { gap: 3px; } .v2-ai { padding: 5px; } .site-acct-btn, .v2-currency-button { padding: 6px !important; font-size: 13px; } .v2-theme { font-size: 10px; } }
@media(max-width:360px) { .v2-theme span { display: none; } }
#siteMain #portfolio-table { table-layout: auto; }
#portfolio-table input.shares { width: auto !important; min-width: 12ch; }
#portfolio-table thead th:nth-child(1), #portfolio-table tbody tr:not(.filter-row) td:nth-child(1) { position: sticky !important; left: 0; z-index: 2; width: 52px !important; min-width: 52px !important; max-width: 52px !important; box-sizing: border-box; background: #fff; }
#portfolio-table thead th:nth-child(2), #portfolio-table tbody tr:not(.filter-row) td:nth-child(2) { position: sticky !important; left: 52px !important; z-index: 2; background: #fff; }
#portfolio-table thead th:nth-child(-n+2) { z-index: 6; }
.v2-ai, .v2-ai:hover, .v2-ai:focus { text-decoration: none !important; }

/* Common spacing for page content, reports, controls and footer. */
#siteMain .page-head { margin: 16px 0 24px; }
#siteMain .sec-body > .sec-help { margin: 0 0 16px; }
#siteMain .sec-body > .table-scroll { margin: 0 0 16px; }
#siteMain .sec-body > .card.subcard { margin-bottom: 16px; }
#siteMain .sec-help p:last-child { margin-bottom: 0; }
.sitefoot { padding-bottom: 18px !important; }

/* The documentation contents follow the introduction, one link per line. */
#api-documentation-content nav.side { margin: 16px 0 24px; }
#api-documentation-content nav.side a { display: block; margin: 6px 0; }

#page-home .hero { padding: 48px 0; }
#page-home .hero .lead { max-width: 850px; }
.v2-home-details { max-width: 850px; margin: 36px auto 0; text-align: left; font: 16px/1.55 Arial,sans-serif; }
.v2-home-details h2 { font: 700 24px Arial,sans-serif; margin: 0 0 16px; }
.v2-home-details ul { margin: 0; padding-left: 24px; }
.v2-home-details li { margin: 0 0 12px; }

#siteMain table .rpt-sortable::after, #siteMain table .rpt-sort-asc::after, #siteMain table .rpt-sort-desc::after { display: block !important; text-align: center; }

/* Keep the report identity columns visible at every screen size. */
:is(#allocation-table,#sector-table,#country-table,#company-table) :is(thead,tbody) :is(th,td):first-child { position: sticky; left: 0; z-index: 2; width: 52px !important; min-width: 52px !important; max-width: 52px !important; box-sizing: border-box; background: #fff; }
:is(#allocation-table,#sector-table,#country-table,#company-table) :is(thead,tbody) :is(th,td):nth-child(2) { position: sticky; left: var(--v2-first-col, 52px); z-index: 2; background: #fff; }
:is(#allocation-table,#sector-table,#country-table,#company-table) thead th:nth-child(-n+2) { z-index: 6; }

/* One shared style for the banner controls. */
.v2-toggle, .v2-ai, .v2-theme, .v2-currency-button, .site-acct-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; height: 40px; border: 1px solid #dce4ec !important; border-radius: 6px !important; background: #fff !important; color: #172333 !important; text-decoration: none; }
.v2-toggle:hover, .v2-ai:hover, .v2-theme:hover, .v2-currency-button:hover, .site-acct-btn:hover { background: #167b91 !important; border-color: #167b91 !important; color: #fff !important; }
html[data-theme="dark"] .v2-theme { filter: none; }
html[data-theme="dark"] .v2-theme svg { color: inherit; }
.v2-ai[hidden] { display: none !important; }
.v2-theme { font: 15px Arial,sans-serif !important; }
.v2-ai, .v2-ai:focus { background: #f1f7f8 !important; border-color: #dce4ec !important; color: #167b91 !important; box-shadow: none; }
.v2-ai:hover { background: #167b91 !important; border-color: #167b91 !important; color: #fff !important; }
.v2-ai svg { color: inherit; }
.v2-theme { background: #25303e !important; border-color: #25303e !important; color: #fff !important; }
html[data-theme="dark"] .v2-theme { background: #fff !important; border-color: #dce4ec !important; color: #172333 !important; filter: invert(1) hue-rotate(180deg) brightness(1.111); }
.v2-currency-button { background: #e1f3e7 !important; border-color: #b7ddc3 !important; }
.site-acct-btn { background: #fae5e5 !important; border-color: #edc1c1 !important; }
.v2-toggle { position: fixed; top: 10px; left: 10px; z-index: 981; }
#v2-sidebar { padding-top: 60px; box-sizing: border-box; }
.site-nav-in > .v2-brand { height: auto; padding: 0; flex: none; }
body.v2-compact .site-nav-in .v2-word { display: inline-flex; }
@media(max-width:800px) { .site-nav-in { padding-left: 60px; } #v2-sidebar { padding-top: 60px; } }
@media(max-width:650px) { .site-nav-in > .v2-brand .v2-word { display: none !important; } }
#chatPanel, body.chat-page #chatPanel.full { box-sizing: border-box; top: var(--v2-chat-top, 64px) !important; bottom: 0; height: auto !important; max-width: calc(100vw - var(--v2-chat-left, 0px)) !important; }
#chatPanel.full { left: var(--v2-chat-left, 0px) !important; right: 0; width: auto !important; }
#chatHead { flex: none; }
#chatBox { gap: 8px; }
#chatBox .v2-chat-prompt { order: 0; display: flex; align-items: flex-end; gap: 8px; }
#chatBoxRow { order: 2; margin-top: 0; flex-wrap: wrap; }
#chatPics { order: 1; }
#chatBox textarea { flex: 1; min-width: 0; border: 1px solid #c8d1e0 !important; border-radius: 6px; padding: 8px !important; }
#chatBox .v2-chat-prompt #chatSend { flex: none; }
.v2-chat-mic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid #c8d1e0; border-radius: 6px; background: #fff; color: #172333; cursor: pointer; }
.v2-chat-mic svg { width: 18px; height: 18px; }
.v2-chat-mic[aria-pressed="true"] { background: #c62828; color: #fff; }
.v2-chat-mic:disabled { opacity: .45; cursor: default; }
.v2-chat-mic-status { order: 1; color: #b00020; font-size: 12px; }
.v2-chat-mic-status:empty { display: none; }
.v2-chat-notices { flex: 0 1 auto; max-height: 25%; overflow-y: auto; padding: 0 14px; }
.v2-chat-notices #chatPics { margin: 8px 0; }
.v2-chat-notices #chatFine { margin: 6px 0; }
.v2-chat-file { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid #c8d1e0; border-radius: 6px; overflow-wrap: anywhere; }
.v2-chat-file button { border: 0; background: transparent; color: inherit; cursor: pointer; }
.chat-reader { margin-top: 4px; }
@media(max-width:420px) { .v2-toggle,.v2-ai,.v2-theme,.v2-currency-button,.site-acct-btn { height: 40px; } .v2-toggle,.v2-ai { padding: 5px; } .site-nav-in { gap: 3px; } }
#portfolio-table input.symbol { min-width: 150px; }
#portfolio-table input.symbol:placeholder-shown { border: 2px solid #c62828 !important; background: #fff3f3 !important; }
#portfolio-table input.symbol:placeholder-shown::placeholder { color: #000; opacity: 1; }
#hvCashLabel[hidden] { display: none !important; }

/* Main page panels are unframed; their internal subsections keep their frames. */
#siteMain .page .card.page-top, #siteMain .page .card.v2-promoted-title { border: 0 !important; border-radius: 0; box-shadow: none !important; padding: 0 !important; background: transparent; }

/* Table headings are slightly smaller and more distinct from the rows. */
#siteMain table thead th { font-size: 12px !important; background: #dcebed !important; }

/* Embedded documentation uses the same body and heading typography as the app. */
#siteMain .legal-content { font: 15px/1.55 Arial,sans-serif; }
#siteMain .legal-content :is(p,li,a,th,td) { font-family: Arial,sans-serif !important; }
#siteMain .legal-content :is(p,li) { font-size: 15px; line-height: 1.55; }
#siteMain .legal-content h1 { font: 800 42px/1.1 Arial,sans-serif; letter-spacing: -2px; }
#siteMain .legal-content h2 { font: 700 20px/1.3 Arial,sans-serif; }
#siteMain .legal-content h3 { font: 700 18px/1.3 Arial,sans-serif; }
@media(max-width:800px) { #siteMain .legal-content h1 { font-size: 32px; } }

/* The owner section already has its selected page heading and description. */
#ownerCard > h2, #ownerCard > .sec-body > .sec-help { display: none !important; }

/* A single rounded frame for scrollable tables throughout the application. */
#siteMain .table-scroll, #siteMain .tblwrap, #siteMain .cc-scroll:has(> table), #siteMain .legal-content .tbl { box-sizing: border-box; border: 1px solid #dce4ec; border-radius: 10px; overflow: auto; }
#siteMain .table-scroll, #siteMain .tblwrap, #siteMain .cc-scroll:has(> table), #siteMain .legal-content .tbl { width: fit-content; max-width: 100%; }
#siteMain :is(.table-scroll,.tblwrap,.legal-content .tbl), #siteMain .sec-body > .table-scroll { margin-block: 16px; }
#siteMain #wsAdd { margin-bottom: 16px; }
#siteMain #wsRefreshAll { margin-bottom: 16px; }
.site-nav-in .v2-ai, .site-nav-in .v2-theme, .site-nav-in .v2-currency-button, .site-nav-in .site-acct-btn { height: 36px; padding: 6px 10px !important; font-size: 14px !important; }
#siteMain table { border-radius: 9px; }
#siteMain .table-scroll > table, #siteMain .tblwrap > table, #siteMain .cc-scroll > table { margin: 0; }
#siteMain .table-scroll > table > thead > tr:first-child > :first-child { border-top-left-radius: 9px; }
#siteMain .table-scroll > table > thead > tr:first-child > :last-child { border-top-right-radius: 9px; }
#siteMain .table-scroll > table > tfoot > tr:last-child > :first-child, #siteMain .table-scroll > table:not(:has(tfoot)) > tbody > tr:last-child > :first-child { border-bottom-left-radius: 9px; }
#siteMain .table-scroll > table > tfoot > tr:last-child > :last-child, #siteMain .table-scroll > table:not(:has(tfoot)) > tbody > tr:last-child > :last-child { border-bottom-right-radius: 9px; }
#siteMain .legal-content .tbl > table > thead > tr:first-child > :first-child { border-top-left-radius: 9px; }
#siteMain .legal-content .tbl > table > thead > tr:first-child > :last-child { border-top-right-radius: 9px; }

/* Align heading text while reserving the arrow line for non-sortable columns. */
table thead th { vertical-align: bottom !important; }
table thead th:not(.rpt-sortable):not(.sortable):not([data-c])::after { content: '\00a0'; display: block; line-height: normal; }
#v2-links svg .soft-fill { fill: #e1f2f4; }

/* Text and numeric table editors grow to fit their contents. */
#siteMain table input.tbl-in:not([type="password"]), #portfolio-table input.account { width: auto; min-width: 12ch; max-width: none; }

/* Match the existing popups to the application panel and button styling. */
:is(#dialogOverlay,#saveOverlay,#pwOverlay,#deleteOverlay,#txPopOverlay,#compEditOverlay,#termsOverlay,#offlineOverlay,#chatModal) > div:first-child, #drModal .dr-box, #spinnerBox { box-sizing: border-box; background: #fff; border: 1px solid #dce4ec; border-radius: 10px !important; box-shadow: 0 8px 24px rgba(14,23,38,.16) !important; color: #172333; font-family: Arial,sans-serif; }
:is(#dialogOverlay,#saveOverlay,#pwOverlay,#deleteOverlay,#txPopOverlay,#compEditOverlay,#termsOverlay,#offlineOverlay,#chatModal,#drModal) button:not(.pop-x) { border-radius: 999px !important; font-family: Arial,sans-serif; }
:is(#dialogOverlay,#saveOverlay,#pwOverlay,#deleteOverlay,#txPopOverlay,#compEditOverlay,#termsOverlay,#offlineOverlay,#chatModal,#drModal) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { box-sizing: border-box; max-width: 100%; border: 1px solid #dce4ec !important; border-radius: 6px !important; font: 14px Arial,sans-serif; }

/* Keep inactive arrows paired and show the active direction in bold. */
table th.rpt-sortable::after, #siteMain table .rpt-sortable::after { content: '↑↓'; display: block; font-weight: 400; }
table th.rpt-sort-asc::after, #siteMain table .rpt-sort-asc::after { content: '↑'; display: block; font-weight: 800; color: #167b91; }
table th.rpt-sort-desc::after, #siteMain table .rpt-sort-desc::after { content: '↓'; display: block; font-weight: 800; color: #167b91; }

/* V3 table frames: visible scrollbars when needed, content-sized columns. */
:is(.table-scroll,.tblwrap,.cc-scroll:has(> table),.legal-content .tbl) { max-height: 85vh !important; overflow: auto !important; scrollbar-width: auto !important; }
:is(.table-scroll,.tblwrap,.cc-scroll:has(> table),.legal-content .tbl)::-webkit-scrollbar { display: initial !important; }
#siteMain :is(.table-scroll,.tblwrap,.cc-scroll,.legal-content .tbl) > table:not(#dq-table) { table-layout: auto !important; }
#siteMain #wsConns table.ws-sub { table-layout: auto !important; width: max-content !important; min-width: 100% !important; }
#siteMain #wsConns table.ws-sub th, #siteMain #wsConns table.ws-sub td { max-width: none !important; }
@media print { :is(.table-scroll,.tblwrap,.cc-scroll:has(> table),.legal-content .tbl) { max-height: none !important; overflow: visible !important; } }

@media (max-width: 420px) { .site-nav-in .v2-theme { font-size: 10px !important; } }
@media (max-width: 420px) { .site-nav-in .v2-ai, .site-nav-in .v2-theme, .site-nav-in .v2-currency-button, .site-nav-in .site-acct-btn { padding-left: 5px !important; padding-right: 5px !important; } }

/* Shared V2 branding and report controls. */
.v2-auth-brand { display:flex; align-items:center; justify-content:center; gap:8px; margin:0 auto 20px; white-space:nowrap; color:#172333; font:750 clamp(24px, 6vw, 36px) Inter, "Segoe UI", sans-serif; letter-spacing:-1px; }
.v2-auth-brand svg { width:clamp(42px, 10vw, 58px); height:clamp(42px, 10vw, 58px); flex:none; }
.v2-auth-word { display:inline-flex; align-items:baseline; gap:2px; }
.v2-auth-word b { color:#0e9295; }
.v2-auth-word small { font-size:.48em; font-weight:600; letter-spacing:0; margin-left:-1px; }
.v2-ai, .v2-ai:focus { background:#d8ebff !important; border-color:#9ec9f2 !important; color:#145995 !important; }
.v2-ai:hover { background:#1769aa !important; border-color:#1769aa !important; color:#fff !important; }
#account-filter { align-items:stretch; }
#account-filter label.chk-l, #hideAcctTagsLabel { display:flex; align-items:center; gap:6px; }
#account-filter label.chk-l input[type=checkbox], #hideAcctTagsLabel input[type=checkbox] { flex:none; margin:0; }

/* Align the checkbox column in each report's filter frame. */
#reports .acct-line { display:none !important; }
.v2-filter-frame { --v2-check-column:110px; }
.v2-account-row, .v2-filter-frame .cf-line:has(> .dq-checks-col) { display:grid !important; grid-template-columns:var(--v2-check-column) minmax(0, 1fr); column-gap:8px !important; align-items:start !important; width:100%; }
.v2-account-row > strong, .v2-filter-frame .cf-line:has(> .dq-checks-col) > strong { min-width:0 !important; }
.v2-filter-frame #account-filter, .v2-filter-frame .dq-checks-col { margin:0 !important; min-width:0; }
.v2-filter-frame .dq-checks-col input[type=checkbox] { flex:none; margin:0; }
.v2-filter-frame #hideAcctTagsLabel { margin:0 0 0 calc(var(--v2-check-column) + 8px) !important; align-items:flex-start; flex-wrap:wrap; }
@media(max-width:420px) { .v2-filter-frame { --v2-check-column:90px; } }

.v2-filter-frame #dq-mine-label, .v2-filter-frame #hvCashLabel { margin-left:calc(var(--v2-check-column) + 8px); }
.v2-filter-frame #dq-mine-label input[type=checkbox], .v2-filter-frame #hvCashLabel input[type=checkbox] { margin:0 6px 0 0; }

/* Report results, message colors, and persistent table scrollbars. */
.v2-filter-frame #hideAcctTagsLabel { margin-left:0 !important; }
.v2-filter-frame #hvCashLabel { margin-left:0; }
.v2-report-result, .wbox-info, .msg-info, #dq-count, #dq-iss-count, .ct-line, #apiLine, #drSrcShowing, #pf-lastsync, #pf-comp-mode, .ws-synced, #mcpOk { color:#1769aa !important; }
.note.warn, .wbox-warn, .wbox-err, .dq-empty-msg, .hv .warn { color:#b00020 !important; }
#cf-countbar, #ov-countbar, .dq-pager-top, .ct-pager-top, .hv-pager:not(.hv-pager-bottom) { display:none !important; }
:is(.table-scroll,.tblwrap,.cc-scroll:has(> table),.legal-content .tbl) { scrollbar-width:auto !important; scrollbar-color:#8093a5 #e8eef3; }
:is(.table-scroll,.tblwrap,.cc-scroll:has(> table),.legal-content .tbl)::-webkit-scrollbar { display:block !important; width:10px; height:10px; }
:is(.table-scroll,.tblwrap,.cc-scroll:has(> table),.legal-content .tbl)::-webkit-scrollbar-thumb { background:#8093a5; border-radius:6px; }
:is(.table-scroll,.tblwrap,.cc-scroll:has(> table),.legal-content .tbl)::-webkit-scrollbar-track { background:#e8eef3; }

/* Avoid repeatedly relaying out large reports while the sidebar changes width. */
body { transition:none; }
@media(min-width:801px) { .site-nav-in > .v2-brand { font-size:29px; } .site-nav-in > .v2-brand svg { width:43px; height:43px; } .site-nav-in > .v2-brand .v2-word small { font-size:15px; } }
#overlap-note { color:#b00020 !important; }

/* The sync timestamp uses the full mobile button row. */
@media (max-width:600px) { .btnrow #pf-lastsync { grid-column:1 / -1; white-space:nowrap; } }

.site-nav-in :is(.v2-theme, .site-acct-btn) { width: 38px; flex: 0 0 38px; padding: 0 !important; }
.site-acct-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
#installApp[hidden] { display: none; }

.site-nav-in .v2-currency-button { gap:4px; white-space:nowrap; }
.currency-chevron { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:2; }
.currency-flag { display:inline-block; min-width:18px; font-size:16px; line-height:1; text-align:center; }
.currency-select-wrap { position:relative; display:inline-block; max-width:100%; }
.currency-select-wrap #currencyChoice { width:100%; appearance:none; padding-right:30px !important; }
@font-face {
  font-family: 'Currency Flags';
  src: url('/static/icons/TwemojiCountryFlags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF;
}
.currency-flag,
.currency-select-wrap #currencyChoice,
.currency-select-wrap #currencyChoice option {
  font-family: 'Currency Flags', var(--font);
}
/* Let desktop Chromium paint option rows with the same font as the closed field. */
@media (pointer: fine) {
  @supports (appearance: base-select) {
    .currency-select-wrap #currencyChoice,
    .currency-select-wrap #currencyChoice::picker(select) { appearance: base-select; }
    .currency-select-wrap #currencyChoice::picker-icon { display: none; }
  }
}
.currency-select-wrap > svg { position:absolute; right:9px; top:50%; transform:translateY(-50%); pointer-events:none; }
#siteMenu button.site-mi { display:flex; align-items:center; gap:10px; }
#siteMenu .site-mi svg { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
#siteMenu #installApp[hidden] { display:none; }

.drawer-brand { display:none; }
@media (max-width:800px) {
  #v2-sidebar .drawer-brand { display:flex; }
  #v2-sidebar .drawer-brand .v2-word { display:inline-flex; }
}
#tickerHelpButton { background:transparent; color:inherit; border:0; padding:2px 4px; font:inherit; cursor:pointer; }
#tickerHelpDialog { box-sizing:border-box; max-width:min(420px,calc(100vw - 32px)); background:var(--surface,#fff); color:var(--text,#172333); border:1px solid var(--border,#ddd); border-radius:10px; padding:18px; }
#tickerHelpDialog::backdrop { background:#0007; }
#tickerHelpDialog h2 { margin:0 0 12px; }
#tickerHelpDialog p { margin:8px 0; }
#tickerHelpDialog form { margin-top:14px; text-align:right; }

#baseCurrency[hidden] { display:none !important; }
#tickerHelpButton svg { width:18px; height:18px; fill:none; stroke:var(--accent,#167b91); stroke-width:1.6; stroke-linecap:round; vertical-align:middle; }
#tickerHelpButton { min-width:30px; min-height:30px; }
#tickerHelpDialog form { margin:0; }
#wsAddOverlay > div, #compEditOverlay > div, #drModal .dr-box, #chatModal .card { position:relative; }
.popup-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
#pwBox, #deleteBox { display:grid; gap:12px; }
#pwBox > *, #deleteBox > * { margin:0 !important; }
#pwBox > .popup-actions, #deleteBox > .popup-actions { margin-top:4px !important; }
#pwMsg:empty, #deleteMsg:empty { display:none; }
#deleteSubmit:disabled { color:#8a8f96; background:var(--surface,white); border-color:var(--action-border); }
#portfolio-table input.symbol:placeholder-shown::placeholder { font-weight:400; }
