@font-face {
  font-family: "Black Ops One";
  src: url("../fonts/black-ops-one.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Share Tech Mono";
  src: url("../fonts/share-tech-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Special Elite";
  src: url("../fonts/special-elite.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070102;
  --raise: #140406;
  --text: #fff4f1;
  --muted: #ffc9c2;
  --hot: #ff3030;
  --ember: #ffb1a3;
  --line: rgba(255, 70, 70, 0.45);
  --max: 1080px;
  --sans: "DejaVu Sans", "Liberation Sans", "Segoe UI", sans-serif;
  --display: "Black Ops One", "Arial Black", sans-serif;
  --mono: "Share Tech Mono", "DejaVu Sans Mono", ui-monospace, monospace;
  --type: "Special Elite", "Courier New", monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(160, 16, 24, 0.5), transparent 58%),
    linear-gradient(rgba(255, 40, 40, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 40, 40, 0.045) 1px, transparent 1px);
  background-size: auto, 52px 52px, 52px 52px;
  line-height: 1.5;
}

button,
input,
summary {
  font: inherit;
}

:focus-visible {
  outline: 3px solid #ffd0c4;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.atmosphere,
.grain,
.scanlines,
.vignette,
.flash {
  pointer-events: none;
}

.grain,
.scanlines,
.vignette {
  position: fixed;
  inset: 0;
}

.grain {
  z-index: 2;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.scanlines {
  z-index: 3;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22),
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.35;
}

.vignette {
  z-index: 4;
  box-shadow: inset 0 0 180px 40px rgba(0, 0, 0, 0.72);
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(255, 20, 20, 0.38);
  opacity: 0;
}

body.horn-flash .flash {
  animation: flash-fade 650ms ease-out;
}

@keyframes flash-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}

.marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #140004;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}

.marquee-track p {
  margin: 0;
  padding: 0.5rem 1.5rem;
  white-space: nowrap;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.page {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.boot-error {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--hot);
  background: #2a060c;
  color: var(--text);
}

.hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.seal {
  width: 5.4rem;
  height: 5.4rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.1rem;
  border: 2px dashed #ff3b3b;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 50, 50, 0.35);
  color: var(--ember);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.62rem;
  transform: rotate(-8deg);
}

.seal strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 7.2vw, 5.1rem);
  font-weight: 400;
  letter-spacing: 0.045em;
  line-height: 0.9;
  text-shadow: 0 0 24px rgba(255, 40, 40, 0.45);
}

.glitch {
  position: relative;
  color: var(--text);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glitch::before {
  color: #ff2a2a;
  clip-path: inset(0 0 58% 0);
  transform: translate(-3px, 0);
  animation: glitch-a 3.6s infinite linear;
  opacity: 0.8;
}

.glitch::after {
  color: #8dfff2;
  clip-path: inset(58% 0 0 0);
  transform: translate(3px, 0);
  animation: glitch-b 2.8s infinite linear;
  opacity: 0.55;
}

@keyframes glitch-a {
  0%, 86%, 100% { transform: translate(0, 0); }
  88% { transform: translate(-4px, 1px); }
  92% { transform: translate(3px, -1px); }
  96% { transform: translate(-2px, 0); }
}

@keyframes glitch-b {
  0%, 80%, 100% { transform: translate(0, 0); }
  84% { transform: translate(4px, 0); }
  90% { transform: translate(-3px, 1px); }
  95% { transform: translate(2px, -1px); }
}

.deck {
  max-width: 38rem;
  margin: 0.9rem auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.status-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: rgba(28, 2, 6, 0.88);
  box-shadow: 0 0 24px rgba(255, 20, 20, 0.12);
}

.status-kicker {
  margin: 0 0 0.25rem;
  color: var(--hot);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-line {
  margin: 0;
  font-size: 1.05rem;
}

body[data-tier="4"] .status-banner,
body[data-tier="5"] .status-banner {
  animation: pulse-border 1.1s ease-in-out infinite;
}

@keyframes pulse-border {
  50% { border-color: #ff5a5a; box-shadow: 0 0 28px rgba(255, 30, 30, 0.35); }
}

.device {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 40, 40, 0.08), transparent 30%),
    #100206;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.device::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 80, 80, 0.85), transparent);
  animation: scan 4.8s linear infinite;
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.device-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rec {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.rec-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 8px var(--hot);
  animation: blink 1.4s steps(2, end) infinite;
}

@keyframes blink {
  50% { opacity: 0.25; }
}

.units {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.unit {
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 0.85rem 0.25rem 0.55rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 50, 50, 0.16), rgba(0, 0, 0, 0.15)),
    #160308;
  border: 1px solid rgba(255, 80, 80, 0.4);
}

.unit::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, #ff2d2d 0 8px, #1a0002 8px 16px);
}

.digit {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.7rem, 5.6vw, 4.4rem);
  line-height: 0.95;
  color: #fff7f5;
  text-shadow: 0 0 16px rgba(255, 40, 40, 0.65);
}

