/* Jev IDS site: the Terminal system of the Figma page "Website".
   Dark is the default; the light palette is the same system on paper. */

/* Semantic tokens (T0 · Fundamentos) plus the three figure colors (T2),
   one per detector, so a chart and its table always agree. */
:root {
  --bg: #0b0f0e;
  --surface: #121917;
  --text: #e9f2ec;
  --muted: #8e9a93;
  --line: #1e6b3f;
  --phosphor: #3dff8a;
  --grid: #1e6b3f;
  --prompt: #1e6b3f;
  --jev: #3dff8a;
  --llm: #ffb454;
  --rf: #6ec1ff;
  --mono:
    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
}

/* Light mode: phosphor turns into the dark green #0B6B3A so text on paper keeps
   its contrast, and each figure color darkens to its paper twin. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #e9f2ec;
    --surface: #ffffff;
    --text: #0b0f0e;
    --muted: #5f6b65;
    --line: #b7d3c2;
    --phosphor: #0b6b3a;
    --grid: #d5ded9;
    /* The dim token's paper twin is too pale for a glyph, so on light paper the
       lockup's prompt borrows the muted grey and stays readable. */
    --prompt: #5f6b65;
    --jev: #0b6b3a;
    --llm: #b36b00;
    --rf: #1f6fb2;
  }
}

/* Page frame: one column, 16 px gutters at every width, nothing wider than the
   viewport so narrow screens never scroll sideways. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
}

header,
main,
footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

/* Header: the horizontal lockup on the left, the outbound links on the right,
   wrapping to two lines when there is no room. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* T1 horizontal lockup: a rounded box with a dim border, ">" dim, "jev" in
   paper, "_ids" and the cursor in phosphor. */
.lockup {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 700 18px/1.2 var(--mono);
  text-decoration: none;
  white-space: nowrap;
}

.lockup-prompt {
  color: var(--prompt);
  margin-right: 2px;
}

.lockup-name {
  color: var(--text);
}

.lockup-accent,
.cursor {
  color: var(--phosphor);
}

/* The cursor block breathes slowly, and holds still for anyone who asked the
   system for less motion. */
.cursor {
  animation: blink 1.6s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0.15;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font: 500 14px/1.4 var(--mono);
}

/* Links carry phosphor everywhere; the underline sits clear of the baseline. */
a {
  color: var(--phosphor);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 2px;
}

/* Type scale (T0): display, H1 and H2 in Plex Mono Bold, running text in Inter.
   The display line shrinks with the viewport instead of overflowing it. */
h1 {
  margin: 8px 0 24px;
  font: 700 clamp(30px, 8.5vw, 48px) / 1.12 var(--mono);
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 16px;
  font: 700 20px/1.3 var(--mono);
}

/* The prompt glyph before every section title keeps the page reading like a log. */
h2::before {
  content: "> ";
  color: var(--phosphor);
}

h3 {
  margin: 32px 0 12px;
  font: 700 16px/1.3 var(--mono);
}

.hero {
  padding: 48px 0 40px;
  border-top: 0;
}

/* The tagline is the one long sentence on the page, so it gets a larger size
   and a measure short enough to read in one sweep. */
.lede {
  max-width: 34em;
  font-size: clamp(17px, 2.4vw, 20px);
  text-wrap: pretty;
}

