@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/public-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #18181b;
  --surface: #131315;
  --raised: #202024;
  --active: #27262a;
  --line: #2c2b30;
  --rule: #26252a;
  --control: #3a393e;
  --ink: #f1f0ee;
  --muted: #b1afb5;
  --faint: #939098;
  --accent: #dfc28b;
  --accent-dark: #393226;
  --positive: #92c4ad;
  --negative: #e29698;
  --radius: 7px;
  --gutter: clamp(20px, 2.4vw, 40px);
  --sidebar: 228px;
  --header: 62px;
  --font: 'Public Sans', 'Microsoft YaHei UI', 'PingFang SC', 'Noto Sans CJK SC', sans-serif;
  font: 14px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); min-width: 300px; }
button, input, select { font: inherit; font-variant-numeric: inherit; color: inherit; }
button, select { cursor: pointer; }
button { border: 0; background: transparent; }
button:disabled { cursor: default; opacity: .48; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 31px; line-height: 1.24; font-weight: 660; letter-spacing: -.025em; }
h2 { font-size: 17px; line-height: 1.35; font-weight: 620; }
h3 { font-size: 14px; font-weight: 600; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.faint, .dash { color: var(--faint); }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.topbar { position: sticky; z-index: 4; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-body { height: var(--header); max-width: 1760px; margin-inline: auto; display: flex; align-items: center; padding-inline: 21px var(--gutter); }
.brand { display: flex; gap: 11px; align-items: center; white-space: nowrap; width: calc(var(--sidebar) - 21px); flex: 0 0 auto; font-size: 17px; font-weight: 650; }
.brand img { display: block; }
.navigation { align-self: stretch; display: flex; align-items: stretch; gap: clamp(13px, 1.6vw, 26px); padding-left: var(--gutter); }
.navigation a { position: relative; display: flex; gap: 7px; align-items: center; white-space: nowrap; color: var(--faint); }
.navigation a:hover, .navigation a[aria-current] { color: var(--ink); }
.navigation a[aria-current]::after { content: ''; position: absolute; bottom: -1px; inset-inline: 0; height: 1px; background: var(--accent); }
.navigation .icon { width: 17px; height: 17px; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.freshness { display: inline-flex; gap: 7px; align-items: center; color: var(--faint); font-size: 12px; }
.status-light { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.button { display: inline-flex; width: fit-content; min-height: 35px; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 1px solid var(--control); border-radius: var(--radius); color: var(--muted); font-size: 12px; font-weight: 580; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.button:hover:not(:disabled) { background: var(--raised); color: var(--ink); border-color: var(--faint); }
.button.primary { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.button.primary:hover:not(:disabled) { background: var(--muted); color: var(--ground); }
.button.header-refresh { color: var(--ink); }
.header-refresh[aria-busy='true'] .icon { animation: spin 1.6s linear infinite; }
.icon-button { padding: 0; width: 31px; height: 31px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.icon-button:hover { background: var(--raised); color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Shell width = institution shelf + workspace. The overview width splits 1:1 after its 16px gutter. */
.workspace { max-width: 1760px; min-height: calc(100dvh - var(--header)); margin-inline: auto; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { align-self: start; position: sticky; top: var(--header); max-height: calc(100dvh - var(--header)); overflow: auto; padding: 28px 15px 20px 18px; display: flex; flex-direction: column; }
.sidebar-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sidebar-title h2 { font-size: 14px; }
.sidebar-title .icon-button { width: 29px; height: 29px; }
.search-field { display: flex; min-width: 0; align-items: center; gap: 7px; min-height: 36px; border: 1px solid var(--control); border-radius: var(--radius); padding: 0 9px; color: var(--faint); background: var(--surface); }
.search-field:focus-within { border-color: var(--accent); color: var(--ink); }
.search-field .icon { width: 16px; height: 16px; }
.search-field input { display: block; min-width: 0; width: 100%; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.search-field input::placeholder { color: var(--faint); }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }
.directory-entry { width: 100%; display: flex; align-items: center; gap: 5px; padding: 8px 1px 3px; color: var(--muted); text-align: left; font-size: 11px; }
.directory-entry:hover { color: var(--accent); }
.directory-entry .icon { width: 14px; height: 14px; }
.directory-entry #directory-shelf-count { margin-left: auto; color: var(--faint); }
.manager-list { flex: 1 1 auto; min-height: 118px; overflow: auto; scrollbar-width: thin; margin-block: 11px 15px; }
.manager-group { color: var(--faint); margin: 9px 0 2px; padding-left: 7px; font-size: 11px; }
.manager-row { display: grid; grid-template-columns: 29px minmax(0, 1fr) 12px; align-items: center; gap: 8px; min-height: 55px; padding: 7px 7px; width: 100%; text-align: left; color: var(--muted); border-bottom: 1px solid var(--rule); }
.manager-row:hover { background: var(--raised); color: var(--ink); }
.manager-row[aria-pressed='true'] { background: var(--raised); color: var(--ink); }
.manager-glyph { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--control); border-radius: 5px; color: var(--faint); font-size: 12px; font-weight: 600; }
.manager-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 590; }
.manager-name small { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--faint); font-size: 11px; font-weight: 400; }
.manager-row[aria-pressed='true'] .manager-name > span { border-bottom: 1px solid var(--accent); }
.manager-row .icon { width: 14px; height: 14px; color: var(--faint); }
.coverage { padding: 12px 9px 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.coverage-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.coverage-label strong { color: var(--ink); font-weight: 600; }
.coverage-meter { height: 3px; background: var(--control); margin-top: 9px; }
.coverage-meter i { display: block; height: 100%; background: var(--accent); }
.coverage-sub { color: var(--faint); font-size: 11px; margin-top: 7px; }
.sidebar-sources { display: flex; padding: 13px 7px; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.sidebar-sources span { flex: 1; }
.sidebar-sources .icon { width: 15px; height: 15px; }
.sidebar-empty { color: var(--faint); font-size: 12px; margin: 12px 0; }

.content { min-width: 0; padding: 26px var(--gutter) 28px; border-left: 1px solid var(--line); }
.view { min-width: 0; }
.profile-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.eyeline { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 12px; margin-bottom: 7px; }
.eyeline .icon { width: 15px; height: 15px; }
.profile-name { min-width: 0; }
.profile-name p { color: var(--faint); font-size: 13px; margin-top: 7px; overflow-wrap: anywhere; }
.profile-meta-divider { padding-inline: 7px; color: var(--faint); }
.profile-head .button { margin-top: 24px; }
.mobile-manager { display: none; }
.period-band { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); margin: 15px 0 16px; }
.periods { display: flex; gap: 18px; align-items: stretch; overflow: auto; scrollbar-width: thin; }
.period { white-space: nowrap; padding: 0 2px; color: var(--faint); min-height: 42px; font-size: 13px; border-bottom: 1px solid transparent; }
.period:hover { color: var(--ink); }
.period[aria-pressed='true'] { color: var(--accent); border-color: var(--accent); font-weight: 650; }
.period-dates { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; font-size: 12px; color: var(--faint); white-space: nowrap; }
.period-dates time { color: var(--muted); margin-left: 4px; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.summary { padding: 16px 20px 13px; min-width: 0; }
.summary-label { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.history-toggle { display: none; }
.summary-main { margin-top: 5px; font-size: 36px; font-weight: 610; line-height: 1.14; letter-spacing: -.045em; white-space: nowrap; }
.summary-main small { color: var(--muted); margin-left: 5px; line-height: 1; font-size: 15px; letter-spacing: 0; font-weight: 500; }
.summary-sub { min-height: 21px; color: var(--faint); margin-top: 6px; font-size: 12px; }
.summary-sub b { font-weight: 610; color: var(--ink); padding-right: 6px; }
.summary-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); gap: 10px; margin-top: 13px; padding-top: 9px; }
.summary-stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-left: 10px; border-left: 1px solid var(--line); }
.summary-stat:first-child { padding-left: 0; border-left: 0; }
.summary-stat strong { font-weight: 600; font-size: 19px; line-height: 1.2; }
.summary-stat span { color: var(--faint); line-height: 1.5; font-size: 12px; white-space: nowrap; }
.history { min-width: 0; padding: 15px 18px 11px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.history-heading h2 { font-size: 14px; }
.history-heading span { color: var(--faint); font-size: 11px; }
.history-chart { --plot-height: 92px; }
.chart-plot { display: grid; grid-template-columns: 38px minmax(0, 1fr); position: relative; height: var(--plot-height); }
.chart-axis { position: relative; color: var(--faint); line-height: 1; font-size: 11px; }
.chart-axis span { position: absolute; top: var(--y); transform: translateY(-50%); }
.chart-bands { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: 100%; position: relative; border-bottom: 1px solid var(--control); }
.chart-line { position: absolute; inset-inline: 0; top: var(--y); border-top: 1px solid var(--rule); pointer-events: none; }
.chart-bar { align-self: end; z-index: 1; padding: 0; position: relative; height: 100%; }
.chart-bar:disabled { opacity: 1; }
.chart-bar i { position: absolute; inset-inline: 25%; bottom: 0; height: var(--height); border-radius: 2px 2px 0 0; background: #56545a; }
.chart-bar[aria-pressed='true'] i { background: var(--accent); }
.chart-bar:hover:not(:disabled) i { background: var(--muted); }
.chart-bar.is-missing i { border-top: 1px dashed var(--faint); background: transparent; }
.chart-names { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-left: 38px; color: var(--faint); font-size: 11px; margin-top: 5px; text-align: center; }
.chart-names .current { color: var(--accent); }
.report-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); padding: 9px 11px; margin: -3px 0 16px; border-left: 1px solid var(--accent); background: var(--surface); }
.report-note .icon { width: 15px; height: 15px; color: var(--accent); }
.report-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.ledger { min-width: 0; }
.section-heading { min-height: 58px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading p { color: var(--faint); margin-top: 5px; font-size: 12px; }
.heading-label, .actions { display: flex; align-items: center; gap: 8px; }
.heading-label { flex-wrap: wrap; gap: 2px 9px; }
.heading-label span { font-size: 12px; }
.ledger-controls { display: flex; justify-content: space-between; align-items: end; gap: 10px; padding: 0 15px; border-bottom: 1px solid var(--line); }
.change-filters { display: flex; flex: 0 1 auto; min-width: 0; gap: 11px; overflow-x: auto; scrollbar-width: thin; }
.filter { display: inline-flex; align-items: center; gap: 5px; padding: 0 1px; min-height: 42px; white-space: nowrap; border-bottom: 1px solid transparent; color: var(--faint); font-size: 12px; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed='true'] { color: var(--ink); border-color: var(--accent); }
.filter-count { font-size: 11px; color: var(--faint); }
.filter[aria-pressed='true'] .filter-count { color: var(--accent); }
.ledger-searches { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; min-width: 0; }
.ledger-searches .search-field { width: min(15vw, 202px); min-height: 32px; }
.ledger-searches input { font-size: 12px; }
select, .field input { background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius); min-height: 32px; padding: 0 6px; font-size: 12px; }
.table-wrap { overflow-x: auto; min-width: 0; }
.holdings-table { border-collapse: collapse; width: 100%; text-align: left; table-layout: fixed; }
.holdings-table th, .holdings-table td { padding: 0 11px; border-bottom: 1px solid var(--rule); }
.holdings-table th:first-child, .holdings-table td:first-child { width: 28%; padding-left: 15px; }
.holdings-table th:nth-child(2) { width: 13%; }
.holdings-table th:nth-child(3), .holdings-table th:nth-child(4), .holdings-table th:nth-child(5) { width: 15%; }
.holdings-table th:last-child, .holdings-table td:last-child { width: 14%; padding-right: 15px; }
.holdings-table th { height: 36px; color: var(--faint); font-size: 12px; font-weight: 450; }
.holdings-table th button { display: inline-flex; align-items: center; justify-content: flex-end; white-space: nowrap; gap: 3px; padding: 0; color: inherit; min-height: 31px; }
.holdings-table th:first-child button { justify-content: flex-start; }
.holdings-table th button:hover, .holdings-table th[aria-sort] button { color: var(--ink); }
.holdings-table th .icon { width: 13px; height: 13px; color: var(--faint); }
.holdings-table td { height: 51px; font-size: 13px; }
.holdings-table tr:hover td { background: var(--raised); }
.holdings-table .numeric { text-align: right; white-space: nowrap; }
.security-button { display: flex; align-items: center; text-align: left; gap: 9px; width: 100%; padding: 0; min-height: 43px; }
.security-button:hover .security-text strong { color: var(--accent); }
.security-code { border: 1px solid var(--line); color: var(--accent); border-radius: 4px; padding: 3px 5px; min-width: 46px; font-size: 11px; text-align: center; font-weight: 630; white-space: nowrap; }
.security-code.cusip { color: var(--faint); }
.security-text { min-width: 0; }
.security-text strong, .security-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.security-text strong { font-weight: 600; }
.security-text small { font-size: 11px; color: var(--faint); }
.change-mark { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; color: var(--muted); }
.change-mark .direction { font-size: 14px; width: 10px; text-align: center; }
.change-mark.increased, .change-mark.added { color: var(--positive); }
.change-mark.reduced, .change-mark.removed { color: var(--negative); }
.weight-value { display: flex; justify-content: flex-end; align-items: center; gap: 7px; }
.weight-bar { width: 26px; height: 2px; background: var(--control); display: inline-block; }
.weight-bar i { display: block; height: 100%; background: var(--accent); }
.holdings-table .row-mobile-meta { display: none; }
.table-end { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 9px 15px; font-size: 12px; color: var(--faint); }
.empty { min-height: 90px; padding: 19px 15px; color: var(--faint); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filing-footer { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--faint); font-size: 12px; }
.filing-footer .icon { width: 15px; height: 15px; }
.filing-footer a { margin-left: auto; white-space: nowrap; color: var(--muted); }

.page-heading { margin-bottom: 19px; }
.page-heading p { margin-top: 6px; color: var(--faint); }
.stock-query { padding: 0 15px 13px; }
.stock-query .periods { margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.stock-form { display: flex; gap: 8px; }
.stock-form .search-field { max-width: 520px; flex: 1; }
.stock-matches { display: grid; gap: 4px; margin-top: 8px; }
.stock-match { display: flex; align-items: center; gap: 9px; text-align: left; min-height: 40px; padding: 5px 6px; border-bottom: 1px solid var(--rule); }
.stock-match:hover, .stock-match[aria-pressed='true'] { background: var(--raised); }
.stock-match .security-text { flex: 1; }
.stock-result { margin-top: 16px; }
.simple-table { border-collapse: collapse; width: 100%; text-align: left; }
.simple-table th, .simple-table td { padding: 9px 14px; border-bottom: 1px solid var(--rule); }
.simple-table th { color: var(--faint); font-size: 12px; font-weight: 450; }
.simple-table td { font-size: 13px; }
.simple-table td:last-child, .simple-table th:last-child { text-align: right; white-space: nowrap; }
.simple-table .numeric { text-align: right; white-space: nowrap; }
.simple-table a:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button { padding: 0; text-align: left; }
.text-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.stock-comment { padding: 10px 14px; color: var(--faint); font-size: 12px; }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.source-card { padding: 14px; }
.source-card h2 span { display: block; color: var(--faint); margin: 3px 0 8px; font-size: 12px; font-weight: 480; }
.source-card p { color: var(--muted); font-size: 13px; }
.source-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 12px; }
.source-links a { color: var(--accent); }
.source-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.source-links .icon { width: 14px; height: 14px; }
.guide-grid .source-card { display: flex; flex-direction: column; gap: 9px; }
.guide-grid .source-links { margin-top: auto; padding-top: 3px; }
.notices, .methodology { margin-top: 16px; }
.methodology { padding: 15px; }
.methodology dl { margin: 9px 0 0; }
.methodology dl > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); padding: 10px 0; border-top: 1px solid var(--rule); }
.guide-methods dl > div { grid-template-columns: 166px minmax(0, 1fr); gap: 12px; }
.methodology dt { font-weight: 595; }
.methodology dd { margin: 0; color: var(--muted); font-size: 13px; }

body:has(dialog[open]) { overflow: hidden; }
.dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 0; }
.dialog::backdrop { background: rgb(3 3 4 / 65%); }
.action-dialog { width: 460px; }
.directory-dialog { width: 590px; }
.directory-dialog[open] { display: flex; flex-direction: column; }
.directory-controls { display: flex; gap: 7px; padding: 12px 17px 5px; }
.directory-controls .search-field { flex: 1; }
.directory-status { color: var(--muted); padding: 4px 17px 8px; min-height: 27px; font-size: 12px; }
.directory-results { min-height: 100px; max-height: min(54dvh, 460px); overflow: auto; scrollbar-width: thin; border-top: 1px solid var(--line); }
.directory-result { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; min-height: 51px; padding: 6px 17px; border-bottom: 1px solid var(--rule); }
.directory-result:last-child { border-bottom: 0; }
.directory-result strong, .directory-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-result strong { font-size: 13px; font-weight: 600; }
.directory-result small { font-size: 11px; color: var(--faint); }
.directory-result .icon-button { width: 31px; height: 34px; }
.directory-footer { display: flex; justify-content: space-between; gap: 6px; padding: 9px 17px; border-top: 1px solid var(--line); }
.directory-pages { display: flex; gap: 5px; }
.detail-dialog { margin: 0 0 0 auto; width: 475px; max-width: 100vw; min-height: 100dvh; border-radius: 0; border-block: 0; border-right: 0; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 18px; }
.dialog-header p { color: var(--faint); font-size: 12px; margin-top: 5px; }
.dialog-main { padding: 16px 20px 20px; }
.dialog-main > p { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.field { display: grid; gap: 5px; margin: 10px 0; font-size: 13px; }
.field input, .field select { width: 100%; min-height: 39px; padding-inline: 8px; font-size: 13px; }
.form-hint { font-size: 12px; color: var(--faint); }
.form-status { margin: 10px 0; color: var(--accent); font-size: 13px; }
.detail-data { margin: 0 0 12px; }
.detail-data div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.detail-data dt { color: var(--faint); }
.detail-data dd { margin: 0; text-align: right; }
.detail-filings { border-top: 1px solid var(--line); padding-top: 11px; margin-top: 15px; }
.detail-filings h3 { margin-bottom: 5px; }
.detail-filings a { display: flex; gap: 7px; align-items: center; min-height: 33px; font-size: 12px; color: var(--accent); }
.detail-filings a:hover { text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; inset: auto 19px 21px auto; margin: 0; padding: 10px 12px; max-width: min(440px, calc(100vw - 32px)); background: var(--raised); border: 1px solid var(--control); border-radius: var(--radius); color: var(--ink); z-index: 6; font-size: 13px; }
.noscript { position: fixed; bottom: 22px; right: 22px; }

body:is([data-view-mode='markets'], [data-view-mode='national'], [data-view-mode='holder']) .workspace { grid-template-columns: minmax(0, 1fr); }
body:is([data-view-mode='markets'], [data-view-mode='national'], [data-view-mode='holder']) :is(.sidebar, .header-tools) { display: none; }
body:is([data-view-mode='markets'], [data-view-mode='national'], [data-view-mode='holder']) .content { border-left: 0; }
.market-view { max-width: 1350px; margin-inline: auto; }
.market-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.market-switch { flex-shrink: 0; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.market-switch button { min-height: 33px; min-width: 72px; padding-inline: 10px; border-radius: 4px; color: var(--muted); }
.market-switch button[aria-pressed='true'] { background: var(--accent-dark); color: var(--accent); }
.market-switch button:hover { color: var(--ink); }
.market-query { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.market-stock { flex: 1 1 260px; max-width: 460px; }
.market-field { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 12px; }
.market-field select { min-height: 36px; padding: 0 8px; color: var(--ink); }
.market-query .button { min-height: 36px; }
.national-period select { min-width: 110px; }
.national-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 13px; }
.national-groups button { display: grid; gap: 3px; align-content: center; min-height: 67px; padding: 9px 12px; border-left: 2px solid var(--line); text-align: left; }
.national-groups button[aria-pressed='true'] { border-color: var(--accent-dark); border-left-color: var(--accent); background: var(--raised); }
.national-groups button[aria-pressed='true'] strong { color: var(--accent); }
.national-groups button:hover { background: var(--raised); }
.national-groups button span { color: var(--muted); font-size: 12px; }
.market-result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 13px 15px 10px; column-gap: 15px; row-gap: 8px; }
.market-result-head h2 .security-code { margin-left: 3px; vertical-align: 2px; }
.market-result-tools { display: flex; align-items: center; gap: 7px; min-width: 0; }
.market-result-tools:empty { display: none; }
.market-local-filter { width: 205px; min-height: 34px; }
.market-title-unit { color: var(--faint); font-size: 13px; font-weight: 500; }
.market-table { min-width: 745px; }
.market-table th { background: var(--raised); }
.market-table th, .market-table td { padding: 8px 15px; }
.market-table tbody tr:hover td { background: var(--raised); }
.market-subject { min-width: 170px; max-width: 380px; overflow-wrap: anywhere; }
.market-subject strong { font-weight: 590; }
.market-sub { display: block; margin-top: 2px; color: var(--faint); font-size: 11px; font-weight: 400; }
.market-date, .market-security { white-space: nowrap; }
.market-security { min-width: 118px; }
.market-link { color: var(--accent); }
.market-link .icon { width: 12px; height: 12px; }
.market-link:hover { color: var(--ink); }
.account-link { color: var(--ink); }
.account-link .icon, .account-link:hover { color: var(--accent); }
.market-positive { color: var(--positive); }
.market-negative { color: var(--negative); }
.market-detail-button { min-height: 29px; }
.a-stock-table th:nth-child(2) { text-align: right; }
.market-status { color: var(--faint); padding: 8px 15px 11px; font-size: 12px; }
.market-table-end { min-height: 40px; }
.market-page-buttons { display: flex; align-items: center; gap: 8px; }
.market-page-buttons .button { min-height: 29px; }
.market-choices { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 15px; }
.market-choices p { width: 100%; color: var(--muted); }
.national-accounts { display: flex; align-items: end; flex-wrap: wrap; gap: 7px; padding: 0 15px 12px; }
.national-accounts label { width: min(100%, 530px); }
.national-accounts select { width: 100%; }
.national-accounts .button { min-height: 36px; }
.market-detail-date, #market-detail-content .detail-filings { margin: 10px 20px; color: var(--muted); font-size: 13px; }
.market-detail-table td { white-space: nowrap; }
.market-detail-table th, .market-detail-table td { padding-inline: 20px; }
#market-detail-content .detail-filings ul { margin: 5px 0 0; padding-inline-start: 17px; }
#market-detail-content .dialog-actions { padding: 0 20px 16px; }
.holder-back { display: inline-flex; align-items: center; gap: 2px; min-height: 28px; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.holder-back .icon { width: 15px; height: 15px; }
.holder-back:hover { color: var(--accent); }
.holder-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.holder-heading > div { min-width: 0; }
.holder-heading h1 { font-size: clamp(23px, 2vw, 30px); overflow-wrap: anywhere; }
.holder-timeline { margin-bottom: 14px; }
.holder-timeline-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 15px; }
.holder-period { grid-auto-flow: column; align-items: center; gap: 7px; }
.holder-period select { min-width: 122px; }
.holder-periods { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0 10px 8px; }
.holder-periods button { display: grid; gap: 4px; justify-items: start; padding: 7px 10px 8px; border-inline-start: 1px solid var(--rule); border-bottom: 1px solid var(--line); text-align: left; }
.holder-periods button:first-child { border-inline-start: 0; }
.holder-periods button[aria-pressed='true'] { border-bottom-color: var(--accent); background: var(--raised); }
.holder-periods button:hover { background: var(--raised); }
.holder-periods button > span:first-child, .holder-periods button small { color: var(--muted); font-size: 11px; }
.holder-periods button strong { font-size: 16px; font-weight: 600; }
.holder-period-bar { display: block; width: 100%; height: 2px; background: var(--line); }
.holder-period-bar i { display: block; height: 100%; background: var(--faint); }
.holder-periods button[aria-pressed='true'] .holder-period-bar i { background: var(--accent); }
.holder-changes { display: flex; flex-wrap: wrap; gap: 6px 13px; font-size: 12px; }
.holder-table .market-security { min-width: 150px; }
.market-table-wrap { scroll-margin-top: calc(var(--header) + 6px); }

@media (max-width: 1260px) {
  :root { --sidebar: 208px; }
  .ledger-controls { flex-wrap: wrap; gap: 0 8px; }
  .ledger-searches .search-field { width: 154px; }
  .holdings-table th, .holdings-table td { padding-inline: 6px; }
  .header-tools { gap: 10px; }
}

@media (max-width: 1000px) {
  :root { --header: 55px; }
  .sidebar { display: none; }
  .workspace { display: block; }
  .content { border-left: 0; padding-top: 15px; }
  .brand { width: auto; }
  .navigation { margin-left: 10px; padding-left: 14px; gap: clamp(9px, 1.5vw, 17px); }
  .periods { gap: 14px; }
  .mobile-manager { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; color: var(--faint); font-size: 12px; }
  .mobile-manager select { color: var(--ink); min-height: 34px; max-width: min(58vw, 320px); }
  .mobile-manager .icon-button { width: 34px; height: 34px; }
}

@media (max-width: 1140px) {
  .freshness { display: none; }
}

@media (min-width: 681px) and (max-width: 830px) {
  .navigation .icon { display: none; }
}

@media (max-width: 680px) {
  :root { --header: 52px; --gutter: 16px; }
  .topbar-body { padding-inline: var(--gutter); }
  .brand { font-size: 16px; gap: 8px; }
  .brand img { width: 29px; height: 29px; }
  .freshness { display: none; }
  .header-refresh { min-height: 36px; }
  .navigation { z-index: 4; position: fixed; margin: 0; inset: auto 0 0; padding: 0 0 env(safe-area-inset-bottom); height: calc(55px + env(safe-area-inset-bottom)); gap: 0; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); }
  .navigation a { flex: 1; min-width: 0; justify-content: center; flex-direction: column; gap: 2px; font-size: 11px; }
  .navigation a[aria-current]::after { top: 0; bottom: auto; inset-inline: 28%; }
  .workspace { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .mobile-manager { margin-bottom: 12px; }
  .mobile-manager .icon-button { width: 44px; min-height: 44px; }
  .mobile-manager select { flex: 1; min-width: 0; max-width: none; min-height: 44px; font-size: 14px; }
  .mobile-manager .button { flex: 0 0 auto; min-height: 44px; }
  .mobile-manager label { display: none; }
  .content { padding-top: 12px; padding-bottom: 14px; }
  h1 { font-size: 23px; }
  .profile-head .button { margin-top: 18px; }
  .profile-name p { font-size: 13px; margin-top: 4px; }
  .eyeline { font-size: 12px; margin-bottom: 4px; }
  .period-band { margin: 6px 0 10px; display: block; }
  .periods { gap: 11px; }
  .period { min-height: 44px; font-size: 13px; }
  .period-dates { justify-content: flex-start; padding: 1px 0 6px; }
  .overview { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
  .summary { padding: 10px 12px; }
  .history-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 31px; color: var(--muted); padding: 0; font-size: 13px; }
  .history-toggle .icon { width: 14px; height: 14px; }
  .history-toggle[aria-expanded='true'] .icon { transform: rotate(180deg); }
  .history:not(.expanded) { display: none; }
  .summary-main { font-size: 29px; margin-top: 1px; }
  .summary-sub { margin-top: 4px; min-height: 18px; }
  .summary-stats { margin-top: 7px; padding-top: 5px; }
  .summary-stat strong { font-size: 16px; }
  .summary-stat span { font-size: 13px; }
  .history { padding: 9px 12px 7px; }
  .history-heading { margin-bottom: 7px; }
  .history-chart { --plot-height: 53px; }
  .chart-axis { font-size: 11px; }
  .section-heading { padding: 8px 9px; min-height: 53px; }
  .heading-label h2 { font-size: 16px; }
  .heading-label span { font-size: 11px; }
  .actions { gap: 4px; }
  .actions .button { padding-inline: 6px; min-height: 40px; font-size: 13px; }
  .actions .button .icon { display: none; }
  .ledger-controls { padding: 0 8px; display: flex; flex-flow: column-reverse nowrap; align-items: stretch; gap: 0; }
  .ledger-searches { margin-bottom: 0; padding-top: 1px; width: 100%; }
  .ledger-searches .search-field { width: auto; flex: 1 1 0; min-height: 38px; }
  .ledger-searches select { min-height: 38px; width: 96px; flex: 0 0 auto; font-size: 13px; }
  .ledger-searches input, .stock-form input { font-size: 14px; }
  .change-filters { gap: 10px; width: 100%; }
  .filter { min-height: 41px; font-size: 13px; }
  .holdings-table th:nth-child(3), .holdings-table td:nth-child(3), .holdings-table th:nth-child(4), .holdings-table td:nth-child(4), .holdings-table th:nth-child(6), .holdings-table td:nth-child(6) { display: none; }
  .holdings-table th:first-child, .holdings-table td:first-child { width: 56%; padding-left: 8px; }
  .holdings-table th:nth-child(2) { width: 17%; }
  .holdings-table th:nth-child(5) { width: 27%; }
  .holdings-table th button { min-height: 32px; }
  .holdings-table th:nth-child(5), .holdings-table td:nth-child(5) { padding-right: 8px; }
  .holdings-table td { height: 63px; }
  .security-button { gap: 5px; min-height: 52px; }
  .security-code { min-width: 34px; padding: 3px; font-size: 11px; }
  .security-code.cusip { border: 0; max-width: 35px; overflow: hidden; text-overflow: ellipsis; }
  .security-text strong { font-size: 14px; }
  .security-text small { font-size: 12px; }
  .holdings-table .row-mobile-meta { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .change-mark { gap: 2px; font-size: 12px; }
  .change-mark .direction { display: none; }
  .table-end { padding-inline: 9px; }
  .filing-footer { align-items: flex-start; flex-wrap: wrap; }
  .filing-footer span { flex: 1; }
  .filing-footer a { margin-left: 21px; }
  .source-grid { grid-template-columns: 1fr; }
  .methodology dl > div { display: block; }
  .methodology dd { margin-top: 4px; }
  .simple-table th, .simple-table td { padding-inline: 7px; }
  .stock-table th:nth-child(3), .stock-table td:nth-child(3) { display: none; }
  .notice-table th:nth-child(3), .notice-table td:nth-child(3) { display: none; }
  .directory-controls, .directory-result, .directory-footer, .directory-status { padding-inline: 10px; }
  .directory-results { max-height: 47dvh; }
  .directory-result strong { font-size: 14px; }
  .directory-result .button, .directory-result .icon-button { min-height: 40px; }
  .toast { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .market-heading { flex-wrap: wrap; align-items: flex-start; gap: 9px 12px; margin-bottom: 12px; }
  .market-heading h1 { font-size: 25px; }
  .market-heading p { font-size: 13px; }
  .market-switch button { min-height: 36px; }
  .market-query { padding: 10px; gap: 7px; }
  .market-stock { flex-basis: 100%; }
  .market-query .button, .market-field select, .market-query .search-field { min-height: 39px; }
  .national-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .national-groups button { min-height: 53px; padding: 6px 9px; }
  .national-groups button span { font-size: 11px; }
  .market-result-head { padding-inline: 10px; }
  .market-result-tools { width: 100%; }
  .market-local-filter { flex: 1; }
  .market-table { display: block; min-width: 0; }
  .market-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .market-table tbody { display: grid; }
  .market-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; column-gap: 7px; row-gap: 5px; padding: 8px 10px; border-top: 1px solid var(--rule); }
  .market-table td { display: block; min-width: 0; max-width: none; padding: 0; border: 0; font-size: 12px; }
  .market-table td:last-child, .market-table td.numeric { text-align: left; }
  .market-table td[data-caption]::before { display: block; content: attr(data-caption); color: var(--faint); font-size: 10px; }
  .market-table .market-security, .market-table .market-subject { grid-column: 1 / -1; font-size: 13px; }
  .market-table .market-security { grid-column: span 2; order: -2; }
  .market-table .market-date { color: var(--faint); }
  .hk-table .market-date, .national-table .market-date { grid-column: span 1; order: -1; }
  .hk-table .market-date { grid-column: 1 / -1; }
  .hk-table .market-detail-button { min-height: 36px; }
  .market-table .market-sub { white-space: normal; }
  .market-table td.numeric { white-space: normal; overflow-wrap: anywhere; }
  .market-status { padding-inline: 10px; }
  .market-footer span { min-width: 75%; }
  .holder-heading { flex-wrap: wrap; margin-bottom: 12px; }
  .holder-timeline-heading { padding-inline: 10px; }
  .holder-periods { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 4px; padding-inline: 6px; }
  .holder-periods button:nth-child(3n + 1) { border-inline-start: 0; }
  .holder-table .market-security { min-width: 0; }
  .holder-table .market-date { order: -1; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; }
}

.publication-credit { padding: 8px var(--gutter) 18px; text-align: right; color: var(--faint); font-size: 12px; }
@media (max-width: 680px) { .publication-credit { padding-bottom: calc(68px + env(safe-area-inset-bottom)); } }
