
:root {
  --ink: #172923;
  --paper: #d8d1ad;
  --paper-light: #e8e1bd;
  --blue: #255870;
  --blue-dark: #173d4f;
  --red: #9e2f27;
  --shadow: #716f5c;
}

* { box-sizing: border-box; }

html { background: #17221f; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, #64766a 0, #293732 43%, #131c1a 100%);
  font-family: "Courier New", Courier, monospace;
}

button { font: inherit; }


.archive-return {
  position: fixed;
  z-index: 22;
  top: 7px;
  left: max(27px, calc((100vw - 1180px) / 2 + 3px));
  color: #b8c2b4;
  font-size: 10px;
  letter-spacing: .14em;
  text-decoration: none;
  opacity: .72;
  transition: color .15s ease, opacity .15s ease;
}
.archive-return:hover,
.archive-return:focus-visible {
  color: #e8e1bd;
  opacity: 1;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}


.machine-shell {
  min-height: 100vh;
  padding: 24px;
  opacity: 0;
  transition: opacity .45s ease;
  position: relative;
  overflow: hidden;
}

.machine-shell.booted { opacity: 1; }

.blackout {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #020504;
  opacity: 0;
  transition: opacity .08s;
}
.blackout.active { opacity: 1; }

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: .12;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #000 3px 4px);
}

.utility-bar, footer {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  color: #b8c2b4;
  font-size: 11px;
  letter-spacing: .14em;
}

.utility-bar { padding: 3px 3px 15px; }
footer { padding: 15px 3px 3px; opacity: .7; }

.machine {
  max-width: 1180px;
  min-height: 720px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid #a9a485;
  box-shadow: 0 24px 70px #050a08aa, inset 0 0 80px #8c866b33;
}

.brand-strip {
  min-height: 142px;
  display: grid;
  grid-template-columns: 124px 1fr auto;
  gap: 26px;
  align-items: center;
  padding: 25px 34px;
  border-bottom: 7px solid var(--blue);
  background:
    linear-gradient(90deg, #eee8c8, #d2caa5),
    repeating-linear-gradient(90deg, transparent 0 24px, #0001 24px 25px);
}

.eyebrow, .form-number, .panel-title, .round-id {
  margin: 0 0 9px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(34px, 6vw, 70px);
  line-height: .9;
  letter-spacing: -.035em;
  color: var(--blue-dark);
}

.tagline { margin: 10px 0 0; font-size: 13px; }

.mouth-mark {
  width: 106px;
  height: 76px;
  padding: 16px 13px;
  border: 4px solid var(--blue);
  border-radius: 50% 50% 45% 45%;
  display: flex;
  align-items: center;
  gap: 7px;
  transform: rotate(-2deg);
}

.mouth-mark i {
  width: 9px;
  height: 39px;
  display: block;
  background: var(--blue);
}
.mouth-mark i:nth-child(2), .mouth-mark i:nth-child(4) { height: 50px; }
.mouth-mark i:nth-child(3) { height: 58px; }

.indicator {
  align-self: start;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #55a365;
  box-shadow: 0 0 8px #55a365;
  animation: blink 2.4s infinite;
}

@keyframes blink { 50% { opacity: .35; } }

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr);
  min-height: 570px;
}

