:root {
  --black: #0c0c0c;
  --black-2: #151515;
  --ivory: #f1ebdd;
  --ivory-2: #e3dac6;
  --red: #e2231a;
  --red-deep: #a8130d;
  --gray: #8d877b;
  --soft: #c9c1b0;
  --line-d: rgba(241, 235, 221, 0.16);

  --cond: "Fira Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --sans: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fira Mono", ui-monospace, Menlo, Consolas, monospace;

  --bar-h: 60px;
  --slant: 5vw;
  --pad: clamp(90px, 12vw, 170px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 10px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--black);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--red);
  color: var(--ivory);
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.wrap {
  width: min(1320px, 100% - 40px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ================= Кнопки ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid currentColor;
  border-radius: 0;
  background: transparent;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:active {
  transform: translateY(2px);
}

.btn-red {
  background: var(--red);
  border-color: var(--red);
  color: var(--ivory);
}

.btn-red:hover {
  background: var(--black);
  border-color: var(--black);
}

.sec-black .btn-red:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--black);
}

.btn-black {
  background: var(--black);
  border-color: var(--black);
  color: var(--ivory);
}

.btn-black:hover {
  background: var(--ivory);
  color: var(--black);
}

.btn-ghost-dark {
  border-color: var(--black);
  color: var(--black);
}

.btn-ghost-dark:hover {
  background: var(--black);
  color: var(--ivory);
}

.btn-xl {
  padding: 1rem 2rem;
  font-size: 1.5rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ================= Шапка ================= */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--black);
  border-bottom: 2px solid var(--red);
}