.digit.tick {
  animation: digit-tick 280ms ease-out;
}

@keyframes digit-tick {
  from { color: #ffd0d0; transform: translateY(-2px); }
  to { color: #fff7f5; transform: none; }
}

.unit-label {
  margin-top: 0.25rem;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.deadline,
.decimal,
.day-label,
.local-deadline,
.horn-note {
  text-align: center;
}

.deadline {
  margin: 0.9rem 0 0.2rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.decimal {
  margin: 0;
  color: var(--hot);
  font-family: var(--mono);
  font-size: 1rem;
}

.day-label,
.local-deadline,
.horn-note {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.timebar-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 0.95rem;
  margin-top: 0.35rem;
  border: 1px solid rgba(255, 80, 80, 0.5);
  background: #1a0508;
  color: var(--hot);
}

progress::-webkit-progress-bar {
  background: #1a0508;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #6a0010, #ff2a2a);
  box-shadow: 0 0 12px rgba(255, 40, 40, 0.45);
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, #6a0010, #ff2a2a);
}

body[data-tier="5"] progress::-webkit-progress-value,
body[data-tier="5"] progress::-moz-progress-bar {
  background: #ff1a1a;
}

.horn-row {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.horn-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  border: 2px solid #ff5a5a;
  background: linear-gradient(180deg, #9b1c24, #4a060c);
  color: #fff6f4;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(255, 30, 30, 0.28), inset 0 0 16px rgba(0, 0, 0, 0.35);
}

.horn-button:hover,
.link-button:hover {
  background: linear-gradient(180deg, #c42832, #6a0a12);
  color: #fff;
}

.horn-button[aria-pressed="true"] {
  animation: horn-pulse 0.35s linear infinite;
}

@keyframes horn-pulse {
  50% { filter: brightness(1.25); }
}

.horn-note {
  max-width: 36rem;
}

.ledger,
.contract {
  margin-top: 1.4rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.ledger h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.credit-count {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.04em;
}

.credit-aside,
.meter-label,
.empty-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.credit-list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.credit-card {
  position: relative;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: rgba(20, 4, 8, 0.9);
}

.credit-card.is-example {
  border-style: dashed;
  opacity: 0.92;
}

.credit-card h3 {
  margin: 0 0 0.2rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.credit-role,
.credit-meta,
.credit-note {
  margin: 0.15rem 0 0;
}

.credit-meta,
.credit-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--hot);
  color: var(--hot);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.edit-hint,
.site-footer details {
  margin-top: 0.9rem;
  color: var(--muted);
}

summary {
  cursor: pointer;
  color: var(--ember);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: #ffd0c8;
}

.contract {
  position: relative;
  z-index: 5;
  color-scheme: light;
  color: #1c1814;
  background: transparent;
  box-shadow: none;
}

.contract :focus-visible {
  outline-color: #1c1814;
}

.doc-page {
  position: relative;
  margin: 0 0 1.35rem;
  padding: 0.95rem 1.25rem 0.85rem;
  border: 1px solid #2a241c;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 252, 245, 0.7);
  color: #1c1814;
  background-color: #f4ecd4;
  background-image:
    radial-gradient(ellipse at 12% 0%, rgba(255, 252, 245, 0.7), transparent 42%),
    radial-gradient(ellipse at 100% 100%, rgba(120, 84, 40, 0.08), transparent 46%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23p)' opacity='.35'/%3E%3C/svg%3E");
  font-family: "Times New Roman", Times, "Liberation Serif", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.doc-page::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(42, 36, 28, 0.4);
}

.doc-banner {
  margin: 0 0 0.75rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid #1c1814;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant: small-caps;
}

.letterhead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid #1c1814;
}

.dept-seal {
  width: 6.4rem;
  height: 6.4rem;
  display: block;
}

.dept-kicker,
.dept-office,
.page-continue,
.sig-hint,
.sig-label {
  margin: 0;
  font-size: 0.78rem;
}

.dept-kicker,
.page-continue {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dept-name {
  margin: 0.1rem 0;
  font-family: "Times New Roman", Times, "Liberation Serif", Georgia, serif;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.dept-office {
  font-style: italic;
}

.contract h2 {
  margin: 0.35rem 0 0;
  color: #1c1814;
  font-family: "Times New Roman", Times, "Liberation Serif", Georgia, serif;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.rubber-stamp {
  margin: 0;
  padding: 0.35rem 0.4rem;
  border: 3px solid #9d2433;
  color: #9d2433;
  font-family: "Times New Roman", Times, "Liberation Serif", Georgia, serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  max-width: 7.4rem;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 0 1px rgba(157, 36, 51, 0.45);
}

.doc-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 1.25rem;
  margin: 0 0 0.8rem;
  padding: 0.45rem 0.15rem 0.15rem;
  border-bottom: 1px solid rgba(28, 24, 20, 0.35);
  font-size: 0.86rem;
}

.doc-meta div {
  display: grid;
  grid-template-columns: 8.2rem 1fr;
  gap: 0.35rem;
}

.doc-meta dt {
  margin: 0;
  font-weight: 700;
}

.doc-meta dd {
  margin: 0;
}

.doc-lead,
.therefore {
  margin: 0.55rem 0;
}

.contract h3 {
  margin: 0.9rem 0 0.3rem;
  color: #1c1814;
  font-family: "Times New Roman", Times, "Liberation Serif", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.whereas {
  margin: 0.28rem 0;
  padding-left: 1.4rem;
  text-indent: -1.4rem;
}

.clause {
  margin: 0.32rem 0;
  padding-left: 2.15rem;
  text-indent: -2.15rem;
}

.clause .num {
  font-weight: 700;
}

.sig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.3rem;
  margin-top: 0.8rem;
}

.sig-label {
  margin-top: 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sig-field .sig-label:first-child {
  margin-top: 0;
}

.ink-line {
  margin: 0.15rem 0 0;
  min-height: 1.7rem;
  border-bottom: 1px solid #1c1814;
  font-family: "Times New Roman", Times, "Liberation Serif", Georgia, serif;
}

.ink-line-blank {
  min-height: 1.8rem;
}

.sig-hint {
  margin-top: 0.2rem;
  font-style: italic;
  color: #3d342c;
}

.doc-page-boilerplate {
  font-size: 0.95rem;
}

.page-continue {
  margin: 0.15rem 0 0.2rem;
  text-align: center;
}

.notary {
  margin-top: 1rem;
  border: 1px solid #1c1814;
  background: rgba(255, 252, 245, 0.35);
}

.notary-head {
  margin: 0;
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid #1c1814;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notary-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.65rem 0.7rem 0.75rem;
}

.notary-body p {
  margin: 0.35rem 0 0;
}

.notary-body p:first-child {
  margin-top: 0;
}

.notary-mark {
  width: 4.6rem;
  height: 4.6rem;
}

.notary-sign {
  font-style: italic;
}

.doc-closer {
  margin: 0.85rem 0 0.3rem;
  font-style: italic;
}

.doc-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: end;
  margin-top: 0.9rem;
  padding-top: 0.4rem;
  border-top: 1px solid #1c1814;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doc-footer p {
  margin: 0;
}

.mini-line {
  display: inline-block;
  width: 4.2rem;
  border-bottom: 1px solid #1c1814;
  transform: translateY(-0.15rem);
}

.sign-caption,
.witness {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sign-line {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding: 0.55rem 0 0.3rem;
  border: 0;
  border-bottom: 2px solid #2a1214;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 48px;
}

.sign-placeholder {
  color: rgba(42, 18, 20, 0.38);
  font-style: italic;
  font-family: var(--type);
  font-size: 1.15rem;
}

.sign-wait {
  color: #7a0c18;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sign-line.shook {
  animation: shake 380ms linear;
}

@keyframes shake {
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.sign-reaction {
  min-height: 1.4em;
  margin: 0.4rem 0 0;
  color: #7a0c18;
}

.contract .sign-line {
  border-bottom-width: 1px;
  border-bottom-color: #1c1814;
}

.contract .sign-placeholder,
.contract .sign-wait,
.contract .sign-reaction {
  font-family: "Times New Roman", Times, "Liberation Serif", Georgia, serif;
}

.contract .sign-wait {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #8e2430;
}

.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2.5rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0 0 0.8rem;
}

.fail-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: auto;
  background:
    radial-gradient(ellipse at 50% 22%, #4a000c 0%, #120004 46%, #050000 100%);
}

html.preview-fail .fail-screen,
.fail-screen.is-open {
  display: block;
}

html.preview-fail,
html.fail-open {
  overflow: hidden;
}

.fail-inner {
  width: min(920px, calc(100% - 1.5rem));
  margin: 7vh auto 3rem;
  text-align: center;
}

.fail-preview {
  display: none;
  margin: 0 auto 0.8rem;
  max-width: 36rem;
  padding: 0.45rem 0.7rem;
  border: 1px dashed #ff8a80;
  color: #ffd0c8;
  font-family: var(--mono);
  font-size: 0.85rem;
}

html.preview-fail .fail-preview {
  display: block;
}

html.is-real-fail .fail-preview,
html.is-real-fail #fail-back {
  display: none;
}

.fail-stamp,
.fail-kicker,
.fail-fine {
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
  font-size: 0.78rem;
}

.fail-stamp,
.fail-kicker,
.fail-sub,
.fail-soft,
.fail-fine {
  margin: 0.3rem 0;
}

.fail-word {
  margin: 0.2rem 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 14vw, 7.5rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 0.04em;
  color: #ff2424;
  text-shadow: 0 0 28px rgba(255, 0, 0, 0.5);
}

.fail-sub {
  font-family: var(--display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: 0.03em;
}

.fail-soft,
#fail-desc,
.fail-order {
  color: var(--muted);
}

#fail-desc {
  max-width: 38rem;
  margin: 0.8rem auto 0;
}

.fail-order {
  margin-top: 0.6rem;
}

.sign-block.on-dark {
  max-width: 34rem;
  margin: 1.2rem auto 0;
  text-align: left;
}

.sign-line.on-dark {
  border-bottom-color: #fff4f1;
  color: #fff4f1;
}

.sign-line.on-dark .sign-placeholder {
  color: rgba(255, 244, 241, 0.42);
}

.sign-line.on-dark .sign-wait {
  color: #ff6b6b;
}

.sign-block.on-dark .sign-reaction {
  color: #ffb1a3;
}

.fail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.fail-fine {
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .hero-row {
    flex-direction: column;
  }

  .fail-inner {
    margin: 0.75rem auto 1.5rem;
  }

  .letterhead {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .rubber-stamp {
    transform: none;
  }

  .doc-meta,
  .sig-grid,
  .notary-body {
    grid-template-columns: 1fr;
  }

  .doc-meta div {
    grid-template-columns: 7.2rem 1fr;
  }

  .doc-page {
    padding: 0.85rem 0.8rem 0.75rem;
    font-size: 1rem;
  }

  .doc-footer {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

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

  .unit-years,
  .unit-days {
    grid-column: span 3;
  }

  .unit-hours,
  .unit-minutes,
  .unit-seconds {
    grid-column: span 2;
  }

  .unit-years .digit,
  .unit-days .digit {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  .sign-line {
    flex-direction: column;
    align-items: start;
  }

  .horn-button,
  .link-button {
    width: 100%;
  }

  .fail-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 420px) {
  h1 {
    letter-spacing: 0.02em;
  }

  .rubber-stamp {
    font-size: 0.72rem;
  }

  .doc-banner {
    letter-spacing: 0.04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .glitch::before,
  .glitch::after,
  .device::after {
    display: none;
  }

  .marquee-track {
    transform: none;
  }

  body.horn-flash .flash {
    opacity: 0;
  }
}
