/* Layout: one narrow reading column for Home, a sidebar + column for Docs, wide data grids for Explorer and Fees. Pixel type only on headlines; everything else stays quiet. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --sunk: #f1f4ea;
  color-scheme: light;
  --fg: #18200f;
  --muted: #5d6a52;
  --line: #d6dcc8;
  --pear: #6fd14b;
  --pear-deep: #2f9e63;
  --pear-ink: #1e6b3f;
  --stem: #7b3d24;
  --on-pear: #0f1a0b;
  --shadow: rgba(24, 32, 15, .08);
  --display: "Pixelify Sans", "Courier New", monospace;
  --body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --px: 4px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: var(--pear-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--pear-deep); outline-offset: 2px;
}
h1, h2, h3 { text-wrap: balance; line-height: 1.15; margin: 0; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.pixel { image-rendering: pixelated; }

/* Header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { font: 600 26px/1 var(--display); letter-spacing: .02em; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 2px; font-weight: 500; font-size: 15px;
}
.nav a:hover { color: var(--fg); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--sunk); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--body);
  padding: 12px 18px; border: 2px solid var(--on-pear); background: var(--pear); color: var(--on-pear);
  text-decoration: none; cursor: pointer; box-shadow: var(--px) var(--px) 0 var(--on-pear);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--on-pear); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--on-pear); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--fg); box-shadow: var(--px) var(--px) 0 var(--line); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.top .btn { padding: 9px 14px; font-size: 14px; }
@media (max-width: 720px) {
  .top .wrap { gap: 8px; padding-block: 10px; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .top .btn { margin-left: auto; }
}

/* Pages */
.page { padding-block: 48px 96px; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--pear-ink); }
.lede { font-size: 19px; color: var(--muted); max-width: 60ch; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono);
  padding: 5px 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px;
}
.pill .dot { width: 7px; height: 7px; background: #d9a326; border-radius: 50%; }

/* Home */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: 24px 64px; }
.hero > * { min-width: 0; }
.hero h1 { font: 600 clamp(44px, 7vw, 78px)/1.02 var(--display); margin-block: 18px 22px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--pear-deep); }
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.orbit { width: 100%; max-width: 440px; justify-self: center; }
.orbit svg { width: 100%; height: auto; display: block; }
.orbit .ln { stroke: var(--line); stroke-width: 2; }
.orbit .flow { stroke: var(--pear-deep); stroke-width: 2; stroke-dasharray: 3 9; animation: flow 1.6s linear infinite; }
.orbit .node rect { fill: var(--surface); stroke: var(--fg); stroke-width: 2; }
.orbit .node text { fill: var(--fg); font: 600 12px var(--mono); }
.orbit .ring { fill: none; stroke: var(--line); stroke-dasharray: 2 6; }
@keyframes flow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .orbit .flow { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; gap: 24px; } .orbit { max-width: 340px; } }

