/* Shared SSR theme: the existing black/orange research command center. */
:root {
  --ink:#111827; --paper:#fff; --line:#e5e7eb;
  --accent:#f97316; --accent-soft:#fdba74; --accent-ink:#9a3412;
  --accent-surface:#fff7ed; --muted:#59616f;
  --panel-shadow:0 18px 40px rgb(15 23 42 / 8%);
}
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body {
  margin:0; color:var(--ink);
  background:radial-gradient(circle at top,#fff7ed 0,#f3f4f6 55%,#e5e7eb 100%);
  font:1rem/1.55 system-ui,-apple-system,"Segoe UI",sans-serif;
}
a { color:var(--accent-ink); text-underline-offset:.18em; }
a:hover { text-decoration-thickness:2px; }
:focus-visible { outline:3px solid #c2410c; outline-offset:3px; }
[id] { scroll-margin-top:10rem; }
.site-header {
  position:sticky; top:0; z-index:10; padding:1rem 1.5rem; color:#fff7ed;
  background:linear-gradient(90deg,#000,#020617); border-bottom:1px solid #000;
  box-shadow:0 10px 25px rgb(0 0 0 / 28%);
}
.header-inner {
  max-width:1232px; margin:auto; display:flex; align-items:center;
  flex-wrap:wrap; gap:.75rem 2rem;
}
.brand { flex:0 1 auto; color:var(--accent); text-decoration:none; }
.brand-name { display:block; font-weight:800; font-size:1.375rem; line-height:1.3; }
.eyebrow {
  display:block; color:var(--accent-soft); font-size:.75rem;
  letter-spacing:.09em; text-transform:uppercase;
}
.site-nav {
  display:flex; flex:1 1 32rem; justify-content:flex-end; align-items:center;
  flex-wrap:wrap; gap:.125rem .875rem; min-width:0;
}
.site-nav a {
  display:inline-flex; align-items:center; min-height:2.75rem; padding:.25rem 0;
  color:var(--accent-soft); font-size:.875rem; text-decoration:none;
}
.site-nav a:hover { color:#fff7ed; text-decoration:underline; }
.site-header :focus-visible { outline-color:var(--accent-soft); }
.site-nav [data-compare-link] { padding-inline:.625rem; border:1px solid var(--accent-soft); border-radius:.5rem; }
.skip-link {
  position:fixed; top:.5rem; left:1rem; z-index:20; transform:translateY(-200%);
  padding:.625rem 1rem; border:2px solid var(--accent-ink); border-radius:.5rem;
  background:var(--paper);
}
.skip-link:focus { transform:translateY(0); }
.research-main,.site-footer { max-width:1280px; margin:0 auto; padding:1.5rem; }
.research-main { min-height:75vh; overflow-wrap:anywhere; }
.research-main:not(.home-main) {
  max-width:1232px; width:calc(100% - 3rem); margin-block:1.5rem;
  border:1px solid var(--line); border-radius:1rem; background:var(--paper);
  box-shadow:var(--panel-shadow);
}
.panel,.workspace-grid>section,.workspace-grid>form {
  min-width:0; padding:1.125rem; border:1px solid var(--line); border-radius:1rem;
  background:rgb(255 255 255 / 96%); box-shadow:var(--panel-shadow);
}
.command-hero {
  margin-bottom:1rem; border-color:#fed7aa;
  background:linear-gradient(180deg,#fffdfb,#fff7ed);
}
h1 { max-width:54ch; margin:0 0 1rem; font-size:clamp(1.5rem,2.6vw,2rem); line-height:1.2; letter-spacing:-.025em; }
h2 { margin:0 0 .75rem; font-size:1.25rem; line-height:1.3; }
h3 { font-size:1.0625rem; line-height:1.35; }
p { margin:.75rem 0; }
.paper-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.875rem; }
.paper-grid>.paper { margin:0; }
.paper-grid>.paper:last-child:nth-child(odd) { grid-column:1/-1; }
.workspace-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:1rem; align-items:start; }
.paper {
  min-width:0; margin:1rem 0; padding:1rem; border:1px solid var(--line);
  border-radius:.75rem; background:var(--paper); box-shadow:0 8px 18px rgb(15 23 42 / 5%);
}
.paper h2 { font-size:1.1875rem; margin:.375rem 0; }
.paper h2 a { color:var(--ink); text-decoration:none; }
.paper h2 a:hover { color:var(--accent-ink); text-decoration:underline; }
.paper p { margin:.625rem 0; }
.paper button { margin:.25rem .25rem 0 0; }
.meta,.notice,.site-footer { font-size:.875rem; color:var(--muted); }
.notice {
  padding:.625rem .875rem; background:var(--accent-surface);
  border-left:3px solid var(--accent); border-radius:0 .5rem .5rem 0;
}
.command-hero>.notice { margin-bottom:1.25rem; }
.site-footer { border-top:1px solid #d6d3d1; }
.about-page { max-width:80ch; margin-inline:auto; }
.about-page section { margin-top:2rem; }
.about-workflows { padding-left:1.5rem; }
.about-workflows li { padding-left:.25rem; margin-bottom:1.5rem; }
.about-workflows h3 { margin-bottom:.5rem; }
input:not([type=checkbox]):not([type=radio]),select,button {
  max-width:100%; min-height:2.75rem; padding:.5rem .75rem; font:inherit;
  border:1px solid #c9cdd3; border-radius:.5rem;
}
input:not([type=checkbox]):not([type=radio]),select { min-width:0; background:var(--paper); color:var(--ink); }
input[type=checkbox],input[type=radio] { accent-color:#c2410c; }
button { cursor:pointer; color:var(--accent-ink); background:var(--accent-surface); border-color:var(--accent-soft); font-weight:600; }
button:hover:not(:disabled) { background:#ffedd5; border-color:#c2410c; }
button:disabled { cursor:default; opacity:.65; }
button[aria-pressed=true] { background:#ffedd5; border-color:#c2410c; }
.filters { display:flex; align-items:end; flex-wrap:wrap; gap:.75rem; margin:1rem 0; }
.filters label { display:grid; gap:.25rem; min-width:0; color:var(--muted); font-size:.875rem; }
.filters input[name=q] { width:100%; }
.command-hero .filters label { flex:1; }
.filters button,[data-topics-form] button[type=submit] { background:#c2410c; color:#fff; border-color:#c2410c; }
.filters button:hover:not(:disabled),[data-topics-form] button[type=submit]:hover:not(:disabled) { background:#9a3412; }
fieldset { min-width:0; margin:1.25rem 0; padding:1rem; border:1px solid var(--line); border-radius:.75rem; }
legend { font-weight:700; padding-inline:.25rem; }
.workspace-grid>form fieldset { margin:0; border:0; border-radius:0; padding:0; }
.topic-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; margin-bottom:1rem; }
.topic-choices label { display:flex; align-items:center; gap:.5rem; min-height:2.75rem; font-size:.875rem; }
.topic-choices input { width:1.25rem; height:1.25rem; flex-shrink:0; }
.workspace-grid .topic-choices { grid-template-columns:1fr; }
[data-account-form],.subscribe { display:flex; align-items:end; flex-wrap:wrap; gap:.75rem; margin:1.25rem 0; }
[data-account-form] label,.subscribe label { display:grid; gap:.25rem; min-width:0; }
[data-personal-status]:empty,[data-changes-status]:empty { display:none; }
[data-authenticated] button { margin:.25rem 0; }
.routes ul { display:grid; gap:.5rem; margin:0; padding:0; list-style:none; }
.routes a { display:block; padding:.625rem .75rem; border:1px solid #fed7aa; border-radius:.5rem; background:#fffdfb; }
.review { margin:1.5rem 0; padding:1rem; border:1px solid var(--line); border-radius:.75rem; background:var(--paper); }
.review dt { font-weight:700; }
.review dd { margin:0 0 .75rem; }
table { width:100%; border-collapse:collapse; margin:1rem 0; }
th,td { border:1px solid var(--line); padding:.625rem; text-align:left; vertical-align:top; }
th { background:var(--accent-surface); }
pre { max-width:100%; padding:1rem; overflow:auto; white-space:pre-wrap; background:#f8fafc; border-radius:.5rem; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:1050px) {
  .workspace-grid { grid-template-columns:minmax(0,1fr); }
  .workspace-grid .topic-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:768px) {
  .site-header { position:static; padding:.875rem 1rem; }
  .header-inner { display:block; }
  .site-nav { justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; gap:1rem; margin-top:.5rem; padding:.25rem; }
  .site-nav a { flex-shrink:0; }
  [id] { scroll-margin-top:1rem; }
  .research-main,.site-footer { padding:1rem; }
  .research-main:not(.home-main) { width:calc(100% - 2rem); margin-block:1rem; }
  .paper-grid { grid-template-columns:minmax(0,1fr); }
  .panel,.workspace-grid>section,.workspace-grid>form { padding:1rem; }
  .filters { align-items:stretch; flex-direction:column; }
  .command-hero .filters { align-items:end; flex-direction:row; flex-wrap:nowrap; }
  .command-hero .filters button { flex-shrink:0; }
  [data-account-form],.subscribe { align-items:stretch; flex-direction:column; }
  table { display:block; max-width:100%; overflow-x:auto; }
  th,td { min-width:8rem; }
}
@media(max-width:480px) {
  .topic-choices,.workspace-grid .topic-choices { grid-template-columns:1fr; }
  .paper { padding:.875rem; }
  .paper h2 { font-size:1.125rem; }
}
