/* MAD LADS STRATEGY — "Mad Rag" newsprint edition
   Paper, ink, Backpack red. Condensed headlines, typewriter numbers. */
:root {
  --paper: #ebe2cc;
  --paper-2: #e1d7bc;
  --paper-3: #d6cbae;
  --ink: #141210;
  --ink-2: #3a352d;
  --muted: #6b6456;
  --rule: #141210;
  --red: #e33e3f;      /* Backpack red */
  --red-2: #c7302f;
  --display: 'Anton', 'Oswald', Impact, sans-serif;
  --label: 'Oswald', 'Arial Narrow', sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'Courier Prime', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: 0.005em; text-transform: uppercase; line-height: 0.95; }
h2 { font-size: clamp(34px, 5vw, 56px); }
h3 { font-size: 26px; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.red { color: var(--red); }
.muted { color: var(--muted); }
.center { text-align: center; }
.r { text-align: right; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; }
.label { font-family: var(--label); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.link { color: var(--red); border-bottom: 2px solid var(--red); font-family: var(--label); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.kicker { font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }

/* paper grain overlay */
.paper-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.3  0 0 0 0 0.22  0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body > * { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.topbar { background: var(--ink); color: var(--paper); font-family: var(--label); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 40px; }
.topbar em { font-style: normal; color: #b8ad93; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--red); border-color: var(--red); }

/* ---------- masthead ---------- */
.masthead { padding: 26px 0 0; border-bottom: 4px solid var(--rule); }
.masthead-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.issue { color: var(--ink-2); line-height: 1.7; }
.issue-r { text-align: right; }
.issue .dot { margin-right: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; vertical-align: middle; box-shadow: 0 0 0 3px rgba(227,62,63,.18); }

.wordmark { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; padding: 6px 12px 6px 60px; transform: skewX(-12deg); line-height: .82; }
.wm-line { font-family: var(--display); font-size: clamp(64px, 9vw, 112px); color: var(--ink); letter-spacing: .01em; }
.wm-line + .wm-line { color: var(--red); margin-top: 2px; }
.wm-tag { display: block; margin-top: 10px; padding: 4px 10px; background: var(--ink); color: var(--paper); font-family: var(--label); font-weight: 700; font-size: clamp(13px, 1.6vw, 20px); letter-spacing: .42em; text-indent: .42em; line-height: 1; align-self: stretch; text-align: center; }
.bolt { position: absolute; left: 6px; top: 8px; bottom: 8px; width: 44px; background: var(--red); clip-path: polygon(48% 0, 100% 0, 60% 46%, 84% 46%, 22% 100%, 38% 58%, 12% 58%); }
.masthead-sub { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-family: var(--label); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- front page ---------- */
.front { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; padding: 44px 0 24px; align-items: start; }
.front-main { position: relative; padding-right: 20px; border-right: 1px solid var(--rule); }
.front h1 { font-size: clamp(56px, 9vw, 118px); line-height: .9; }
.dek { font-size: 20px; line-height: 1.45; margin-top: 22px; max-width: 560px; color: var(--ink-2); }
.dek strong { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; font-family: var(--label); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); transition: transform .12s, box-shadow .12s; cursor: pointer; background: var(--paper); color: var(--ink); }
.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); }
.btn-ink { background: var(--paper); }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.brief { list-style: none; margin: 28px 0 0; padding: 14px 0 0; border-top: 1px dotted var(--ink); display: grid; gap: 6px; color: var(--ink-2); }
.brief b { color: var(--ink); font-weight: 700; margin-right: 6px; }
.stamp { position: absolute; right: 26px; bottom: -6px; transform: rotate(-8deg); font-family: var(--display); text-transform: uppercase; font-size: 22px; line-height: 1; color: var(--red); border: 4px solid var(--red); padding: 8px 12px; opacity: .8; letter-spacing: .04em; pointer-events: none; }

/* treasury report box */
.report { border: 3px solid var(--ink); background: var(--paper-2); box-shadow: 8px 8px 0 var(--ink); padding: 16px 18px 14px; }
.report-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 26px; text-transform: uppercase; border-bottom: 3px solid var(--ink); padding-bottom: 8px; }
.gauge-wrap { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-top: 8px; }
.gauge { width: 100%; max-width: 220px; height: auto; display: block; margin: 0 auto; }
#gauge-fill { transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
#gauge-wave { animation: wave 3.2s linear infinite; }
@keyframes wave { from { transform: translateX(0); } to { transform: translateX(100px); } }
.gauge-target { text-align: right; min-width: 130px; }
.gauge-need { font-family: var(--display); font-size: 44px; line-height: 1; margin: 4px 0; }
.gauge-need small { font-family: var(--label); font-size: 14px; letter-spacing: .1em; color: var(--muted); }
.report-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px dotted var(--ink); }
.num { font-family: var(--mono); font-weight: 700; font-size: 20px; }
.report-note { margin-top: 12px; color: var(--muted); font-size: 11px; }

/* ---------- in brief stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 24px; border-top: 4px double var(--rule); border-bottom: 4px double var(--rule); }
.stat { padding: 18px 20px; border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat-v { font-family: var(--display); font-size: 40px; line-height: 1.05; margin: 6px 0 2px; }
.stat-v small { font-family: var(--label); font-size: 14px; letter-spacing: .1em; color: var(--muted); }
.stat-s { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 64px 0 0; }
.rule-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--rule); padding-bottom: 8px; margin-bottom: 22px; }
.rule-tag { font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .18em; color: var(--red); text-transform: uppercase; }

/* spotlight */
.spotlight { display: grid; grid-template-columns: 360px 1fr; gap: 32px; align-items: start; margin-bottom: 48px; }
.spot-frame { position: relative; display: block; aspect-ratio: 1; border: 4px solid var(--ink); background: var(--red); box-shadow: 10px 10px 0 var(--ink); overflow: hidden; }
.spot-frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.05) saturate(1.05); }
.spot-badge { position: absolute; left: -4px; top: 18px; background: var(--red); color: #fff; font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .16em; padding: 6px 12px 6px 14px; border: 3px solid var(--ink); border-left: 0; }
.spot-copy h3 { font-size: clamp(40px, 5vw, 64px); }
.spot-copy .dek { margin-top: 12px; font-size: 18px; }
.manifesto { margin-top: 22px; border: 2px solid var(--ink); padding: 14px 16px; background: var(--paper-2); }
.manifesto p { margin-top: 6px; font-style: italic; font-size: 17px; }

/* vault */
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.lad { position: relative; display: block; border: 3px solid var(--ink); background: var(--paper-2); box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.lad:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.lad img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-bottom: 3px solid var(--ink); }
.lad .tag { display: block; padding: 6px 8px; font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.lad-more { display: grid; place-items: center; text-align: center; aspect-ratio: 1 / 1.22; }
.lad-more b { display: block; font-family: var(--display); font-size: 40px; color: var(--red); line-height: 1; }
.lad-more .mono { font-family: var(--label); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.vault-empty[hidden] { display: none; }
.vault-empty { grid-column: 1 / -1; border: 3px dashed var(--ink); padding: 40px 20px; text-align: center; display: grid; gap: 8px; font-size: 18px; }
.bench { margin-top: 26px; padding: 16px 18px; border: 2px solid var(--ink); background: var(--paper-2); }
.bench-l { margin-bottom: 12px; }
.bench-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.bench-item { display: flex; gap: 12px; align-items: center; }
.bench-item img { width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--ink); background: var(--paper); }
.bench-item .n { font-family: var(--label); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.bench-item .p { font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--red); }

/* the method */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.step { padding: 22px 20px 26px; border-right: 1px solid var(--rule); }
.step:last-child { border-right: 0; }
.step-n { font-family: var(--display); font-size: 44px; color: var(--red); line-height: 1; margin-bottom: 10px; }
.step h3 { font-size: 24px; }
.step p { margin-top: 10px; font-size: 16px; color: var(--ink-2); }

/* ledger */
.table-wrap { overflow-x: auto; border: 3px solid var(--ink); background: var(--paper-2); }
.log-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
.log-table th { text-align: left; font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 12px 16px; border-bottom: 3px solid var(--ink); }
.log-table th.r { text-align: right; }
.log-table td { padding: 12px 16px; border-bottom: 1px dotted var(--ink); }
.log-table tr:last-child td { border-bottom: 0; }
.log-table .lad-cell { display: flex; align-items: center; gap: 10px; }
.log-table .lad-cell img { width: 34px; height: 34px; border: 2px solid var(--ink); }
.log-table .paid { font-weight: 700; color: var(--red); }
.log-table .link { border-bottom: 0; font-family: var(--mono); text-transform: none; letter-spacing: 0; }

/* token */
.token-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.token-card, .rules-card { border: 3px solid var(--ink); background: var(--paper-2); padding: 22px; box-shadow: 6px 6px 0 var(--ink); }
.ca-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 18px; }
.ca-row code { flex: 1; padding: 10px 12px; border: 2px solid var(--ink); background: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.icon-btn { background: var(--paper); border: 2px solid var(--ink); color: var(--ink); width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.icon-btn:hover { background: var(--red); color: #fff; }
.token-rows { margin: 0; display: grid; gap: 8px; }
.token-rows > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--ink); padding-bottom: 6px; }
.token-rows dt { color: var(--muted); }
.token-rows dd { margin: 0; text-align: right; }
.token-card .cta-row { margin-top: 20px; }
.rules { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.rules li { padding-left: 22px; position: relative; color: var(--ink-2); font-size: 17px; }
.rules li::before { content: ''; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; background: var(--red); border: 2px solid var(--ink); }
.rules b { color: var(--ink); font-weight: 700; }

/* faq */
.faq { display: grid; gap: 0; border-top: 1px solid var(--rule); }
details { border-bottom: 1px solid var(--rule); padding: 0 4px; }
summary { cursor: pointer; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; font-family: var(--label); font-weight: 600; font-size: 17px; letter-spacing: .02em; }
summary::after { content: '+'; color: var(--red); font-family: var(--display); font-size: 22px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { padding: 0 0 18px; color: var(--ink-2); max-width: 780px; }

/* footer */
.footer { margin-top: 72px; }
.band { background: var(--red); color: var(--ink); padding: 18px 0; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.band-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.band-title { font-family: var(--display); font-size: clamp(34px, 6vw, 68px); text-transform: uppercase; line-height: 1; letter-spacing: .01em; }
.band-sub { font-family: var(--label); font-weight: 700; font-size: 14px; letter-spacing: .2em; }
.footer-inner { padding: 26px 0 40px; display: grid; gap: 14px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { border-bottom: 1px solid var(--ink); }
.footer-links a:hover { color: var(--red); border-color: var(--red); }
.disclaimer { font-size: 14px; color: var(--muted); max-width: 760px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border: 2px solid var(--red); font-family: var(--label); letter-spacing: .1em; text-transform: uppercase; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 5; }
.toast.show { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .masthead-row { grid-template-columns: 1fr; text-align: center; }
  .issue, .issue-r { text-align: center; }
  .wordmark { margin: 0 auto; }
  .front { grid-template-columns: 1fr; }
  .front-main { border-right: 0; padding-right: 0; }
  .stamp { position: static; display: inline-block; margin-top: 24px; transform: rotate(-4deg); }
  .stats, .steps { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2), .step:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2), .step:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .bench-grid { grid-template-columns: repeat(2, 1fr); }
  .token-grid { grid-template-columns: 1fr; }
  .spotlight { grid-template-columns: 1fr; }
  .spot-frame { max-width: 360px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .topbar-r { display: none; }
  .stats, .steps, .bench-grid { grid-template-columns: 1fr; }
  .stat, .step { border-right: 0; border-bottom: 1px solid var(--rule); }
  .gauge-wrap { grid-template-columns: 1fr; }
  .gauge-target { text-align: left; }
  .report { box-shadow: 5px 5px 0 var(--ink); }
}
