/* Advanced Monkey Dopamine. One system: cream lab ground, ink, lever red for the action, pellet amber for pellets
   and dopamine, graph-paper blue for the record. Libre Caslon for the protocol voice, Work Sans for everything read
   and counted, IBM Plex Mono only for addresses, signatures and the prompt. Spacing 8/16/24/32/48/64/96. */
:root {
  --ground: #f5e9d8;
  --paper: #fbf7ef;
  --grid: #9db7c9;
  --ink: #1b1b1b;
  --ink-2: #4a4640;
  --red: #c8372d;
  --red-deep: #a32a22;
  --amber: #e0a21b;
  --amber-deep: #8a5a00;
  --steel: #8c8a86;
  --rule: rgba(27, 27, 27, 0.16);
  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --wrap: 1240px;
  --gut: 64px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 18px/1.55 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
b, strong { font-weight: 650; }
.mono { font-family: var(--mono); font-variant-numeric: normal; }

/* ---------- top row ---------- */
.bar { position: relative; z-index: 20; }
.bar .wrap { display: flex; align-items: center; gap: var(--s4); height: 72px; position: relative; }
.bar .wrap::after { content: ""; position: absolute; left: var(--gut); right: var(--gut); bottom: 0; height: 1px; background: var(--ink); }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 400 22px/1 var(--serif); letter-spacing: -0.01em; white-space: nowrap; }
.mark img { width: 36px; height: 36px; }
.nav { display: flex; gap: var(--s4); margin: 0 auto; }
.nav a { font: 500 17px/1 var(--sans); text-decoration: none; padding: 12px 2px; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.nav a:hover::after { background: var(--rule); }
.nav a[aria-current="page"]::after { background: var(--red); }
.series-chip {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 20px; border: 1px solid var(--ink);
  border-radius: 999px; font: 500 16px/1 var(--sans); white-space: nowrap; background: var(--paper); text-decoration: none;
}
.series-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(224, 162, 27, 0.25); }
.series-chip.live i { background: var(--red); box-shadow: 0 0 0 3px rgba(200, 55, 45, 0.22); }
.menu-btn { display: none; }

/* ---------- type ---------- */
.over { margin: 0; font: 600 16px/1.2 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.title { margin: 0; font: 400 48px/1.05 var(--display); letter-spacing: -0.01em; }
.lede-line { margin: 0; max-width: 62ch; color: var(--ink-2); }
.sec-head { display: grid; gap: var(--s2); margin-bottom: var(--s5); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px;
  font: 600 18px/1 var(--sans); text-decoration: none; border: 1.5px solid var(--ink); border-radius: 2px; cursor: pointer;
  background: var(--paper); transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out), background 120ms;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn:hover { background: #fff; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--red); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--red-deep); }
.btn[aria-disabled="true"], .btn:disabled { cursor: not-allowed; opacity: 1; background: transparent; color: var(--ink-2); box-shadow: none; border-style: dashed; }
.btn img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- the contract line ---------- */
.ca { display: grid; gap: var(--s1); padding: 12px; background: var(--paper); border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.ca-field {
  min-width: 0; min-height: 48px; display: block; padding: 12px 16px; border: 1px solid var(--rule); background: #fff;
  font: 400 16px/1.35 var(--sans); color: var(--ink-2);
}
.ca-field b { color: var(--ink); }
.ca-field .addr { font: 500 16px/1.35 var(--mono); color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.ca-top { display: grid; grid-template-columns: 1fr auto; gap: var(--s1); }
.ca-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s1); }
.ca-row .btn, .ca-top .btn { min-height: 48px; padding: 0 20px; box-shadow: none; font-size: 16px; gap: 8px; }
.ca-copy { background: var(--ink); color: var(--paper); border-color: var(--ink); min-width: 96px; }
.ca-copy:hover { background: #3a3733; }
.ca-copy[aria-disabled="true"], .ca-copy[aria-disabled="true"]:hover { background: transparent; color: var(--ink-2); }
.ca-copy.ok:hover { background: var(--amber); }
.ca-copy.ok { background: var(--amber); color: var(--ink); }

/* ---------- section rhythm ---------- */
section.block { padding: var(--s7) 0 0; }
section.block:last-of-type { padding-bottom: var(--s7); }
.sheet { background: var(--paper); border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: var(--s4); }

@media (max-width: 1100px) {
  :root { --gut: 32px; }
  .nav { gap: var(--s3); }
}
@media (max-width: 860px) {
  :root { --gut: 20px; }
  body { font-size: 17px; }
  .bar .wrap { height: 64px; gap: var(--s2); }
  .mark { font-size: 18px; white-space: normal; line-height: 1.1; min-width: 0; }
  .mark img { width: 32px; height: 32px; }
  .nav, .bar .series-chip { display: none; }
  .menu-btn {
    display: inline-flex; margin-left: auto; min-height: 48px; padding: 0 20px; align-items: center; border: 1.5px solid var(--ink);
    background: var(--paper); font: 600 16px/1 var(--sans); cursor: pointer; border-radius: 2px;
  }
  .drawer[open] { display: grid; }
  .title { font-size: 36px; }
}
.drawer {
  display: none; position: fixed; inset: 0; z-index: 60; background: rgba(27, 27, 27, 0.35); border: 0; padding: 0; margin: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
}
.drawer::backdrop { background: rgba(27, 27, 27, 0.35); }
.drawer-panel { margin-left: auto; width: min(340px, 88vw); height: 100%; background: var(--ground); border-left: 1px solid var(--ink); padding: var(--s3); display: grid; align-content: start; gap: var(--s1); }
.drawer-panel a { font: 400 30px/1.2 var(--display); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.drawer-panel a[aria-current="page"] { color: var(--red); }
.drawer-close { justify-self: end; margin-bottom: var(--s2); }
@media (max-width: 360px) { .mark { font-size: 16px; } .mark img { width: 28px; height: 28px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; } }
