/*
 * Typewriter Design — Phase B (plugin) stylesheet.
 * Deliberately MINIMAL and scoped to the transformed article content
 * (.tw-content). It never styles page chrome (body background, header,
 * navigation, layout) — that is the theme's job, and the full "cream paper"
 * treatment is Phase C. Here we only make the content read as typewritten:
 * the monospace face, the per-glyph defects, and the correction gag.
 */

@font-face {
  font-family: 'TT2020';
  src: url('fonts/TT2020Base.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Typewriter face for the article content only. */
.tw-content {
  font-family: 'TT2020', 'Courier New', monospace;
}

/* Per-glyph defects (offset + baseline wobble). */
.tw-content .tw-w {
  display: inline-block;
}
.tw-content .tw-c {
  display: inline-block;
  transform: translate(var(--dx, 0), var(--dy, 0));
}

/* Ink variation. */
.tw-content .ink-1 { opacity: 0.82; }
.tw-content .ink-2 { opacity: 0.88; }
.tw-content .ink-3 { opacity: 0.94; }
.tw-content .ink-4 { opacity: 1; }

/* Rare double-strike smear. */
.tw-content .tw-overstrike {
  position: relative;
}
.tw-content .tw-overstrike::after {
  content: attr(data-ch);
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(1px, 0.5px);
  opacity: 0.5;
}

/* Per-paragraph carriage-return jitter. */
.tw-content p {
  margin-left: var(--tw-indent, 0);
}

/* Correction gag — the red is functional (the struck word + red rewrite IS the joke). */
.tw-content .tw-correction .tw-wrong {
  text-decoration: line-through;
  -webkit-user-select: none;
  user-select: none;
}
.tw-content .tw-correction .tw-right {
  color: #b23a2e;
  margin-left: 0.15em;
}
