/* White and technology-blue visual system. Loaded after module styles so surfaces, type and controls
   stay consistent without changing module behavior, status or permission rules. */
:root {
  color-scheme: light;
  --bg: #fff;
  --paper: #fff;
  --ink: #1e293b;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;
  --blue: var(--accent);
  --deep: var(--accent-strong);
  --pale: var(--accent-soft);
  --line: #e2e8f0;
  --cyan: #0284c7;
  --red: #b13f4b;
  --orange: #8b651d;
  --shadow: none;
  --surface: #f8fafc;
  --surface-hover: #f1f5f9;
  --ink-secondary: #475569;
  --radius: 10px;
  --sidebar-width: 220px;
}

body { background: var(--bg); color: var(--ink); font-family: "PingFang SC", Arial, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1 { font-size: 22px; line-height: 1.4; font-weight: 650; letter-spacing: -.45px; }
h2 { font-size: 15px; line-height: 1.5; font-weight: 600; }
h3 { font-size: 13px; line-height: 1.6; }
small { font-size: 11px; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px;
}
::selection { background: #dbeafe; color: var(--ink); }

/* Navigation and page frame: a quiet fixed rail, one clear page heading. */
.sidebar { width: var(--sidebar-width); padding: 22px 12px 14px; background: #f8fafc; border-right-color: var(--line); }
.main { margin-left: var(--sidebar-width); background: #fff; }
.brand { gap: 10px; padding: 0 10px 22px; color: var(--ink); }
.brand b { font-size: 17px; letter-spacing: -.45px; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: 1.6px; }
.brand-mark { width: 35px; height: 35px; }
.workspace { padding: 8px 10px; margin: 0 6px 18px; border-color: var(--line); border-radius: 6px; background: #fff; color: var(--ink-secondary); font-size: 10px; }
.nav { gap: 18px; }
.nav a, .nav-module summary { color: var(--ink-secondary); border-radius: 6px; }
.nav-primary > a { padding: 10px 12px; margin: 3px 0; font-size: 13px; font-weight: 500; }
.nav-primary > a > .icon { width: 17px; height: 17px; }
.nav a:hover, .nav-module summary:hover { background: var(--surface); color: var(--ink); }
.nav a.active, .nav .nav-children a.active { background: var(--accent-soft); color: var(--accent-strong); box-shadow: none; font-weight: 600; }
.nav-module summary { padding: 9px 12px; font-size: 12px; font-weight: 500; gap: 10px; }
.nav-module[open] > summary { color: var(--ink); }
.nav-module.is-current > summary { color: var(--accent-strong); }
.nav-module summary > .icon { width: 17px; height: 17px; }
.nav-children { border-left-color: var(--line); margin-left: 21px; padding-left: 8px; }
.nav .nav-children a { padding: 7px 10px; font-size: 12px; }
.nav-utilities { padding-top: 12px; border-top-color: var(--line); }
.nav-label { color: var(--muted); letter-spacing: .3px; font-size: 10px; margin: 0 12px 8px; }
.nav-chevron { font-size: 18px; color: var(--muted); }
.sidebar-foot { margin-top: 14px; padding: 12px 7px 0; font-size: 12px; }
.sidebar-foot button { color: var(--muted); }
.avatar { background: #eff6ff; color: var(--accent-strong); width: 29px; height: 29px; font-weight: 600; }
.account-avatar-link[aria-current] { background: var(--accent-soft); }
.topbar { height: 60px; padding: 0 30px; background: #fff; backdrop-filter: none; border-bottom-color: var(--line); }
.top-right, .search { color: var(--muted); }
.top-right { font-size: 11px; }
.search.stock-global-search { width: min(500px,52vw); gap: 9px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.search.stock-global-search:focus-within { background: #fff; border-color: var(--accent-border); box-shadow: 0 0 0 3px #2563eb09; }
.search input { border: 0; background: transparent; min-height: 34px; padding: 6px 0; }
.search > .icon { width: 16px; height: 16px; }
.search input:focus-visible { outline: 0; }
.search-results { border-color: var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px #20212412; }
.search-results a:hover { background: var(--surface); }
.dot { background: var(--accent); }
kbd { background: var(--surface); color: var(--muted); }
.page { max-width: 1540px; padding: 24px 30px 40px; }
.breadcrumb { color: var(--muted); margin-bottom: 12px; font-size: 11px; gap: 7px; }
.breadcrumb [aria-current] { color: var(--ink-secondary); }
.page-heading { gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading > .actions { padding-top: 2px; }
.page-heading p:empty, .page-heading .actions:empty { display: none; }
.page-heading p { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 6px; max-width: 780px; }
.footer { color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); padding-top: 16px; }

/* Accent identifies actions and selection; market red/green remain financial. */
.btn { min-height: 34px; padding: 6px 12px; border-color: #dedfe3; border-radius: 6px; color: var(--ink-secondary); background: #fff; font-size: 12px; box-shadow: none; }
.btn:hover { background: var(--surface); color: var(--ink); border-color: #c8cbd1; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; font-weight: 500; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 11px; }
.btn.ghost { background: transparent; color: var(--blue); border: 0; padding: 3px 0; }
.btn.danger { color: var(--red); border-color: #ecd4d7; }
.btn.quiet-action, .investing-low-priority .btn, .watchlist-list .quiet-action, .watchlist-selection .quiet-action {
  min-height: 28px; color: var(--muted); background: transparent; border-color: transparent; box-shadow: none;
}
.btn.quiet-action:hover, .investing-low-priority .btn:hover { color: var(--ink-secondary); background: var(--surface-hover); }
.actions { gap: 7px; }
.field { gap: 6px; margin-bottom: 16px; }
.field label, .check, .field-check label { color: var(--ink-secondary); font-size: 12px; }
input:where(:not([type=checkbox]):not([type=radio])), select, textarea {
  min-height: 36px; border-color: #dedfe3; border-radius: 6px; padding: 7px 10px; color: var(--ink); background: #fff; font-size: 12px;
}
input::placeholder, textarea::placeholder { color: #868b94; opacity: 1; }
textarea { min-height: 90px; line-height: 1.75; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); }
.field small, .field-check small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.check { margin: 12px 0; }
.form-error { color: var(--red); font-size: 12px; }

/* Content uses modest borders and whitespace, without decorative elevation. */
.grid { gap: 16px; }
.card { padding: 18px 20px; border-color: var(--line); border-radius: var(--radius); box-shadow: none; }
.card-head { gap: 12px; margin-bottom: 16px; }
.section { margin-top: 18px; }
.hero { background: #fff; border-color: var(--line); }
.hero:after { display: none; }
.hero h2 { font-size: 20px; line-height: 1.5; max-width: none; margin: 8px 0; }
.hero p { color: var(--muted); line-height: 1.75; max-width: 780px; }
.hero .actions { margin-top: 18px; }
.eyebrow { color: var(--muted); letter-spacing: 1px; font-size: 10px; }
.stat-label, .stat-foot { color: var(--muted); font-size: 11px; }
.stat-value { color: var(--ink); font-size: 26px; letter-spacing: -.65px; margin: 8px 0 5px; font-weight: 550; }
.card:has(> .stat-label) { padding: 16px 18px; border-radius: 8px; }
.stat-label > .icon { width: 15px; height: 15px; color: #94a3b8; }
.stat-value small { color: var(--muted); }
.tag { background: var(--accent-soft); color: var(--accent-strong); font-size: 10px; padding: 2px 7px; border-radius: 4px; }
.tag.neutral { background: #f1f2f4; color: #62666f; }
.tag.warn { background: #fff5df; color: #876015; }
.tag.error { background: #fceef0; color: #a33746; }
.tag.good { background: #eaf5ef; color: #28714e; }
.market, .list-icon { background: var(--surface); color: var(--ink-secondary); border-color: var(--line); border-radius: 6px; }
.market { width: 27px; height: 27px; }
.list-item, .info-row { border-bottom-color: var(--line); }
.list-item { padding: 12px 0; }
.list-item p, .list-item .tail { color: var(--muted); }
.info-row { padding: 10px 0; color: var(--ink-secondary); }
.info-row span:first-child { color: var(--muted); }
.info-row span:last-child { color: var(--ink); }
.note { color: var(--ink-secondary); background: var(--surface); border-left: 2px solid var(--accent-border); padding: 10px 12px; border-radius: 0 5px 5px 0; line-height: 1.75; }
.note.warn { background: #fff9ed; color: #876323; border-color: #d7b975; }
.empty { padding: 30px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.empty .symbol { color: #9198a3; font-size: 22px; }
.empty h2 { font-size: 15px; margin: 10px 0 6px; }
.empty p { color: var(--muted); margin: 6px auto 18px; font-size: 12px; }
.doc-body { color: var(--ink-secondary); font-size: 13px; line-height: 1.85; }
.code, .investing-details pre { color: var(--ink-secondary); background: var(--surface); border-color: var(--line); border-radius: 6px; font-size: 11px; line-height: 1.75; padding: 14px; }
.step { border-color: var(--line); padding-bottom: 20px; }
.step:before { background: #8f9bad; }
.step p, .legend { color: var(--muted); }
.progress { background: #eef0f3; }
.progress i { background: #60a5fa; }

/* Tables and tabs keep a stable, compact reading rhythm. */
table { font-size: 12px; }
th { color: var(--muted); font-size: 11px; font-weight: 500; padding: 10px 12px; border-bottom-color: var(--line); background: var(--surface); }
td { color: var(--ink-secondary); padding: 12px; border-bottom-color: #eef0f2; }
th:first-child, td:first-child { padding-left: 12px; }
th:last-child, td:last-child { padding-right: 12px; }
thead th:first-child { border-radius: 5px 0 0 0; }
thead th:last-child { border-radius: 0 5px 0 0; }
tbody tr:hover > td { background-color: #f8fafc; }
td strong { color: var(--ink); font-weight: 500; }
td small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.positive { color: #287d68; }
.negative { color: #b24a51; }
.tabs { gap: 4px; margin-bottom: 20px; border-bottom-color: var(--line); }
.tabs a { padding: 9px 12px; color: var(--muted); font-size: 12px; }
.tabs a.active { color: var(--accent-strong); border-bottom-color: var(--accent); font-weight: 600; }
.filter-row { margin-bottom: 16px; }
.record-bulk-bar { background: var(--surface); border-color: var(--line); color: var(--ink-secondary); }
.selection-hint, .record-list-heading { color: var(--muted); }
.record-list-heading { font-size: 11px; }
.confirm-dialog { padding: 22px; border-radius: 10px; border-color: var(--line); box-shadow: 0 16px 64px #2021241f; }
.confirm-dialog::backdrop { background: #20212455; }
.confirm-dialog h2 { font-size: 17px; }
.confirm-dialog p, .confirm-dialog .confirm-record small { color: var(--ink-secondary); }
.confirm-dialog .confirm-record { background: var(--surface); }
#toast { color: #fff; background: #292b30; box-shadow: 0 6px 24px #2021241a; border-radius: 7px; padding: 10px 16px; }

/* Loading communicates one short state instead of a tall animated panel. */
.boot { padding: 16vh 20px; color: var(--muted); font-size: 12px; }
.loading, .catalog-page-loading { height: auto; min-height: 64px; padding: 20px 0; background: none; animation: none; border-radius: 0; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.loading::before { content: ''; width: 13px; height: 13px; border: 1.5px solid #dddfe4; border-top-color: #65738c; border-radius: 50%; flex: none; animation: workbench-spin .9s linear infinite; }
.loading:empty::after { content: '正在加载…'; }
@keyframes workbench-spin { to { transform: rotate(360deg); } }

/* Route transitions leave the navigation and search in place. */
.page-loading { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; min-height: 36px; }
.loading-dot { display: inline-block; flex: none; width: 13px; height: 13px; border: 1.5px solid #dddfe4; border-top-color: #65738c; border-radius: 50%; animation: workbench-spin .9s linear infinite; }
.loading-outline { margin-top: 18px; max-width: 720px; }
.loading-outline > div { height: 35px; border-bottom: 1px solid #f0f1f3; }
.loading-outline > div:last-child { width: 62%; }
.page-error { padding: 24px 0; max-width: 640px; border: 0; text-align: left; }
.page-error h2 { font-size: 15px; color: var(--ink); }
.page-error p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 8px 0 18px; overflow-wrap: anywhere; }
.page-error .actions { margin-top: 16px; }

/* Everyday investing, insight and monitoring panels share one visual level. */
.investing-workbench, .quick-backtest, .event-research, .insight-workspace { color: var(--ink-secondary); }
.investing-welcome, .integration-hero, .investing-automation, .insight-workspace-head {
  background: #fff; border-color: var(--line); border-radius: var(--radius); padding: 20px 22px;
}
.investing-welcome h2, .integration-hero h2, .insight-workspace-head h2, .investing-validation-intro h2 {
  color: var(--ink); font-size: 20px; line-height: 1.5; letter-spacing: -.3px; margin: 6px 0;
}
.investing-welcome p, .integration-hero p, .insight-workspace-head p { color: var(--muted); font-size: 12px; line-height: 1.75; }
.investing-eyebrow, .automation-eyebrow, .event-eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .5px; }
.investing-caption, .investing-meta, .investing-prose, .investing-cell-note,
.investing-insight p, .investing-details, .quick-caption, .quick-details,
.insight-muted, .insight-prose, .insight-evidence, .insight-candidate-meta { color: var(--ink-secondary); }
.investing-meta, .investing-caption, .quick-caption, .insight-muted { font-size: 12px; }
.investing-identity > strong { color: var(--ink); font-size: 17px; }
.investing-identity > small, .investing-insight small, .investing-monitor small, .investing-evidence small,
.investing-check-record small, .insight-usage dt, .insight-history-item small, .insight-empty p,
.insight-run-meta, .insight-candidate-details h4, .insight-dimensions dt { color: var(--muted); }
.investing-insight, .investing-monitor, .investing-check-record, .investing-closed-row { border-color: var(--line); }
.investing-insight { padding: 16px 0; }
.investing-insight h3 { font-size: 14px; margin: 5px 0; }
.investing-insight h3 a, .investing-monitor-head strong { color: var(--ink); }
.investing-prose, .insight-prose { line-height: 1.8; }
.investing-details, .investing-validation-group, .quick-details, .insight-dimensions { border-color: var(--line); background: #fff; border-radius: 7px; padding: 12px 14px; }
.investing-details summary, .investing-validation-group summary, .quick-details summary, .insight-workspace summary { color: var(--ink-secondary); }
.investing-validation-group summary { font-size: 14px; }
.investing-validation-links a { padding: 12px 14px; background: var(--surface); color: var(--ink-secondary); border-radius: 6px; }
.investing-validation-links a:hover { background: var(--surface-hover); color: var(--blue); }
.investing-validation-group p, .investing-validation-intro p { color: var(--muted); font-size: 12px; }
.investing-workbench .grid.three .stat-value { font-size: 23px; }
.investing-workbench .empty, .quick-backtest .empty { padding: 28px 18px; }
.investing-workbench .empty h2, .quick-backtest .empty h2 { font-size: 15px; }
.investing-status:not(:empty), .investing-automation-result, .insight-export, .insight-question,
.insight-progress, .monitoring-shortcut, .monitoring-brief-card > .monitoring-evidence,
.quick-confirm, .investing-confirm { background: var(--surface); color: var(--ink-secondary); border-color: var(--line); border-radius: 6px; }
.investing-status.is-error { color: var(--red); background: #fff5f5; border-color: #efdadd; }
.investing-automation h2, .insight-context h3, .insight-result h3 { color: var(--ink); font-size: 15px; }
.investing-automation h2 > span, .investing-automation-times dt { color: var(--muted); }
.investing-automation-times dd, .investing-automation-result strong, .insight-progress strong,
.insight-usage dd, .insight-history-item strong, .insight-history-state { color: var(--ink-secondary); }
.monitoring-layout { gap: 18px; grid-template-columns: minmax(0,1fr) 300px; }
.monitoring-layout .card { padding: 20px; }
.monitoring-main > .card, .monitoring-side > .card { margin-bottom: 18px; }
.monitoring-layout .investing-monitor { border-radius: 7px; padding: 15px; }
.monitoring-layout .investing-monitoring-settings summary { font-size: 14px; }
.monitoring-budget strong { font-size: 25px; }
.monitoring-budget strong small { font-size: 12px; }
.monitoring-brief-card > .investing-prose { font-size: 13px; }
.monitoring-model { margin-top: 16px; padding-top: 14px; }
.monitoring-current .card-head small { color: var(--muted); font-size: 11px; }
.monitoring-coverage { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 14px; font-size: 12px; color: var(--muted); }
.monitoring-coverage strong { color: var(--ink-secondary); font-weight: 600; }
.monitoring-coverage .monitoring-data-gap strong { color: #96601b; }
.monitoring-signals { list-style: none; margin: 8px 0; padding: 0; }
.monitoring-signals > li { padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.monitoring-signal-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.monitoring-signals p { font-size: 12px; line-height: 1.65; margin: 5px 0; }
.monitoring-signals small, .monitoring-method-name { font-size: 11px; color: var(--muted); }
.monitoring-priority { display: inline-flex; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 500; background: #f2f4f7; color: #637086; }
.monitoring-priority-high .monitoring-priority { background: #fff0ed; color: #a33a24; }
.monitoring-priority-medium .monitoring-priority { background: #fff6e7; color: #875812; }
.monitoring-priority-low .monitoring-priority { background: #edf4ff; color: #2458a6; }
.monitoring-signal-lines { margin: 8px 0; }
.monitoring-signal-lines > p { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 4px; }
.monitoring-signal-lines > p > :first-child { color: var(--muted); font-weight: 400; }
.monitoring-change strong { font-weight: 500; color: var(--ink); }
.monitoring-next { color: var(--ink-secondary); }
.monitoring-judgment strong { font-weight: 600; color: var(--ink); }
.monitoring-driver-analysis { border-left: 2px solid var(--accent-border); padding: 2px 0 2px 10px; margin: 8px 0 12px; }
.monitoring-driver-analysis > p { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 6px; margin: 5px 0; }
.monitoring-driver-analysis > p > :first-child { color: var(--muted); font-weight: 400; }
.monitoring-driver-analysis strong { font-size: inherit; font-weight: 600; color: var(--ink); }
.monitoring-action-label { display: inline-block; padding: 1px 6px; margin-right: 7px; border-radius: 4px; background: #edf3ff; color: #315a99; font-size: 11px; font-weight: 600; }
.monitoring-action-note { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.monitoring-supporting { color: var(--ink-secondary); }
.monitoring-signal-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; align-items: baseline; }
.monitoring-signal-detail { margin-top: 6px; }
.monitoring-signal-detail summary { font-size: 11px; color: var(--muted); cursor: pointer; }
.monitoring-signal-detail[open] { padding: 8px 10px; background: var(--surface); border-radius: 5px; }
.monitoring-signal-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 6px 14px; margin: 8px 0; font-size: 11px; }
.monitoring-signal-facts dt { color: var(--muted); }
.monitoring-signal-facts dd { margin: 2px 0 0; color: var(--ink-secondary); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.monitoring-confirmation-checks { margin: 8px 0; padding: 0; list-style: none; }
.monitoring-confirmation-checks > li { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 3px 6px; margin: 5px 0; font-size: 11px; overflow-wrap: anywhere; }
.monitoring-confirmation-checks .investing-evidence { grid-column: 2; }
.monitoring-confirmation-state { color: var(--muted); }
.monitoring-confirmation-missing { overflow-wrap: anywhere; }
.monitoring-priority-guide { margin: 0 0 12px; font-size: 11px; color: var(--muted); }
.monitoring-priority-guide summary { cursor: pointer; width: fit-content; }
.monitoring-priority-guide p { margin: 7px 0 3px; line-height: 1.8; }
.monitoring-priority-guide strong { font-weight: 500; color: var(--ink-secondary); }
.monitoring-priority-guide small { font-size: 11px; }
.monitoring-history-basis { margin: 7px 0 0; font-size: 11px; }
.monitoring-methods { margin-top: 14px; padding: 10px 12px; }
.monitoring-methods > summary { font-size: 12px; }
.monitoring-method-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 14px; margin-top: 12px; }
.monitoring-method-list h3 { font-size: 12px; font-weight: 600; margin: 0 0 5px; }
.monitoring-method-list p { font-size: 12px; line-height: 1.65; margin: 4px 0; }
.monitoring-method-list small { color: var(--muted); font-size: 11px; }
.monitoring-report-heading { display: grid; gap: 5px; min-width: 0; }
.monitoring-report-kind { color: var(--muted); font-size: 11px; }
.monitoring-securities { display: flex; flex-wrap: wrap; gap: 5px 14px; align-items: baseline; }
.monitoring-security { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 5px; }
.monitoring-security strong { font-size: 13px; font-weight: 600; }
.monitoring-security small { font-size: 11px; }
.monitoring-revision { margin-top: 10px; padding: 9px 0 0; border-top: 1px solid var(--line); }
.monitoring-revision > summary { cursor: pointer; font-size: 12px; color: var(--ink-secondary); }
.monitoring-revision > summary > small { margin-left: 8px; font-weight: 400; }
.monitoring-revision-material > summary > span { color: #96601b; }
.monitoring-revision-list { padding: 0; margin: 10px 0; list-style: none; }
.monitoring-revision-list > li { display: grid; gap: 4px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.monitoring-revision-list > li > div:first-child { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.monitoring-revision-list strong, .monitoring-revision-list span { font-size: 12px; }
.monitoring-revision-values { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.monitoring-revision-values > span > small { margin-right: 5px; }
.monitoring-revision-unavailable { font-size: 12px; color: var(--muted); margin: 9px 0 0; }
.monitoring-condition-changes p { font-size: 12px; margin: 4px 0; }
.monitoring-condition-changes p > span:first-child { color: var(--muted); }
.monitoring-condition-changes small { display: block; margin-top: 4px; }

.insight-workspace { border-color: var(--line); border-radius: var(--radius); margin-bottom: 22px; }
.insight-workspace-head { border-radius: 0; }
.insight-config, .insight-context, .insight-result { padding: 20px 22px; border-color: var(--line); background: #fff; }
.insight-fields { gap: 14px; }
.insight-config label, .insight-dimensions dd { color: var(--ink-secondary); }
.insight-context { background: #fafbfc; }
.insight-history-head, .insight-result, .insight-candidate, .insight-run-meta { border-color: var(--line); }
.insight-history .insight-history-item { border-bottom-color: var(--line); border-radius: 5px; }
.insight-history-item[aria-pressed=true] { background: var(--surface-hover); border-color: #dfe2e7; }
.insight-funnel { border-color: var(--line); border-radius: 6px; }
.insight-funnel span { padding: 13px 16px; color: var(--muted); }
.insight-funnel span + span { border-left-color: var(--line); }
.insight-funnel strong { font-size: 21px; color: var(--ink); }
.insight-candidate-head h3 { font-size: 15px; }
.insight-candidate-head a { color: var(--ink); }
.insight-candidate { padding: 20px 0; }
.insight-matches .insight-stock-option, .investing-stock-option { background: #fff; border-color: var(--line); color: var(--ink-secondary); border-radius: 6px; }
.insight-matches .insight-stock-option:hover, .investing-stock-option:hover { background: var(--surface); }
.insight-stock-option small, .investing-stock-option small { color: var(--muted); }

/* Segmented filters retain a visible selected state without large blue fills. */
.investing-segment .btn, .watchlist-view-controls .btn { color: var(--muted); }
.investing-segment .btn[aria-pressed=true], .watchlist-view-controls [aria-pressed=true],
.catalog-market-tabs button[aria-pressed=true], .catalog-pagination .selected-page {
  background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-border); box-shadow: none;
}
.investing-mode legend, .investing-mode strong, .quick-search-controls label { color: var(--ink-secondary); }
.investing-mode label, .token-preset { background: #fff; border-color: var(--line); border-radius: 6px; padding: 12px; }
.investing-mode label:has(input:checked), .token-preset:has(input:checked) { background: #f7f9fc; border-color: #9baecb; }
.investing-mode small, .token-preset small { color: var(--muted); }
.quick-steps { border-bottom-color: var(--line); margin-bottom: 20px; }
.quick-steps button { font-size: 12px; color: var(--muted); padding-bottom: 13px; }
.quick-steps button span { background: #f0f1f3; color: var(--muted); }
.quick-steps button[aria-current] { color: var(--accent-strong); border-bottom-color: var(--accent); }
.quick-steps button[aria-current] span { background: var(--accent); color: #fff; }
.quick-search-row, .quick-selected-row { border-bottom-color: var(--line); padding: 11px 0; }
.quick-search-row strong, .quick-selected-row strong, .quick-summary-assets > strong { color: var(--ink); }
.quick-search-row small, .quick-selected-row small, .quick-summary-assets small,
.quick-pagination, .quick-report-meta, .quick-limit-list { color: var(--muted); }

/* Sources, collections and stock research use the same neutral surfaces. */
.catalog-search-field label, .attention-sort, .attention-explanation { color: var(--ink-secondary); }
.catalog-search-field input { font-size: 13px; background: #fff; }
.catalog-market-tabs button { color: var(--ink-secondary); border-color: var(--line); border-radius: 6px; padding: 6px 11px; }
.catalog-market-tabs button span, .catalog-market-tabs button[aria-pressed=true] span { background: #e9ebee; color: var(--ink-secondary); }
.catalog-search-feedback, .catalog-page-size, .catalog-pagination, .attention-empty { color: var(--muted); }
.catalog-pagination { border-color: var(--line); padding-top: 14px; }
.attention-score, .attention-part b { color: var(--ink); }
.attention-score strong { font-size: 15px; }
.attention-details summary { color: var(--ink-secondary); }
.attention-details[open] { background: var(--surface); border-color: var(--line); }
.attention-details p, .attention-details li { color: var(--muted); }
.stock-row-selected td, .stock-search-results [role=option].is-selected { background: var(--pale); }
.stock-search-clear, .stock-result-market { background: #f0f1f3; color: var(--ink-secondary); border-color: var(--line); }
.stock-search-clear:hover { background: #e5e7eb; color: var(--ink); }
.stock-search-results [role=option] { color: var(--ink); min-height: 48px; padding: 9px 10px; }
.stock-result-identity strong { font-size: 12px; }
.stock-result-identity small, .stock-search-group, .stock-search-message, .stock-search-footer { color: var(--muted); }
.stock-search-footer { border-top-color: var(--line); }
.recent-searches { background: #fff; border-color: var(--line); border-radius: 6px; padding: 10px 12px; }
.recent-searches-head, .recent-searches-head button, .recent-searches-empty, .recent-searches-more { color: var(--muted); }
.recent-search-item { border-color: var(--line); background: var(--surface); border-radius: 5px; }
.recent-search-item button { color: var(--ink-secondary); font-size: 11px; }
.recent-search-item button:hover:not(:disabled) { background: var(--surface-hover); color: var(--ink); }
.watchlist-stock-option { border-color: var(--line); border-radius: 6px; padding: 12px 14px; color: var(--ink); }
.watchlist-stock-option:hover { background: var(--surface); border-color: #c9ced6; }
.watchlist-list small, .watchlist-stock-option small, .watchlist-add-hint, .watchlist-selection, .watchlist-pager { color: var(--muted); }
.watchlist-list .watchlist-coverage, .watchlist-add-hint { font-size: 12px; }
.collection-pool > div { border-color: var(--line); border-radius: 7px; padding: 16px 18px; }
.collection-pool strong { color: var(--ink); font-size: 23px; }
.collection-pool span, .collection-help, .collection-scope { color: var(--ink-secondary); }
.collection-pool > div > small, .collection-step p, .collection-stock small, .collection-preview-members small { color: var(--muted); }
.collection-step { margin-bottom: 18px; gap: 10px; }
.collection-step > span, .collection-plan-empty > span { background: var(--surface-hover); color: var(--ink-secondary); width: 28px; height: 28px; border-radius: 6px; }
.collection-step h2, .collection-plan h3 { font-size: 15px; color: var(--ink); }
.collection-config legend, .collection-markets label, .collection-choice label,
.collection-fields label, .collection-search-label { color: var(--ink-secondary); }
.collection-kinds span { border-color: var(--line); color: var(--ink-secondary); border-radius: 6px; padding: 9px 10px; }
.collection-kinds input:checked + span { background: var(--pale); border-color: #9eb2d4; color: var(--blue); }
.collection-fields select, .collection-fields input, .collection-search-label input,
.financial-collection-controls select, .attention-sort select { background: #fff; border-color: #dedfe3; border-radius: 6px; color: var(--ink); min-height: 36px; }
.collection-stock-list { border-color: var(--line); border-radius: 6px; }
.collection-stock, .collection-preview-members li { border-bottom-color: var(--line); }
.collection-stock:hover { background: var(--surface); }
.collection-stock strong, .collection-preview-members strong { color: var(--ink); }
.collection-estimate { background: var(--surface); color: var(--ink-secondary); border-radius: 6px; padding: 13px; }
.collection-estimate strong { color: var(--ink); font-size: 22px; }
.collection-plan-empty, .collection-evidence, .collection-unavailable, .collection-feedback { color: var(--muted); }
.collection-plan { top: 76px; min-height: 180px; }
.automation-grid > .card { padding: 20px; }
.automation-heading h2, .automation-toolbar h2 { font-size: 15px; color: var(--ink); }
.automation-schedule > div { background: var(--surface); border-color: var(--line); border-radius: 6px; }
.automation-schedule small, .automation-records small, .expansion-counts { color: var(--muted); }
.automation-records { border-color: var(--line); }
.automation-records summary, .expansion-counts strong { color: var(--ink-secondary); }
.expansion-number { color: var(--ink); font-size: 23px; }
.route-layer { border-color: var(--line); padding: 12px 0; }
.route-layer p { color: var(--muted); }
.route-step { color: var(--ink-secondary); background: var(--surface-hover); }

/* Market price colors and chart geometry remain unchanged. */
.stock-chart { --chart-ink: #414650; --chart-muted: #727883; --chart-blue: #245bba; }
.stock-chart-heading h3 { font-size: 15px; }
.stock-chart-controls, .event-intervals { background: var(--surface); border-color: var(--line); }
.stock-chart-controls button, .event-intervals button { color: var(--muted); }
.stock-chart-controls button[aria-pressed=true], .event-intervals button[aria-pressed=true] { color: var(--ink); background: #fff; box-shadow: 0 1px 3px #20212412; }
.stock-chart-controls button:hover { background: #eceef2; color: var(--ink); }
.stock-chart-readout, .stock-chart-readout > strong, .stock-chart-readout b { color: var(--ink-secondary); border-color: var(--line); }
.stock-chart-convention, .stock-chart-footer, .stock-chart-period-meta, .stock-chart-observation-note { color: var(--muted); }
.stock-chart-empty, .event-chart-empty { background: #fff; border-color: var(--line); color: var(--muted); border-style: solid; }
.stock-chart-empty { padding: 55px 18px; }
.stock-chart-acquisition { background: var(--surface); border-color: var(--line); border-radius: 6px; }
.stock-section-nav { top: 60px; background: #fff; padding: 8px 0; margin: 16px 0; border-bottom: 1px solid var(--line); }
.stock-section-nav button { background: #fff; color: var(--ink-secondary); border-color: var(--line); border-radius: 5px; }
.stock-section-nav button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: none; }
.stock-metrics-disclosure { background: #fff; border-color: var(--line); border-radius: 6px; padding: 13px 16px; color: var(--ink-secondary); font-size: 12px; }
#stock-events, #stock-chart, .financial-panel { scroll-margin-top: 122px; }
.financial-controls { margin: 16px 0; color: var(--muted); }
.financial-controls label { color: var(--ink-secondary); }
.financial-controls select { background: #fff; border-color: #dedfe3; color: var(--ink); border-radius: 6px; }
.financial-cards > div, .valuation-metric { background: #fff; border-color: var(--line); border-radius: 6px; padding: 14px; }
.financial-cards strong, .valuation-metric strong { color: var(--ink); font-size: 21px; font-weight: 600; margin-top: 7px; }
.financial-cards span, .financial-cards small, .financial-footnote, .financial-caveat,
.financial-provenance, .financial-empty, .financial-comparison td small { color: var(--muted); }
.financial-caveat { background: var(--surface); }
.financial-footnote { border-color: var(--line); }
.financial-empty h3 { color: var(--ink-secondary); }
.valuation-metric > span { min-height: 0; margin-bottom: 8px; }
.valuation-empty { font-size: 12px; }
.event-filters, .event-picker, .event-chart-note { background: var(--surface); border-color: var(--line); border-radius: 6px; }
.event-filters label, .event-picker-list button, .event-chart-readout,
.event-chart-readout > strong, .event-chart-readout b, .event-evidence summary { color: var(--ink-secondary); }
.event-filters input, .event-filters select { color: var(--ink); border-color: #dedfe3; }
.event-research-intro, .event-research-toolbar p, .event-picker-date, .event-picker-source,
.event-window-heading p, .event-anchor-description, .event-chart-toolbar > span,
.event-chart-footer p, .event-evidence, .event-chart-readout small { color: var(--muted); }
.event-workspace, .event-picker, .event-chart-readout, .event-chart-footer, .event-evidence { border-color: var(--line); }
.event-picker-list button:hover { background: #eef0f3; }
.event-picker-list button[aria-pressed=true] { background: #edf1f8; border-color: #bbc9df; box-shadow: inset 2px 0 #557cb6; }
.event-window-heading h3 { color: var(--ink); font-size: 15px; }
.event-chart-grid { stroke: #eceef1; }
.event-chart-axis, .event-chart-relative { fill: #707783; }

/* API docs, tokens, accounts and private connection settings. */
.integration-hero-mark { color: #bcc1ca; font-size: 42px; padding: 8px; }
.integration-endpoint { color: var(--ink-secondary); background: var(--surface); border-color: var(--line); border-radius: 6px; padding: 10px 12px; }
.integration-steps li::before { background: var(--surface-hover); color: var(--ink-secondary); border-radius: 6px; }
.integration-steps strong, .integration-doc-index strong { color: var(--ink); }
.integration-steps p, .integration-doc-index, .token-mask, .token-owner, .token-purposes small,
.token-scope-options code, .token-card-meta span, .token-card-meta small { color: var(--muted); }
.integration-doc-content td:first-child { color: var(--ink-secondary); }
.integration-code-block > .btn { background: #fff; }
.token-card { border-color: var(--line); border-radius: 6px; padding: 16px 18px; background: #fff; }
.token-name-line > strong { color: var(--ink); }
.token-card-meta { margin-top: 14px; padding-top: 12px; border-color: var(--line); }
.token-card-meta strong, .token-card-permissions, .token-permissions summary { color: var(--ink-secondary); }
.token-permissions { border-color: var(--line); border-radius: 6px; }
.token-form-section + .token-form-section, .account-login-provider { border-color: var(--line); }
.account-dialog p, .account-login-provider p { color: var(--muted); }
.reference-index a, .reference-index strong { color: var(--ink-secondary); }
.reference-index a:hover { background: var(--surface); color: var(--ink); }
.reference-index a.active { background: var(--surface-hover); color: var(--ink); }
.reference-index-label { color: var(--muted); letter-spacing: .04em; }
.reference-start, .reference-resource-links { border-color: var(--line); }
.reference-start h2, .reference-page-intro h2 { font-size: 18px; color: var(--ink); }
.reference-start p, .reference-page-intro p, .reference-category p,
.reference-operation p, .reference-operation small, .reference-category-count,
.reference-grants span, .reference-footnote, .reference-rules ul, .reference-rules p { color: var(--muted); }
.reference-category, .reference-operation { border-color: var(--line); border-radius: 7px; padding: 18px; color: var(--ink); }
.reference-category:hover, .reference-operation:hover { background: #fafbfc; border-color: #c8cdd5; box-shadow: none; }
.reference-category h3 { font-size: 14px; margin: 8px 0; }
.reference-category p { margin-bottom: 14px; }
.reference-operation code, .reference-start code, .reference-subsection h3,
.reference-rules h3, .reference-schema summary, .reference-endpoint code { color: var(--ink-secondary); }
.reference-endpoint code { font-size: 13px; }
.reference-grants code { color: var(--ink-secondary); background: var(--surface); }
.reference-schema { border-color: var(--line); border-radius: 6px; }
.connection-fieldset { border-color: var(--line); border-radius: 6px; padding: 10px 14px; margin: 16px 0; }
.connection-fieldset legend { font-size: 12px; color: var(--ink-secondary); }
.connection-check { font-size: 12px; }
.connection-target { border-color: var(--line); gap: 10px; padding: 12px 0; }
.connection-secret { gap: 6px; }
.connection-remove { background: transparent; color: var(--muted); }
.connection-plaintext { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px; font-size: 12px; }
.connection-plaintext dt { color: var(--muted); }
.connection-plaintext dd { color: var(--ink-secondary); }

/* Progressive configuration: essentials first, optional detail on demand. */
.settings-form { max-width: 880px; }
.settings-section { margin: 0 0 20px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
fieldset.settings-section, .integration-token-form fieldset.settings-section {
  min-width: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 20px; margin: 0 0 20px;
}
fieldset.settings-section > legend { float: none; width: 100%; padding: 0; margin-bottom: 14px; color: var(--ink); font-size: 14px; font-weight: 600; }
.settings-section > .actions:first-child { margin-bottom: 14px; }
.settings-section > .actions:first-child h2 { font-size: 14px; }
.settings-section + .settings-section { padding-top: 0; }
.automation-grid > .settings-section { padding: 18px 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
.settings-disclosure .connection-fieldset { border: 0; border-radius: 0; padding: 0; }
.settings-summary { margin-left: 8px; font-weight: 400; }
.settings-section:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.settings-section > h2, .settings-section > h3 { margin: 0 0 14px; font-size: 14px; color: var(--ink); }
.settings-summary, .settings-help { color: var(--muted); font-size: 12px; line-height: 1.7; }
.settings-disclosure { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 14px; margin: 14px 0; color: var(--ink-secondary); }
.settings-disclosure > summary { cursor: pointer; padding: 12px 0; font-size: 12px; font-weight: 500; color: var(--ink-secondary); }
.settings-disclosure > summary small { font-weight: 400; margin-left: 8px; color: var(--muted); }
.settings-disclosure[open] { padding-bottom: 14px; }
.settings-disclosure[open] > summary { margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.settings-disclosure .settings-disclosure { margin-top: 12px; }
.settings-disclosure .field:last-child { margin-bottom: 0; }
.settings-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--line); }
.settings-actions .form-error { margin: 0 auto 0 0; }

/* A single calm login form with brand identity and clear access state. */
.login-shell { display: grid; grid-template-columns: minmax(340px,.9fr) minmax(420px,1.1fr); min-height: 100vh; background: #fff; }
.login-art { display: flex; padding: 48px clamp(32px,5vw,84px); background: #f5f9ff; border-right: 1px solid var(--line); }
.login-art .brand-mark { width: 38px; height: 38px; }
.login-art h1 { font-size: clamp(26px,2.5vw,36px); line-height: 1.6; color: var(--ink); letter-spacing: -.7px; margin: 18px 0; }
.login-art p { color: var(--muted); font-size: 13px; max-width: 330px; line-height: 1.9; margin: 0; }
.login-art .eyebrow { color: var(--accent); font-size: 10px; letter-spacing: 1.5px; }
.login-art .orbit { display: none; }
.login-art > small { color: var(--muted); font-size: 11px; }
.login-art .brand small { color: var(--muted); }
.login-panel { padding: 40px 24px; min-height: 100vh; }
.login-form { width: min(340px,100%); }
.login-mobile-brand { display: none; margin-bottom: 32px; padding: 0; }
.login-form .eyebrow { display: none; }
.login-form h1 { font-size: 21px; color: var(--ink); letter-spacing: -.3px; }
.login-form p { color: var(--muted); font-size: 12px; margin: 8px 0 24px; }
.login-form .btn { min-height: 40px; padding: 9px 12px; }
.login-form .google-login { color: var(--ink-secondary); border-color: #dedfe3; }
.login-form .login-google-note { color: var(--muted); font-size: 11px; line-height: 1.7; }
.login-help { margin-top: 14px; font-size: 11px; color: var(--muted); }
.login-help > summary { cursor: pointer; line-height: 1.8; }
.login-help[open] > summary { margin-bottom: 7px; }
.login-form .login-help p { font-size: 11px; margin: 0; line-height: 1.7; }
.login-divider { color: var(--muted); margin: 18px 0; }
.login-divider::before, .login-divider::after { background: var(--line); }

@media (max-width: 1180px) {
  :root { --sidebar-width: 208px; }
  .page { padding: 22px 24px 36px; }
  .topbar { padding: 0 24px; }
  .monitoring-layout { grid-template-columns: minmax(0,1fr) 278px; gap: 16px; }
}
@media (max-width: 800px) {
  :root { --sidebar-width: 236px; }
  .sidebar { padding-top: 22px; }
  .main { margin-left: 0; }
  .topbar { height: 56px; padding: 0 16px; gap: 12px; }
  .page { padding: 20px 16px 32px; }
  .page-heading { gap: 12px; align-items: flex-start; margin-bottom: 18px; }
  .page-heading h1 { font-size: 21px; }
  .page-heading .actions { width: auto; }
  .brand b { font-size: 18px; }
  .card, .monitoring-layout .card { padding: 17px; }
  .grid { gap: 14px; }
  .hero h2, .investing-welcome h2, .integration-hero h2, .insight-workspace-head h2 { font-size: 18px; }
  .stat-value, .investing-workbench .stat-value { font-size: 24px; }
  .investing-welcome, .integration-hero, .investing-automation, .insight-workspace-head,
  .insight-config, .insight-context, .insight-result { padding: 18px; }
  .monitoring-layout { grid-template-columns: 1fr; }
  .stock-section-nav { top: 56px; }
  .settings-disclosure { padding-left: 12px; padding-right: 12px; }
  .settings-actions { justify-content: flex-start; }
  .reference-layout .card { padding: 17px 14px; }
  .connection-plaintext { grid-template-columns: 1fr; }
  .overlay.show { background: #20212455; }
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-mobile-brand { display: flex; }
  .login-panel { padding: 30px 24px; }
  .search.stock-global-search { width: 100%; min-width: 0; }
}
@media (pointer: coarse) {
  /* Keep compact text while giving touch controls a reliable target. */
  .btn, .btn.small, .btn.quiet-action, .stock-section-nav button,
  .catalog-market-tabs button, .recent-search-item button, .stock-chart-controls button,
  .event-intervals button, .nav .nav-children a { min-height: 40px; }
  input:where(:not([type=checkbox]):not([type=radio])), select, textarea { min-height: 40px; font-size: 16px; }
  .mobile-menu, .sidebar-foot button { min-width: 40px; min-height: 40px; }
  .stock-search-clear { width: 34px; height: 34px; flex-basis: 34px; }
  .connection-check, .check, .field-check label { min-height: 34px; }
  .connection-check input[type=checkbox], input[type=checkbox], input[type=radio] { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading::before, .loading-dot { animation: none; }
}

/* Avoid nested frames around empty results and single-entry navigation. */
.card > .empty, .card > div > .empty { border: 0; border-radius: 0; padding: 24px 12px; }
.breadcrumb:has(> span:only-child) { display: none; }
.nav-utilities > .nav-primary-link, .nav-utilities > a.active { padding: 9px 12px; font-size: 12px; gap: 10px; }
.nav-utilities > a > .icon { width: 17px; height: 17px; }

/* Evidence-backed research: conclusion first, detailed inputs on demand. */
.insight-research { margin: 16px 0; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 7px; background: #fff; }
.insight-research-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.insight-research-heading h3 { margin: 0; }
.insight-research > .insight-prose { color: var(--ink); font-weight: 500; }
.insight-research-rows, .insight-decision dl { margin: 10px 0 0; }
.insight-research-rows > div, .insight-decision dl > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 5px 0; font-size: 12px; line-height: 1.75; }
.insight-research-rows dt, .insight-decision dt { color: var(--muted); }
.insight-research-rows dd, .insight-decision dd { margin: 0; color: var(--ink-secondary); overflow-wrap: anywhere; }
.insight-research-boundary { color: var(--muted); font-size: 11px; line-height: 1.75; margin-bottom: 0; }
.insight-decision { margin: 13px 0; padding: 13px 16px; border-radius: 6px; background: var(--surface); }
.insight-decision-conclusion { margin: 0 0 8px; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.8; }
.insight-analysis-detail { margin: 12px 0; }
.insight-candidate .insight-head-tags { padding-top: 0; }
@media(max-width:600px) { .insight-research { padding: 13px; } .insight-decision { padding: 12px; } .insight-research-rows > div, .insight-decision dl > div { grid-template-columns: 56px minmax(0, 1fr); gap: 8px; } }
.monitoring-historical-decision { color: var(--ink-secondary); margin-top: 8px; }
.monitoring-historical-decision summary { font-size: 11px; color: var(--muted); cursor: pointer; }
.monitoring-historical-decision[open] { padding: 10px; background: var(--surface); border-radius: 5px; }
.monitoring-historical-decision > p { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 5px; }
.monitoring-historical-decision > p > :first-child { color: var(--muted); }
.monitoring-original-summary { margin: 8px 0; border-left: 2px solid var(--line); padding-left: 10px; }
.monitoring-original-summary small { color: var(--muted); font-size: 11px; }
.monitoring-background > :last-child { color: #425d7c; }
.monitoring-attribution { margin: 10px 0 0; font-size: 12px; }
.monitoring-attribution > summary { cursor: pointer; color: var(--muted); font-size: 11px; }
.monitoring-attribution dl { padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; }
.monitoring-attribution dl > div { display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 10px; padding: 8px 0; }
.monitoring-attribution dl > div + div { border-top: 1px solid var(--line); }
.monitoring-attribution dt { color: var(--muted); }
.monitoring-attribution dd { margin: 0; overflow-wrap: anywhere; line-height: 1.65; }
.monitoring-attribution dd > small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.monitoring-attribution-state { display: inline-block; margin-right: 8px; color: var(--muted); font-size: 10px; }

/* Frame accessibility and compact, branded controls. */
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 6px; color: #fff; background: var(--accent-strong); }
.skip-link:focus { top: 10px; color: #fff; }
.sidebar-close { display: none; }
.topbar .btn.icon-only { min-height: 32px; width: 32px; padding: 6px; color: var(--muted); background: transparent; border-color: transparent; }
.topbar .btn.icon-only:hover { color: var(--accent); background: var(--accent-soft); }
.topbar .btn.icon-only .icon { width: 16px; height: 16px; }
.stock-search-results [role=option].is-selected { box-shadow: inset 2px 0 var(--accent); }
.reference-index a.active { background: var(--accent-soft); color: var(--accent-strong); }
.pagination-pages .btn[aria-current=page] { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-border); }
input:where(:not([type=checkbox]):not([type=radio])):focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-border); outline-offset: 1px; border-color: var(--accent); }
.btn:disabled { box-shadow: none; }
.settings-disclosure > summary:hover { color: var(--accent-strong); }
.footer { margin-top: 28px; border-top-color: #edf1f3; }
@media(max-width:800px) {
  .sidebar { z-index: 40; box-shadow: 12px 0 40px #1e293b12; }
  .sidebar-close { display: inline-grid; place-items: center; position: absolute; right: 12px; top: 10px; width: 28px; height: 28px; padding: 0; color: var(--muted); background: transparent; border-radius: 5px; }
  .sidebar-close:hover { background: var(--surface-hover); }
  .sidebar-close .icon { width: 16px; height: 16px; }
  .overlay.show { z-index: 39; width: 100%; height: 100%; padding: 0; border-radius: 0; background: #1e293b40; }
  body:has(#app.navigation-open) { overflow: hidden; }
  .topbar .top-right { gap: 0; }
  .page-heading > .actions { padding-top: 0; }
  .topbar .stock-search-results { top: 56px; }
}
