/* ui-refine-20261002
   Presentation-only overlay for the live dashboard. Loaded as the last
   parser-inserted stylesheet so the bundle's chart token reader (Pe) sees
   these values on first render and after every theme toggle.
   Rules aimed at the position cards always start with `.posrow >` because
   `.pos` is also the positive-number class on table cells. Chart containers
   ([data-chart-*]) never get padding: the bundle sizes plots from them. */

/* ---------- Monospace face ----------
   Chromium cannot reach SF Mono by name and ignores ui-monospace, so every
   number fell back to Courier. "Cascadia Mono" sits after ui-monospace in both
   the CSS token and the bundle's hard-coded chart stack, so aliasing it fixes
   HTML and charts together in Chromium while Safari keeps SF Mono through
   ui-monospace and Windows keeps the real Cascadia Mono. */
@font-face {
  font-family: "Cascadia Mono";
  src: local("Cascadia Mono"), local("CascadiaMono-Regular"),
       local("Menlo Regular"), local("Menlo-Regular"), local("Consolas");
  font-weight: 100 549;
  font-style: normal;
}
@font-face {
  font-family: "Cascadia Mono";
  src: local("Cascadia Mono Bold"), local("CascadiaMono-Bold"),
       local("Menlo Bold"), local("Menlo-Bold"), local("Consolas Bold"), local("Consolas-Bold");
  font-weight: 550 900;
  font-style: normal;
}

/* ---------- Tokens (hex only: Plotly and the alpha helper parse them) ---------- */
html[data-theme="dark"] {
  --text-3: #838A96;
  --cat-9: #E8A0B4;
  --cat-11: #5DB7C9;
  --bg-hover: #1D2026;
  --bg-selected: #272B33;
  --scroll-shadow: rgba(255, 255, 255, .14);
}
html[data-theme="light"] {
  --text: #1E1C19;
  --text-2: #4D4A44;
  --text-3: #6B675F;
  --heat-pos: #9FD3BA;
  --heat-neg: #E8AFA6;
  --cat-9: #B07AA8;
  --cat-11: #1F7A8C;
  --bg-hover: #F2F1EC;
  --bg-selected: #E6E3DB;
  --scroll-shadow: rgba(23, 20, 16, .14);
}

/* ---------- Typography base ---------- */
.kpi__label, .rail__group, .sec__title, .colophon__label,
.data-table thead th, .dd-events__table thead th { letter-spacing: 0; text-transform: none; }
.kpi__label { font-size: 12px; }
.sec__title { font-size: 16px; line-height: 1.3; }
.dd-events__title { font-weight: 500; color: var(--text-2); }
.kv dt, .factor-row__value { font-size: 12.5px; }
.universe__chip, .kv__chip, .similarity-matrix__caption { font-size: 12px; }
.colophon__label { font-size: 11px; }
.data-table thead th, .dd-events__table thead th { font-size: 12px; font-weight: 500; color: var(--text-2); }
/* Latin terms that the section copy writes in capitals */
.sec--tables [data-table-pane="signal"] .data-table:has(td.warm) thead th:nth-last-child(-n+2) { text-transform: uppercase; }

