/* ============================================================================
   ODIAN — "Aurora Glass" design tokens + base
   ----------------------------------------------------------------------------
   THE canonical token set. Every ODIAN surface links this file; nothing below
   is page-specific. Values are lifted verbatim from the admin panel's
   ONTOLOGY_HTML "THEME B" block (admin-panel/app.py) — the origin of the theme,
   which the API and AI control pages were retrofitted to match.

   When the admin panel merges into this service, its five duplicated :root
   blocks collapse onto this file. Keep the values identical so that collapse is
   a deletion, not a redesign.

   Rule for what belongs here: a token earns its place by being referenced by at
   least one live ODIAN surface. Declaring tokens nobody uses is how the admin
   panel ended up shipping --plum #c6a0f6 (a purple) in 12 places while
   referencing it in none.

   Deliberately NOT carried over from the THEME B block, all verified dead:
   - 'Space Mono' as --mono. Referenced 10x across the admin panel but never
     loaded (no @font-face, no link), so every page has silently fallen back to
     Consolas since it was written. A CDN link would also fail in the offline
     cluster. Consolas is what actually ships, so Consolas is what we declare.
   - --plum / --plumBg (#c6a0f6): defined 6x, referenced 0x.
   - --border (#3a3a3a): defined 5x, referenced 0x. The admin panel draws its
     borders with --line / --line-soft (its "compat aliases") and literal rgba.
   - --cobalt (#b7bfe0): defined 5x, referenced 0x.
   ========================================================================== */

:root {
  --bg:           #1e1e1e;
  --surface:      #262626;  /* admin panel: 14 refs */
  --text:         #e4e4e4;
  --muted:        #9a9a9a;
  --dim:          #6a6a6a;

  --steel:        #5f83bd;
  --cyan:         var(--steel); /* legacy alias: ONTOLOGY_HTML names it --cyan and
                                   references it 38x; the value is steel-blue, not
                                   cyan. Keep until that rename is done in one pass. */
  --green:        #6aa05f;
  --amber:        #c39a45;
  --red:          #c46b6b;

  --glass:        rgba(38, 38, 38, 0.52);
  --glass-border: rgba(255, 255, 255, 0.09);

  --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, Consolas, 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* Aurora mesh — the theme's signature ground. background-attachment: fixed so
     the glow stays put while content scrolls. */
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(95, 131, 189, 0.20), transparent 55%),
    radial-gradient(1000px 700px at 95% 15%, rgba(95, 131, 189, 0.14), transparent 60%),
    radial-gradient(800px 600px at 50% 115%, rgba(95, 131, 189, 0.14), transparent 55%),
    radial-gradient(500px 400px at 70% 55%, rgba(183, 191, 224, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(95, 131, 189, 0.35); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255, 255, 255, 0.16); }
*::-webkit-scrollbar-track { background: transparent; }

a { color: #9db8de; }
a:hover { color: #c4d5ef; }

:focus-visible { outline: 2px solid rgba(95, 131, 189, .7); outline-offset: 3px; }

/* ---- shared chrome ------------------------------------------------------ */
/* Glass header bar — blur(22px) saturate(1.3) is the theme's header signature.
   Shared so / and /panel (and, after the merge, the admin pages) carry one
   identical bar. */
.o-top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 16px; border-radius: 999px;
  background: rgba(30, 30, 30, 0.42);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.o-chip { display: inline-flex; align-items: baseline; gap: 10px; }
.o-chip b { font: 600 13px/1 var(--sans); letter-spacing: .18em; color: var(--text); }
.o-chip span { font: 500 9.5px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: #a9bede; }
.o-toplink {
  font: 500 12px var(--sans); color: #9db8de; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 999px;
  padding: 5px 13px; background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px); transition: all .18s ease;
}
.o-toplink:hover {
  color: #c4d5ef; background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
}
.o-nav { display: flex; align-items: center; gap: 8px; }
/* The way into the merged admin — the app-hub tile lands on the portal, so this
   is the only entry point. Given a touch of the accent so it reads as the
   destination rather than a footnote next to the connector panel link. */
.o-toplink-admin {
  color: #c4d5ef;
  border-color: rgba(95, 131, 189, 0.45);
  background: rgba(95, 131, 189, 0.14);
}
.o-toplink-admin:hover {
  border-color: rgba(95, 131, 189, 0.75);
  background: rgba(95, 131, 189, 0.24);
}

/* Eyebrow / section label — wide tracking is the theme's label voice. */
.o-eyebrow {
  color: #a9bede; font: 600 11px var(--sans); letter-spacing: .30em;
  text-transform: uppercase; opacity: .85; margin: 0 0 10px;
}

.o-mono { font-family: var(--mono); }
.o-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
