@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* Monochrome, square, thin: taken from the INNERNET wordmark.
   The signature device is the logo's closing pair "[" + "⌝":
   a frame open at the bottom right. See .frame below. */
:root {
  --bg: #000000;
  --surface: #0A0A0A;
  --surface-2: #121212;
  --border: #222222;
  --border-2: #333333;
  --frame: #A3A3A3;
  --text: #EDEDED;
  --muted: #A8A8A8;
  --dim: #8A8A8A;      /* 5.9:1 on black, readable at small sizes */
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
  --step: clamp(80px, 10vw, 128px);
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--text); }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.skip { position: absolute; left: 12px; top: -48px; padding: 8px 14px; background: #fff; color: #000; z-index: 100; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4 { margin: 0; color: var(--text); }
h1 {
  font-size: clamp(2.4rem, 4.3vw, 3.7rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
h1 .soft { color: #8F8F8F; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 300; line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
h3 { font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; color: var(--muted); max-width: 64ch; text-wrap: pretty; }

/* The bracket frame: "[" on the left, "⌝" at top right, open at bottom right. */
.frame { position: relative; border: 1px solid var(--border); }
.frame::before, .frame::after { content: ""; position: absolute; pointer-events: none; }
.frame::before {
  left: -1px; top: -1px; bottom: -1px; width: 18px;
  border: 2px solid var(--frame); border-right: 0;
}
.frame::after {
  right: -1px; top: -1px; width: 18px; height: 18px;
  border-top: 2px solid var(--frame); border-right: 2px solid var(--frame);
}

/* Buttons: square, like the wordmark */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px;
  border: 1px solid var(--border-2);
  font-weight: 500; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm { height: 34px; padding: 0 14px; font-size: 0.875rem; }
.btn-light { background: #fff; color: #000; border-color: #fff; }
.btn-light:hover { background: #D4D4D4; border-color: #D4D4D4; color: #000; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: #4A4A4A; }

.gh { width: 16px; height: 16px; flex: none; }
.btn .gh { margin-right: 8px; }
.with-icon { display: flex; width: fit-content; align-items: center; gap: 8px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-row { display: flex; align-items: center; gap: 36px; height: 64px; }
.brand { display: inline-flex; padding: 4px 0; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 8px; margin-left: auto; }

/* Hero */
.hero { position: relative; padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 104px); overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 25%, transparent 75%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero-figure { margin: 0; background: rgba(10, 10, 10, 0.9); padding: clamp(20px, 2.5vw, 32px); }
.hero-figure figcaption { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); }
.hero-facts { list-style: none; margin: 36px 0 0; padding: 20px 0 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 0.85rem; color: var(--dim); align-self: stretch; }
.hero-facts li { position: relative; padding-left: 14px; }
.hero-facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; background: var(--dim); }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 12px; margin-bottom: 32px;
  border: 1px solid var(--border-2);
  background: rgba(10, 10, 10, 0.85);
  color: var(--muted); font-size: 0.85rem; text-decoration: none;
}
.pill:hover { color: var(--text); border-color: #4A4A4A; }
.pill .dot { width: 6px; height: 6px; background: var(--text); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.15rem); line-height: 1.6; margin: 24px 0 0; max-width: 46ch; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.notfound .actions { justify-content: center; }

/* Terminal */
.terminal {
  width: 100%; text-align: left;
  background: var(--surface);
  scroll-margin-top: 96px;
}
.term-bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 12px 0 22px; border-bottom: 1px solid var(--border); }
.term-title { color: var(--dim); font-size: 0.8rem; font-family: var(--mono); flex: 1; }
.copy {
  font: inherit; font-size: 0.8rem; color: var(--muted);
  background: transparent; border: 1px solid var(--border-2);
  height: 28px; padding: 0 10px; cursor: pointer;
}
.copy:hover { color: var(--text); border-color: #4A4A4A; }
.term-body { margin: 0; padding: 20px 22px; overflow-x: auto; font-size: 0.875rem; line-height: 1.85; color: #D4D4D4; }
.term-body .p { color: var(--dim); user-select: none; }
.term-note { font-size: 0.8rem; color: var(--dim); margin: 0; padding: 12px 22px 16px; border-top: 1px solid var(--border); max-width: none; }

/* Sections: one rhythm everywhere */
section { padding: var(--step) 0 0; }
main > section:last-child { padding-bottom: var(--step); }
.start-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.start-grid h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.start-grid p { margin-top: 14px; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-top: 14px; font-size: 1.05rem; }
.panel { background: var(--surface); border: 1px solid var(--border); padding: clamp(24px, 3vw, 36px); }

/* Diagram */
.diagram { width: 100%; height: auto; overflow: visible; }
.diagram text { font-family: "Geist", sans-serif; fill: var(--text); }
.diagram .bar-label { font-size: 13px; fill: var(--dim); }
.diagram .slot { fill: none; stroke: #3A3A3A; stroke-width: 1.2; stroke-dasharray: 4 3; }
.diagram .link { fill: none; stroke: #2E2E2E; stroke-width: 1.2; }
.diagram .node { fill: #050505; stroke: #262626; stroke-width: 1.2; }
.diagram .node-frame { fill: none; stroke: var(--frame); stroke-width: 2.4; }
.diagram .node-label { font-size: 14px; font-weight: 500; fill: var(--muted); }
.diagram .chunk {
  fill: var(--text);
  animation: travel 1000ms cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(500ms + var(--d));
}
.diagram .c0 { --fx: 68px; --fy: -240px; --d: 0ms; }
.diagram .c1 { --fx: -50px; --fy: -240px; --d: 90ms; }
.diagram .c2 { --fx: -168px; --fy: -240px; --d: 180ms; }
.diagram .c3 { --fx: 172px; --fy: -240px; --d: 270ms; }
.diagram .c4 { --fx: 54px; --fy: -240px; --d: 360ms; }
.diagram .c5 { --fx: -64px; --fy: -240px; --d: 450ms; }
@keyframes travel {
  from { transform: translate(var(--fx), var(--fy)); }
  to { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { .diagram .chunk { animation: none; } }

/* Steps: a real sequence */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); }
.steps li { display: flex; flex-direction: column; padding: 28px 26px 28px; background: var(--surface); }
.steps li + li { border-left: 1px solid var(--border); }
.step-n { font-family: var(--mono); font-size: 0.8rem; color: var(--dim); margin-bottom: 20px; }
.steps h3 { margin-bottom: 10px; }
.steps p { font-size: 0.925rem; line-height: 1.6; margin-bottom: 20px; }
.tag {
  margin-top: auto; align-self: flex-start;
  font-size: 0.75rem; color: var(--text);
  border: 1px solid var(--border-2); padding: 3px 8px;
}

/* Layers table */
.table-panel { padding: 0; overflow-x: auto; }
.layers { width: 100%; border-collapse: collapse; min-width: 560px; }
.layers th, .layers td { text-align: left; vertical-align: top; padding: 18px 24px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.layers tbody tr:last-child th, .layers tbody tr:last-child td { border-bottom: 0; }
.layers thead th { font-size: 0.8rem; font-weight: 500; color: var(--dim); padding-top: 14px; padding-bottom: 14px; background: var(--surface-2); }
.layers tbody th { width: 1%; white-space: nowrap; font-weight: 500; padding-right: 48px; }
.layers tbody th code { font-size: 0.9rem; color: var(--text); }
.layers td { color: var(--muted); }
.layers .muted-row th, .layers .muted-row td { color: var(--dim); font-weight: 400; }
.badge { display: inline-block; margin-right: 10px; font-size: 0.72rem; font-weight: 500; padding: 2px 8px; border: 1px solid var(--border-2); color: var(--muted); vertical-align: 1px; }

/* Status */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 h3 { margin-bottom: 18px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { position: relative; padding: 11px 0 11px 30px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }
.checks li::before {
  content: ""; position: absolute; left: 3px; top: 18px; width: 12px; height: 7px;
  border-left: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); transform: rotate(-45deg);
}
.gaps li::before { content: ""; position: absolute; left: 3px; top: 22px; width: 12px; border-top: 1.5px solid var(--dim); }
.note { font-size: 0.875rem; color: var(--dim); margin: 20px 0 0; }
.note a { color: var(--text); }

/* Providers */
.providers { padding: clamp(32px, 5vw, 64px); background: var(--surface); }
.planned { display: inline-block; font-size: 0.78rem; font-family: var(--mono); color: var(--muted); border: 1px solid var(--border-2); padding: 3px 10px; }
.providers h2 { margin: 20px 0; }
.providers p { font-size: 1.05rem; }
.providers .btn { margin-top: 12px; }

/* Footer */
.foot { border-top: 1px solid var(--border); padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-brand p { margin-top: 18px; font-size: 0.875rem; color: var(--dim); max-width: 34ch; }
.foot h4 { font-size: 0.85rem; font-weight: 500; margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 10px; }
.foot a { color: var(--muted); text-decoration: none; font-size: 0.875rem; }
.foot a:hover { color: var(--text); }
.fine { grid-column: 1 / -1; font-size: 0.8rem; color: var(--dim); margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--border); max-width: none; }

/* 404 */
.notfound { text-align: center; padding: clamp(96px, 14vw, 180px) 0; }
.notfound p { margin: 20px auto 0; }
.notfound .actions { margin-top: 32px; }

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-grid, .start-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--border); }
  .grid-2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .nav-cta .btn-ghost { display: none; }
  .grid-4 { grid-template-columns: 1fr; }
  .steps li + li { border-left: 0; border-top: 1px solid var(--border); }
  .term-title { display: none; }
  .term-bar { justify-content: flex-end; }
  .diagram .node-label { font-size: 22px; }
  .diagram .bar-label { font-size: 20px; }
  .layers { min-width: 0; }
  .layers thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .layers tr { display: block; padding: 16px 20px; border-bottom: 1px solid var(--border); }
  .layers tbody tr:last-child { border-bottom: 0; }
  .layers th, .layers td { display: block; border: 0; padding: 0; width: auto; white-space: normal; }
  .layers tbody th { padding-bottom: 6px; }
}

/* Use cases */
.tier + .tier { margin-top: 56px; }
.tier-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 16px; margin-bottom: 20px; }
.tier-head .planned { grid-row: 1; }
.tier-head h3 { font-size: 1.15rem; }
.tier-head p { grid-column: 1 / -1; margin: 8px 0 0; font-size: 0.95rem; color: var(--dim); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.tiles.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; padding: 24px 24px 22px; background: var(--surface); }
.tile h4 { font-size: 1rem; font-weight: 500; margin-bottom: 10px; }
.tile p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 18px; }
.tile .tags { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tile .tags .tag { margin-top: 0; }
@media (max-width: 900px) {
  .tiles.cols-3, .tiles.cols-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .tiles.cols-3, .tiles.cols-4 { grid-template-columns: 1fr; }
}

/* Donate */
.donate { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); padding: clamp(32px, 4vw, 48px); }
.donate-copy p { margin-top: 16px; }
.donate-copy .note { margin-top: 20px; }
.token-tabs { display: inline-flex; border: 1px solid var(--border-2); margin-bottom: 16px; }
.tab { font: inherit; font-size: 0.875rem; font-weight: 500; color: var(--muted); background: transparent; border: 0; padding: 8px 18px; cursor: pointer; }
.tab + .tab { border-left: 1px solid var(--border-2); }
.tab[aria-pressed="true"] { background: var(--text); color: #000; }
.addr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.addr { border: 1px solid var(--border); background: #050505; padding: 18px 20px; }
.addr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.addr .net { font-weight: 500; }
.addr .std { font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }
.addr-val { display: block; font-size: 0.85rem; color: var(--text); word-break: break-all; user-select: all; line-height: 1.5; }
.addr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qr { margin-top: 16px; width: 180px; }
.qr .qr-bg { fill: transparent; }
.qr .qr-fg { fill: #FFFFFF; }
.qr.qr-standard .qr-bg { fill: #FFFFFF; }
.qr.qr-standard .qr-fg { fill: #000000; }
.qr-flip { display: block; margin-top: 8px; padding: 0; background: none; border: 0; font: inherit; font-size: 0.8rem; color: var(--dim); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.qr-flip:hover { color: var(--text); }
.qr svg { display: block; width: 100%; height: auto; }
.warn { font-size: 0.8rem; color: var(--dim); margin: 12px 0 0; }
.donate-empty { color: var(--muted); border: 1px dashed var(--border-2); padding: 18px 20px; margin: 0; }
@media (max-width: 900px) { .donate { grid-template-columns: 1fr; } }