.paper-panel { padding: 65px 7vw; border-right: 1px solid #9d987d; }
.paper-panel h2 {
  max-width: 620px;
  margin: 0 0 18px;
  font-family: Georgia, serif;
  font-size: clamp(35px, 5vw, 62px);
  font-weight: 400;
  line-height: 1.02;
}
.paper-panel > p:not(.form-number) { max-width: 650px; font: 18px/1.65 Georgia, serif; }

.warning {
  max-width: 650px;
  margin: 34px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  border: 2px solid var(--red);
  color: #6f221e;
}
.warning strong { padding: 14px; color: var(--paper-light); background: var(--red); }
.warning span { padding: 14px 18px; }

.red-button {
  appearance: none;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  color: #fff3dc;
  background: #4f302a;
  box-shadow: 0 7px 0 #271a17, 0 11px 18px #4c443c88;
  cursor: pointer;
}
.red-button span {
  display: block;
  padding: 21px 28px;
  border: 2px solid #c8695d;
  border-radius: 5px;
  background: linear-gradient(#bd4d43, #882921);
  font-weight: 800;
  letter-spacing: .08em;
  text-shadow: 0 -1px #38100c;
}
.red-button:active { transform: translateY(5px); box-shadow: 0 2px 0 #271a17; }

.manual {
  padding: 64px 42px;
  color: #d7dccd;
  background: var(--blue-dark);
  box-shadow: inset 20px 0 40px #071e2955;
}
.manual > p { border-bottom: 1px solid #7691a0; padding-bottom: 15px; letter-spacing: .18em; }
.manual ol { margin: 34px 0 55px; padding-left: 24px; }
.manual li { margin: 22px 0; line-height: 1.5; }
.manual small { opacity: .65; line-height: 1.6; }

.console-grid {
  min-height: 570px;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.metrics {
  padding: 32px 26px;
  color: #dae0d2;
  background: #1d3434;
  border-right: 8px solid #102728;
}
.metrics .panel-title { color: #b9c6b8; border-bottom: 1px solid #647672; padding-bottom: 14px; }
.meter { margin: 28px 0; }
.meter > div:first-child { display: flex; justify-content: space-between; font-size: 11px; }
.meter-track { height: 13px; margin-top: 8px; padding: 2px; border: 1px solid #7f918a; }
.meter-track i { display: block; height: 100%; background: #b3c79d; transition: width .4s ease; }
.metrics dl { margin: 35px 0; border-top: 1px solid #647672; }
.metrics dl div { padding: 14px 0; border-bottom: 1px solid #647672; }
.metrics dt { font-size: 9px; letter-spacing: .12em; opacity: .7; }
.metrics dd { margin: 5px 0 0; font-size: 12px; word-break: break-word; }
.utility-actions { display: grid; gap: 8px; }
.utility-actions button {
  padding: 10px;
  border: 1px solid #6f817a;
  color: #cbd5c8;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 10px;
}
.utility-actions button:hover { color: #fff; background: #ffffff12; }

.terminal-panel { padding: 36px 46px 46px; background: var(--paper-light); }
.terminal-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 3px double var(--blue);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
}
.status { color: var(--red); text-align: right; }
.route-resistance .terminal-head { border-bottom-color: var(--red); }
.route-resistance .status { animation: blink .7s steps(2) infinite; }
.route-resistance .terminal-panel {
  background:
    repeating-linear-gradient(90deg, transparent 0 117px, #8c34260c 117px 119px),
    var(--paper-light);
}
.route-resistance .brand-strip { border-bottom-color: var(--red); }
.route-compliance .machine { box-shadow: 0 24px 70px #050a08aa, inset 0 0 80px #8c866b33, 0 0 0 5px #ffffff08; }
.route-compliance .choice-list button { border-radius: 3px; }
.route-repair .terminal-panel { background: #e6dfc0; }
.route-repair .brand-strip { filter: saturate(.72); }
.route-repair .meter-track i { background: #d1b56f; }
.secret-meter { opacity: .22; transition: opacity .4s ease; }
.route-repair .secret-meter, .route-resistance .secret-meter { opacity: 1; }
.return-notice {
  margin: 18px 0;
  padding: 10px 14px;
  border-left: 5px solid var(--red);
  background: #cdbf98;
  color: var(--red);
  font-size: 12px;
  line-height: 1.55;
}
.contamination, .retained-language, .sacrifice {
  margin: 20px 0;
  padding: 12px 15px;
  border: 1px dashed var(--red);
  color: #6f221e;
  background: #cdbf98;
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: .05em;
}
.withdrawn {
  margin: 30px 0;
  padding: 12px;
  border: 1px solid #9da9a2;
  color: #b8c2b4;
  font-size: 10px;
  text-decoration: line-through;
}
.recipient-input {
  position: relative;
  z-index: 4;
  margin: 17px auto -25px;
  max-width: 730px;
  padding: 12px 16px;
  border: 1px solid #8a5c52;
  color: #60271e;
  background: #f0dec1;
  box-shadow: 4px 4px 0 #8d846b;
  font: italic 16px/1.5 Georgia, serif;
  transform: rotate(-.35deg);
}
.recipient-input span { display: block; margin-bottom: 5px; font: 8px "Courier New"; letter-spacing: .14em; }
.round { max-width: 730px; margin: 52px auto 0; }
.round h2, .final h2 {
  margin: 0;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(30px, 4vw, 47px);
  color: var(--blue-dark);
}
.prompt { margin: 14px 0 28px; font: 18px/1.5 Georgia, serif; }
.evidence-slip {
  margin: -10px 0 24px;
  padding: 13px 15px;
  border: 1px dashed #8d846b;
  color: #5c3a32;
  background: #cfc49e;
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: .05em;
  transform: rotate(-.25deg);
}
.choice-list { display: grid; gap: 10px; }
.choice-list button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 17px;
  border: 1px solid #9c9678;
  color: var(--ink);
  background: #ded7b4;
  cursor: pointer;
  text-align: left;
  box-shadow: 2px 2px 0 #9c9678;
}
.choice-list button:hover, .choice-list button:focus-visible {
  outline: none;
  color: #f4edd2;
  background: var(--blue);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #8e896e;
}
.check { width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid currentColor; }
blockquote {
  margin: 28px 0 0;
  padding: 13px 16px;
  border-left: 3px solid var(--blue);
  color: #45534c;
  font: italic 14px/1.5 Georgia, serif;
}
blockquote span { display: block; margin-bottom: 4px; font: 9px "Courier New"; letter-spacing: .12em; }

.draft-editor { max-width: 760px; margin: 42px auto 0; }
.draft-editor h2 { margin: 0; font: 38px/.95 Arial Black, Impact, sans-serif; color: var(--blue-dark); }
.paper-draft {
  margin: 30px 0 15px;
  padding: 35px 32px;
  background:
    repeating-linear-gradient(#e4dcb8 0 30px, #9aa48f55 30px 31px);
  border: 1px solid #928b6f;
  box-shadow: 5px 7px 0 #b0a789;
  font: 20px/1.58 Georgia, serif;
  transform: rotate(.15deg);
}
.revision {
  display: inline;
  margin: 0 2px;
  padding: 0 3px;
  border: 0;
  border-bottom: 2px dotted var(--red);
  color: #6f221e;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.revision-0 { text-decoration: wavy underline #a33a31; }
.revision-1 { color: var(--blue-dark); background: #adc0ae55; }
.revision-2 { color: #241614; background: #c7a39177; font-weight: 700; }
.revision-readout { margin-bottom: 20px; color: var(--red); font-size: 10px; letter-spacing: .1em; }
.finalize-draft, .reject-document {
  margin: 8px 8px 0 0;
  padding: 13px 18px;
  border: 1px solid var(--blue-dark);
  color: #eee8c8;
  background: var(--blue);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .06em;
}
.reject-document { color: var(--red); background: transparent; border-color: var(--red); }

.maintenance {
  position: absolute;
  z-index: 20;
  inset: 18px 22px auto;
  max-width: 720px;
  margin: auto;
  padding: 22px;
  border: 3px double #a04535;
  color: #cad7c9;
  background: #142725;
  box-shadow: 10px 14px 35px #0009;
}
.terminal-panel { position: relative; }
.maintenance > button { float: right; border: 0; color: #cad7c9; background: none; cursor: pointer; font-size: 24px; }
.maintenance > p { color: #d98b72; font-size: 10px; letter-spacing: .13em; }
.maintenance pre { white-space: pre-wrap; font: 12px/1.7 "Courier New"; }
.reconstruction {
  margin: 25px 0;
  padding: 16px 19px;
  border: 1px dashed #6a6252;
  background: #cfc49e;
  font-size: 12px;
}
.reconstruction summary { cursor: pointer; color: var(--red); font-weight: 700; letter-spacing: .07em; }
.reconstruction small { opacity: .68; }
.sacrifice { border-style: solid; text-align: center; }

.final { max-width: 720px; margin: 42px auto 0; }
.apology-output {
  margin: 25px 0;
  padding: 26px 30px;
  border: 1px solid #918b70;
  background: #d9d1aa;
  box-shadow: inset 0 0 35px #8d866944;
  font: 18px/1.65 Georgia, serif;
}
.apology-output p:first-child { font: 10px "Courier New"; letter-spacing: .14em; }
.apology-output .final-echo {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px dashed #918b70;
  color: #5b5546;
  font-size: 14px;
}
.authorization {
  padding: 19px 22px;
  border: 3px double var(--red);
  color: var(--red);
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.authorization strong { letter-spacing: .08em; }
.authorization.ending-prevented,
.authorization.ending-repair { border-color: var(--blue); color: var(--blue); }
.authorization.ending-transfer { border-color: #70517c; color: #62426d; }
.authorization.ending-created { animation: blink 1.8s steps(2) infinite; }
.authorization.ending-malfunction { border-color: #111; color: #111; background: #ccbd95; }
.outcome-prevented .machine { filter: grayscale(.65); }
.outcome-repair .metrics { opacity: .45; }
.outcome-malfunction .brand-strip { transform: translateX(3px); }
.quiet-reset { margin-top: 26px; border: 0; border-bottom: 1px solid; color: #65716a; background: transparent; cursor: pointer; font-size: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 760px) {
  .archive-return { top: 6px; left: 13px; font-size: 8px; }
  .machine-shell { padding: 10px; }
  .utility-bar { display: none; }
  .machine { min-height: calc(100vh - 45px); }
  .brand-strip { grid-template-columns: 62px 1fr; gap: 14px; padding: 18px; }
  .mouth-mark { width: 58px; height: 46px; padding: 7px; gap: 3px; border-width: 3px; }
  .mouth-mark i { width: 5px; height: 22px; }
  .mouth-mark i:nth-child(2), .mouth-mark i:nth-child(4) { height: 28px; }
  .mouth-mark i:nth-child(3) { height: 32px; }
  .indicator { display: none; }
  h1 { font-size: clamp(29px, 9vw, 48px); }
  .eyebrow { font-size: 8px; }
  .intro-grid, .console-grid { grid-template-columns: 1fr; }
  .paper-panel { padding: 38px 24px 48px; border-right: 0; }
  .paper-panel > p:not(.form-number) { font-size: 16px; }
  .warning { grid-template-columns: 1fr; }
  .manual { padding: 35px 28px; }
  .metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding: 18px; border-right: 0; border-bottom: 6px solid #102728; }
  .metrics .panel-title, .metrics dl, .utility-actions { grid-column: 1 / -1; }
  .metrics dl { display: none; }
  .utility-actions { grid-template-columns: repeat(3, 1fr); }
  .utility-actions button { text-align: center; padding: 8px 3px; }
  .terminal-panel { padding: 24px 18px 38px; }
  .terminal-head { gap: 15px; font-size: 8px; }
  .round, .final { margin-top: 35px; }
  .choice-list button { padding: 14px 12px; }
  .authorization { flex-direction: column; }
  .draft-editor h2 { font-size: 29px; }
  .paper-draft { padding: 25px 20px; font-size: 18px; }
  .maintenance { inset: 12px 10px auto; }
  footer { font-size: 8px; }
}

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