/* Shared interaction and record styles across local and hosted Recon surfaces. */
:root { --danger-soft:#f18c8617; --success-soft:#75d5b617; --violet:#b9a3ef; --control-height:36px; }
.recon-navigation {
  display:flex; align-items:stretch; gap:4px; padding:0 16px; margin:0;
  min-height:44px; flex:none; overflow-x:auto; background:var(--panel); border-bottom:1px solid var(--line);
}
.recon-navigation a {
  display:inline-flex; align-items:center; justify-content:center; padding:10px 14px;
  color:var(--muted); font:500 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  border-bottom:2px solid transparent; white-space:nowrap; text-decoration:none;
}
.recon-navigation a:hover { color:var(--ink); background:var(--raised); }
.recon-navigation a[aria-current="page"] { color:var(--accent); border-bottom-color:var(--accent); }
.recon-navigation a:focus-visible { outline-offset:-4px; }
.workspace-title { font-family:var(--mono); color:var(--accent); }
.mission-context-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; border:1px solid var(--line); background:var(--panel); padding:12px 16px; margin-bottom:20px; }
.mission-context-bar span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
.mission-context-bar button { flex-shrink:0; }
.mission-links { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.mission-links button, .record-link { font-size:12px; }
.record-link { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:var(--r); padding:8px 12px; color:var(--cyan); min-height:var(--control-height); }
.record-link:hover { border-color:var(--cyan); text-decoration:none; }
.lead-card { display:flex; flex-direction:column; gap:10px; }
.lead-card .card-actions { justify-content:flex-start; }
.lead-grid { gap:12px; border:0; }
.lead-card { border:1px solid var(--line); }
.lead-card .question { border-color:var(--cyan); }
.lead-card h3, .evidence-card h3, .library-card h3 { text-transform:none; letter-spacing:0; line-height:1.4; }
.evidence-card blockquote, .source-detail blockquote { color:var(--ink); border-color:var(--line2); }
.source-bindings span { color:var(--muted); }
.tag.critical, .tag.contradicts { color:var(--bad); background:var(--danger-soft); }
.tag.high, .tag.medium { color:var(--warn); background:var(--accent-soft); }
.tag.supports { color:var(--good); background:var(--success-soft); }
.tag.context, .tag.unreviewed { color:var(--muted); }
.iteration[data-status="blocked"], .iteration[data-status="interrupted"] { border-left:3px solid var(--bad); }
.iteration[data-status="running"] { border-left:3px solid var(--accent); }
.wiki-link[aria-current="page"] { border-color:var(--accent-line); box-shadow:inset 2px 0 var(--accent); background:var(--raised); }
.wiki-article h2 { overflow-wrap:anywhere; }
.wiki-article { min-width:0; }
.source-detail .card-actions { margin-top:16px; }
.connections { display:block; padding:18px 10px; }
.connections summary { color:var(--muted); font:600 11px var(--mono); }
.connections[open] summary { color:var(--accent); margin-bottom:16px; }
.connection { gap:12px; }
button:disabled { cursor:not-allowed; }
button, .button { min-height:var(--control-height); }
button.primary, .button.primary, .go, .cgo, .bc-pause-a button.prim { color:var(--bg); }
input, textarea, select { background:var(--bg); border-color:var(--line2); border-radius:var(--r); }
input[type="checkbox"], input[type="radio"] { accent-color:var(--accent); }
dialog { border-color:var(--line2); border-radius:var(--r); max-height:90dvh; overflow-y:auto; }
.dialog-actions { flex-wrap:wrap; }
.empty { border-color:var(--line2); }
#status.error, #notice { border-color:var(--bad); background:var(--danger-soft); color:var(--ink); }
.nexus-empty { margin-top:18px; }
.nexus-stage { background:var(--panel); }
.nexus-stage svg { min-width:var(--nexus-width); }
.nexus-inspector h2 { overflow-wrap:anywhere; }
.nexus-legend { display:flex; flex-wrap:wrap; gap:12px; color:var(--muted); font-size:11px; margin-top:12px; }
.nexus-legend span::before { content:''; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--node-color); margin-right:6px; }
.gateway-shell header { height:44px; background:var(--panel); padding:0 20px; }
.gateway-shell .brand { gap:10px; font:700 15px var(--mono); color:var(--ink); }
.gateway-shell .brand span:last-child { font:inherit; text-transform:none; }
.gateway-shell main { max-width:1280px; padding:32px 26px; }
.gateway-shell .message, .gateway-shell textarea { background:var(--panel); border:1px solid var(--line); border-radius:var(--r); color:var(--ink); }
.gateway-shell .message.user { border-left:2px solid var(--accent); }
.gateway-shell .message strong { color:var(--cyan); }
.gateway-shell p, .gateway-shell label, .gateway-shell details { color:var(--muted); }
.gateway-shell nav button[aria-current] { color:var(--accent); border-bottom-color:var(--accent); }
.gateway-shell .heading h1 { font-size:28px; }
.gateway-shell button, .gateway-shell .button { background:var(--raised); border-color:var(--line); color:var(--ink); }
.gateway-shell .primary { background:var(--accent); color:var(--bg); }
@media (min-width:1500px) { .lead-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) {
  .recon-navigation { padding:0 6px; gap:0; }
  .recon-navigation a { padding:12px 10px; font-size:12px; }
  .connections { margin-top:12px; padding:12px 0 0; border-top:1px solid var(--line); }
  .connections[open] { max-width:none; }
  .mission-context-bar { flex-wrap:wrap; gap:8px; }
  .mission-context-bar span { flex-basis:100%; }
  .card-actions > button, .card-actions > a { flex:1 1 auto; justify-content:center; }
  .metric { flex:1 1 64px; min-width:0; margin-right:8px; padding-right:0; }
  .workspace { min-height:0; }
  .gateway-shell main { padding:24px 14px; }
  .gateway-shell header { padding:0 14px; }
  dialog { padding:20px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }

.map-unavailable { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; padding:28px; text-align:center; gap:12px; color:var(--muted); }
.map-unavailable strong { color:var(--ink); font-size:16px; }
.map-unavailable p { max-width:340px; margin:0; line-height:1.6; }
.mapwrap:has(.map-unavailable) .mapempty { display:none; }

:root[data-accent="blue"] { --accent:#94bfff; --accent-soft:#94bfff17; --accent-line:#94bfff66; }
:root[data-accent="teal"] { --accent:#75d5b6; --accent-soft:#75d5b617; --accent-line:#75d5b666; }
:root[data-accent="violet"] { --accent:#b9a3ef; --accent-soft:#b9a3ef17; --accent-line:#b9a3ef66; }
:root[data-accent="amber"] { --accent:#f2ad54; --accent-soft:#f2ad5417; --accent-line:#f2ad5466; }

.mission-shell { min-height:100dvh; display:flex; flex-direction:column; }
.mission-shell .workspace { flex:1; min-height:0; }
.recon-navigation { position:sticky; top:0; z-index:20; }
.gateway-shell { min-height:100dvh; }
.gateway-shell .brand-mark { display:grid; place-items:center; color:var(--bg); flex:none; }
.gateway-shell .eyebrow { color:var(--accent); }
