/* Molt — shared styles. Dark monochrome, three typefaces:
   Unbounded (wordmark), Geist (UI + display), Geist Mono (data).
   Fonts are self-hosted (OFL) — no requests to Google (GDPR). */
@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("../fonts/geist-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500; font-display: swap; src: url("../fonts/geist-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("../fonts/geist-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 700; font-display: swap; src: url("../fonts/geist-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url("../fonts/geist-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 500; font-display: swap; src: url("../fonts/geist-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 600; font-display: swap; src: url("../fonts/geist-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("../fonts/unbounded-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #0d0d0d;
  --bg-2: #0a0a0a;
  --card: #141414;
  --card-2: #1b1b1b;
  --line: #222;
  --line-strong: #2f2f2f;
  --ink: #ededed;
  --ink-soft: #a6a6a6;   /* 8.0:1 on --bg */
  --ink-faint: #868686;  /* ≥4.6:1 on every surface incl. --card-2 (WCAG AA) */
  --accent: #fff;
  --red: #ff6b6b;
  --skin: #ede6d8;

  --font-brand: "Unbounded", "Geist", sans-serif;
  --font-ui: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Menlo, monospace;

  --sidebar: 236px;
  --sidebar-collapsed: 68px;
  --topbar: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: var(--ink); color: var(--bg); }

/* Keyboard focus: always visible, never shown for mouse clicks. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .tab:focus-visible { outline-offset: 3px; }
.search:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.search input:focus-visible { outline: none; }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 13px; transform: translateY(-200%); transition: transform .15s;
}
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.mono { font-family: var(--font-mono); }
.brand { font-family: var(--font-brand); font-weight: 700; letter-spacing: -0.04em; }
.display { font-family: var(--font-ui); font-weight: 600; letter-spacing: -0.05em; line-height: 1; margin: 0; }
.kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.shell { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .shell { padding-inline: 16px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  height: 2.35rem; padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #1c1c1c; color: var(--ink);
  font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background-color .12s, border-color .12s, color .12s, opacity .12s;
}
.btn:hover { background: #242424; border-color: #3a3a3a; }
.btn-sm { height: 2rem; padding: 0 .8rem; font-size: 13px; }
.btn-lg { height: 2.75rem; padding: 0 1.25rem; font-size: 15px; }
.btn-ink { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-ink:hover { background: #dcdcdc; border-color: #dcdcdc; }
.btn[disabled], .btn.is-disabled { cursor: not-allowed; opacity: .55; }
.btn[disabled]:hover { background: #1c1c1c; border-color: var(--line-strong); }
.btn-ink[disabled]:hover { background: var(--accent); border-color: var(--accent); }

.soon {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--ink-faint);
  margin-left: auto; line-height: 1.4;
}
.soon-dark { margin-left: 2px; border-color: rgba(0,0,0,.25); color: rgba(0,0,0,.6); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-faint); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar);
  display: flex; flex-direction: column;
  background: var(--bg-2); border-right: 1px solid var(--line);
  transition: width .2s, transform .2s;
}
.sidebar-top { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-mark { width: 38px; height: 38px; border-radius: 28%; box-shadow: 0 0 0 1px var(--line-strong); flex-shrink: 0; }
.logo-word { display: block; font-size: 21px; line-height: 1; }
.logo-sub { display: block; margin-top: 4px; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); line-height: 1; }
.nav { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.nav-item {
  height: 36px; display: flex; align-items: center; gap: 12px; padding: 0 12px;
  border-radius: 8px; border: 1px solid transparent; font-size: 14px; color: var(--ink-soft);
  transition: background-color .15s, color .15s; white-space: nowrap; overflow: hidden;
}
a.nav-item:hover { background: var(--card); color: var(--ink); }
.nav-item.is-active { background: var(--card-2); border-color: var(--line-strong); color: var(--ink); }
.nav-item.is-active svg { color: var(--accent); }
.nav-item.is-soon { color: var(--ink-faint); cursor: default; }
.sidebar-foot { margin-top: auto; padding: 0 16px 16px; }
.x-link { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: var(--ink-faint); font-size: 12px; transition: background-color .15s, color .15s; }
.x-link:hover { background: var(--card); color: var(--ink); }

body.collapsed .sidebar { width: var(--sidebar-collapsed); }
body.collapsed .logo-text, body.collapsed .nav-label, body.collapsed .nav-item .soon { display: none; }
body.collapsed .sidebar-top { flex-direction: column; justify-content: center; gap: 8px; height: 96px; }
body.collapsed .collapse-btn svg { transform: rotate(180deg); }
body.collapsed .nav-item { justify-content: center; padding: 0; }
body.collapsed .x-link { justify-content: center; }

/* ---------- page column + topbar ---------- */
.page { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .2s; }
body.collapsed .page { margin-left: var(--sidebar-collapsed); }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(13,13,13,.9); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; width: 40px; height: 40px; color: var(--ink-soft); }
.search-wrap { position: relative; width: 100%; max-width: 460px; margin-inline: auto; }
.search {
  height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--ink-faint);
  transition: border-color .15s;
}
.search:hover, .search:focus-within { border-color: var(--line-strong); }
.search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 13px; }
.search input::placeholder { color: var(--ink-faint); }
.search kbd { font-size: 10.5px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--card-2); color: var(--ink-soft); }
.search-pop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 12px 14px; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.search-pop p { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
main { flex: 1; padding-bottom: 96px; }

.scrim { display: none; }

@media (max-width: 1023px) {
  /* visibility:hidden takes the closed drawer out of the Tab order */
  .sidebar { transform: translateX(-100%); visibility: hidden; width: var(--sidebar) !important; transition: transform .2s, visibility 0s linear .2s; }
  body.menu-open .sidebar { transform: none; visibility: visible; transition: transform .2s, visibility 0s; }
  body.menu-open { overflow: hidden; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); }
  .page, body.collapsed .page { margin-left: 0; }
  .collapse-btn { display: none; }
  .menu-btn { display: inline-flex; flex-shrink: 0; }
  body.collapsed .logo-text, body.collapsed .nav-label, body.collapsed .nav-item .soon { display: revert; }
  body.collapsed .nav-item { justify-content: flex-start; padding: 0 12px; }
  body.collapsed .sidebar-top { flex-direction: row; height: 68px; justify-content: space-between; }
}
.search-wrap { min-width: 0; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .search kbd { display: none; }
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar-actions .soon { display: none; }
  .spec-row { font-size: 10.5px; }
}

