:root {
  color-scheme: dark;
  --black: #090909;
  --black-soft: #11110f;
  --paper: #f0ede4;
  --paper-deep: #d8d3c7;
  --ink: #11110f;
  --gray: #99978f;
  --line: rgba(240, 237, 228, 0.19);
  --red: #ff3b2f;
  --max: 1240px;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--black);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
textarea,
a {
  font: inherit;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  padding: 0.7rem 1rem;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 9, 0.78);
  backdrop-filter: blur(16px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: max-content;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-decoration: none;
}

.wordmark-mark {
  display: inline-grid;
  width: 22px;
  height: 27px;
  place-items: center;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 83% 100%, 66% 88%, 50% 100%, 33% 88%, 16% 100%, 0 88%);
}

.wordmark-mark::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

nav {
  display: flex;
  gap: 1.75rem;
}

nav a,
.header-status {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

nav a {
  color: #b8b5ad;
}

nav a:hover {
  color: var(--paper);
}

.header-status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--paper);
}

.header-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 59, 47, 0.8);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  filter: brightness(0.78) contrast(1.08) saturate(0.7);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.7) 42%, rgba(0, 0, 0, 0.04) 77%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, transparent 55%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 4rem));
  margin: 0 max(2rem, calc((100vw - var(--max)) / 2));
  padding: 9rem 0 6rem;
}

.kicker {
  margin: 0 0 1.4rem;
  color: #aaa79e;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-size: clamp(4rem, 9.2vw, 9rem);
  line-height: 0.84;
  letter-spacing: -0.075em;
  font-weight: 760;
}

.hero-lede {
  max-width: 580px;
  margin: 2rem 0 0;
  color: #d7d3c9;
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 1px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.button-light {
  background: var(--paper);
  color: var(--ink);
}

.button-ghost {
  border-color: rgba(240, 237, 228, 0.45);
  background: rgba(5, 5, 5, 0.2);
  color: var(--paper);
}

.button:hover,
.small-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.hero-note {
  margin: 1.25rem 0 0;
  color: #aaa79e;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-index {
  position: absolute;
  z-index: 2;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  gap: 1.25rem;
  color: rgba(240, 237, 228, 0.65);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.print-section,
.protocol-section,
.archive-section,
.verify-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 2rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 4rem;
}

.section-heading .kicker {
  grid-column: 1 / -1;
  margin-bottom: -0.75rem;
}

.section-heading h2,
.protocol-statement h2,
.identity-copy h2,
.verify-copy h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.section-heading > p:last-child,
.protocol-statement > p:last-child,
.identity-copy > p:last-child,
.verify-copy > p:last-child {
  margin: 0;
  color: #a9a69d;
  font-size: 1.05rem;
  line-height: 1.65;
}

.printer-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.68fr) minmax(420px, 1.32fr);
  border: 1px solid var(--line);
  background: #0d0d0c;
}

.control-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.5rem, 3.5vw, 3.5rem);
  border-right: 1px solid var(--line);
}

.field-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: #b6b3aa;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#receipt-text {
  width: 100%;
  min-height: 168px;
  resize: vertical;
  border: 1px solid #44423d;
  border-radius: 0;
  background: #080808;
  color: var(--paper);
  padding: 1.15rem;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.55;
  text-transform: uppercase;
}

.print-button {
  width: 100%;
  margin-top: 1rem;
  background: var(--red);
  color: #100504;
}

.button-led {
  width: 7px;
  height: 7px;
  margin-right: 0.65rem;
  border-radius: 50%;
  background: #170403;
}

.preset-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 3.5rem;
  font-family: var(--mono);
}

.preset-block > span {
  color: #6f6d67;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #aaa79f;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}

.printer-stage {
  min-width: 0;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 5vw, 5rem) 2rem;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.08), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px),
    #171715;
}

.printer-top {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border: 1px solid #3d3b37;
  background: linear-gradient(#2f2e2a, #171715 58%, #0c0c0b);
  box-shadow: 0 18px 25px rgba(0, 0, 0, 0.4);
}

.printer-label {
  color: #8d8a82;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.red-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 59, 47, 0.75);
}

.paper-slot {
  position: relative;
  z-index: 3;
  width: 78%;
  height: 10px;
  margin: -4px auto 0;
  background: #030303;
  box-shadow: inset 0 2px 2px #000, 0 1px #4c4a44;
}

.receipt {
  position: relative;
  width: min(100%, 440px);
  min-height: 610px;
  margin: 0 auto;
  padding: 2.3rem 2rem 2.6rem;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.025), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.025)),
    var(--paper);
  font-family: var(--mono);
  box-shadow: 0 28px 44px rgba(0, 0, 0, 0.34);
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 100% 98.7%, 97% 100%, 94% 98.7%, 91% 100%, 88% 98.7%, 85% 100%, 82% 98.7%, 79% 100%, 76% 98.7%, 73% 100%, 70% 98.7%, 67% 100%, 64% 98.7%, 61% 100%, 58% 98.7%, 55% 100%, 52% 98.7%, 49% 100%, 46% 98.7%, 43% 100%, 40% 98.7%, 37% 100%, 34% 98.7%, 31% 100%, 28% 98.7%, 25% 100%, 22% 98.7%, 19% 100%, 16% 98.7%, 13% 100%, 10% 98.7%, 7% 100%, 4% 98.7%, 0 100%);
}

.receipt.is-printing {
  animation: printPaper 700ms cubic-bezier(0.22, 0.82, 0.3, 1);
}

@keyframes printPaper {
  0% { transform: translateY(-75%) scaleY(0.25); opacity: 0.25; }
  70% { transform: translateY(2%) scaleY(1.01); opacity: 1; }
  100% { transform: translateY(0) scaleY(1); }
}

