/* ============================================================
   ████████ // $REDACTED — classified document stylesheet
   ============================================================ */

:root {
  --paper: #f1eee2;
  --paper-2: #e8e4d3;
  --ink: #191712;
  --ink-soft: #3a372d;
  --muted: #7a7462;
  --stamp: #a83226;
  --line: rgba(25, 23, 18, 0.22);
  --line-strong: rgba(25, 23, 18, 0.55);
}

/* site-wide dark theme — nav toggle, preference cached in localStorage */
html[data-theme="dark"] {
  --paper: #100e0a;
  --paper-2: #1b1812;
  --ink: #f1eee2;
  --ink-soft: #d8d3c2;
  --muted: #8f8a79;
  --stamp: #d4553f;
  --line: rgba(241, 238, 226, 0.2);
  --line-strong: rgba(241, 238, 226, 0.45);
}
html[data-theme="dark"] body {
  background-image:
    repeating-linear-gradient(0deg, rgba(241,238,226,0.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(241,238,226,0.016) 0 1px, transparent 1px 4px);
}
html[data-theme="dark"] .stat-value.up,
html[data-theme="dark"] .stat-sub.up { color: #6fbf77; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.6rem; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { background: var(--ink); color: var(--paper); }
.theme-toggle svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Mono", "Courier New", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* faint paper fibre */
  background-image:
    repeating-linear-gradient(0deg, rgba(25,23,18,0.014) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(25,23,18,0.010) 0 1px, transparent 1px 4px);
}

::selection { background: var(--ink); color: var(--paper); }

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

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- classification banners ---------- */
.class-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 0.4rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
.banner-file { opacity: 0.55; }
.banner-bottom {
  position: relative;
  top: auto;
  bottom: 0;
}
@media (max-width: 560px) { .banner-file { display: none; } }

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 0.95rem;
}
.brand-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-bars i {
  display: block;
  width: 26px;
  height: 8px;
  background: var(--ink);
}
.nav-links {
  display: flex;
  gap: 1.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.nav-links a {
  text-decoration: none;
  position: relative;
  padding: 0.2rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: var(--ink);
  transition: right 0.25s ease;
}
.nav-links a:hover::after { right: 0; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
}
.btn:active { transform: translate(1px, 1px); }
.btn-solid {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--muted);
}
.btn-solid:hover { background: var(--stamp); border-color: var(--stamp); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--muted);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-big { font-size: 0.8rem; padding: 0.9rem 1.6rem; }
.btn-copy { background: transparent; }

/* ---------- hero ---------- */
.hero { padding: 2.5rem 1.5rem 0; }

.hero-doc {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  box-shadow: 6px 6px 0 rgba(25, 23, 18, 0.12);
}
.doc-head, .doc-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.doc-foot { border-bottom: none; border-top: 1px solid var(--line); }

.hero-body {
  padding: 3rem 2rem 3.5rem;
  text-align: center;
}

.hero-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}
.hero-logo {
  width: 132px;
  height: 132px;
  border: 1px solid var(--line-strong);
  filter: grayscale(1) contrast(1.05);
}
.stamp {
  display: inline-block;
  border: 3px double var(--stamp);
  color: var(--stamp);
  font-weight: 700;
  letter-spacing: 0.3em;
  padding: 0.25rem 0.9rem 0.25rem 1.15rem;
  transform: rotate(-8deg);
  opacity: 0.85;
  text-transform: uppercase;
  pointer-events: none;
}
.stamp-hero {
  position: absolute;
  right: -56px;
  bottom: -14px;
  font-size: 0.62rem;
}
@media (max-width: 560px) { .stamp-hero { right: -30px; } }

.kicker {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55em;
  margin-bottom: 1.8rem;
}
.bar {
  display: block;
  background: var(--ink);
  height: clamp(2.6rem, 7vw, 4.4rem);
  position: relative;
  overflow: hidden;
}
.bar::after {  /* subtle sheen sweep */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(241,238,226,0.14) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sheen 7s ease-in-out infinite;
}
.bar-xl { width: min(78%, 560px); }
.bar-lg { width: min(64%, 460px); }
@keyframes sheen {
  0%, 55% { transform: translateX(-100%); }
  75%, 100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) { .bar::after { animation: none; } }

.hero-tag {
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  line-height: 1.9;
  margin-bottom: 2.2rem;
}

