/* ──────────────────────────────────────────────────────────
   REDACTION theme — typewriter-on-cream-paper, government docs.
   Special Elite for body, classification stamps, [REDACTED] bars.
   ────────────────────────────────────────────────────────── */
[data-theme='redaction'] {
  --paper: #f1ebda;
  --paper-2: #e8e0c8;
  --paper-3: #ddd2b3;
  --ink: #1a1612;
  --ink-mute: #4f463a;
  --ink-faint: #847764;
  --rule: #b8a883;
  --accent: #8b1a1a;
  --accent-2: #2a3a1a;
  --warn: #b35900;
  --good: #2a5a30;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 12px rgba(60, 40, 0, 0.08);

  --font-display: 'Special Elite', 'Courier Prime', 'Courier New', monospace;
  --font-body: 'Special Elite', 'Courier Prime', 'Courier New', monospace;
  --font-mono: 'Courier Prime', 'Courier New', monospace;

  --leading-body: 1.55;
  --track-display: 0;
  --scroll-thumb: #b8a883;
}

[data-theme='redaction'][data-mode='dark'] {
  --paper: #1c1a14;
  --paper-2: #25221a;
  --paper-3: #2f2a20;
  --ink: #e8dfc4;
  --ink-mute: #ad9f78;
  --ink-faint: #756b50;
  --rule: #4a4231;
  --accent: #ff7a6b;
  --accent-2: #c0d68a;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  --scroll-thumb: #4a4231;
}

/* Paper texture — subtle vertical stripes + tiny grain via gradients */
[data-theme='redaction'] body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 0, 0, 0.04), transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 22px,
      rgba(0, 0, 0, 0.012) 22px,
      rgba(0, 0, 0, 0.012) 23px
    ),
    var(--paper);
}
[data-theme='redaction'][data-mode='dark'] body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.02), transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 22px,
      rgba(255, 255, 255, 0.012) 22px,
      rgba(255, 255, 255, 0.012) 23px
    ),
    var(--paper);
}

/* Body text — typewriter ribbon-on-paper effect: very slight drop shadow */
[data-theme='redaction'] body {
  text-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.06);
}
[data-theme='redaction'][data-mode='dark'] body {
  text-shadow: none;
}

/* Eyebrow = stamp lozenge */
[data-theme='redaction'] .eyebrow {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.1em 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  transform: skew(-2deg);
}

/* All caps headings — proper rubber-stamp feel */
[data-theme='redaction'] h1,
[data-theme='redaction'] h2.display {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-weight: 400; /* typewriter has no real weight scale */
}

/* Redaction bars — applied to .redact spans (and document.classification when set) */
[data-theme='redaction'] .redact,
[data-theme='redaction'] mark.redact {
  background: var(--ink);
  color: var(--ink);
  padding: 0 0.25em;
  user-select: none;
  border-radius: 0;
}
[data-theme='redaction'] .redact:hover {
  background: var(--accent);
  color: var(--paper);
  cursor: not-allowed;
}

/* Card: looks like a folder with a tab */
[data-theme='redaction'] .card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 1px;
  position: relative;
}
[data-theme='redaction'] .card::before {
  content: '';
  position: absolute;
  top: -0.55rem;
  left: 1.25rem;
  width: 4rem;
  height: 0.55rem;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-bottom: 0;
  border-radius: 1px 1px 0 0;
}

/* Classification stamp helper */
.stamp {
  display: inline-block;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 0.15em 0.5em;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  transform: rotate(-3deg);
  white-space: nowrap;
}
[data-theme='redaction'] .stamp {
  font-family: 'Special Elite', monospace;
}

[data-theme='redaction'] body::before {
  /* faint diagonal "DECLASSIFIED" watermark */
  content: 'DECLASSIFIED';
  position: fixed;
  bottom: 6vh;
  right: -2vw;
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 9rem);
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.04);
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
}
[data-theme='redaction'][data-mode='dark'] body::before {
  color: rgba(255, 255, 255, 0.03);
}