/* ---------- animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes molt {
  0% { filter: none; clip-path: inset(0); transform: none; }
  15% { filter: grayscale(1) contrast(3) brightness(1.4); clip-path: inset(10% 0 55%); transform: scale(1.04) translateX(-3px); }
  30% { filter: invert(1) contrast(2); clip-path: inset(48% 0 12%); transform: translateX(4px); }
  45% { filter: grayscale(1) blur(3px); clip-path: inset(0); transform: scale(.97); }
  70% { filter: contrast(1.6) blur(.5px); transform: translateX(-1px); }
  100% { filter: none; transform: none; }
}
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@keyframes pulse { 50% { opacity: .5; } }
@keyframes dash { to { stroke-dashoffset: -16; } }
.animate-rise { animation: rise .26s ease-out both; }
.animate-molt { animation: molt .9s cubic-bezier(.3,0,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- home: hero diagram ---------- */
.hero { padding-top: 40px; }
.diagram { position: relative; width: 100%; }
.diagram-stage { position: absolute; top: 0; left: 50%; width: 1000px; height: 290px; transform-origin: top center; }
.diagram svg.wires { position: absolute; inset: 0; }
.wire { stroke: #333; stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; transition: stroke .3s; fill: none; }
.wire.is-on { stroke: #fff; animation: dash .6s linear infinite; }
.node { position: absolute; }
.sources { left: 30px; top: 66px; width: 206px; overflow: hidden; }
.sources .kicker { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.src { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); transition: background-color .3s; }
.src:last-child { border-bottom: 0; }
.src .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; transition: background-color .3s; }
.src .name { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); transition: color .3s; }
.src .note { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src.is-on { background: var(--card-2); }
.src.is-on .dot { background: var(--ink); }
.src.is-on .name { color: var(--ink); }

.token { left: 300px; top: 22px; width: 170px; display: flex; flex-direction: column; align-items: center; }
.token-img { position: relative; width: 150px; height: 150px; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.token-img svg, .token-img img { width: 100%; height: 100%; object-fit: cover; }
.token-img .scanline { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%); transform: translateY(-100%); pointer-events: none; }
.token-img.is-molting .scanline { animation: scan .9s linear both; }
.token-name { margin-top: 12px; width: 100%; text-align: center; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token-name span { color: var(--ink-soft); }
.token-mint { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); }

.box {
  width: 210px; height: 84px; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .3s, box-shadow .3s;
}
.box.is-on { border-color: #5a5a5a; box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.box .big { font-family: var(--font-mono); font-size: 17px; font-weight: 600; letter-spacing: -.02em; padding-right: 56px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box .small { margin-top: 4px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box .tag { position: absolute; top: 10px; right: 10px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--card-2); }
.box .mini { width: 36px; height: 36px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.box .mini svg, .box .mini img { width: 100%; height: 100%; object-fit: cover; }
.box .mini img { transform: scale(1.7); } /* 36 px slot: zoom in on the creature */
.box .body { min-width: 0; flex: 1; }
.b-auth { left: 540px; top: 20px; }
.b-meta { left: 790px; top: 20px; }
.b-wallet { left: 790px; top: 170px; }
.b-holders { left: 540px; top: 170px; }
.diagram-foot { left: 540px; top: 266px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }

/* pause control (WCAG 2.2.2: auto-moving content needs a stop) */
.motion-btn {
  position: absolute; top: 252px; left: 30px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-faint); font-family: var(--font-mono); font-size: 11px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.motion-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* Compact diagram for narrow screens: a readable flow instead of a 0.35x miniature */
.diagram.is-compact { height: auto !important; padding-top: 38px; }
.diagram.is-compact .motion-btn { top: 0; left: auto; right: 0; }
.diagram.is-compact .diagram-stage {
  position: static; width: auto; height: auto; transform: none !important;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.diagram.is-compact svg.wires { display: none; }
.diagram.is-compact .node { position: static; left: auto; top: auto; width: auto; min-width: 0; }
.diagram.is-compact .token { grid-column: 1 / -1; order: 0; }
.diagram.is-compact .token-img { width: 132px; height: 132px; }
.diagram.is-compact .sources { grid-column: 1 / -1; order: 1; }
.diagram.is-compact .b-auth { order: 2; }
.diagram.is-compact .b-meta { order: 3; }
.diagram.is-compact .b-wallet { order: 4; }
.diagram.is-compact .b-holders { order: 5; }
.diagram.is-compact .box { height: auto; min-height: 76px; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; }
.diagram.is-compact .box .tag { position: static; order: -1; }
.diagram.is-compact .box .big { padding-right: 0; font-size: 15px; }
.diagram.is-compact .box .mini { display: none; }
.diagram.is-compact .box .body { width: 100%; }
.diagram.is-compact .diagram-foot { grid-column: 1 / -1; order: 6; white-space: normal; text-align: center; }

.hero-copy { margin-top: 24px; text-align: center; }
.hero-copy h1 { font-size: 72px; }
.hero-copy p { max-width: 42rem; margin: 20px auto 0; font-size: 16px; line-height: 1.625; color: var(--ink-soft); }
.hero-ctas { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 640px) { .hero-copy h1 { font-size: 44px; } }

/* ---------- home: launches ---------- */
.launches { margin-top: 56px; border-top: 1px solid var(--line); padding: 40px 0; }
.launches-head { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 768px) { .launches-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.launches-head h2 { font-size: 26px; }
.launches-head .kicker { margin-top: 8px; }
.tabsets { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; gap: 4px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .15s, background-color .15s; }
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--card-2); color: var(--ink); }

.grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.spec { overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.spec:hover { border-color: var(--line-strong); }
.spec-img { position: relative; aspect-ratio: 1; }
.spec-img svg, .spec-img img { width: 100%; height: 100%; object-fit: cover; }
.spec-img .preview { position: absolute; top: 8px; left: 8px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.55); color: var(--ink-soft); backdrop-filter: blur(6px); }
.spec-img .mode { position: absolute; top: 8px; right: 8px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.55); color: var(--ink); backdrop-filter: blur(6px); }
.spec-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.spec-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; margin: 0; font-size: inherit; font-weight: inherit; }
.spec-title b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-title span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.spec-row { display: flex; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.spec-row .v { color: var(--ink-soft); }
.spec-row .v.hot { color: var(--ink); }
.spec-was { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-was s { text-decoration-color: var(--ink-faint); }

.empty { margin-top: 24px; padding: 40px; text-align: center; color: var(--ink-soft); }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 40px; }
@media (max-width: 960px) { .docs { grid-template-columns: minmax(0, 1fr); gap: 0; } .toc { display: none; } }
.toc-mobile { display: none; margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.toc-mobile summary { cursor: pointer; list-style: none; padding: 10px 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); display: flex; justify-content: space-between; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; }
.toc-mobile[open] summary::after { content: "–"; }
.toc-mobile nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 0 14px 12px; }
.toc-mobile a { padding: 6px 0; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 960px) { .toc-mobile { display: block; } }
@media (max-width: 400px) { .toc-mobile nav { grid-template-columns: 1fr; } }
.toc { position: sticky; top: calc(var(--topbar) + 24px); align-self: start; max-height: calc(100vh - var(--topbar) - 48px); overflow-y: auto; scrollbar-width: none; }
.toc .kicker { margin-bottom: 10px; }
.toc a { display: block; padding: 5px 10px; border-left: 1px solid var(--line); font-size: 13px; color: var(--ink-faint); transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--ink); }
.toc a.sub { padding-left: 22px; font-size: 12px; }

