/* ── SecurePeak radii, borders, elevation, textures ───────────────────
   Radii are small and consistent: this brand is squared-off. Nothing
   above 8px except the pill on tape/badges. Elevation on paper is a
   hairline + a whisper of shadow; on terminal it is a lighter border and
   an inner top highlight, never a drop shadow. */
:root{
  --radius-0:0;
  --radius-xs:2px;
  --radius-sm:4px;
  --radius-md:6px;
  --radius-lg:8px;
  --radius-pill:999px;

  --border-width:1px; /* @kind spacing */
  --border-width-accent:1.5px; /* @kind spacing */
  --border-width-rule:2px; /* @kind spacing */

  /* Paper elevation */
  --shadow-0:none;
  --shadow-1:0 1px 2px rgba(15,26,20,.05);
  --shadow-2:0 2px 8px rgba(15,26,20,.07);
  --shadow-3:0 12px 32px -8px rgba(15,26,20,.16);
  --shadow-card:0 1px 2px rgba(15,26,20,.05);

  /* Terminal elevation — inset highlight, not drop shadow */
  --shadow-term-1:inset 0 1px 0 rgba(255,255,255,.04);
  --shadow-term-2:inset 0 1px 0 rgba(255,255,255,.05), 0 8px 24px -12px rgba(0,0,0,.8);
  --glow-signal:0 0 0 1px rgba(53,178,137,.35), 0 0 24px -6px rgba(79,224,168,.45);

  /* Textures — the "classified" layer. Composable backgrounds.
     A texture is made of light or dark lines, and neither reads on both
     grounds. Each one therefore exists three times: an explicit -on-paper and
     -on-ink value that resolve the same in any scope, and a mode-following
     alias composed from them. The alias is right for a whole surface; the
     explicit pair is for the case the alias cannot express — a dark band inside
     a paper document, which three documents hand-drew because the alias handed
     them the paper line. Name the ground when you know it. */
  --grid-line-on-paper:rgba(15,26,20,.07); /* @kind other */
  --grid-line-on-ink:rgba(53,178,137,.09); /* @kind other */
  --grid-line:var(--grid-line-on-paper); /* @kind other */
  --grid-size:32px; /* @kind other */
  --texture-grid:linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); /* @kind other */
  --texture-scanline-on-paper:repeating-linear-gradient(180deg, rgba(15,26,20,.022) 0 1px, transparent 1px 3px); /* @kind other */
  --texture-scanline-on-ink:repeating-linear-gradient(180deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px); /* @kind other */
  --texture-scanline:var(--texture-scanline-on-paper); /* @kind other */
  --texture-hatch-on-paper:repeating-linear-gradient(-45deg, rgba(15,26,20,.05) 0 1px, transparent 1px 6px); /* @kind other */
  --texture-hatch-on-ink:repeating-linear-gradient(-45deg, rgba(255,255,255,.045) 0 1px, transparent 1px 6px); /* @kind other */
  --texture-hatch:var(--texture-hatch-on-paper); /* @kind other */
  --fade-bottom:linear-gradient(180deg, transparent, var(--surface-page)); /* @kind other */
}

/* Ink surface: the textures invert, nothing else does. Each alias is
   re-pointed at its -on-ink twin rather than restating a value, so the two
   grounds are defined once and cannot drift apart. */
[data-mode="terminal"]{
  --grid-line:var(--grid-line-on-ink); /* @kind other */
  --texture-scanline:var(--texture-scanline-on-ink); /* @kind other */
  --texture-hatch:var(--texture-hatch-on-ink); /* @kind other */
  /* Re-composed against the ink values above — a var() inside a :root
     declaration resolves at :root and inherits down already-substituted,
     so overriding --grid-line and --surface-page alone would not reach
     these two. Any composed token needs a twin in this block. */
  --texture-grid:linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); /* @kind other */
  --fade-bottom:linear-gradient(180deg, transparent, var(--surface-page)); /* @kind other */
}