.bar-in {
  width: min(1320px, 100% - 32px);
  height: var(--bar-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.logo i {
  width: 11px;
  height: 11px;
  background: var(--red);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.4rem;
}

.nav-links a {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
}

.nav-links a:hover {
  color: var(--red);
}

.tunnel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border: 2px solid var(--ivory);
  background: transparent;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s;
}

.tunnel-btn i {
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tunnel-btn:hover,
.tunnel-btn[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
}

.tunnel-btn[aria-pressed="true"] i {
  background: currentColor;
}

.nav-toggle {
  display: none;
  padding: 0.35rem 0.8rem;
  border: 2px solid var(--ivory);
  background: transparent;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ================= Тоннель и тост ================= */
.tunnel {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), transparent 0, transparent 130px, rgba(12, 12, 12, 0.94) 290px);
}

.tunnel-on .tunnel {
  opacity: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 0.8rem 1.3rem;
  background: var(--red);
  color: var(--ivory);
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ================= Обложка ================= */
.hero {
  --calm: 0;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + 32px) 0 calc(48px + var(--slant));
  background: var(--black);
}

.sun {
  position: absolute;
  z-index: -1;
  top: 44%;
  right: -7vmin;
  width: min(80vmin, 780px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  transform: translateY(-50%) scale(calc(1 - var(--calm) * 0.95));
}

/* печатный растр */
.sun::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: radial-gradient(rgba(0, 0, 0, 0.32) 1.2px, transparent 1.7px);
  background-size: 7px 7px;
  -webkit-mask-image: linear-gradient(210deg, transparent 40%, #000 100%);
  mask-image: linear-gradient(210deg, transparent 40%, #000 100%);
}

/* чёрная полоса, разрезающая солнце */
.sun::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -25%;
  right: -25%;
  top: 58%;
  height: 8%;
  background: var(--black);
  transform: rotate(-14deg) scaleX(calc(1 - var(--calm)));
}

.wedge {
  position: absolute;
  z-index: -1;
  left: -5%;
  right: -5%;
  top: 30%;
  height: 3px;
  background: var(--ivory);
  transform: rotate(-14deg);
  opacity: calc(0.85 - var(--calm) * 0.85);
}

#storm {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.hero-in {
  position: relative;
  z-index: 1;
  width: min(1320px, 100% - 40px);
  margin-inline: auto;
}

.hero-kicker {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.6rem;
  margin-bottom: clamp(1.2rem, 3vh, 2.2rem);
  border-top: 2px solid var(--ivory);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-title,
.hero-sub {
  display: grid;
}

.hero-title > span,
.hero-sub > span {
  grid-area: 1 / 1;
}

.hero-title {
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(3.8rem, 15vw, 13.5rem);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero-title .ln {
  display: block;
}

.hero-title b {
  font-weight: inherit;
}

.t-chaos {
  opacity: calc(1 - var(--calm) * 1.7);
}

.t-calm {
  opacity: calc(var(--calm) * 1.7 - 0.7);
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.6rem 4rem;
  align-items: end;
  margin-top: clamp(1.6rem, 4vh, 2.6rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-d);
}

.hero-sub {
  max-width: 36em;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--soft);
}

.hold {
  position: relative;
  display: block;
  width: 100%;
  min-width: 340px;
  overflow: hidden;
  padding: 1.15rem 1.6rem;
  border: none;
  background: var(--red);
  color: var(--ivory);
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

.hold-fill {
  position: absolute;
  inset: 0;
  background: var(--black);
  transform: scaleX(var(--calm));
  transform-origin: 0 50%;
}

.hold.holding {
  outline: 2px solid var(--red);
  outline-offset: 0;
}

.hold-label {
  position: relative;
}

.hint {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray);
}

/* ================= Разделы ================= */
.sec {
  position: relative;
  padding-block: var(--pad);
}

.slant,
.footer.slant {
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  margin-top: calc(var(--slant) * -1);
  padding-top: calc(var(--pad) + var(--slant));
}

.sec-black {
  background: var(--black);
  color: var(--ivory);
}

.sec-ivory {
  background: var(--ivory);
  color: var(--black);
}

.sec-red {
  background: var(--red);
  color: var(--black);
}

.label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.label span {
  padding: 0.25rem 0.6rem;
  background: var(--red);
  color: var(--ivory);
}

.label::after {
  content: "";
  flex: 1;
  height: 2px;
  background: currentColor;
  opacity: 0.4;
}

.label-dark span,
.sec-ivory .label span {
  background: var(--black);
  color: var(--ivory);
}

.mega {
  display: block;
  overflow: hidden;
  /* запас сверху, чтобы маска не срезала точки над «Ё» и «Й» */
  margin-top: -0.14em;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
  padding-top: 0.14em;
  padding-bottom: 0.03em;
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(3rem, 11vw, 12rem);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mega > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1s var(--ease);
}

.mega.in > span {
  transform: none;
}

.lede {
  max-width: 40em;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--soft);
}

.lede-dark {
  color: #2b2620;
}

.sec-red .lede-dark {
  color: #2a0b08;
}

/* ================= Манифест ================= */
.articles {
  list-style: none;
}

.article {
  display: grid;
  grid-template-columns: clamp(4rem, 9vw, 8rem) minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: baseline;
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  border-top: 3px solid var(--black);
}

.article:last-child {
  border-bottom: 3px solid var(--black);
}

.art-n {
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  color: var(--red);
}

.article p {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.article em {
  font-style: normal;
  font-weight: 900;
  color: var(--red);
}

/* подпись */
.sign {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 2rem 3rem;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding: clamp(20px, 4vw, 44px);
  border: 4px solid var(--black);
  background: var(--ivory-2);
}

.sign-title {
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 0.92;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.sign-text {
  color: #3a342c;
  max-width: 26em;
}

.sign-pad {
  position: relative;
  height: clamp(190px, 24vw, 260px);
  background: #faf6ec;
  border: 2px solid var(--black);
  overflow: hidden;
}

#signPad {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.sign-line {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 26%;
  height: 2px;
  background: var(--black);
}

.sign-x {
  position: absolute;
  left: 7%;
  bottom: calc(26% + 4px);
  font-family: var(--cond);
  font-weight: 900;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--red);
}

.sign-placeholder {
  position: absolute;
  left: calc(7% + 2.4rem);
  bottom: calc(26% + 12px);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--gray);
  transition: opacity 0.2s;
}

.has-ink .sign-placeholder {
  opacity: 0;
}

.stamp-seal {
  position: absolute;
  z-index: 3;
  right: 6%;
  top: 10%;
  width: clamp(118px, 15vw, 160px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  border: 5px double var(--red);
  border-radius: 50%;
  color: var(--red);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: rotate(-14deg) scale(1.8);
}

.signed .stamp-seal {
  opacity: 0.9;
  animation: stampIn 0.45s var(--ease) both;
}

@keyframes stampIn {
  0% { opacity: 0; transform: rotate(-14deg) scale(1.8); }
  60% { opacity: 0.95; transform: rotate(-14deg) scale(0.94); }
  100% { opacity: 0.9; transform: rotate(-14deg) scale(1); }
}

.seal-top,
.seal-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.seal-mid {
  padding: 0.15rem 0.3rem;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1;
  text-transform: uppercase;
}

.sign-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.signed #signPad {
  cursor: default;
}