.receipt-brand,
.receipt-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 800;
}

.receipt-brand {
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.receipt-rule {
  margin: 1.25rem 0;
  border-top: 1px dashed #6e6b64;
}

.receipt-meta {
  margin: 0;
  font-size: 0.68rem;
}

.receipt-meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.receipt-meta dt,
.receipt-meta dd {
  margin: 0;
}

.receipt-item {
  margin: 0 0 1.5rem;
  font-size: 0.72rem;
}

.receipt-message {
  min-height: 7.8rem;
  margin: 0;
  font-size: clamp(1.28rem, 2.5vw, 1.65rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.receipt-total {
  font-size: 0.9rem;
}

.receipt-symbol {
  width: 70px;
  height: 70px;
  margin: 2rem auto 1.15rem;
  border-radius: 50%;
  background: #111;
  box-shadow: inset 5px 0 0 rgba(255, 255, 255, 0.07);
}

.receipt-fineprint {
  margin: 0;
  font-size: 0.64rem;
  line-height: 1.45;
  text-align: center;
}

.barcode {
  width: 72%;
  height: 46px;
  margin: 1.4rem auto 0;
  background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 5px, #111 5px 6px, transparent 6px 9px);
}

.receipt-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
}

.small-button {
  min-height: 40px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #4a4842;
  background: #11110f;
  color: #c6c3b9;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.protocol-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(3rem, 8vw, 8rem);
  border-top: 1px solid var(--line);
}

.protocol-statement {
  position: sticky;
  top: 120px;
  align-self: start;
}

.protocol-statement > p:last-child {
  margin-top: 2rem;
}

.principles-grid {
  border-top: 1px solid var(--line);
}

.principles-grid article {
  display: grid;
  grid-template-columns: 50px 0.85fr 1.15fr;
  gap: 1.25rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.principles-grid span,
.principles-grid h3,
.principles-grid p {
  margin: 0;
}

.principles-grid span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.principles-grid h3 {
  font-size: 1rem;
  font-weight: 650;
}

.principles-grid p {
  color: #99968e;
  line-height: 1.6;
}

.identity-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
  min-height: 720px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.coin-frame {
  display: grid;
  place-items: center;
  min-height: 560px;
  overflow: hidden;
  background: #000;
}

.coin-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.03);
}

.identity-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 7rem);
}

.ticker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 2rem 0;
}

.ticker-row span {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
}

.archive-section .compact {
  grid-template-columns: 1fr;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.archive-grid blockquote {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding: 2rem;
  background: var(--black);
}

.archive-grid span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.archive-grid p {
  margin: 3rem 0 0;
  font-family: var(--mono);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 700;
  line-height: 1.25;
}

.verify-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: start;
  border-top: 1px solid var(--line);
}

.verify-copy > p:last-child {
  margin-top: 2rem;
}

.status-card {
  border: 1px solid var(--line);
  background: #10100f;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.status-row strong {
  color: var(--red);
}

.contract-box {
  padding: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.contract-box span {
  display: block;
  margin-bottom: 0.7rem;
  color: #77756f;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.contract-box code {
  color: #ddd9cf;
  font-family: var(--mono);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.official-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.official-links button,
.official-links a {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  background: #0c0c0b;
  color: #6d6b65;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-decoration: none;
}

.official-links a {
  color: var(--paper);
}

.risk-note {
  margin: 0;
  padding: 1.4rem;
  color: #79766f;
  font-size: 0.78rem;
  line-height: 1.55;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 150px;
  padding: 2rem;
  border-top: 1px solid var(--line);
  color: #7c7972;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

footer p {
  margin: 0;
}

footer p:last-child {
  justify-self: end;
}

.footer-wordmark {
  opacity: 0.7;
}

.toast {
  position: fixed;
  z-index: 110;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: min(360px, calc(100% - 3rem));
  padding: 0.9rem 1.1rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  transform: translateY(160%);
  transition: transform 220ms ease;
}

.toast.visible {
  transform: translateY(0);
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 1rem;
  }

  nav {
    display: none;
  }

  .header-status {
    font-size: 0.62rem;
  }

  .hero-copy {
    width: calc(100% - 2rem);
    margin: 0 1rem;
    padding-bottom: 4rem;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.4) 100%),
      linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
  }

  .hero-index {
    display: none;
  }

  .section-heading,
  .printer-layout,
  .protocol-section,
  .identity-section,
  .verify-section {
    grid-template-columns: 1fr;
  }

  .section-heading .kicker {
    margin-bottom: -0.5rem;
  }

  .control-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .preset-block {
    padding-top: 2rem;
  }

  .protocol-statement {
    position: static;
  }

  .identity-copy {
    order: -1;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

  .archive-grid blockquote {
    min-height: 200px;
  }

  footer {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  footer p:last-child {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 64px;
  }

  .wordmark {
    font-size: 0.66rem;
  }

  .wordmark-mark {
    width: 18px;
    height: 23px;
  }

  .header-status {
    gap: 0.35rem;
  }

  h1 {
    font-size: clamp(3.7rem, 18vw, 5.4rem);
  }

  .hero-image {
    object-position: 64% center;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .print-section,
  .protocol-section,
  .archive-section,
  .verify-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .printer-stage {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .receipt {
    min-height: 560px;
    padding: 1.7rem 1.35rem 2.5rem;
  }

  .receipt-message {
    font-size: 1.3rem;
  }

  .principles-grid article {
    grid-template-columns: 36px 1fr;
  }

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

  .official-links {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
