/* Shared tokens, loaded after each existing screen stylesheet. */
:root {
  color-scheme: light;
  --surface: #fff; --surface-soft: #f3f5fa; --bg: #eaf0f7; --canvas: #eaf0f7;
  --deep: #182238; --action: #4959d9; --ink: #182238; --ink-soft: #334155;
  --muted: #596981; --slate: #596981; --line: #d5deeb; --edge: #d5deeb;
  --blue: #4959d9; --blue-light: #eef0ff; --blue-dark: #3c4bc6;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --surface: #172238; --surface-soft: #1e2d46; --bg: #0c1423; --canvas: #0c1423;
  --ink: #edf2fc; --ink-soft: #d3deef; --muted: #b1bed3; --slate: #b1bed3;
  --line: #34445f; --edge: #34445f; --blue: #b2bdff; --blue-light: #28375b;
  --blue-dark: #c0c9ff; --white: #172238;
  --green: #82dfb6; --green-light: #173d36; --amber: #f3cd7b; --amber-light: #44351d;
  --shadow: 0 12px 36px #0004;
}
.theme-toggle { flex: 0 0 auto; padding: 9px 12px; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.theme-toggle:hover { background: var(--surface-soft); }
.workspace-topbar,.public-header { gap: 12px; flex-wrap: wrap; }
.public-header>div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.site-header .theme-toggle { order: 2; }
.button:not(.secondary):not(.button-light) { background: var(--action); color: #fff!important; }
.button.secondary { background: var(--surface); color: var(--ink-soft)!important; border-color: var(--line); }
.button.secondary:hover { background: var(--surface-soft); }
input,select,textarea { background: var(--surface); border-color: var(--line); color: var(--ink); }
input::placeholder,textarea::placeholder { color: var(--muted); opacity: 1; }
label,.opportunity-facts dd,.summary-strip strong,.opportunity-card h2 a,td>a { color: var(--ink); }
.sidebar,.panel,.table-wrap,.summary-strip,.public-header,.auth-shell,.auth-card,.detail-panel,.detail-grid>div { background: var(--surface); }
.workspace-topbar,.sticky-actions,th,tbody tr:hover { background: var(--surface-soft); }
.sidebar nav a,.eyebrow,.workspace-role { color: var(--muted); }
.sidebar nav a[aria-current=page],.sidebar nav a:hover,.logout-button:hover { background: var(--blue-light); color: var(--blue); }
:root[data-theme=dark] .account-avatar,:root[data-theme=dark] .client-avatar,:root[data-theme=dark] .badge,:root[data-theme=dark] .admin-context { background: #29385b; color: #c0caff; border-color: var(--line); }
:root[data-theme=dark] .status-pill.positive,:root[data-theme=dark] .notice.success,:root[data-theme=dark] .status-badge.open { background: #173d36; color: #a0ebc6; border-color: #39765f; }
:root[data-theme=dark] .status-pill.pending,:root[data-theme=dark] .notice.warning { background: #44351d; color: #f3d397; border-color: #816938; }
:root[data-theme=dark] .notice.error { background: #492a37; color: #ffbcc9; border-color: #9d5068; }
:root[data-theme=dark] .notice.info,:root[data-theme=dark] .watch-form,:root[data-theme=dark] .profile-summary { background: #24354e; color: #c6ddfa; border-color: #446184; }
:root[data-theme=dark] .future small { background: var(--surface-soft); border-color: var(--line); }
:root[data-theme=dark] th,:root[data-theme=dark] td { border-color: var(--line); }
.detail-toolbar { flex-wrap: wrap; }
.opportunity-card { border-color: var(--line); box-shadow: 0 3px 14px #18223808; padding: 22px; }
.opportunity-card h2 { -webkit-line-clamp: 3; font-size: 17px; line-height: 1.5; }
.opportunity-card .card-meta { align-items: flex-start; }
.opportunity-card .card-meta>span:last-child { max-width: 65%; color: var(--muted); }
.opportunity-facts { padding: 16px; margin-top: auto; background: var(--surface-soft); border-radius: 10px; }
.opportunity-facts dd { font-variant-numeric: tabular-nums; }
.opportunity-facts>div:first-child dd { font-size: 17px; }
.detail-link { margin: 12px 0!important; font-size: 12px; }
.filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.filters label { min-width: 0; }
.filters .actions { align-self: end; }
.filter-panel { margin-bottom: 18px; }
.filter-panel>summary { padding: 12px 4px; color: var(--ink-soft); font-weight: 600; cursor: pointer; }
.filter-panel>.filters { margin-bottom: 0; }
:root[data-theme=dark] .dashboard { --edge: #34445f; --soft: #24354e; }
:root[data-theme=dark] .dashboard-tabs a { color: var(--muted); }
:root[data-theme=dark] .dashboard-tabs a[aria-current=page],:root[data-theme=dark] .dashboard-tabs a:hover { color: var(--blue); background: var(--blue-light); }
:root[data-theme=dark] .detail-grid dt,:root[data-theme=dark] .source-stamp { color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 24px 0; color: var(--muted); }
.pagination p { margin: 0; }
/* Preserve dark presentation sections while the surrounding landing follows the theme. */
:root[data-theme=dark] .site-header,:root[data-theme=dark] .site-header.is-scrolled,:root[data-theme=dark] .main-nav.is-open { background: var(--surface); border-color: var(--line); }
:root[data-theme=dark] .hero { background: linear-gradient(115deg,#0c1423,#192541); }
:root[data-theme=dark] .hero-lead,:root[data-theme=dark] .preview-tabs,:root[data-theme=dark] .preview-disclaimer,:root[data-theme=dark] .price-note,:root[data-theme=dark] .faq-heading>p { color: var(--muted); }
:root[data-theme=dark] .opportunity-card .ai-note,:root[data-theme=dark] .review-message { background: var(--surface-soft); color: var(--ink-soft); }
:root[data-theme=dark] .benefit-card,:root[data-theme=dark] .radar-preview,:root[data-theme=dark] .price-card { border-color: var(--line); }
:root[data-theme=dark] .button-light { color: #182238!important; }
:focus-visible { outline: 3px solid #8798ff; outline-offset: 3px; }
@media(max-width:860px) {
  .site-header .main-nav { top: calc(100% + 8px); }
}
@media(max-width:760px) {
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters label:first-child,.filters .actions { grid-column: 1/-1; }
  .filters .actions>* { flex: 1; }
  .workspace-topbar { padding-top: 10px; padding-bottom: 10px; }
  .workspace-topbar>span:not(.workspace-role) { display: none; }
  .sidebar .brand { padding-right: 54px; }
  .site-header .nav-wrap { gap: 8px; flex-wrap: wrap; padding-block: 12px; }
  .site-header .brand { flex: 1 1 180px; }
  .site-header .brand strong { font-size: 15px; }
  .site-header .theme-toggle { font-size: 11px; }
  .public-header { padding-inline: 16px; }
  .public-header .brand .brand-copy { font-size: 16px; }
  .opportunity-card { padding: 18px; }
  .opportunity-footer>* { max-width: 100%; }
  .sticky-actions .button { width: 100%; }
  .sticky-actions form { width: 100%; }
}
@media(max-width:420px) {
  .filters { grid-template-columns: 1fr; }
  .opportunity-facts { grid-template-columns: 1fr; }
  .public-header>div { width: 100%; justify-content: space-between; }
}
