:root {
  --iron: #3a2a28;
  --ticket: #f3ead8;
  --lead: #b8c0c4;
  --red: #c43a32;
  --mute: #7a6a5c;
  --ok: #4a7a52;
  --ink: #241816;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 76px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--ticket);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--mono); background: rgba(196, 58, 50, 0.1); padding: 0.05em 0.35em; }

.iron-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.14;
  background-image: url("images/texture.webp");
  background-size: 400px auto;
  mix-blend-mode: multiply;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 70; background: var(--red); color: #fff; padding: 8px 12px; }

.stub-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
  background: rgba(243, 234, 216, 0.94);
  border-bottom: 1px dashed var(--iron);
}
.seal-mark { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; }
.seal-mark small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--mute); }
.lead-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lead);
  box-shadow: 0 0 0 3px var(--iron);
  position: relative;
}
.lead-dot::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 10px; background: var(--lead); }
.nav-toggle { display: none; background: var(--red); color: #fff; border: 0; padding: 10px 14px; font-size: 16px; }
.stub-links { display: flex; gap: 16px; align-items: center; font-size: 14px; }
.stub-links a { color: var(--mute); }
.stub-links a.is-active, .stub-links a:hover { color: var(--red); }
.stub-links .live { background: var(--red); color: #fff; padding: 8px 12px; }

.rad { position: relative; min-height: 100vh; display: grid; align-items: end; }
.rad img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rad::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36,24,22,0.15) 0%, rgba(36,24,22,0.82) 100%);
}
.rad-copy { position: relative; z-index: 1; color: var(--ticket); padding: 10vh 8vw 8vh; max-width: 780px; }
.rad-copy .kicker { color: #e8b4ae; }
.kicker { font-family: var(--mono); letter-spacing: 0.16em; font-size: 12px; color: var(--red); margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--serif); margin: 0 0 12px; line-height: 1.08; }
h1 { font-size: clamp(40px, 6.5vw, 78px); }
h2 { font-size: clamp(26px, 3.5vw, 40px); }
h3 { font-size: 22px; }
.lead { font-size: 17px; }
.tickets { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0; }
.tickets li {
  font-family: var(--mono);
  font-size: 12px;
  border: 1px dashed rgba(243, 234, 216, 0.55);
  padding: 4px 10px;
}
.acts { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; padding: 12px 16px; border: 2px solid currentColor; font-size: 15px; }
.fill { background: var(--red); border-color: var(--red); color: #fff; }
.ghost { background: transparent; }

.wrap { width: min(1060px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; }
.hall { background: var(--ticket); }
.paper { background: #e7dcc6; }
.quiet { color: var(--mute); max-width: 44em; }

.triptych { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; margin-top: 28px; }
.triptych article {
  padding: 20px;
  background: #fff;
  border-right: 8px dotted var(--iron);
}
.triptych article:last-child { border-right: 0; }
.triptych span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--red); }
.triptych ul { margin: 8px 0 0; padding-left: 1.1em; }

.stub { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; margin: 44px 0; }
.stub.rev figure { order: 2; }
.n { font-family: var(--mono); color: var(--red); letter-spacing: 0.12em; font-size: 12px; display: block; margin-bottom: 8px; }
figure { margin: 0; }
figure img { width: 100%; height: 260px; object-fit: cover; }
figcaption { margin-top: 8px; font-size: 13px; color: var(--mute); }

.therm { margin-top: 16px; padding: 14px; background: #fff; border: 2px solid var(--iron); }
.therm-label { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.therm-row { display: grid; grid-template-columns: 40px 1fr 64px; gap: 10px; align-items: center; }
.therm-row input { width: 100%; accent-color: var(--red); }
.therm-row strong { font-family: var(--mono); font-size: 22px; color: var(--red); }
.seal-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.seal-row input { width: 20px; height: 20px; accent-color: var(--red); }
.therm-state { margin: 10px 0 0; font-family: var(--mono); font-size: 14px; }
.therm-state.ok { color: var(--ok); }
.therm-state.warn { color: var(--red); }

.mods { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.mods li { background: #fff; padding: 18px; border-top: 6px solid var(--iron); }
.mods p { margin: 0; color: var(--mute); font-size: 14px; }

.vals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.vals article { padding: 18px; background: #fff; }
.vals p { margin: 0; color: var(--mute); }

.laws { max-width: 46em; font-size: 17px; }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.io ul { margin: 0; padding-left: 1.1em; }

footer { background: var(--iron); color: #d8cbb8; }
.foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding-top: 24px; padding-bottom: 24px; }
footer .app-link { color: #e8b4ae; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .stub-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 12px 16px 18px;
    background: var(--ticket);
  }
  .stub-links.open { display: flex; }
  .wrap { width: min(1060px, calc(100% - 24px)); padding: 48px 0; }
  .triptych, .stub, .stub.rev, .mods, .vals, .io, .foot { grid-template-columns: 1fr; display: grid; }
  .triptych article { border-right: 0; border-bottom: 8px dotted var(--iron); }
  .stub.rev figure { order: 0; }
  h1 { font-size: 36px; }
  figure img { height: 200px; }
  .therm-row { grid-template-columns: 1fr; }
  .btn { min-height: 44px; }
}