/* ================= I. Испытание ================= */
.trial {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  grid-template-areas:
    "count sim"
    "btn sim";
  grid-template-rows: auto 1fr;
  gap: 1.6rem 3rem;
}

.trial-count {
  grid-area: count;
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(7rem, 15vw, 14rem);
  line-height: 0.8;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.trial-count small {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
}

.trial > .btn {
  grid-area: btn;
  align-self: start;
  justify-self: start;
}

.sim {
  grid-area: sim;
  position: relative;
  min-height: 450px;
  overflow: hidden;
  background: var(--ivory);
  color: var(--black);
  box-shadow: 16px 16px 0 var(--red);
}

.sim.in {
  transform: rotate(-1deg);
}

.sim-paper {
  padding: clamp(22px, 4vw, 48px);
}

.sim-doc {
  margin-bottom: 1.2rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}

.sim-text {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.8;
}

.sim-text .w {
  display: inline-block;
  transition: filter 0.35s, opacity 0.35s, transform 0.35s, color 0.35s;
}

.sim-text .w.glitch {
  filter: blur(2.5px);
  opacity: 0.4;
  transform: translateY(-3px) rotate(-3deg);
  color: var(--red);
}

.running .sim-paper {
  animation: nudge 5s infinite;
}

@keyframes nudge {
  0%, 90%, 100% { transform: none; }
  92% { transform: translateX(-6px); }
  95% { transform: translateX(5px); }
  98% { transform: translateX(-2px); }
}

.sim-notifs {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: min(290px, calc(100% - 28px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif {
  padding: 0.6rem 0.85rem;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  background: rgba(250, 250, 250, 0.97);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  line-height: 1.35;
  color: #111;
  animation: notifIn 0.35s ease-out;
  transition: opacity 0.3s, transform 0.3s;
}

.notif b {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #6b6b6b;
}

.notif.out {
  opacity: 0;
  transform: translateX(30px);
}

@keyframes notifIn {
  from { opacity: 0; transform: translateY(-10px); }
}

.sim-thoughts {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.thought {
  position: absolute;
  padding: 0.3rem 0.7rem;
  background: var(--red);
  color: var(--ivory);
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(var(--rot));
  animation: slam 2.8s var(--ease) forwards;
}

@keyframes slam {
  0% { opacity: 0; transform: rotate(var(--rot)) scale(1.6); }
  10%, 82% { opacity: 1; transform: rotate(var(--rot)) scale(1); }
  100% { opacity: 0; transform: rotate(var(--rot)) scale(1); }
}

.fly {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 30px;
  height: 30px;
  pointer-events: none;
  opacity: 0;
}

.running .fly {
  opacity: 1;
}

.fly .wing {
  fill: rgba(190, 210, 235, 0.75);
  stroke: rgba(0, 0, 0, 0.35);
  stroke-width: 0.6;
  animation: flap 0.05s infinite alternate;
}

@keyframes flap {
  to { opacity: 0.35; }
}

.sim-result {
  max-width: 24em;
  min-height: 1.2em;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.sim-result .mark {
  color: var(--red);
}

/* ================= II. Устройство ================= */
.posters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.poster {
  display: flex;
  flex-direction: column;
  background: var(--black-2);
  border: 1px solid var(--line-d);
  transition: border-color 0.25s, transform 0.25s var(--ease), opacity 0.8s var(--ease);
}

.poster:hover {
  border-color: var(--red);
}

.art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-bottom: 1px solid var(--line-d);
}

.poster-body {
  padding: 22px 24px 28px;
}

.poster-n {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--cond);
  font-weight: 900;
  font-size: 2.8rem;
  line-height: 0.85;
  color: var(--red);
}

.poster h3 {
  margin-bottom: 0.6rem;
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.poster p {
  font-size: 0.98rem;
  color: #bdb6a6;
}

/* ================= III. Признание ================= */
.confess {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: center;
}

.deck {
  position: relative;
  width: min(400px, 100%);
  height: 430px;
  margin: 0 auto;
}

.s-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px 26px 22px;
  background: var(--black);
  color: var(--ivory);
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.7);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  transition: transform 0.4s var(--ease), opacity 0.4s;
}

.s-card.top {
  cursor: grab;
}

.s-card.dragging {
  transition: none;
  cursor: grabbing;
}

.s-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.s-text {
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(2rem, 7vw, 2.7rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.s-foot {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
}

.stamp {
  position: absolute;
  top: 22px;
  right: 20px;
  padding: 0.1rem 0.7rem;
  border: 4px solid currentColor;
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1.6rem;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
}

.stamp.yes {
  color: var(--red);
  transform: rotate(10deg);
}

.stamp.no {
  color: var(--soft);
  transform: rotate(-10deg);
}

.deck-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.verdict {
  max-width: 520px;
  margin: 0 auto;
}

.verdict-score {
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(8rem, 22vw, 15rem);
  line-height: 0.8;
}

.verdict-score small {
  font-size: 0.32em;
}

.verdict-bars {
  display: flex;
  gap: 6px;
  margin: 1.4rem 0;
}

.verdict-bars i {
  flex: 1;
  height: 38px;
  border: 3px solid var(--black);
  transition: background 0.2s;
}

.verdict-bars i.on {
  background: var(--black);
}

.verdict-text {
  margin-bottom: 0.8rem;
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.verdict-note {
  margin-bottom: 1.6rem;
  font-size: 0.95rem;
  color: #2a0b08;
}

/* ================= IV. Кодекс ================= */
.rules {
  list-style: none;
  border-top: 3px solid var(--ivory);
}

.rule {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: clamp(3.5rem, 8vw, 7rem) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0.6rem 2rem;
  align-items: baseline;
  padding: clamp(1.3rem, 2.4vw, 1.9rem) 0;
  border-bottom: 1px solid var(--line-d);
  transition: color 0.25s;
}

.rule::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -20px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s var(--ease);
}

.rule:hover::before {
  transform: scaleY(1);
}

.rule-n {
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.8;
  color: var(--red);
  transition: color 0.25s;
}

.rule:hover .rule-n {
  color: var(--black);
}

.rule h3 {
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(1.8rem, 3.6vw, 3.1rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.rule p {
  color: #bdb6a6;
  transition: color 0.25s;
}

.rule:hover p {
  color: var(--ivory);
}

/* ================= V. Арсенал ================= */
.tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool {
  min-width: 0;
  padding: 0 2.2rem;
  border-left: 3px solid var(--black);
}

.tool:first-child {
  padding-left: 0;
  border-left: none;
}

.tool:last-child {
  padding-right: 0;
}

.tool-title {
  margin-bottom: 1.2rem;
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(1.9rem, 2.8vw, 2.4rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.tool-title span {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--red);
}

.tabs {
  display: flex;
  gap: 1rem;
}

.tab {
  padding: 0.1rem 0;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gray);
}

.tab.active {
  color: var(--black);
  border-bottom-color: var(--red);
}

.t-time {
  margin-top: 1rem;
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(5.2rem, 8.5vw, 8rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.t-track {
  height: 6px;
  margin-top: 0.9rem;
  background: #d3c9b3;
}

.t-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
}

#timerTool[data-phase="break"] .t-track span {
  background: var(--black);
}

.t-phase {
  margin: 0.7rem 0 1.4rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6c665b;
}

.done-today {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  min-height: 26px;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a443b;
}

.tally {
  display: inline-flex;
  gap: 9px;
}

.tally .grp {
  position: relative;
  display: inline-flex;
  gap: 3px;
}

.tally .mk {
  width: 3px;
  height: 20px;
  background: var(--black);
}

.tally .grp.full::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 9px;
  height: 3px;
  background: var(--red);
  transform: rotate(-24deg);
}

.todo-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.todo-form input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0;
  border: none;
  border-bottom: 3px solid var(--black);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--black);
}

.todo-form input::placeholder {
  color: var(--gray);
}

.todo-form input:focus {
  outline: none;
  border-bottom-color: var(--red);
}

.todo-list {
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
}

.todo-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #cbc1aa;
}

.check {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border: 3px solid var(--black);
  background: transparent;
  transition: background 0.2s;
}

li.done .check {
  background: var(--black);
}

.check svg {
  position: absolute;
  left: -1px;
  top: -6px;
  width: 30px;
  height: 30px;
  overflow: visible;
}

.check path {
  fill: none;
  stroke: var(--red);
  stroke-width: 4;
  stroke-linecap: square;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.3s ease-out;
}

li.done .check path {
  stroke-dashoffset: 0;
}

.todo-list .txt {
  position: relative;
  flex: 1;
  min-width: 0;
  word-break: break-word;
  transition: color 0.3s;
}

.todo-list .txt::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 52%;
  width: 0;
  height: 3px;
  background: var(--red);
  transition: width 0.35s ease-out;
}

.todo-list li.done .txt {
  color: var(--gray);
}

.todo-list li.done .txt::after {
  width: calc(100% + 4px);
}

.todo-list .del {
  flex: none;
  padding: 0 0.3rem;
  border: none;
  background: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--gray);
}

.todo-list .del:hover {
  color: var(--red);
}

.praise {
  position: absolute;
  right: 2.2rem;
  top: 0.55rem;
  padding: 0.1rem 0.5rem;
  background: var(--red);
  color: var(--ivory);
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1.05rem;
  text-transform: uppercase;
  transform: rotate(-5deg);
  pointer-events: none;
  animation: praise 1.6s var(--ease) forwards;
}

@keyframes praise {
  0% { opacity: 0; transform: rotate(-5deg) scale(1.6); }
  15%, 70% { opacity: 1; transform: rotate(-5deg) scale(1); }
  100% { opacity: 0; transform: rotate(-5deg) scale(1); }
}

.todo-empty {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: #6c665b;
}

.wheel-src {
  margin-top: -0.4rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c665b;
}

.wheel-wrap {
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 1;
  margin: 1.6rem auto 1rem;
}

#wheel {
  display: block;
  width: 100%;
  height: 100%;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  margin-left: -13px;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 26px solid var(--black);
}

