:root {
  --bg: #000000;
  --text: #e6e6e6;
  --muted: #6a6a6a;
  --dim: #9a9a9a;
  --line: #171717;
  --code: #8fb8e6;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #1f1f1f; }

.wrap { max-width: 620px; margin: 0 auto; padding: 0 28px; }

/* header */
header { border-bottom: 1px solid var(--line); }
.nav {
  max-width: 620px; margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
/* shared neon gradient for the top bar */
@keyframes gradshift { to { background-position: 200% 50%; } }
.brand, .ca, .ca .lbl, .ca .addr {
  background: linear-gradient(90deg, #2e9bff, #39d353, #a6f21a, #ff4438, #2e9bff);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradshift 6s linear infinite;
}
.brand {
  font-family: var(--mono); font-size: 15px; font-weight: 600;
  letter-spacing: 0.5px; text-decoration: none;
}
.links { display: flex; align-items: center; gap: 18px; }
.links a { display: inline-flex; transition: filter 0.15s; }
.links a:hover { filter: brightness(1.3) saturate(1.25); }

/* contract address */
.ca { font-family: var(--mono); font-size: 12px; letter-spacing: 0.3px; }

/* logo */
.logo { display: flex; justify-content: center; padding: 96px 0 72px; }
.logo img { width: 200px; height: auto; display: block; }

/* dev note */
.devnote { position: relative; padding: 2px 0 2px 22px; margin-bottom: 8px; }
.devnote::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #2e9bff, #39d353, #a6f21a, #ff4438);
}
.devnote h2 { margin-bottom: 16px; }
.devnote p { color: var(--dim); margin: 0 0 14px; font-size: 15px; }
.devnote p:last-child { margin-bottom: 0; }
.devnote em { font-style: normal; color: var(--text); }
.devnote .sig { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 18px; }

/* intro */
.intro { padding-bottom: 8px; }
.intro p {
  font-size: 17px; line-height: 1.75; margin: 0; letter-spacing: -0.1px;
  background: linear-gradient(90deg, #2e9bff, #39d353, #a6f21a, #ff4438, #2e9bff);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradshift 8s linear infinite;
}
.intro code.f { -webkit-text-fill-color: var(--code); }

code {
  font-family: var(--mono); font-size: 0.88em; color: #cfcfcf;
  background: #0b0b0b; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
/* the one accented value on the whole site */
code.f { color: var(--code); }

hr { border: none; border-top: 1px solid var(--line); margin: 48px 0; }

/* section headings */
h2 {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted);
  margin: 0 0 20px; display: flex; align-items: center; gap: 9px;
}
h2::before {
  content: ""; width: 16px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #2e9bff, #a6f21a);
}

/* ascii diagrams */
.asciiart {
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  white-space: pre; overflow-x: auto; color: var(--dim);
  border: 1px solid var(--line); border-radius: 10px;
  background: #060809; padding: 18px 20px; margin: 4px 0 14px;
}
.asciiart .flow { color: #47606e; }
.asciiart .k { color: #d3e2f0; }
.asciiart .f { color: var(--code); }
.asciiart .hit { color: var(--red); }
.asciiart .cap { color: var(--muted); }
.dcap { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 0 0 26px; }

/* claim callout */
.claim {
  position: relative; border: 1px solid var(--line); border-radius: 12px;
  background: #070809; padding: 18px 22px 18px 26px; margin: 4px 0 22px;
  color: var(--text); font-size: 15.5px; line-height: 1.7;
}
.claim::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, #2e9bff, #39d353, #a6f21a, #ff4438);
}
.claim .f { font-family: var(--mono); color: var(--code); font-size: 0.92em; }

/* lore */
.lore p { color: var(--dim); margin: 0 0 18px; }
.lore em { font-style: normal; color: var(--text); }
.lore .cite { font-size: 13px; color: var(--muted); margin-top: 24px; }
.lore .cite a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--line); }
.lore .cite a:hover { color: var(--text); border-bottom-color: var(--muted); }

/* diagrams */
.diagram { margin: 6px 0 30px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram text { font-family: var(--mono); text-anchor: middle; fill: var(--dim); font-size: 12px; }
.diagram .node rect, .diagram .snode circle { fill: #070707; stroke: var(--line2); stroke-width: 1; }
.diagram .node.open rect { stroke-dasharray: 3 4; }
.diagram .node text, .diagram .snode text { fill: var(--text); font-size: 12.5px; }
.diagram .node .sub { fill: var(--muted); font-size: 9.5px; }
.diagram .snode.dead circle { stroke: #333; }
.diagram .snode.dead text { fill: var(--muted); }
.diagram text.acc { fill: var(--code); font-size: 12px; }
.diagram .lab { fill: var(--muted); font-size: 10.5px; }
.diagram line, .diagram path { stroke: #4f4f4f; stroke-width: 1; }
.diagram figcaption { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.5; }

/* prose sections */
.why p, .ledger p { color: var(--dim); margin: 0 0 18px; }
.why p:last-child, .ledger p:last-child { margin-bottom: 0; }

/* notes / qa */
.qa { padding: 16px 0; border-top: 1px solid var(--line); }
.qa:first-of-type { border-top: none; padding-top: 0; }
.qa .q { margin: 0 0 6px; color: var(--text); font-size: 14.5px; font-weight: 600; }
.qa .a { margin: 0; color: var(--dim); font-size: 14px; }

/* how it works */
.mech .step { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.mech .step:first-of-type { border-top: none; padding-top: 0; }
.mech .step .n { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.mech h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.mech .step p { margin: 0; color: var(--dim); font-size: 14px; }

/* labelled rows (states, status) */
.srow { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline; }
.srow:first-of-type { border-top: none; }
.srow .k { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.srow p { margin: 0; color: var(--dim); font-size: 14px; }

/* spec */
.spec dl { margin: 0; font-family: var(--mono); font-size: 13.5px; }
.spec dl > div {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.spec dl > div:first-child { border-top: none; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; color: var(--dim); }

/* falling owl eyes */
.eyefield { position: fixed; top: 0; bottom: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.eyefield.left { left: 0; }
.eyefield.right { right: 0; }
.eye {
  position: absolute; font-family: var(--mono); font-size: 15px; line-height: 1;
  white-space: nowrap; filter: drop-shadow(0 0 5px currentColor); opacity: .85; user-select: none;
}
@media (max-width: 900px) { .eyefield { display: none; } }

/* footer */
footer {
  max-width: 620px; margin: 96px auto 0; padding: 24px 28px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}

@media (max-width: 560px) {
  .logo { padding: 64px 0 52px; }
  .logo img { width: 160px; }
  .intro p { font-size: 16px; }
  .spec dl > div,
  .srow { grid-template-columns: 92px 1fr; gap: 12px; }
  footer { flex-direction: column; gap: 6px; }
}