.statstrip {
  display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--fg); background: var(--surface);
}
.statstrip > div { padding: 18px 20px; border-right: 1px solid var(--line); min-width: 0; }
.statstrip > div:last-child { border-right: 0; }
.statstrip b { display: block; font: 600 28px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.statstrip small { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .statstrip { grid-template-columns: 1fr 1fr; }
  .statstrip > div:nth-child(2) { border-right: 0; }
  .statstrip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

.section { padding-top: 88px; }
.section h2 { font: 600 clamp(30px, 4vw, 42px)/1.1 var(--display); margin-block: 10px 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; counter-reset: s; }
.step { padding: 24px; border-top: 3px solid var(--fg); background: var(--surface); }
.step .n { font: 600 13px var(--mono); color: var(--pear-ink); }
.step h3 { font-size: 20px; margin-block: 10px 8px; }
.step p { color: var(--muted); font-size: 15.5px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.tweet-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.tweet-wrap > * { min-width: 0; }
@media (max-width: 820px) { .tweet-wrap { grid-template-columns: 1fr; gap: 24px; } }
.tweet {
  background: #000; border: 2px solid var(--fg); padding: 0; box-shadow: 8px 8px 0 var(--pear);
  overflow: hidden;
}
.tweet a { display: block; }
.tweet img { display: block; width: 100%; height: auto; }

.split { display: flex; height: 44px; border: 2px solid var(--fg); margin-top: 28px; }
.split > div { display: flex; align-items: center; padding-inline: 12px; font: 600 13px var(--mono); white-space: nowrap; overflow: hidden; min-width: 0; }
.s1 { background: var(--pear); color: var(--on-pear); }
.s2 { background: var(--pear-deep); color: #fff; }
.s3 { background: var(--stem); color: #fff; }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.legend > div { min-width: 0; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 1px solid var(--fg); }
.legend b { font-family: var(--mono); }
.legend p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
@media (max-width: 720px) { .legend { grid-template-columns: 1fr; } }

.cta-band { margin-top: 96px; padding: 40px; background: var(--sunk); color: var(--fg); border: 2px solid var(--fg); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { font: 600 32px/1.1 var(--display); color: var(--fg); }
.cta-band p { color: var(--muted); margin-top: 6px; }

/* Page heads */
.phead { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.phead h1 { font: 600 clamp(36px, 5vw, 54px)/1.05 var(--display); margin-block: 10px 10px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--sunk); border-left: 3px solid #d9a326; font-size: 15px; margin-bottom: 28px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tiles.five { grid-template-columns: repeat(5, 1fr); }
.tile { background: var(--surface); padding: 18px; min-width: 0; }
.tile small { display: block; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.tile b { display: block; font: 600 26px/1.2 var(--mono); font-variant-numeric: tabular-nums; margin-top: 8px; }
.tile span { font-size: 13px; color: var(--muted); font-family: var(--mono); }
@media (max-width: 900px) { .tiles, .tiles.five { grid-template-columns: repeat(2, 1fr); } }

.panel { background: var(--surface); border: 1px solid var(--line); margin-top: 28px; min-width: 0; }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel > header h2 { font: 600 17px/1.2 var(--body); }
.panel > header p { color: var(--muted); font-size: 13.5px; }
.panel .body { padding: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid2 > * { min-width: 0; }
.grid2 .panel { margin-top: 28px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; gap: 0; } }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.input, select {
  font: 15px var(--body); padding: 9px 12px; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 2px; min-width: 0;
}
.input.search { flex: 1 1 240px; }
.tabs { display: flex; gap: 2px; background: var(--sunk); padding: 3px; flex-wrap: wrap; }
.tabs button { font: 500 14px var(--body); border: 0; background: transparent; color: var(--muted); padding: 6px 12px; cursor: pointer; border-radius: 2px; }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px var(--shadow); }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 600 11.5px var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.r, td.r { text-align: right; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.empty { text-align: center; padding: 48px 18px; color: var(--muted); white-space: normal; }
.empty img { width: 40px; height: 40px; opacity: .55; display: block; margin: 0 auto 12px; }
.empty b { display: block; color: var(--fg); font-size: 16px; margin-bottom: 4px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); }
.chart .axis { fill: var(--muted); font: 11px var(--mono); }
.chart .zero { stroke: var(--pear-deep); stroke-width: 2.5; fill: none; }
.chart .area { fill: var(--pear); opacity: .15; }

.calc { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: start; }
.calc > * { min-width: 0; }
.calc label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.calc .row { display: grid; gap: 14px; }
.calc .input { width: 100%; }
.calc .out { display: grid; gap: 10px; }
.calc .out div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--sunk); font-size: 14.5px; }
.calc .out div b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.calc .out div.total { background: transparent; border-top: 2px solid var(--fg); }
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } }

/* Docs */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; }
.toc p { font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 6px; }
.toc p:first-child { margin-top: 0; }
.toc a { display: block; padding: 4px 10px; color: var(--muted); text-decoration: none; border-left: 2px solid var(--line); }
.toc a:hover, .toc a.act { color: var(--fg); border-left-color: var(--pear-deep); }
.article { max-width: 72ch; }
.article section { padding-top: 12px; margin-bottom: 56px; scroll-margin-top: 90px; }
.article h2 { font: 600 32px/1.15 var(--display); margin-bottom: 16px; }
.article h3 { font-size: 19px; margin-block: 28px 10px; }
.article p, .article li { color: color-mix(in srgb, var(--fg) 85%, var(--muted)); }
.article p + p { margin-top: 14px; }
.article ul, .article ol { padding-left: 22px; margin: 12px 0; display: grid; gap: 6px; }
.article .tbl-wrap { border: 1px solid var(--line); margin: 18px 0; background: var(--surface); }
.article td { white-space: normal; }
.callout { margin: 18px 0; padding: 14px 16px; background: var(--sunk); border-left: 3px solid var(--pear-deep); font-size: 15px; }
.callout.warn { border-left-color: #d9a326; }
pre { background: var(--sunk); padding: 14px 16px; overflow-x: auto; font: 13px/1.55 var(--mono); border: 1px solid var(--line); margin: 16px 0; }
details { border-bottom: 1px solid var(--line); padding-block: 12px; }
details summary { cursor: pointer; font-weight: 600; color: var(--fg); }
details p { margin-top: 8px; }
dl.gloss { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; }
dl.gloss dt { font-weight: 600; }
dl.gloss dd { margin: 0; color: var(--muted); }
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; max-height: none; display: none; }
  .toc-mobile { display: block !important; }
  dl.gloss { grid-template-columns: 1fr; gap: 2px; }
  dl.gloss dd { margin-bottom: 10px; }
}
.toc-mobile { display: none; margin-bottom: 20px; }
.toc-mobile select { width: 100%; }

footer.foot { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 14px; }
footer.foot .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
footer.foot .brand span { font-size: 18px; }
footer.foot .brand img { width: 28px; height: 28px; }

/* Launch */
.launch-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.launch-grid > .panel { margin-top: 28px; }
.side { margin-top: 28px; }
@media (max-width: 900px) { .launch-grid { grid-template-columns: 1fr; gap: 0; } }
.form { display: grid; gap: 18px; }
.form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form .input { width: 100%; }
.form textarea { resize: vertical; font: 15px/1.5 var(--body); }
.form small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.form input[readonly] { background: var(--sunk); font-family: var(--mono); }
.form .btn { justify-self: start; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.f2 > *, .f3 > * { min-width: 0; }
@media (max-width: 640px) { .f2, .f3 { grid-template-columns: 1fr; } }
.form-err { color: #c0392b; font-size: 14px; }
.deploy-msg, .wallet-msg { padding: 12px 14px; background: var(--sunk); border-left: 3px solid #d9a326; font-size: 14.5px; }
.wallet-msg { margin: 0; border-top: 1px solid var(--line); }
.wallet .btn { padding: 9px 14px; font-size: 14px; }
.addr { padding: 8px 10px; background: var(--sunk); font-size: 13.5px; }
.tok { display: flex; gap: 14px; align-items: center; }
.tok-img { width: 64px; height: 64px; flex: none; border: 2px solid var(--fg); background: var(--sunk); display: grid; place-items: center; overflow: hidden; }
.tok-img img { width: 100%; height: 100%; object-fit: contain; }
.tok b { display: block; font-size: 18px; overflow-wrap: anywhere; }
.tok span { color: var(--muted); }
.pv-desc { margin-top: 14px; color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere; }