/* ---------- Section rhythm: heads sit on space, title then note ---------- */
.dash__hero { border-bottom: 0; }
.sec__head:not(.sec__head--tables) { border-bottom: 0; }
@media (min-width: 821px) {
  .dash { row-gap: 40px; }
  .dash__hero { padding-bottom: 0; }
  .sec__head:not(.sec__head--tables) { padding-bottom: 0; margin-bottom: 14px; justify-content: flex-start; }
  .sec--daily-pnl .sec__head > div { flex: 1 1 auto; display: flex; align-items: baseline;
    justify-content: flex-start; flex-wrap: wrap; gap: 4px 16px; }
  .sec__head--tables { margin-bottom: 14px; border-bottom: 0; }
  .sec__head--tables > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
  .sec__head--tables > .tables__nav { border-bottom: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .dash__hero { padding-bottom: 0; }
  .sec__head:not(.sec__head--tables) { padding-bottom: 0; margin-bottom: 12px; }
}

/* ---------- Hero: title, numeral, KPIs ---------- */
.dash__id { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.dash__name { font-size: 26px; letter-spacing: -0.015em; line-height: 1.15; }
.dash__roman { margin: 0; color: var(--accent); font-family: var(--font-sans); font-size: 26px; font-weight: 500;
  letter-spacing: 0; line-height: 1.15; }                      /* no display: [hidden] on Complex keeps working */
.dash__sub { flex: 1 0 100%; margin-top: 8px; }
@media (max-width: 820px) { .dash__name, .dash__roman { font-size: 24px; } }
.kpis > .kpi:nth-child(n+5) .kpi__value { font-size: 18px; }
.kpis > .kpi:nth-child(n+6) > .kpi__value { color: var(--text); }   /* ratios are not up/down figures */
@media (min-width: 821px) and (max-width: 1799px) { .kpis { column-gap: 16px; } }
@media (min-width: 1800px) { .kpis > .kpi:nth-child(n+5) .kpi__value { padding-top: 5px; } }
@media (max-width: 820px) { .kpis > .kpi:nth-child(n+5) .kpi__value { font-size: 16px; } }
@media (min-width: 700px) and (max-width: 820px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .posrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Position cards ---------- */
.posrow > .pos { display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline; align-content: start; column-gap: 10px; }
.posrow > .pos > .pos__head { display: contents; }
.posrow > .pos .pos__label { grid-row: 1; grid-column: 1; color: var(--text); font-size: 13px; font-weight: 600; }
.posrow > .pos .pos__date { grid-row: 1; grid-column: 2; margin: 0; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.posrow > .pos .pos__tag { grid-row: 1; grid-column: 3; padding: 0; border-radius: 0; background: none;
  color: var(--text-2); font-size: 12px; }               /* no display: the [hidden] and :empty guards stay */
.posrow > .pos--now .pos__tag { display: none; }        /* static 已执行, never updated by the bundle */
.posrow > .pos .pos__body { grid-row: 2; grid-column: 1 / -1; margin-top: 10px; }
.posrow > .pos--next.is-changed .pos__tag--next { color: var(--accent); }
@media (min-width: 700px) and (max-width: 820px) {
  .posrow > .pos--next .pos__tag { grid-row: 2; grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
  .posrow > .pos--next .pos__body { grid-row: 3; }
  /* invisible spacer so the current list starts on the same row as the plan list */
  .posrow > .pos--now .pos__tag { display: block; visibility: hidden; grid-row: 2; grid-column: 1 / -1; margin-top: 4px; }
  .posrow > .pos--now .pos__body { grid-row: 3; }
}
@media (max-width: 480px) {
  .posrow > .pos { padding-inline: 12px; }
  .posrow > .pos .pos__tag { grid-row: 2; grid-column: 1 / -1; justify-self: start; margin-top: 4px; white-space: normal; }
  .posrow > .pos .pos__body { grid-row: 3; }
}
.posrow .position-row__book, .posrow .position-row__asset, .posrow .position-row--plain { font-family: var(--font-sans); }
.posrow .position-row__book { color: var(--text); }
.posrow .position-row__change { color: inherit; font-size: inherit; }
.posrow > .pos .position-row--plain { font-size: 16px; font-weight: 600; line-height: 1.35; }
@media (min-width: 821px) {
  .posrow > .pos .position-row:not(.position-row--plain) {
    grid-template-columns: minmax(48px, auto) 56px minmax(0, 11em) auto; justify-content: start; }
}
.posrow > .pos--next .position-row.is-changed { margin-inline: -8px; padding-inline: 8px; border-radius: 4px;
  background: var(--accent-soft); counter-increment: poschg; }
.posrow > .pos--next .pos__body { counter-reset: poschg; }
.posrow > .pos--next:has(.position-row.is-changed:not(.position-row--plain)) .pos__body::after {
  content: "共 " counter(poschg) " 本调整"; display: block; margin-top: 8px;
  color: var(--text-2); font-family: var(--font-sans); font-size: 12px; }
@media (max-width: 699px) { .posrow > .pos--next { order: -1; } }

/* ---------- Rail and topbar ---------- */
@media (min-width: 1101px) {
  .rail { background: var(--bg); }
  .navtab { gap: 6px; }
  .navtab__roman { min-width: 28px; }
  .navtab__meta { padding-left: 0; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
  .rail__clock { align-items: center; }
  .rail__clock time { display: inline-block; width: 5ch; overflow: hidden; white-space: nowrap; }
  .topbar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar__title { color: var(--text-2); font-size: 13px; font-weight: 500; letter-spacing: 0; }
}
@media (min-width: 1101px) and (max-height: 760px) {
  .navtab { padding-block: 5px; }
  .rail__group { margin: 8px 8px 3px; }
  .rail__brand { padding-top: 14px; padding-bottom: 8px; }
  .rail__desc { display: none; }
  .rail__foot { padding: 10px 20px 12px; gap: 8px; }
  .rail__actions { gap: 6px; }
}
@media (min-width: 1101px) and (max-height: 640px) {
  .rail__group, .rail__clock { display: none; }
  .navtab[data-tab="blend"] { margin-bottom: 6px; }
}
@media (min-width: 1101px) and (any-pointer: coarse) {
  .rail__brand { padding-top: 12px; padding-bottom: 8px; grid-template-columns: minmax(0, 1fr) 44px; }
  .sidebar-toggle { width: 44px; height: 44px; padding: 13px; }
  .sidebar-toggle--open { margin-block: -8px; margin-inline-start: -13px; }
  .rail__desc { display: none; }
  .rail__nav { gap: 0; padding-bottom: 8px; }
  .rail__group { margin: 6px 8px 2px; }
  .rail__foot { padding: 10px 16px max(12px, env(safe-area-inset-bottom)); gap: 8px; }
  .rail__actions { grid-template-columns: minmax(0, 1fr) 44px; }
  .refresh { padding-inline: 0; justify-content: center; }
  .refresh__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 1101px) and (any-pointer: coarse) and (max-height: 819px) {
  .rail__group, .rail__clock { display: none; }
  .rail__nav { padding-bottom: 0; }
  .navtab[data-tab="blend"] { margin-bottom: 6px; }
  .navtab[data-tab="blend"]::after { content: ""; position: absolute; left: 12px; right: 10px; bottom: -4px;
    height: 1px; background: var(--line-strong); }
}
@media (max-width: 1100px) {
  .rail__status { display: flex; }
  .rail__clock { display: none; }
  .rail__asof { display: grid; gap: 0; font-size: 10px; line-height: 1.25; }
  .rail__nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .rail__nav::after { content: ""; flex: 0 0 32px; }
  .navtab { justify-content: center; }
  .navtab.is-active { background: transparent; }        /* the amber underline is the one active cue */
  .topbar { display: none; }
}
@media (max-width: 1100px) and (max-height: 500px) and (any-pointer: coarse) {
  .refresh__text, .appearance__label { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 374px) { .rail__status { display: none; } }
@media (max-width: 820px) and (any-pointer: coarse) {
  /* Only the tab strip stays pinned on phones; the brand row scrolls away. */
  .rail { top: calc(env(safe-area-inset-top) - max(8px, env(safe-area-inset-top)) - 52px); }
  /* Keyboard focus on a brand-row control brings the whole rail back. */
  .rail:has(.rail__brand :focus-visible, .rail__foot :focus-visible) { top: 0; }
}
.topbar__hint { display: none; }

/* ---------- Daily P&L module ---------- */
.sec--daily-pnl tr:has(> td.pnl-holdings) > td:not(.pnl-holdings) { vertical-align: top; padding-top: 10px; }
.sec--daily-pnl tr:has(> td.pnl-holdings) > td { border-bottom-color: var(--line-strong); }
.sec--daily-pnl .pnl-holdings .data-table__multi-row { padding: 3px 0; }
.sec--daily-pnl .pnl-holdings .data-table__multi-row + .data-table__multi-row { margin-top: 0; padding-top: 3px; }
@media (min-width: 1101px) {
  .sec--daily-pnl .tables__body { max-height: min(720px, calc(100vh - 200px));
    max-height: min(720px, calc(100dvh - 200px)); }
  .card__body[data-chart-daily-pnl] { height: 320px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .sec--daily-pnl .tables__body { max-height: min(720px, calc(100vh - 160px));
    max-height: min(720px, calc(100dvh - 160px)); }
}
@media (any-pointer: coarse) { .sec--daily-pnl .tables__body { max-height: min(720px, 60svh); } }
@media (any-pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .sec--daily-pnl .tables__body { max-height: calc(100svh - 80px); }
}
@media (max-width: 820px) { .card__body[data-chart-daily-pnl] { height: 280px; } }
@media (max-width: 600px) {
  .sec--daily-pnl .data-table th.num:nth-last-child(2),
  .sec--daily-pnl .data-table td.num:nth-last-child(2) { position: sticky; right: 0;
    border-left: 1px solid var(--line); background: var(--bg-raised); box-shadow: -12px 0 12px -12px var(--scroll-shadow); }
  .sec--daily-pnl .data-table th.num:nth-last-child(2) { z-index: 3; }
  .sec--daily-pnl .data-table td.num:nth-last-child(2) { z-index: 1; }
  .sec--daily-pnl .data-table th:first-child, .sec--daily-pnl .data-table td:first-child { padding-inline: 8px; }
  .pnl-holdings .pnl-holding { justify-content: flex-start; gap: 12px; }
  .pnl-holdings .pnl-holding__return { order: -1; min-width: 7ch; }
}
@media (min-width: 601px) { .nav-years { padding: 12px 16px; } }
@media (min-width: 1140px) and (max-width: 1399px) { .pnl-range__summary > :first-child { flex-basis: 100%; } }
.sec--daily-pnl .pnl-range--table { margin: 0; border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.sec--daily-pnl .pnl-range--table:not([hidden]) + .tables__body { border-top-left-radius: 0; border-top-right-radius: 0; }
html[data-theme="light"] [data-chart-daily-pnl] .rangeslider-mask-min,
html[data-theme="light"] [data-chart-daily-pnl] .rangeslider-mask-max { fill: #171410 !important; fill-opacity: .08 !important; }
html[data-theme="dark"] [data-chart-daily-pnl] .rangeslider-slidebox { fill: #FFFFFF; fill-opacity: .07; }

/* Card toolbars join their card head */
.pnl-range--chart { border-top: 0; }
.card__head + .nav-years, .card__head + .pnl-range--chart { padding-top: 0; }

/* ---------- Shared table surfaces ---------- */
:is(.sec--daily-pnl, .sec--tables, .sec--eligibility) > .tables__body {
  background:
    linear-gradient(to right, var(--bg-raised) 30%, transparent) left center / 32px 100% no-repeat local,
    linear-gradient(to left, var(--bg-raised) 30%, transparent) right center / 32px 100% no-repeat local,
    linear-gradient(to right, var(--scroll-shadow), transparent) left center / 18px 100% no-repeat scroll,
    linear-gradient(to left, var(--scroll-shadow), transparent) right center / 18px 100% no-repeat scroll,
    var(--bg-raised);
}
.sec--tables .data-table thead th, .sec--eligibility .data-table thead th,
.sec--tables .table-more, .sec--daily-pnl .table-more,
.sec--eligibility .eligibility-table tbody td:last-child { background: var(--bg-raised); }
@media (max-width: 820px) {
  .sec--tables .data-table tbody td:first-child, .sec--daily-pnl .data-table tbody td:first-child,
  .sec--eligibility .data-table tbody td:first-child { background: var(--bg-raised); }
  /* room for the focus ring of the detail tabs inside the scrolling tab track */
  .sec__head--tables .tables__nav { width: calc(100% + 8px); margin: -4px; padding: 4px; }
  /* the detail tables get a window like the daily table, so a long 调仓记录 does not push the page */
  .sec--tables > .tables__body { max-height: min(720px, 60svh); overflow-y: auto; overscroll-behavior-y: auto; }
}
@media (hover: hover) {
  html[data-theme] .data-table tbody tr:hover td,
  html[data-theme] .dd-events__table tbody tr:hover td { background: var(--bg-hover); }
}
@media (hover: hover) and (max-width: 600px) {
  html[data-theme] .sec--daily-pnl .data-table tbody tr:hover td.num:nth-last-child(2) { background: var(--bg-hover); }
}
.data-table td.warm { color: var(--text); }
.data-table tr:has(td.warm) td.pos:last-child { color: var(--text); }
/* single-line sub-strategy trade table: the last column takes the slack */
[data-table-pane="trade"] .data-table:not(:has(td.data-table__cell--multi)) :is(th, td):last-child { width: 100%; }
@media (max-width: 820px) {
  [data-table-pane="trade"] .data-table td.data-table__cell--multi { max-width: none; }
  [data-table-pane="trade"] .data-table__multi-row { white-space: nowrap; }
}
.table-more__button { scroll-margin-bottom: 16px; border-radius: var(--r-md); }
@media (min-width: 1101px) {
  .sec--tables > .tables__body { max-height: min(520px, calc(100vh - 200px)); max-height: min(520px, calc(100dvh - 200px)); }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .sec--tables > .tables__body { max-height: min(520px, calc(100vh - 160px)); max-height: min(520px, calc(100dvh - 160px)); }
}
@media (any-pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .sec--tables > .tables__body { max-height: calc(100svh - 80px); }
}
[data-table-pane="trade"] .data-table tr:has(> td.data-table__cell--multi) > td:not(.data-table__cell--multi) { vertical-align: top; padding-top: 10px; }

/* ---------- Eligibility table: one line per check, scroll cue at the sticky verdict ---------- */
.eligibility-table tbody td { height: auto; }
.eligibility-table td > span { display: inline; margin: 0; }
.eligibility-table td > span + span { margin-left: 8px; }
.eligibility-table .eligibility-asset > span,
.eligibility-table .eligibility-check > span,
.eligibility-table .eligibility-result > span { color: var(--text); font-size: 12.5px; font-weight: 400; }
.eligibility-table .eligibility-check--missing > .eligibility-check__status,
.eligibility-table .eligibility-result--missing > .eligibility-result__value { color: var(--warn); }
.eligibility-table .eligibility-result--mismatch > .eligibility-result__summary { color: var(--neg); }
table.eligibility-table { min-width: max(1080px, 100%); }
.eligibility-intro { justify-content: flex-start; flex-wrap: wrap; }
.eligibility-table .eligibility-result { min-width: 0; }
.eligibility-table .eligibility-asset > span,
.eligibility-table .eligibility-check > span,
.eligibility-table .eligibility-result > span { font-size: 12px; }
@media (min-width: 821px) {
  .eligibility-table thead th, .eligibility-table tbody td { padding-left: 6px; padding-right: 6px; }
  .eligibility-table td > span + span { margin-left: 6px; }
  .sec--eligibility .eligibility-table thead th:last-child,
  .sec--eligibility .eligibility-table tbody td:last-child { box-shadow: -12px 0 12px -12px var(--scroll-shadow); }
  @supports (animation-timeline: scroll()) {
    .sec--eligibility > .tables__body { scroll-timeline: --elig-x inline; }
    .sec--eligibility .eligibility-table thead th:last-child,
    .sec--eligibility .eligibility-table tbody td:last-child { box-shadow: none; animation: elig-edge linear both; animation-timeline: --elig-x; }
  }
}
@keyframes elig-edge {
  from, 98% { box-shadow: -12px 0 12px -12px var(--scroll-shadow); }
  to { box-shadow: none; }
}

/* ---------- Drawdown section ---------- */
.dash.is-pro > .sec:has([data-drawdown-events]:empty) { display: none; }   /* bundle leaves it empty in pro mode */
.dash > .sec:has([data-drawdown-events]) .card > .card__head { display: none; }
.ddevents { margin: 0 0 6px; padding-top: 4px; border-top: 0; }
.dd-events__head { padding-top: 12px; }
.dd-events__table td.muted { color: inherit; }
@media (min-width: 821px) {
  /* head + 12.5 rows: a cut row and a bottom shadow show that older events continue */
  .dd-events__scroll {
    max-height: 418px;
    background:
      linear-gradient(to top, var(--bg-raised) 40%, transparent) center bottom / 100% 28px no-repeat local,
      linear-gradient(to top, var(--scroll-shadow), transparent) center bottom / 100% 16px no-repeat scroll,
      var(--bg-raised);
  }
}
@media (any-pointer: coarse) { .dd-events__scroll { max-height: none; overflow-y: visible; } }

/* ---------- Charts and attribution ---------- */
.sec__body--attr { grid-template-columns: repeat(auto-fit, minmax(min(100%, 594px), 1fr)); }
[data-chart-contribution] .bartext-inside { fill: var(--accent-ink) !important; }
.similarity-matrix { border-spacing: 0; }
.similarity-matrix th { height: 30px; padding: 4px 10px; background: var(--bg-raised); color: var(--text-2);
  font-size: 12px; font-weight: 500; border-bottom: 1px solid var(--line); }
.similarity-matrix__corner, .similarity-matrix__row { border-right: 1px solid var(--line); }
@media (max-width: 820px) {
  .similarity-matrix__corner, .similarity-matrix__row { box-shadow: 12px 0 12px -12px var(--scroll-shadow); }
}
.similarity-matrix thead th { border-bottom-color: var(--line-strong); }
.similarity-matrix .similarity-matrix__row { color: var(--text); }
.similarity-matrix__value { height: 30px; padding: 4px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
.similarity-matrix__value--diagonal { background: transparent; }
html[data-theme] .similarity-matrix { --sim-low: transparent; }
@media (min-width: 821px) { .similarity-matrix-scroll { max-height: none; } }
@media (any-pointer: coarse) { .similarity-matrix-scroll { max-height: none; overflow-y: visible; } }
@media (min-width: 821px) { .factors { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.factor-row__bar-fill { background: var(--text-3); }
@media (min-width: 1101px) { .card--compare > .card__body { height: 500px; } }
@media (min-width: 601px) and (any-pointer: coarse) {
  .card--equity [data-chart-equity]:not(.pro-chart-host) { height: clamp(440px, calc(100svh - 250px), 600px); min-height: 0; }
}
.card--equity > .card__body.pro-chart-host { container-type: inline-size; }
@container (min-width: 720px) {
  .pro-chart-ranges { top: 10px; right: 10px; left: auto; }
  .pro-chart-summary { top: 12px; right: 220px; left: 14px; }
  .pro-chart-summary__detail { white-space: nowrap; }
}
@media (any-pointer: coarse) {
  @container (min-width: 720px) {
    .pro-chart-ranges { top: 6px; }
    .pro-chart-summary { right: 256px; }
  }
}
.dash.is-pro .nav-years__summary strong { color: var(--text) !important; }
@media (max-width: 820px) {
  .card--equity > .card__head { flex-direction: row; flex-wrap: nowrap; align-items: flex-start;
    justify-content: space-between; column-gap: 12px; }
  .card--equity > .card__head > .card__headings { flex: 1 1 auto; min-width: 0; }
  .card--equity > .card__head > .proswitch { flex: none; }
}
@media (max-width: 480px) {
  .card__head { padding-inline: 12px; }
  .card__body { margin-inline: 12px; }
  .dd-events__head { padding-inline: 12px; }
}

/* ---------- Model config ---------- */
.sec[data-config-cards] { container-type: inline-size; }
@container (min-width: 700px) and (max-width: 1139px) {
  .sec[data-config-cards] > .sec__body--3col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec[data-config-cards] > .sec__body--3col > .card:last-child { grid-column: 1 / -1; }
}
@media (min-width: 481px) { .kv { grid-template-columns: minmax(max-content, 1fr) auto; overflow-x: auto; } }
.kv dt, .kv dd { white-space: nowrap; overflow-wrap: normal; }
.kv dd.kv__chips { flex-wrap: nowrap; }
.kv__chip, .universe__chip { padding: 0; border-radius: 0; background: none; color: var(--text); }
.kv__chip:not(:last-child)::after { content: " ·"; }
.universe__code, .universe__name, .universe__chip--muted { color: var(--text); }

/* ---------- Controls: one family, neutral selected state, focus clearance ---------- */
.appearance__option.is-active, .proswitch__btn.is-active, .pro-chart-range.is-active {
  background: var(--bg-selected); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav-years button, .nav-years select, .pnl-range button, .pnl-range select, .pnl-range input {
  background-color: var(--bg-raised); border-radius: var(--r-md);
  transition: border-color .15s cubic-bezier(.4, 0, .2, 1), background-color .15s cubic-bezier(.4, 0, .2, 1); }
.nav-years button[aria-pressed="true"], .pnl-range button[aria-pressed="true"] {
  background: var(--bg-selected); border-color: var(--text-3); color: var(--text); }
@media not all and (any-pointer: coarse) {
  @media (min-width: 601px) {
    .nav-years button, .nav-years select, .pnl-range button, .pnl-range select, .pnl-range input { min-height: 32px; padding-block: 4px; }
    .nav-years button[aria-label="上一年"], .nav-years button[aria-label="下一年"], .pnl-range .pnl-range__step {
      min-width: 32px; font-size: 18px; padding-inline: 8px; }
    .proswitch__btn { min-height: 26px; }
  }
}
html[data-theme] .navtab:hover:not(:disabled):not(.is-active):not(.is-unavailable) { background: var(--bg-hover); }
@media (min-width: 1101px) {
  html[data-theme="light"] .navtab:hover:not(:disabled):not(.is-active):not(.is-unavailable) { background: rgba(23, 20, 16, .05); }
}
@media (hover: hover) {
  .pro-chart-range:hover:not(.is-active) { background: var(--bg-hover); color: var(--text); }
  .nav-years button:not(:disabled):not([aria-pressed="true"]):hover,
  .pnl-range button:not(:disabled):not([aria-pressed="true"]):hover,
  .nav-years select:hover, .pnl-range select:hover, .pnl-range input:hover {
    border-color: var(--text-3); background: var(--bg-hover); }
}
.nav-years button:disabled, .pnl-range button:disabled, .navtab:disabled, .navtab.is-unavailable { cursor: not-allowed; }
.refresh:disabled { cursor: progress; }
:is(.navtab:not(:disabled), .appearance__option, .refresh:not(:disabled), .proswitch__btn:not(:disabled),
    .pro-chart-range, .tables__tab, .table-more__button, .nav-years button:not(:disabled),
    .pnl-range button:not(:disabled), .sidebar-toggle, .initial-loading__retry):active { transform: translateY(1px); }
@media (any-pointer: coarse) {
  .nav-years button, .nav-years select, .pnl-range button, .pnl-range select, .pnl-range input { min-height: 44px; }
  .nav-years button[aria-label="上一年"], .nav-years button[aria-label="下一年"], .pnl-range .pnl-range__step { min-width: 44px; }
}
@media (hover: none) {
  .dd-events__table tbody tr:hover td { background: none; }
  .refresh:hover:not(:disabled) { border-color: var(--line-strong); color: var(--text-2); }
  .table-more__button:hover { border-color: var(--line-strong); }
  .pro-chart-range:hover:not(.is-active) { color: var(--text-3); background: transparent; }
}
.stage, .stage :is(a[href], button, select, input, [tabindex]) { scroll-margin-top: 64px; }
@media (max-width: 1100px) { .stage, .stage :is(a[href], button, select, input, [tabindex]) { scroll-margin-top: 76px; } }
@media (max-width: 820px) { .stage, .stage :is(a[href], button, select, input, [tabindex]) { scroll-margin-top: 128px; } }

/* ---------- Loading and update status ---------- */
.overlay.is-error .overlay__bar, .overlay.is-error .overlay__small { display: none; }
.overlay__pane { position: relative; }
html[data-theme="dark"] .overlay__pane { box-shadow: 0 10px 30px rgba(0, 0, 0, .38); }
html[data-theme="light"] .overlay__pane { box-shadow: 0 10px 30px rgba(23, 20, 16, .14); }
.overlay__close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; border: 0;
  border-radius: var(--r-sm); background: transparent; color: var(--text-3); font-size: 18px; line-height: 1; cursor: pointer; }
.overlay__close:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) { .overlay__close:hover { color: var(--text); background: var(--bg-hover); } }
@media (any-pointer: coarse) { .overlay__close { top: 2px; right: 2px; width: 44px; height: 44px; } }
.initial-loading__progress[hidden] { display: none; }
.stage.has-load-error .initial-loading__kicker { visibility: hidden; }
html:has(.stage.has-load-error) .rail__asof { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .overlay__bar span { width: 100%; transform: none; opacity: .45; } }

/* ---------- Colophon: prose in sans, machine values in mono ---------- */
.colophon { font-family: var(--font-sans); }
.colophon [data-build], .colophon [data-refreshed], .colophon [data-next-refresh] { font-family: var(--font-mono); }
.colophon [data-refreshed], .colophon [data-next-refresh] { white-space: nowrap; }
@media (min-width: 1101px) {
  .colophon { grid-template-columns: repeat(3, max-content) minmax(0, 1fr); column-gap: 40px; }
  .colophon__value { white-space: nowrap; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .colophon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colophon__col--end { text-align: left; }
}
@media (min-width: 1101px) and (max-width: 1339px) {
  html:not([data-sidebar-collapsed="true"]) .colophon__col--end { grid-column: 1 / -1; text-align: left; }
}
