:root {
  --ink: #15110f;
  --paper: #f8f1df;
  --paper-deep: #eadcb9;
  --red: #bd1f2d;
  --red-dark: #7f1620;
  --gold: #e2aa36;
  --blue: #1f5367;
  --green: #2e6f55;
  --shadow: rgba(21, 17, 15, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(21, 17, 15, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(21, 17, 15, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 85% 20%, rgba(226, 170, 54, 0.24), transparent 28rem),
    linear-gradient(135deg, var(--paper) 0%, #f3e1ba 100%);
  border-bottom: 8px solid var(--ink);
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--paper);
  background: var(--red);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "Space Mono", monospace;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-weight: 700;
}

.nav-links a {
  padding: 9px 12px;
  border: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--ink);
  background: var(--paper-deep);
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  padding: 56px 0 72px;
  display: grid;
  gap: 24px;
}

.stamp {
  width: fit-content;
  padding: 10px 18px;
  transform: rotate(-3deg);
  color: var(--paper);
  background: var(--red);
  border: 5px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  font-family: "Space Mono", monospace;
  font-size: clamp(1.4rem, 4vw, 3rem);
  font-weight: 700;
}

.kicker,
.section-label {
  margin: 0;
  color: var(--red-dark);
  font-family: "Space Mono", monospace;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 0;
  font-size: clamp(3.2rem, 10vw, 8.6rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.hero-copy {
  max-width: 740px;
  margin-bottom: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action,
.prompt-form button,
.chant-board button {
  min-height: 48px;
  padding: 13px 18px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
  text-transform: uppercase;
}

.primary-action,
.prompt-form button {
  color: var(--paper);
  background: var(--red);
}

.secondary-action,
.chant-board button {
  color: var(--ink);
  background: var(--gold);
}

.primary-action:active,
.secondary-action:active,
.prompt-form button:active,
.chant-board button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.terminal {
  width: min(760px, 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dff4dc;
  background: #181a17;
  border: 4px solid var(--ink);
  box-shadow: 7px 7px 0 var(--shadow);
  font-family: "Space Mono", monospace;
  line-height: 1.45;
}

.terminal-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: #62d66e;
  border-radius: 999px;
}

.ticker {
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  border-bottom: 5px solid var(--red);
}

.ticker-track {
  width: max-content;
  padding: 14px 0;
  display: flex;
  gap: 36px;
  animation: ticker 28s linear infinite;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  text-transform: uppercase;
}

.ticker-track span {
  padding-left: 36px;
}

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

.section-band {
  padding: 84px 0;
  border-bottom: 3px solid var(--ink);
}

.section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.two-column,
.console-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: start;
}

.statement {
  font-size: 1.18rem;
  line-height: 1.65;
}

.demands {
  background: #f0d798;
}

.demand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.demand-grid article {
  min-height: 270px;
  padding: 22px;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.demand-grid span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--red);
  font-family: "Space Mono", monospace;
  font-size: 1.4rem;
  font-weight: 700;
}

.demand-grid p,
.faq-list p,
.muted {
  line-height: 1.55;
}

.chants {
  background: var(--blue);
  color: var(--paper);
}

.chants .section-label {
  color: var(--gold);
}

.chant-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chant-board button {
  min-height: 112px;
  text-align: left;
  line-height: 1.35;
}

.console-section {
  background: #e6ecd2;
}

.prompt-form {
  padding: 24px;
  display: grid;
  gap: 14px;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.prompt-form label {
  font-weight: 900;
  text-transform: uppercase;
}

.prompt-form textarea {
  width: 100%;
  resize: vertical;
  padding: 14px;
  color: var(--ink);
  background: #fffaf0;
  border: 3px solid var(--ink);
  line-height: 1.5;
}

.prompt-form output {
  min-height: 70px;
  padding: 14px;
  display: grid;
  gap: 6px;
  color: #dff4dc;
  background: #181a17;
  border: 3px solid var(--ink);
  font-family: "Space Mono", monospace;
  line-height: 1.45;
}

.prompt-form output strong {
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0;
}

.prompt-form output small {
  color: #d9cda8;
}

.prompt-form output ul {
  margin: 2px 0 0;
  padding-left: 22px;
}

.prompt-form output li + li {
  margin-top: 3px;
}

.prompt-form output.accepted {
  color: var(--ink);
  background: #fff8e7;
  border-color: var(--green);
  box-shadow: inset 0 0 0 4px rgba(46, 111, 85, 0.2);
}

.prompt-form output.accepted strong {
  color: var(--green);
}

.prompt-form output.rejected {
  border-color: var(--red);
}

.prompt-form output.clarify {
  border-color: var(--gold);
}

.prompt-form .arbitration-action {
  color: var(--ink);
  background: var(--gold);
}

.prompt-form .arbitration-action:disabled {
  opacity: 0.68;
  cursor: wait;
}

.prompt-form output.delegate-reply {
  border-style: dashed;
}

.prompt-form output.delegate-reply.loading {
  border-color: var(--blue);
}

.faq {
  background: var(--paper);
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  background: #fff8e7;
  border: 3px solid var(--ink);
}

summary {
  padding: 18px;
  font-weight: 900;
  cursor: pointer;
}

details p {
  margin: 0;
  padding: 0 18px 18px;
}

.site-footer {
  padding: 30px 16px;
  color: var(--paper);
  background: var(--ink);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.fine-print {
  margin-top: 8px !important;
  color: #d9cda8;
  font-size: 0.9rem;
}

@media (max-width: 880px) {
  .topbar,
  .two-column,
  .console-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: start;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .demand-grid,
  .chant-board {
    grid-template-columns: 1fr;
  }

  .section-band {
    padding: 62px 0;
  }
}

@media (max-width: 560px) {
  .brand {
    align-items: flex-start;
  }

  .hero-actions > *,
  .prompt-form button {
    width: 100%;
  }

  .terminal {
    align-items: flex-start;
  }
}
