:root {
  --paper: #f4f0e4;
  --card: #fffaf1;
  --ink: #1a2420;
  --muted: #4e5b55;
  --line: #1f4d3a;
  --red: #b23b2e;
  --serif: "PT Serif", Georgia, serif;
  --sans: "Golos Text", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background:
    linear-gradient(90deg, transparent 0 28px, rgba(178, 59, 46, 0.55) 28px 30px, transparent 30px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(31, 77, 58, 0.13) 31px 32px),
    var(--paper);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: 0; transform: translateY(-120%); background: var(--line); color: #fffaf1; padding: 0.55rem 0.8rem; z-index: 5; }
.skip:focus { transform: none; }
.wrap { width: min(1080px, calc(100% - 2.2rem)); margin-inline: auto; }
.mast, .hero, .index, .note-block, .entry, .foot { position: relative; z-index: 1; }
.mast { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 1.2rem 0 0.8rem; border-bottom: 2px solid var(--line); }
.mark { font-family: var(--serif); font-size: 1.55rem; text-decoration: none; }
.issue { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.6rem; align-items: end; padding: 1.6rem 0 0.4rem; }
.kicker { margin: 0 0 0.45rem; color: var(--red); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; text-wrap: balance; scroll-margin-top: 1rem; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); margin: 0 0 0.7rem; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 1.6rem 0 0.5rem; }
h3 { font-size: 1.2rem; margin: 1.1rem 0 0.35rem; }
.dek, .lead { font-size: 1.15rem; }
img { max-width: 100%; height: auto; display: block; }
.hero img, .shot img { width: 100%; object-fit: cover; border: 1px solid var(--line); }
.hero img { aspect-ratio: 16 / 9; }
.shot img { aspect-ratio: 16 / 9; }
figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 0.55rem; }
.index { display: flex; flex-direction: column; padding-bottom: 1.4rem; }
.index a {
  display: grid; grid-template-columns: 4rem 1fr; gap: 0.8rem; align-items: center;
  text-decoration: none; min-height: 44px; padding: 0.85rem 0.2rem;
  border-bottom: 1px solid rgba(31, 77, 58, 0.28);
  touch-action: manipulation;
}
.index a:hover { background: rgba(255, 250, 241, 0.7); }
.num { font-family: var(--serif); font-size: 1.6rem; color: var(--red); font-variant-numeric: tabular-nums; }
.index strong { display: block; font-family: var(--serif); font-size: 1.25rem; }
.index em { font-style: normal; color: var(--muted); }
.entry { width: min(740px, calc(100% - 2.2rem)); margin: 0 auto; padding: 1.3rem 0 2.4rem; }
.answer, .steps { background: var(--card); border-left: 4px solid var(--line); padding: 0.8rem 1rem; }
.steps { margin: 0.8rem 0; padding-left: 1.3rem; }
.prompt { background: var(--ink); color: #f4f0e4; padding: 0.9rem; margin: 1rem 0; }
.prompt header { display: flex; justify-content: space-between; gap: 0.7rem; align-items: center; margin-bottom: 0.6rem; }
.prompt p { margin: 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.copy { min-height: 44px; border: 0; background: var(--red); color: #fffaf1; font: 600 0.95rem/1 var(--sans); padding: 0.5rem 0.8rem; cursor: pointer; touch-action: manipulation; }
.copy:hover { background: #8d2e24; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.92rem; line-height: 1.5; }
table { width: 100%; border-collapse: collapse; background: var(--card); font-variant-numeric: tabular-nums; margin: 0.8rem 0 1rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.7rem; border-bottom: 1px solid rgba(31, 77, 58, 0.25); }
.bridge { margin-top: 1.5rem; padding: 1rem; background: var(--card); border: 2px solid var(--red); }
.bridge h2 { margin-top: 0; }
.slot { margin: 0.6rem 0 0; font-family: var(--mono); color: var(--red); }
.back { margin-top: 1.4rem; }
.foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; border-top: 2px solid var(--line); padding: 0.9rem 0 calc(1rem + env(safe-area-inset-bottom)); color: var(--muted); }
.foot a { color: var(--ink); font-weight: 600; }
.foot p { margin: 0; }
#copy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .mast, .prompt header { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