/* redacted spans */
.rx {
  background: var(--ink);
  color: transparent;
  padding: 0 0.35em;
  cursor: help;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.rx[data-rx]:hover,
.rx[data-rx]:focus-visible {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.ca-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 720px;
  margin: 0 auto 2.4rem;
  padding: 0.65rem 0.9rem;
  border: 1px dashed var(--line-strong);
  background: var(--paper);
  font-size: 0.72rem;
}
.ca-label { letter-spacing: 0.2em; color: var(--muted); flex-shrink: 0; }
.ca-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* marquee */
.marquee {
  max-width: 960px;
  margin: 2.5rem auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 0.55rem 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- sections ---------- */
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 1.5rem 1.5rem;
}
.section-head { margin-bottom: 2.2rem; }
.section-head h2 {
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  letter-spacing: 0.14em;
  border-bottom: 2px solid var(--ink);
  display: inline-block;
  padding-bottom: 0.4rem;
}
.sec-no { color: var(--stamp); margin-right: 0.6em; }
.section-sub {
  margin-top: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.section-sub a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
@media (max-width: 860px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card {
  background: var(--paper-2);
  padding: 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 118px;
}
.stat-label {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  color: var(--muted);
}
.stat-value {
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  word-break: break-all;
}
.stat-value.up { color: #2e6b34; }
.stat-value.down { color: var(--stamp); }
.stat-sub {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.stat-sub.up { color: #2e6b34; }
.stat-sub.down { color: var(--stamp); }
.stat-note {
  margin-top: 1rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* rewards */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 760px) { .reward-grid { grid-template-columns: 1fr; } }
.reward-card {
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  padding: 1.8rem 1.5rem;
  position: relative;
}
.reward-no {
  font-size: 2.2rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  letter-spacing: 0.05em;
}
.reward-card h3 {
  margin: 0.7rem 0 0.6rem;
  letter-spacing: 0.2em;
  font-size: 1rem;
}
.reward-card p { font-size: 0.82rem; color: var(--ink-soft); }

/* treasury ledger (ZEC paid to holders) */
.ledger {
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 5px 5px 0 rgba(25, 23, 18, 0.12);
}
.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
}
.ledger-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}
.ledger-link {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--paper);
}
.ledger-link:hover { color: #d8c9a3; border-color: #d8c9a3; }
.ledger-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1px;
  background: var(--line-strong);
}
@media (max-width: 760px) { .ledger-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .ledger-grid { grid-template-columns: 1fr; } }
.ledger-cell {
  background: var(--paper-2);
  padding: 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 104px;
}
.ledger-cell-hero { background: var(--paper); }
.ledger-cell-hero .stat-value { color: var(--stamp); }
.ledger-time { font-size: clamp(0.95rem, 2vw, 1.1rem); }
.ledger-note {
  padding: 0.55rem 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.classified-note {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  border: 1px dashed var(--line-strong);
  padding: 1.4rem 1.6rem;
}
.classified-note .stamp { font-size: 0.7rem; }
.classified-note p { font-size: 0.78rem; letter-spacing: 0.08em; }

/* chart */
.chart-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  aspect-ratio: 16 / 9;
  max-height: 560px;
}
.chart-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.chart-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(45deg, rgba(25,23,18,0.05) 0 12px, transparent 12px 24px),
    var(--paper-2);
  border: 0;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: background 0.15s ease;
}
.chart-cover:hover { background: var(--paper); }
.chart-cover-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.25em;
}
.chart-cover-sub {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* steps */
.steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line-strong);
}
.steps li {
  display: flex;
  gap: 1.6rem;
  align-items: baseline;
  padding: 1.3rem 0.4rem;
  border-bottom: 1px solid var(--line);
}
.step-no {
  flex-shrink: 0;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--stamp);
  font-weight: 700;
}
.steps p { font-size: 0.88rem; }
.steps a { text-decoration: underline; text-underline-offset: 3px; }
.inline-ca {
  font-size: 0.72rem;
  background: var(--paper-2);
  border: 1px dashed var(--line-strong);
  padding: 0.15rem 0.45rem;
  word-break: break-all;
}

/* ---------- footer ---------- */
.footer {
  margin-top: 6rem;
  border-top: 2px solid var(--ink);
  padding: 2.5rem 1.5rem 3rem;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: 600;
}
.footer-ca { color: var(--muted); font-weight: 400; }
.footer-ca code { word-break: break-all; }
.footer-links {
  display: flex;
  gap: 1.8rem;
}
.footer-links a { text-decoration: none; border-bottom: 1px solid var(--ink); }
.footer-links a:hover { background: var(--ink); color: var(--paper); }
.footer-legal {
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.9;
  letter-spacing: 0.08em;
}

/* ---------- back to top ---------- */
#to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 2.6rem;
  z-index: 60;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--muted);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.12s ease;
}
#to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
#to-top:hover { background: var(--stamp); border-color: var(--stamp); }

/* reveal on scroll */
.section, .hero-doc { will-change: transform, opacity; }
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