.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  margin: -41px 0 0 -41px;
  border: 4px solid var(--ivory);
  border-radius: 50%;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s;
}

.wheel-hub:hover {
  background: var(--red);
}

.wheel-hub:disabled {
  cursor: wait;
  background: #444;
}

.wheel-result {
  min-height: 3.6em;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wheel-result b {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--cond);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
  color: var(--red);
}

/* ================= Вопросы ================= */
.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem 4rem;
  align-items: start;
}

.faq details {
  border-top: 3px solid var(--ivory);
}

.faq details:last-child {
  border-bottom: 3px solid var(--ivory);
}

.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 0;
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.3em;
  line-height: 0.7;
  color: var(--red);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 40em;
  padding-bottom: 1.5rem;
  color: #bdb6a6;
}

/* ================= Подвал ================= */
.footer {
  position: relative;
  padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  background: var(--red);
  color: var(--black);
}

.mega-foot {
  margin-bottom: 1.4rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-top: 1rem;
  border-top: 3px solid var(--black);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ================= Адаптив ================= */
@media (max-width: 1150px) {
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: -16px;
    right: -16px;
    padding: 0.4rem 16px 1rem;
    background: var(--black);
    border-bottom: 2px solid var(--red);
  }

  .nav.open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
  }

  .nav-links a {
    padding: 0.75rem 0;
    font-size: 1.6rem;
    border-bottom: 1px solid var(--line-d);
  }

  .nav-links a span {
    width: 2.2rem;
    font-size: 12px;
  }

  .nav-toggle {
    display: block;
  }

  .bar-in {
    gap: 0.6rem;
  }
}