.doc { max-width: 720px; }
.doc-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: 48px; margin-top: 12px; }
.doc-head .lede { margin: 16px 0 0; font-size: 16px; line-height: 1.625; color: var(--ink-soft); }
.meta-row { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--font-mono); font-size: 11px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); }
.chip b { color: var(--ink); font-weight: 500; }

.doc section { padding-top: 40px; }
.doc h2 { font-size: 24px; font-weight: 600; letter-spacing: -.03em; margin: 0 0 12px; display: flex; align-items: baseline; gap: 12px; }
.doc h2 .n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); font-weight: 400; letter-spacing: 0; }
.doc h3 { font-size: 16px; font-weight: 600; letter-spacing: -.02em; margin: 24px 0 8px; }
.doc p, .doc li { font-size: 15px; line-height: 1.7; color: #c9c9c9; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc code { font-family: var(--font-mono); font-size: .86em; padding: 1px 5px; border-radius: 4px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink); }
.doc pre { margin: 0 0 16px; padding: 14px 16px; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: #d6d6d6; }
.doc pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.doc pre .c { color: var(--ink-faint); }
.doc a.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.doc a.link:hover { text-decoration-color: var(--ink); }

.table-wrap { margin: 0 0 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc th { text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; color: var(--ink-faint); background: var(--card); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.doc td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: #c9c9c9; vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { color: var(--ink); white-space: nowrap; }

.callout { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-left: 2px solid var(--ink); border-radius: 10px; background: var(--card); }
.callout p { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding: 10px 12px 10px 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin: 0 0 8px; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 14px; top: 11px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
.two-col .card { padding: 14px 16px; }
.two-col .card ul { margin: 8px 0 0; }
.two-col .card li { font-size: 14px; }
details.faq { border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin-bottom: 8px; }
details.faq summary { cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 500; font-size: 14.5px; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-faint); }
details.faq[open] summary::after { content: "–"; }
details.faq p { padding: 0 16px 14px; margin: 0; }
.doc-end { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }

/* ---------- wallet button + menu ---------- */
.wallet-wrap { position: relative; }
.wallet-btn.mono { font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; }
.wallet-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 220px; padding: 10px; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.wallet-menu .kicker { padding: 2px 6px; }
.wallet-addr { padding: 4px 6px 8px; font-size: 11px; color: var(--ink-soft); word-break: break-all; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.wallet-item { display: block; width: 100%; text-align: left; padding: 8px 6px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; color: var(--ink); cursor: pointer; }
.wallet-item:hover { background: var(--card-2); }

/* ---------- form fields ---------- */
.field {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--ink);
  font: inherit; font-size: 14px; transition: border-color .15s;
}
.field:hover { border-color: #3a3a3a; }
.field:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
.field[aria-invalid="true"] { border-color: var(--red); }

/* ---------- token page ---------- */
.tk { padding-top: 32px; }
.tk-loading { padding: 40px 0; }
.dim { color: var(--ink-faint); }
.small { font-size: 12px; }
.tk-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.tk-pagehead h1 { font-size: 40px; margin-top: 8px; }
.tk-lookup { display: flex; gap: 8px; width: 100%; max-width: 440px; }
.tk-notice { padding: 18px 20px; max-width: 560px; }
.tk-notice p { margin: 8px 0 0; color: var(--ink-soft); line-height: 1.6; }
.tk-notice .btn { margin-top: 14px; }
.spec-link { color: inherit; }
.spec-img .art-empty, .tk-art .art-empty, .tk-thumb .art-empty { width: 100%; height: 100%; background: var(--card-2); }
.skeleton { aspect-ratio: 4 / 5; animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }

.tk-back { display: inline-block; margin-bottom: 20px; font-size: 13px; color: var(--ink-soft); }
.tk-back:hover { color: var(--ink); }
.tk-head { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.tk-art { aspect-ratio: 1; overflow: hidden; }
.tk-art img { width: 100%; height: 100%; object-fit: cover; }
.tk-name { font-size: 48px; margin-top: 10px; overflow-wrap: anywhere; }
.tk-name span { font-family: var(--font-mono); font-size: .42em; font-weight: 500; letter-spacing: 0; color: var(--ink-soft); }
.tk-desc { margin: 14px 0 0; color: var(--ink-soft); line-height: 1.6; max-width: 56ch; }
.tk-meta { margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; max-width: 520px; }
.tk-meta dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.tk-meta dd { margin: 4px 0 0; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.copy { font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink-soft); cursor: pointer; }
.copy:hover { color: var(--ink); }
.tk-links { margin-top: 20px; display: flex; gap: 8px; }

.tk-body { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: start; }
.tk-h2 { font-size: 20px; font-weight: 600; letter-spacing: -.03em; margin: 0 0 14px; display: flex; align-items: baseline; gap: 8px; }
.tk-form { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.tk-form-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 12px; }
.tk-field { display: flex; flex-direction: column; gap: 6px; }
.tk-field > span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.tk-field i { font-style: normal; color: var(--ink-faint); text-transform: none; letter-spacing: 0; }
.tk-image { display: flex; gap: 14px; align-items: center; }
.tk-image p { margin: 8px 0 0; line-height: 1.5; }
.tk-preview { width: 88px; height: 88px; flex-shrink: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--card-2); }
.tk-preview img { width: 100%; height: 100%; object-fit: cover; }
.tk-file { position: relative; }
.tk-file:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.tk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tk-status { margin: 0; min-height: 1.5em; font-size: 13px; color: var(--ink-soft); }
.tk-status[data-kind="error"] { color: var(--red); }
.tk-status[data-kind="ok"] { color: var(--ink); }
.tk-status a { text-decoration: underline; text-underline-offset: 3px; }

.tk-skins { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tk-skin { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.tk-skin:last-child { border-bottom: 0; }
.tk-thumb { width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.tk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tk-skin-main { flex: 1; min-width: 0; }
.tk-skin-main b { font-weight: 600; }
.tk-tx { color: var(--ink-soft); white-space: nowrap; }
.tk-tx:hover { color: var(--ink); }

@media (max-width: 900px) {
  .tk-head { grid-template-columns: minmax(0, 1fr); }
  .tk-art { max-width: 320px; }
  .tk-body { grid-template-columns: minmax(0, 1fr); }
  .tk-name { font-size: 36px; }
}
@media (max-width: 520px) {
  .tk-form-row { grid-template-columns: minmax(0, 1fr); }
  .tk-meta { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- launch page ---------- */
.ln { padding-top: 32px; }
.ln-lede { margin: 12px 0 0; color: var(--ink-soft); max-width: 56ch; line-height: 1.6; }
.ln-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.ln-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ln-sec { padding: 20px; }
.ln-sec .tk-h2 { gap: 10px; }
.ln-skin { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 16px; align-items: start; }
.ln-fields { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ln-drop {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
  border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--bg-2); overflow: hidden; cursor: pointer;
  transition: border-color .15s;
}
.ln-drop:hover { border-color: #4a4a4a; }
.ln-drop:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.ln-drop img { width: 100%; height: 100%; object-fit: cover; }
.ln-drop.is-loading { opacity: .5; }
.ln-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 8px; }
.ln-drop-empty b { font-size: 13px; font-weight: 600; }
.ln-links { margin-top: 14px; }
.ln-links summary { cursor: pointer; color: var(--ink-soft); }
.ln-links-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.ln-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ln-mode { position: relative; display: block; cursor: pointer; }
.ln-mode input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ln-mode > span { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-2); transition: border-color .15s, background-color .15s; }
.ln-mode b { font-size: 14px; font-weight: 600; }
.ln-mode .small { line-height: 1.45; }
.ln-mode input:checked + span { border-color: var(--ink); background: var(--card-2); }
.ln-mode input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.ln-schedule { margin-top: 16px; }
.ln-rows { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ln-row { display: grid; grid-template-columns: 56px 80px minmax(0, 1fr) 110px 28px; gap: 10px; align-items: end; }
.ln-drop-sm { width: 56px; height: 56px; aspect-ratio: auto; }
.ln-del { align-self: center; margin-top: 18px; }
.ln-keeper { margin: 14px 0 0; }

.ln-buy { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.ln-buy .tk-field { width: 180px; }
.ln-quick { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.ln-quick .tab[aria-pressed="true"] { background: var(--card-2); color: var(--ink); }
.ln-sec > p.small { margin: 10px 0 0; }

.ln-side { position: sticky; top: calc(var(--topbar) + 16px); }
.ln-summary { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ln-prev { display: flex; gap: 12px; align-items: center; }
.ln-prev-img { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); flex-shrink: 0; }
.ln-prev-img img { width: 100%; height: 100%; object-fit: cover; }
.ln-prev-name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.ln-cost { margin: 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.ln-cost div { display: flex; justify-content: space-between; font-size: 13px; }
.ln-cost dt { color: var(--ink-soft); }
.ln-cost dd { margin: 0; }
.ln-cost div:last-child { padding-top: 6px; border-top: 1px solid var(--line); }
.ln-cost div:last-child dd { color: var(--ink); font-weight: 600; }
.ln-go { width: 100%; }
.ln-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-faint); }
.ln-steps li::before { content: "○"; font-family: var(--font-mono); margin-right: 8px; }
.ln-steps li[data-state="now"] { color: var(--ink); }
.ln-steps li[data-state="now"]::before { content: "●"; animation: pulse 1.2s ease-in-out infinite; }
.ln-steps li[data-state="done"] { color: var(--ink-soft); }
.ln-steps li[data-state="done"]::before { content: "✓"; }

@media (max-width: 960px) {
  .ln-grid { grid-template-columns: minmax(0, 1fr); }
  .ln-side { position: static; }
  .ln-modes { grid-template-columns: minmax(0, 1fr); }
  .ln-links-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ln-skin { grid-template-columns: minmax(0, 1fr); }
  .ln-skin .ln-drop { max-width: 180px; }
  .ln-row { grid-template-columns: 56px 72px minmax(0, 1fr) 28px; }
  .ln-row .ln-t { grid-column: 2 / 4; }
}

/* ---------- Tokens page + Molts feed ---------- */
.grid .tk-empty { grid-column: 1 / -1; margin-top: 0; }
.tk-empty a, .mf-list .dim a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.mf-list { margin-top: 16px; }
.mf-row .tk-thumb { display: block; }
.mf-name { color: inherit; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-name:hover b { text-decoration: underline; text-underline-offset: 3px; }
.mf-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.mf-src { color: var(--ink-soft); }
.mf-src[data-src="keeper"], .mf-src[data-src="schedule"] { color: var(--ink); }
@media (max-width: 520px) { .mf-meta { display: none; } }
