/* PSYROB shared theme.
   One file, two copies: psyrob.com (assets/css/psyrob-theme.css) and explorer.psyrob.com
   (psyrob-node: node/web/psyrob-theme.css). Edit both together so the sites stay identical.
   Tokens first; then the pieces both sites draw the same way (base type, focus, icons,
   the cross-site strip, the footer, status badges, chart text). Site-specific layout stays
   in each site's own stylesheet. */

:root {
  /* surfaces */
  --bg: #071014;
  --panel: #0c181c;
  --field: #081216;
  --raise: #101e22;
  --line: #1c3336;
  --line-2: #2a4a4e;
  /* text */
  --ink: #e7f4f2;
  --mute: #8aa8a6;
  --faint: #5f7d7b;
  /* brand: --cyan is the interface accent, --glow is the logo and icon light */
  --cyan: #3ee0d6;
  --glow: #00f0ff;
  --on-cyan: #06201e;
  --cyan-wash: rgba(62, 224, 214, 0.08);
  /* status (never reused as chart series) */
  --warn: #e0c36e;
  --warn-bg: #151208;
  --warn-line: #6b5a2a;
  --danger: #e07a72;
  --danger-bg: #1a0b0b;
  --danger-line: #6b3a3a;
  /* chart series, in this fixed order; validated for colour-blind separation on --panel */
  --viz-1: #17a399;
  --viz-2: #b98a2c;
  --viz-3: #877ce4;
  --viz-4: #d65c55;
  --viz-ref: #8aa8a6;
  /* type */
  --head: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* layout */
  --header-h: 64px;
  --wrap: 1180px;
  --gutter: 20px;
  color-scheme: dark;
}

html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); }
::selection { background: var(--cyan); color: var(--on-cyan); }
a { color: var(--cyan); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; letter-spacing: 0.03em; color: var(--ink); }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 0.98; text-wrap: balance; }
h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.1; }
h3 { font-size: 21px; line-height: 1.2; }
code, kbd, pre { font-family: var(--mono); }

/* keyboard focus: always visible, never hidden under the sticky header (WCAG 2.2, 2.4.7 and 2.4.11) */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }

/* skip link, first thing in <body> */
.psy-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cyan); color: var(--on-cyan); padding: 10px 14px; font: 600 14px/1 var(--head); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.psy-skip:focus { top: 8px; }

/* icons from the shared sprite: <svg class="prb"><use href="…sprite.svg#prb-name"/></svg> */
.prb { width: 16px; height: 16px; flex: 0 0 auto; color: var(--glow); vertical-align: -3px; }

/* eyebrow above a heading */
.eyebrow { color: var(--cyan); font: 600 13px/1.2 var(--head); letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 8px; }

/* cross-site strip: the same bar on top of both sites, so a visitor always sees where they are */
.psy-x { background: var(--field); border-bottom: 1px solid var(--line); font: 500 13px/1 var(--head); letter-spacing: 0.1em; text-transform: uppercase; }
.psy-x-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 4px; min-height: 34px; }
.psy-x a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; color: var(--mute); text-decoration: none; border-bottom: 2px solid transparent; }
.psy-x a:hover { color: var(--ink); }
.psy-x a[aria-current] { color: var(--ink); border-bottom-color: var(--cyan); }
.psy-x .prb { width: 14px; height: 14px; }
.psy-x .psy-x-net { margin-left: auto; color: var(--mute); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.psy-x .psy-x-net i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px var(--glow); }
@media (max-width: 560px) { .psy-x .psy-x-net span { display: none; } .psy-x a { padding: 0 8px; } }

/* status badge */
.st { display: inline-block; font: 600 11px/1 var(--head); letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 7px; white-space: nowrap; }
.st.on { background: var(--cyan); color: var(--on-cyan); }
.st.off { border: 1px solid var(--line-2); color: var(--mute); }
.st.red { border: 1px solid var(--danger-line); color: var(--danger); }
.st.amber { border: 1px solid var(--warn-line); color: var(--warn); }

/* footer: company, link columns, base line */
.psy-foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 32px 0 40px; color: var(--mute); font-size: 15px; background: linear-gradient(180deg, var(--field), var(--bg)); }
.psy-foot-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 28px; }
.psy-foot .psy-foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 600 18px/1 var(--head); letter-spacing: 0.22em; text-decoration: none; margin-bottom: 12px; }
.psy-foot .psy-foot-brand img { width: 30px; height: 30px; }
.psy-foot p { margin: 0 0 6px; line-height: 1.55; }
.psy-foot h2 { font: 600 13px/1 var(--head); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); margin: 4px 0 12px; }
.psy-foot ul { list-style: none; margin: 0; padding: 0; }
.psy-foot li a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--mute); text-decoration: none; font: 500 15px/1.2 var(--head); letter-spacing: 0.06em; }
.psy-foot li a:hover { color: var(--ink); }
.psy-foot-base { max-width: var(--wrap); margin: 26px auto 0; padding: 18px var(--gutter) 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font: 500 13px/1.5 var(--head); letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 960px) { .psy-foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .psy-foot-in > :first-child { grid-column: 1 / -1; } }

/* chart text and marks (server-rendered SVG on the explorer, inline SVG on psyrob.com) */
.chart text { fill: var(--mute); font: 500 12px var(--head); letter-spacing: 0.06em; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; padding: 0; list-style: none; font: 500 13px var(--head); letter-spacing: 0.06em; color: var(--mute); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .psy-x, .psy-skip, .psy-foot { display: none; }
}