@media (max-width: 1000px) {
  .posters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .confess,
  .faq-wrap,
  .sign {
    grid-template-columns: minmax(0, 1fr);
  }

  .sign-actions {
    grid-column: auto;
  }

  .trial {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "count"
      "sim"
      "btn";
  }

  .trial-count {
    display: flex;
    align-items: baseline;
    gap: 1rem;
  }

  .tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }

  .tool,
  .tool:first-child {
    padding: 2.4rem 0 0;
    border-left: none;
    border-top: 3px solid var(--black);
  }

  .tool:first-child {
    padding-top: 0;
    border-top: none;
  }

  .rule {
    grid-template-columns: clamp(3.5rem, 10vw, 5rem) minmax(0, 1fr);
  }

  .rule p {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  :root {
    --slant: 9vw;
  }

  body {
    font-size: 16px;
  }

  .hero-kicker span:last-child {
    display: none;
  }

  .sun {
    top: 30%;
    right: -22vmin;
    width: 92vmin;
  }

  .hero-foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .hold {
    min-width: 0;
    font-size: 1.3rem;
  }

  .posters {
    grid-template-columns: minmax(0, 1fr);
  }

  .article {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .sim {
    min-height: 520px;
    box-shadow: 10px 10px 0 var(--red);
  }

  .sim-notifs {
    top: auto;
    bottom: 14px;
  }

  .deck {
    height: 400px;
  }

  .btn-xl {
    width: 100%;
  }

  .stamp-seal {
    top: 6%;
    right: 4%;
  }

  /* на узких экранах заголовки переносятся, а не ужимаются */
  .mega {
    white-space: normal;
    font-size: 15.5vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .mega > span {
    transition: none;
    transform: none;
  }

  .running .sim-paper,
  .fly .wing {
    animation: none;
  }
}
