/* JARVIS Career Agent public docs: the dark JARVIS command-surface look.
   Fonts are self-hosted (SIL OFL, see assets/fonts/), so pages make no third-party requests. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dm-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  /* JARVIS palette, shared with the Career Command Center. */
  --void: #08070d;
  --iris: #7f00ff;
  --iris-soft: #c8a6ff;
  --text: #f5f2ff;
  --muted: #938aa9;
  --prose: #d9d3e8;
  --cell: #0e0b18;
  --edge: rgb(182 145 255 / 24%);
  --hairline: rgb(182 145 255 / 14%);
  --edge-bright: rgb(127 0 255 / 72%);
  /* Accent roles, as in the app: iris for links, navigation, and focus; green for the telemetry layer. */
  --telemetry: #76b900;
  --sans: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", "Cascadia Mono", ui-monospace, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { background: var(--void); scroll-padding-top: 5rem; }
body {
  /* A stacking context, so the grid overlay (z-index -1) sits above this background and below the content. */
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  background: var(--void);
}
/* The atmosphere is pinned to the viewport so long documents keep it while scrolling. */
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 86% -6rem, rgb(127 0 255 / 16%), transparent 34rem),
    radial-gradient(circle at 0% 100%, rgb(118 185 0 / 12%), transparent 28rem);
  content: "";
  pointer-events: none;
}
body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  opacity: 0.23;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
a { color: var(--iris-soft); text-underline-offset: 0.18em; overflow-wrap: anywhere; }
a:hover { color: var(--text); }
a:focus-visible { border-radius: 2px; outline: 2px solid var(--iris-soft); outline-offset: 3px; }

.skip-link { position: absolute; top: 0.75rem; left: 0.75rem; z-index: 20; padding: 0.5rem 1rem; background: var(--text); color: var(--void); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Brand bar */
.site-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem var(--gutter); border-bottom: 1px solid var(--edge); background: rgb(8 7 13 / 90%); }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--text); text-decoration: none; }
.brand-mark { width: 1.75rem; height: 1.75rem; flex: none; }
.brand-hex { fill: none; stroke: var(--iris); stroke-width: 1.3; }
.brand-trace { fill: none; stroke: var(--iris-soft); stroke-width: 1.8; stroke-linecap: square; }
.brand-node { fill: var(--void); stroke: var(--iris-soft); stroke-width: 1.3; }
.brand-live { fill: var(--telemetry); }
.brand-word { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.32em; }
.brand-sub { color: var(--muted); font: 500 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.site-nav { display: flex; gap: 0.25rem; }
.site-nav a { padding: 0.45rem 0.7rem; border: 1px solid transparent; border-radius: 2px; color: var(--muted); font: 500 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-decoration: none; text-transform: uppercase; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { border-color: var(--edge-bright); background: rgb(127 0 255 / 18%); color: var(--text); }

/* Page layout: a sticky table of contents beside the document on wide screens. */
.page { max-width: 72rem; margin: 0 auto; padding: 2.5rem var(--gutter) 3.5rem; }
.page.has-toc { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 3rem; }
.toc { position: sticky; top: 5.5rem; align-self: start; max-height: calc(100vh - 7rem); overflow: auto; }
.toc-label { margin: 0 0 0.75rem; color: var(--telemetry); font: 500 0.75rem/1.45 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; border-left: 1px solid var(--edge); list-style: none; }
.toc a { display: block; margin-left: -1px; padding: 0.35rem 0.8rem; border-left: 1px solid transparent; color: var(--muted); font-size: 0.8125rem; line-height: 1.35; text-decoration: none; }
.toc a:hover { border-left-color: var(--iris-soft); color: var(--text); }
.toc a:focus-visible { outline-offset: -2px; }

/* Document */
.doc { min-width: 0; max-width: 68ch; }
.doc:focus { outline: none; }
.doc-kicker { margin: 0; color: var(--telemetry); font: 500 0.75rem/1.45 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
/* `.doc p` outranks `.doc-kicker`, so the kicker's color needs the extra specificity. */
.doc .doc-kicker { color: var(--telemetry); }
.doc-kicker::before, .doc h2::before { color: var(--telemetry); content: "// " / ""; letter-spacing: 0; }
.doc h1 { margin: 0.75rem 0 1.5rem; font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.05em; text-wrap: balance; }
.doc h2 { margin: 2.5rem 0 0.75rem; font-size: 1.5rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; text-wrap: balance; }
.doc h2::before { font: 500 0.75em var(--mono); }
.doc h3 { margin: 1.75rem 0 0.5rem; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.doc p, .doc li { color: var(--prose); }
.doc p { margin: 0 0 1rem; text-wrap: pretty; }
.doc ul, .doc ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.doc li { margin-bottom: 0.6rem; }
.doc li::marker { color: var(--telemetry); }
.doc strong { color: var(--text); font-weight: 600; }
.doc code { padding: 0.05rem 0.35rem; border: 1px solid var(--hairline); border-radius: 2px; background: rgb(5 4 10 / 60%); color: var(--iris-soft); font: 400 0.875em var(--mono); overflow-wrap: anywhere; }
.doc hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--edge); }

/* Document metadata: the bold-labelled lines directly under the title become a readout strip. */
.doc h1 + p:has(> strong:first-child),
.doc p:has(> strong:first-child) + p:has(> strong:first-child) { margin: 0; padding: 0.5rem 0.9rem; border-left: 1px solid var(--telemetry); background: rgb(14 11 24 / 72%); color: var(--text); font: 500 0.8125rem/1.5 var(--mono); }
.doc h1 + p:has(> strong:first-child) strong,
.doc p:has(> strong:first-child) + p:has(> strong:first-child) strong { margin-right: 0.35em; color: var(--telemetry); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.doc p:has(> strong:first-child) + :is(h2, p:not(:has(> strong:first-child))) { margin-top: 2rem; }

.site-foot { max-width: 72rem; margin: 0 auto; padding: 1.25rem var(--gutter) 2.5rem; border-top: 1px solid var(--edge); color: var(--muted); font: 500 0.75rem/1.7 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); }

@media (max-width: 56rem) {
  .page.has-toc { display: block; }
  .toc { position: static; max-height: none; margin-bottom: 2rem; padding: 1rem; border: 1px solid var(--edge); background: rgb(14 11 24 / 72%); }
  .toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; border-left: 0; }
  .toc a { margin-left: 0; padding: 0.3rem 0; border-left: 0; }
}
@media (max-width: 30rem) {
  .toc ol { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  body { background: Canvas; }
  body::before, body::after { display: none; }
}
