/*
  addapa-phosphor — the single canonical colorscheme.

  MEASURED FROM THE SOURCE DOCUMENT, not invented. Census of the 2,320 inline
  style attributes in the "ADDAPA: REBOOTED" dossier export, cross-checked against
  a screenshot of the rendered cover:

      #00ff00   1261 text + 340 border uses    the phosphor — panel borders, labels
      #000000    935 text +  78 background     PANEL INTERIORS (not the page)
      #2d2c2b                                  the page ground, warm dark grey
      #274e13    296 background-color uses     emphasis fill
      #38761d    275 text + 275 border uses    mid green, secondary labels
      #d9d9d9    143 text uses                 prose grey
      #434343     12 text uses                 inner hairline rules
      #999999     26 text uses                 dim grey
      #ffffff / #f3f3f3 / #efefef              titles and highlights

  The structure that palette implies, and which the site follows exactly:
  black panels, 2px pure-phosphor borders, SQUARE corners, floating on warm grey.

  ONE DELIBERATE DEVIATION, for legibility:
  body prose is --ink (#d9d9d9), which is the document's own choice for its long
  passages. Phosphor is reserved for chrome, labels, borders and state — roughly
  the document's own ratio. Running whole paragraphs in #00ff00 would be less
  faithful, not more, and it vibrates badly on an LCD at paragraph length.

  Note this diverges from wonder-night (wonder/design/hud-v4-design-brief §2) in
  two places on purpose: wonder lifts its ground off pure black and rounds every
  corner at 8px. The dossier does neither — pure black panels, hard corners. Where
  the two disagree, the dossier wins, because the dossier is the brief.

  LAWS (inherited from wonder-night, hue-translated):
    moss   = static chrome, labels, annotation      (was olive-gold)
    accent = alive / structure / data / links       (was ultramarine)
    ember  = events, heat — scarce, <=5% of pixels
    red    = faults and DENIED only, never aliased with ember
  Text hierarchy is the alpha ladder (ink / ink2 / dim / faint), never font-size soup.

  Nothing in this file should be anything but a custom property.
*/
:root {
  /* ---- ground ---- */
  --bg: #2d2c2b;          /* the page — warm dark grey, document-true */
  --bg2: #232221;         /* recessed strips on the page */
  --pane: #000000;        /* panel interiors — pure black, document-true */
  --pane-solid: #000000;
  --bar: #000000;
  --raised: #13260d;      /* hover / selected rows inside panels */
  --panel-fill: #274e13;  /* document-true emphasis fill */

  /* ---- ink: the alpha ladder ---- */
  --ink: #f3f3f3;         /* titles */
  --ink2: #d9d9d9;        /* document-true prose grey */
  --dim: #999999;         /* document-true dim grey */
  --faint: rgba(153, 153, 153, 0.34);
  --hair: #434343;        /* document-true inner hairline rule */
  --grid-dot: rgba(120, 134, 110, 0.16);  /* the wallpaper dot — grey nudged toward moss */

  /* ---- chrome ---- */
  --border: #00ff00;                    /* panel border — full phosphor, 2px */
  --border2: rgba(56, 118, 29, 0.55);   /* #38761d, secondary borders */
  --border3: rgba(67, 67, 67, 0.9);     /* hairlines inside panels */

  /* ---- accents ---- */
  --accent: #00ff00;        /* THE phosphor */
  --accent-hi: #ccffc4;     /* white-hot, top of the ramp */
  --accent-soft: #7dff7d;   /* softened phosphor for link-length text */
  --accent-dim: #38761d;    /* document-true mid green — the quieter label green */
  --label: #38761d;         /* moss — labels, annotation, quiet chrome */
  --label-hi: #5aa832;
  --ember: #e8542e;         /* events only, <=5% of pixels */
  --red: #e06c75;           /* faults and DENIED only */

  /* ---- focus: the one animated gradient ---- */
  --focus-line: linear-gradient(100deg, var(--label), var(--accent), var(--accent-hi), var(--label));

  /*
    Clearance tiers PUB..AES.

    In a single-hue terminal, tiers must ramp by LUMINANCE, not by hue — inventing
    six hues would break the phosphor identity on the one screen where the security
    system is the subject. So this is one green climbing to white-hot at AES.
  */
  --clr-pub: #2f5f1a;
  --clr-wep: #3d7d22;
  --clr-des: #4d9c2b;
  --clr-rsa: #5fbb34;
  --clr-rfc: #72d93d;
  --clr-pgp: #00ff00;
  --clr-aes: #ccffc4;

  /* ---- type ---- */
  /* The dossier is monospace throughout except its stat blocks and panel headers,
     which are set in a humanist sans. Both are reproduced. */
  --mono-family: "Cascadia Mono", Consolas, ui-monospace, "DejaVu Sans Mono", "Liberation Mono", monospace;
  --sans-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: 14.551px var(--mono-family);

  /* the 8x16 character cell (wonder brief §3) — Consolas at 14.551px/16px is a
     verified exact metric; changing either desynchronises box-drawing frames */
  --cell-w: 8px;
  --cell-h: 16px;

  /* ---- layout: two constants, one layout (brief §3) ---- */
  --gap-out: 16px;
  --gap-in: 12px;
  --rail-w: 44px;
  --drawer-w: 288px;
  --measure: 74ch;
  --panel-pad: clamp(16px, 3vw, 34px);

  /* ---- the tube (crt.css) ----
     The medium pass: this dossier is read on an older monochrome phosphor
     terminal, and the tube has optics — bloom around lit phosphor, the raster's
     scanlines, light falling off toward the corners. Values live here so the
     whole medium can be tuned (or zeroed) from one place. Everything driven by
     these is STATIC — the tube glows, nothing moves. */
  --scan-pitch: 3px;                          /* raster pitch — one dark line per */
  --scan-ink: rgba(0, 0, 0, 0.18);            /* how dark the unlit scanline gap is */
  --bloom-text: 0 0 6px rgba(0, 255, 0, 0.38);      /* halo on full-phosphor glyphs */
  --bloom-border: 0 0 11px rgba(0, 255, 0, 0.16);   /* halo outside a lit frame */
  --bloom-border-in: inset 0 0 9px rgba(0, 255, 0, 0.07); /* and the spill inside it */
  --vignette-edge: rgba(0, 0, 0, 0.32);       /* corner falloff of the tube face */
}
