/* FrontierDock-inspired presentation layer. Existing data and interactions stay in place. */
:root:not([data-theme="dark"]) {
  --bg:#f5f5f0; --glass:#fff; --glass-strong:#fff; --glass-thin:#f0f2ec;
  --text:#293532; --text-secondary:#56645d; --text-muted:#68756e;
  --accent:#245b50; --accent-dim:#e7eeea; --accent-glow:transparent;
  --edge-outer:#dfe3dc; --hairline:#dfe3dc; --hairline-soft:#e8ebe5;
  --well:#eef1eb; --surface-1:#f7f8f4; --surface-2:#eef2ec; --surface-3:#e6ece5;
  --sidebar-bg:#194c46; --card-bg:#fff; --card-border:#dfe3dc;
  --input-bg:#fff; --bg-elevated:#fff; --rule:#dfe3dc; --rule-strong:#bdc9c1;
  --sh-1:none; --sh-2:none; --sh-3:none; --glass-blur:0px;
  --sidebar-w:232px; --radius:8px; --radius-lg:8px; --radius-xl:10px; --radius-sm:6px;
  --font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --font-serif:"Songti SC","STSong","SimSun",Georgia,serif;
  --ink:#293532; --muted:#56645d; --green:#245b50; --line:#dfe3dc; --paper:#fff; --wash:#f5f5f0;
}
:root[data-theme="dark"] {
  --font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --font-serif:"Songti SC","STSong","SimSun",Georgia,serif;
  --bg:#18211f; --glass:#202c28; --glass-strong:#24312c; --glass-thin:#1c2723;
  --text:#e5ece5; --text-secondary:#b8c8bd; --text-muted:#9aae9f;
  --accent:#a7cbb5; --accent-dim:#2e4439; --accent-glow:transparent;
  --edge-outer:#3b4c42; --hairline:#3b4c42; --hairline-soft:#304137;
  --well:#2b3b31; --card-bg:#202c28; --card-border:#3b4c42; --input-bg:#24312c;
  --surface-1:#202c28; --surface-2:#28392e; --surface-3:#304437;
  --rule:#3b4c42; --rule-strong:#607b69; --bg-elevated:#24312c;
  --sh-1:none; --sh-2:none; --sh-3:none; --glass-blur:0px;
  --sidebar-w:232px; --radius:8px; --radius-lg:8px; --radius-xl:10px; --radius-sm:6px;
}
.frontier-workbench { background:var(--bg); font-family:var(--font-sans); }
:root .frontier-workbench .bg-layer { background:var(--bg); }
:root .frontier-workbench .bg-layer > * { display:none; }
:root .frontier-workbench .sidebar {
  width:var(--sidebar-w); background:#194c46; color:#e4eee6;
  border-right:0; padding:24px 14px 18px; backdrop-filter:none; -webkit-backdrop-filter:none;
}
:root .frontier-workbench .sidebar-brand { border-color:#ffffff1c; padding:0 8px 20px; }
:root .frontier-workbench .brand-title { color:#f2f5ec; font:600 17px/1.4 var(--font-sans); letter-spacing:0; }
:root .frontier-workbench .brand-sub { color:#becfc3; font:11px/1.7 var(--font-sans); letter-spacing:0; }
:root .frontier-workbench .brand-mark { color:#dae7d9; width:30px; height:30px; }
:root .frontier-workbench .brand-mark svg [stroke] { stroke:currentColor; }
:root .frontier-workbench .brand-mark svg [fill]:not([fill="none"]) { fill:currentColor; }
:root .frontier-workbench .sidebar-nav { gap:20px; scrollbar-color:#718e7a transparent; }
:root .frontier-workbench .nav-group { gap:3px; }
:root .frontier-workbench .nav-group-label { color:#b4cabb; opacity:1; letter-spacing:.5px; font-size:11px; }
:root .frontier-workbench :is(.nav-item,.paperfocus-nav) {
  color:#d1dfd4; font:13px/1.5 var(--font-sans); border:0; border-radius:6px;
  min-height:38px; padding:9px 11px; box-shadow:none; background:transparent;
  transition:color .15s,background .15s; text-decoration:none; gap:10px;
}
:root .frontier-workbench :is(.nav-item,.paperfocus-nav):hover { background:#123b36; color:#fff; transform:none; }
:root .frontier-workbench .nav-item.active { background:#e4efdf; color:#204b3f; }
:root .frontier-workbench .nav-ink { display:none; }
:root .frontier-workbench .nav-item.active .nav-badge { background:#cfdfcd; color:#204b3f; }
:root .frontier-workbench .nav-badge { background:#ffffff17; color:#dbe6d9; }
:root .frontier-workbench .paperfocus-nav svg { width:17px; height:17px; flex-shrink:0; }
:root .frontier-workbench .sidebar-footer { border-color:#ffffff1c; color:#cfdfd1; padding-top:14px; }
:root .frontier-workbench .sidebar-footer :is(.phd-mini-label,.phd-mini-range,.phd-mini-percent) { color:#cfdfd1; }
:root .frontier-workbench .phd-mini-bar { background:#ffffff20; }
:root .frontier-workbench .phd-mini-fill { background:#bdcfac; }
:root .frontier-workbench .main { margin-left:var(--sidebar-w); padding:0 36px 64px; }
:root .frontier-workbench .topbar {
  min-height:72px; margin:0 -36px 24px; padding:14px 36px;
  background:var(--bg); border-bottom:1px solid var(--hairline); box-shadow:none;
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
:root .frontier-workbench .panel-title { font-size:25px; line-height:1.35; letter-spacing:0; font-weight:600; }
:root .frontier-workbench .topbar-date { color:var(--text-secondary); font-size:12px; }
:root .frontier-workbench .topbar-right { gap:10px; }
:root .frontier-workbench :is(.theme-toggle,.topbar-search,.btn-refresh,.weather-chip) {
  border-radius:6px; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;
}
:root .frontier-workbench .studio-hero {
  display:block; background:transparent; border:0;
  border-radius:0; box-shadow:none; padding:8px 0 24px; margin-bottom:24px;
}
:root .frontier-workbench .studio-kicker { font:11px/1.6 var(--font-sans); color:var(--text-secondary); letter-spacing:1.4px; }
:root .frontier-workbench .studio-hero h2 { font-size:30px; line-height:1.45; margin:8px 0; }
:root .frontier-workbench .studio-hero p { font-size:14px; margin:8px 0; }
:root .frontier-workbench .studio-doodle { display:none; }
:root .frontier-workbench .studio-actions { margin:18px 0 0; }
:root .frontier-workbench :is(.studio-actions button,.studio-card button,.studio-card .btn) {
  border-radius:6px; border:1px solid var(--hairline); background:var(--glass-strong);
  color:var(--accent); min-height:38px; padding:8px 14px; box-shadow:none;
}
:root .frontier-workbench .studio-actions button:last-child { background:var(--accent); color:var(--bg); border-color:var(--accent); }
:root .frontier-workbench .studio-summary { gap:0; border-block:1px solid var(--hairline); margin-bottom:28px; }
:root .frontier-workbench .studio-summary a { padding:18px 22px; border:0; border-right:1px solid var(--hairline); border-radius:0; background:transparent; }
:root .frontier-workbench .studio-summary a:first-child { padding-left:0; }
:root .frontier-workbench .studio-summary a:last-child { border-right:0; }
:root .frontier-workbench .studio-summary strong { font:500 27px/1.3 Georgia,serif; margin-bottom:4px; }
:root .frontier-workbench :is(.card,.studio-card,.stat-card,.today-board) {
  border:1px solid var(--hairline); border-radius:8px; background:var(--glass);
  box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;
}
:root .frontier-workbench :is(.card,.studio-card,.stat-card):hover { transform:none; box-shadow:none; }
:root .frontier-workbench .card { padding:22px; }
:root .frontier-workbench .studio-card { padding:24px; }
:root .frontier-workbench .card-dot { display:none; }
:root .frontier-workbench .card-label { font-size:12px; letter-spacing:.3px; color:var(--text-secondary); }
:root .frontier-workbench .today-board { border:0; border-bottom:1px solid var(--hairline); padding:0 0 24px; border-radius:0; background:transparent; }
:root .frontier-workbench .today-title { font-size:21px; }
:root .frontier-workbench .today-head { margin-bottom:20px; }
:root .frontier-workbench .today-grid { gap:24px; }
:root .frontier-workbench .studio-map { background-image:none; }
:root .frontier-workbench .studio-map .map-node { border-radius:6px; border-width:1px; }
:root .frontier-workbench .studio-journals article { border-radius:6px; }
:root .frontier-workbench :is(.panel,.panel.active .card,.panel.active .stat-card) { animation:none; }
.frontier-workbench :is(button,a,input,select,textarea):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.frontier-workbench .sidebar :is(button,a):focus-visible { outline-color:#e4efdf; outline-offset:1px; }

/* The evidence hub shares the same visual language, with text navigation. */
.frontier-hub { background:var(--wash); color:var(--ink); font:15px/1.75 var(--font-sans); }
.frontier-hub .shell { margin:0 0 0 var(--sidebar-w); max-width:1400px; padding:32px 36px 72px; min-width:0; }
.frontier-hub .tabs {
  position:fixed; inset:0 auto 0 0; width:var(--sidebar-w); z-index:20;
  display:flex; flex-direction:column; gap:5px; margin:0; padding:25px 14px;
  background:#194c46; color:#d1dfd4; border:0; overflow:auto;
}
.frontier-hub .hub-brand { display:block; margin:0 7px 22px; padding:0 0 22px; border-bottom:1px solid #ffffff1c; color:#f2f5ec; font-weight:600; font-size:17px; text-decoration:none; }
.frontier-hub .hub-brand span { display:block; font-size:11px; font-weight:400; color:#becfc3; margin-top:4px; }
.frontier-hub .tabs button { text-align:left; color:#d1dfd4; border-radius:6px; min-height:44px; padding:10px 14px; background:transparent; }
.frontier-hub .tabs button:hover { background:#123b36; color:#fff; }
.frontier-hub .tabs button.active { background:#e4efdf; color:#204b3f; font-weight:600; }
.frontier-hub .hero { border:0; border-bottom:1px solid var(--line); border-radius:0; padding:0 0 26px; color:var(--ink); background:transparent; box-shadow:none; }
.frontier-hub .eyebrow { color:var(--muted); font-size:11px; letter-spacing:1.4px; }
.frontier-hub h1 { font-size:30px; line-height:1.4; margin:8px 0; }
.frontier-hub .hero p { color:var(--muted); max-width:700px; font-size:14px; margin:8px 0 18px; }
.frontier-hub .hero-links a { color:var(--green); border-color:var(--line); border-radius:6px; font-size:13px; padding:7px 10px; }
.frontier-hub .stats { gap:0; margin-top:22px; }
.frontier-hub .stat { border:0; border-right:1px solid var(--line); border-radius:0; padding:0 24px; min-width:120px; background:transparent; }
.frontier-hub .stat:first-child { padding-left:0; }
.frontier-hub .stat:last-child { border-right:0; }
.frontier-hub .stat strong { font:500 27px/1.4 Georgia,serif; }
.frontier-hub .stat span { color:var(--muted); }
.frontier-hub .tab { padding-top:26px; }
.frontier-hub .card { box-shadow:none; border-radius:8px; padding:22px; }
.frontier-hub :is(.paper-card,.topic-card,.screening-paper,.gap-card) { border-left-width:2px; }
.frontier-hub .section-title h2 { font-size:23px; }
.frontier-hub .section-title p { font-size:13px; }
.frontier-hub :is(.button,.query-item,.doc-row,.note,dialog,.screening-empty) { border-radius:6px; }
.frontier-hub .button { min-height:38px; }
.frontier-hub :is(.button,.hero-links a,.tabs button,.dialog-head button):focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.frontier-hub .tabs :is(button,a):focus-visible { outline-color:#e4efdf; outline-offset:1px; }
.frontier-hub .grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); }
.frontier-hub .query-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); }
.frontier-hub :is(.filters input,.filters select) { border-color:var(--line); border-radius:6px; }
.frontier-hub .doc-content { line-height:1.85; font-family:var(--font-sans); }

@media(max-width:960px) {
  .frontier-hub .shell { margin-left:0; padding:24px 22px 56px; }
  .frontier-hub .tabs { position:static; width:auto; flex-direction:row; padding:10px; margin:22px 0 0; border-radius:6px; }
  .frontier-hub .hub-brand { display:none; }
  .frontier-hub .tabs button { flex-shrink:0; }
}
@media(max-width:900px) {
  :root .frontier-workbench .sidebar { width:72px; padding:20px 10px; }
  :root .frontier-workbench .main { margin-left:72px; padding:0 20px 48px; }
  :root .frontier-workbench .topbar { padding:14px 20px; margin:0 -20px 20px; }
  :root .frontier-workbench :is(.brand-text,.nav-group-label,.sidebar-footer,.nav-badge,.nav-item span,.paperfocus-nav span) { display:none; }
  :root .frontier-workbench .nav-item[data-panel="projects"] > span:first-child,
  :root .frontier-workbench .nav-item[data-panel="writing"] > span:first-child { display:inline-flex; }
  :root .frontier-workbench :is(.nav-item,.paperfocus-nav) { justify-content:center; min-height:42px; padding:10px; }
  :root .frontier-workbench .sidebar-brand { padding:0 6px 20px; }
  :root .frontier-workbench .studio-hero h2 { font-size:25px; }
}
@media(max-width:600px) {
  :root .frontier-workbench .topbar { flex-direction:row; align-items:center; gap:10px; }
  :root .frontier-workbench .topbar-right { width:auto; gap:6px; }
  :root .frontier-workbench .panel-title { font-size:21px; }
  :root .frontier-workbench .weather-chip { display:none; }
  :root .frontier-workbench .studio-summary a { padding:14px 8px; font-size:11px; }
  :root .frontier-workbench .studio-summary strong { font-size:24px; }
  :root .frontier-workbench :is(.card,.studio-card) { padding:16px; }
  .frontier-hub .shell { padding:20px 14px 40px; }
  .frontier-hub .hero-row { gap:12px; }
  .frontier-hub .stats { gap:16px 0; }
  .frontier-hub .stat { min-width:100px; padding:0 14px; }
  .frontier-hub .card { padding:17px; }
}