.headline {
  max-width: 34em;
  font: 500 15px/1.6 var(--mono);
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

/* Headline ratios: a big phosphor number over a two-line grey label, four in
   a row when there is room, two by two on a phone. The label breaks only at
   its <br>, so every item is exactly two lines tall. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.stats li {
  max-width: none;
  margin: 0;
}

.stats strong {
  display: block;
  color: var(--phosphor);
  font: 700 clamp(26px, 4vw, 32px) / 1.1 var(--mono);
}

.stats span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

p,
li {
  max-width: 38em;
}

ul,
ol {
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
}

/* Inline code and the terminal blocks share the mono face at the T0 code size. */
code {
  font-family: var(--mono);
  font-size: 0.92em;
}

/* Terminal blocks (T3 · CLI output): surface panel, dim border, attacks and
   verdicts in phosphor, comments in grey. Long lines scroll inside the block,
   never the page. */
.terminal {
  margin: 24px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  font: 400 14px/1.7 var(--mono);
  color: var(--text);
}

.terminal code {
  font-size: inherit;
}

/* The comment marker lives in CSS so the markup holds only the words. */
.c {
  color: var(--muted);
}

.c::before {
  content: "# ";
}

.a {
  color: var(--phosphor);
}

/* Integration diagram (T2 rules: one color for the subject, thin lines, no shadow).
   It keeps its natural width and scrolls on narrow screens, like the table. */
.pipeline {
  display: block;
  width: 100%;
  min-width: 600px;
  height: auto;
}

.pipeline text {
  font: 400 14px var(--mono);
  fill: var(--text);
}

.pipeline .box {
  fill: var(--surface);
  stroke: var(--line);
}

.pipeline .main,
.pipeline .side {
  fill: none;
  stroke-width: 1.5;
}

.pipeline .main {
  stroke: var(--muted);
}

.pipeline .head {
  fill: var(--muted);
}

.pipeline .side {
  stroke: var(--phosphor);
}

.pipeline .sidehead,
.pipeline .jev text {
  fill: var(--phosphor);
}

.pipeline .jev .box {
  stroke: var(--phosphor);
}

.pipeline .label {
  font-size: 12px;
  fill: var(--muted);
}

/* Evidence table (T2): mono, digits right-aligned, a color marker left of each
   detector name, thin rules, no zebra. */
.scroll-x {
  overflow-x: auto;
  margin: 24px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  font: 400 13px/1.5 var(--mono);
}

caption {
  margin-bottom: 10px;
  text-align: left;
  font: 500 12px/1.4 var(--mono);
  color: var(--muted);
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
}

thead th {
  color: var(--muted);
  font-weight: 500;
}

/* Numbers align by themselves with tabular figures, so no decimal trickery. */
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tbody strong {
  font-weight: 700;
  color: var(--phosphor);
}

.mut {
  color: var(--muted);
}

/* One square of the detector's color, left of its name in the table. */
.marker {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  vertical-align: 1px;
}

.marker.jev {
  background: var(--jev);
}

.marker.llm {
  background: var(--llm);
}

.marker.rf {
  background: var(--rf);
}

/* The request diagram: three surface cards, one per word of the display line,
   joined by phosphor arrows. Stacked with "↓" on a phone, in a row with "→"
   from 720 px up. */
.flow {
  display: grid;
  gap: 36px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.flow li {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.flow h3 {
  margin: 0 0 8px;
}

.step-label {
  display: block;
  margin-bottom: 6px;
  font: 500 12px/1.4 var(--mono);
}

.flow p {
  margin: 0;
  font-size: 14px;
}

.answers {
  font: 400 14px/1.7 var(--mono);
}

.flow li + li::before {
  content: "↓";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--phosphor);
  font: 700 18px/1 var(--mono);
}

@media (min-width: 720px) {
  .flow {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .flow li + li::before {
    content: "→";
    top: 50%;
    left: -20px;
  }
}

/* Team cards: portrait, name and handle stacked and centered, equal cards in a
   row. Portraits sit in grayscale and the border stays dim until hover or
   focus, when both turn to color and the card lifts a little. */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.team li {
  max-width: none;
  margin: 0;
}

.team a {
  display: block;
  height: 100%;
  padding: 28px 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.team a:hover,
.team a:focus-visible {
  border-color: var(--phosphor);
  transform: translateY(-2px);
}

.team img {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  filter: grayscale(1);
  transition:
    border-color 0.2s,
    filter 0.2s;
}

.team a:hover img,
.team a:focus-visible img {
  border-color: var(--phosphor);
  filter: none;
}

.person-name {
  display: block;
  font: 700 15px/1.3 var(--mono);
}

.person-handle {
  display: block;
  margin-top: 4px;
  color: var(--phosphor);
  font: 500 13px/1.3 var(--mono);
}

@media (prefers-reduced-motion: reduce) {
  .team a,
  .team img {
    transition: none;
  }

  .team a:hover,
  .team a:focus-visible {
    transform: none;
  }
}

/* Footer: the independence notice and the links again. The notice may run the
   full column so it stays on one line on a desktop. */
footer {
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer p {
  max-width: none;
}

footer nav {
  margin: 16px 0;
}
