/* Self-hosted fonts (no Google Fonts requests, so visitor IPs stay with this host).
   Inconsolata: SIL OFL 1.1. */
@font-face { font-family: "Inconsolata"; src: url("assets/fonts/inconsolata-latin.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inconsolata"; src: url("assets/fonts/inconsolata-latin-ext.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Shared by both pages. Palette switches on <html data-theme>. */

/* Octochan: near-black exchange UI (Kraken Pro / Tsunami), lavender accent.
   The character carries the violet; the page stays neutral. */
:root,
[data-theme="octochan"] {
  --hero: #0B0B0F;
  --hero-ink: #F1EEE4;
  --bg: #0B0B0F;
  --bg-alt: #121218;
  --surface: #21212B;
  --ink: #F1EEE4;
  --muted: #85869B;
  --line: rgb(255 255 255 / 0.11);
  --accent: #A79BFF;
  --btn: #F1EEE4;
  --btn-ink: #0B0B0F;
  --nav-bg: rgb(13 14 20 / 0.7);
  --nav-hover: rgb(255 255 255 / 0.1);
  --wm-fill: #D4CAFF;
  --wm-edge: #0B0B0F;
  --wm-outer: #8B4DE6;
  --lockup-ink: #fff;
  --lockup-edge: #0B0B0F;
}

[data-theme="satsuma"] {
  --hero: #FFF6E8;
  --hero-ink: #F7931A;
  --bg: #1A120C;
  --bg-alt: #FFF6E8;
  --surface: #2A1E15;
  --ink: #FFF6E8;
  --muted: #A8927C;
  --line: rgb(255 246 232 / 0.14);
  --accent: #F7931A;
  --btn: #F7931A;
  --btn-ink: #1A120C;
  --nav-bg: rgb(26 18 12 / 0.06);
  --nav-hover: rgb(26 18 12 / 0.1);
  --wm-fill: #FFC46B;
  --wm-edge: #1A120C;
  --wm-outer: #F7931A;
  --lockup-ink: #1A120C;
  --lockup-edge: #FFF6E8;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inconsolata", ui-monospace, Menlo, monospace;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 32px, 960px);
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  margin: 0;
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* 1. Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 8px 16px 0;
  background: var(--hero);
  color: var(--hero-ink);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.nav {
  position: sticky;
  top: 16px;
  z-index: 2;
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav-bg);
  color: var(--ink);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

[data-theme="satsuma"] .nav { color: var(--bg); }

.nav {
  max-width: 100%;
  justify-content: safe center;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  flex: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover { background: var(--nav-hover); }

.wordmark {
  margin: 64px 0 0;
  line-height: 0;
}

.wordmark-svg {
  display: block;
  width: min(90vw, 640px);
  height: auto;
  overflow: visible;
}

.lockup {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--muted);
}

.lockup strong {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.mascot {
  width: min(100%, 720px);
  flex: 1;
  min-height: 320px;
  margin-top: 0;
  object-fit: cover;
  object-position: 50% 40%;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
}

.brand {
  position: relative;
  margin-bottom: 44px;
}

.brand .lockup,
.brand .lockup strong { color: var(--lockup-ink); }

.brand .lockup {
  position: absolute;
  right: -6px;
  bottom: -30px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  -webkit-text-stroke: 0.3em var(--lockup-edge);
  paint-order: stroke fill;
  stroke-linejoin: round;
  transform: rotate(-3deg);
  z-index: 2;
}

/* 2. Official links */

.links {
  padding: 36px 0;
  background: var(--bg);
}

.links ul {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.links a,
.links .off {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}

.links a:hover {
  background: var(--accent);
  color: var(--btn-ink);
}

.links .off { opacity: 0.35; }
.links svg { width: 24px; height: 24px; }

/* 3. Marquee */

.marquee {
  overflow: hidden;
  padding: 14px 0;
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

[data-theme="satsuma"] .marquee { color: var(--bg); }

.marquee-track {
  display: inline-flex;
  animation: slide 30s linear infinite;
}

.marquee-track span { padding-right: 48px; }
.marquee-track span.hl { color: var(--accent); }
.marquee-track .kbtc { display: inline-flex; align-items: center; gap: 8px; }
.marquee-track .kbtc-logo { width: 1.1em; height: 1.1em; }
.marquee-track .kbtc-price { font-weight: 900; }

@keyframes slide {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
}

/* 4. Buy */

.buy {
  padding: clamp(72px, 12vw, 128px) 0;
  background: var(--bg);
}

.contract {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  margin: 32px 0 0;
  padding: 8px 8px 8px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
}

.contract code {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  font-size: 16px;
}

.contract code.empty { color: var(--muted); }

.supply { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 16px 0 0; font-size: 16px; color: var(--muted); }
.supply strong { font-size: 20px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.supply span:last-child { flex-basis: 100%; }

.contract button {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.button {
  display: inline-block;
  margin-top: 20px;
  padding: 18px 36px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-ink);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  transition: background 0.15s;
}

.button:hover { background: var(--accent); }

.textlink {
  display: inline-block;
  margin: 0 0 0 24px;
  font-size: 15px;
  color: var(--muted);
}

.textlink:hover { color: var(--ink); }

/* 5. Story */

.story {
  padding: clamp(72px, 12vw, 128px) 0;
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}

[data-theme="satsuma"] .story { color: var(--bg); }

.story ol {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.story li {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr 24px;
  gap: 8px 24px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.story time {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.story p {
  margin: 0;
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 700;
  line-height: 1.35;
}

.story li a {
  font-size: 0;
  color: #8a7a68;
  text-align: right;
  text-decoration: none;
}

/* the whole row is the link; an arrow replaces the repeated "Original post" label (still read by screen readers) */
.story li a::before { content: ""; position: absolute; inset: 0; }
.story li a::after { content: "\2197"; font-size: 20px; }
.story li p { transition: color 0.15s; }
.story li:hover p,
.story li:hover a { color: #C2410C; }
.story li a:focus-visible { outline: none; }
.story li:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

@media (max-width: 640px) {
  .story li { grid-template-columns: 1fr 24px; }
  .story time { grid-column: 1 / -1; }
  .art-row { grid-template-columns: repeat(2, 1fr); }
}

/* 6. Art + footer */

.art {
  padding: clamp(72px, 12vw, 128px) 0 0;
  background: var(--bg);
}

.art-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.art-row a { display: block; }

.art-row img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
}

footer {
  padding: 56px 0 48px;
  background: var(--bg);
  text-align: center;
}

footer p { margin: 0; }

.signoff {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
}

.disclaimer {
  max-width: 46ch;
  margin: 14px auto 0;
  font-size: 13px;
  color: var(--muted);
}

/* Satsuma: portrait hero, earn section */

[data-theme="satsuma"] .mascot {
  width: min(100%, 440px);
  object-position: 50% 18%;
}

.earn {
  padding: clamp(72px, 12vw, 128px) 0;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--bg);
}

.earn h2 { margin-bottom: 0; }

.earn ul {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  line-height: 1.4;
}

.earn .contract {
  border-color: rgb(26 18 12 / 0.18);
  background: #fff;
  color: var(--bg);
}

.earn .contract code.empty { color: #8a7a68; }

.earn .button[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.earn .fine {
  max-width: 46ch;
  margin: 24px 0 0;
  font-size: 13px;
  color: #6f5f4e;
}

/* Stats page */

.stats-page { padding-bottom: 96px; }

.st-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.st-back { text-decoration: none; font-weight: 700; color: var(--muted); }
.st-back:hover { color: var(--ink); }

.st-buy-top {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-ink);
  font-weight: 900;
  text-decoration: none;
}
.st-buy-top:hover { background: var(--ink); }

.st-head { display: flex; gap: 16px; align-items: center; margin-top: 8px; }

.st-avatar {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  object-position: 50% 30%;
}

.st-title h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 900;
  line-height: 1.1;
}
.st-title h1 span { color: var(--accent); margin-left: 6px; font-size: 0.7em; }

.st-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.st-pill, .st-tag {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.st-pill.live { color: #5BD98A; border-color: #5BD98A; }

.st-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 0; font-size: 14px; }
.st-addr code { word-break: break-all; }
.st-addr code.empty { color: var(--muted); }
.st-addr button, .st-addr a {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.st-price { margin: 28px 0 12px; }
.st-big { margin: 0; font-size: clamp(40px, 9vw, 64px); font-weight: 900; line-height: 1; }
.st-change { margin: 6px 0 0; font-weight: 700; color: var(--muted); }
.st-change.up { color: #5BD98A; }
.st-change.down { color: #FF6B5B; }

.st-chart {
  position: relative;
  height: clamp(260px, 50vw, 420px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}
.st-chart iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.st-chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); }

.st-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
@media (min-width: 700px) { .st-grid { grid-template-columns: repeat(4, 1fr); } }
.st-grid div { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.st-grid dt { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.st-grid dd { margin: 4px 0 0; font-size: 24px; font-weight: 900; }

.st-info dl { margin: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.st-info dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.st-info dl > div:first-child { border-top: 0; }
.st-info dt { color: var(--muted); }
.st-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; text-align: right; font-size: 15px; }
.st-info dd.empty { color: var(--muted); }
.st-info a { color: var(--accent); text-decoration: none; }
.st-info a:hover { text-decoration: underline; }

.st-tabs { margin-top: 28px; }
.st-tablist { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.st-tablist button {
  padding: 10px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.st-tablist button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.st-empty { padding: 32px 0; text-align: center; color: var(--muted); }

.st-table { overflow-x: auto; }
.st-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.st-table th { padding: 10px 8px; text-align: left; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.st-table td { padding: 10px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.st-table a { color: var(--accent); text-decoration: none; }

.st-fine { margin: 32px 0 0; font-size: 14px; color: var(--muted); }

.st-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100% - 32px, 560px);
  padding: 10px 12px 10px 20px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(42 30 21 / 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.st-bar small { display: block; font-size: 12px; color: var(--muted); }
.st-bar strong { font-size: 20px; }
.st-bar .button { margin: 0; padding: 10px 28px; }

/* Mission */

.mission {
  padding: clamp(72px, 12vw, 128px) 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

.mission h2 { max-width: 14em; }

.mission ul {
  display: grid;
  gap: 14px;
  max-width: 600px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  line-height: 1.4;
}

.mission li:last-child { color: var(--accent); }

.mission .fine {
  margin: 28px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* About kBTC */

.about {
  padding: clamp(72px, 12vw, 128px) 0;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--bg);
}

.about .lead { max-width: 640px; margin: 24px 0 0; font-size: clamp(17px, 2.2vw, 20px); font-weight: 700; line-height: 1.45; }

.steps {
  display: grid;
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.steps li {
  padding: 22px;
  border: 1px solid rgb(26 18 12 / 0.18);
  border-radius: 20px;
  background: #fff;
}
.steps img { width: 44px; height: 44px; }
.steps h3 { margin: 14px 0 6px; font-size: 24px; font-weight: 900; }
.steps p { margin: 0; font-size: 16px; line-height: 1.45; }

.basics {
  display: grid;
  gap: 10px;
  max-width: 600px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.about .verify { margin: 28px 0 0; font-weight: 700; }
.about .verify a { margin: 0 6px 0 0; color: var(--bg); text-decoration-color: var(--accent); text-underline-offset: 4px; }
.about .verify a:hover { color: var(--accent); }
.about .fine { max-width: 560px; margin: 24px 0 0; font-size: 14px; color: #6b5a48; }

@media (max-width: 640px) {
  .nav a { padding: 8px 12px; font-size: 14px; }
}

.nav a.nav-app {
  margin-left: 6px;
  background: var(--accent);
  color: var(--btn-ink);
  font-weight: 900;
}
.nav a.nav-app:hover { background: var(--btn-ink); color: var(--accent); }

.eyebrow .nb { white-space: nowrap; }

@media (max-width: 640px) {
  .eyebrow .nb { display: block; }
  .eyebrow .sep { display: none; }

  .nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 420px;
    overflow: visible;
    border-radius: 24px;
  }
  .nav a { padding: 9px 4px; font-size: 14px; text-align: center; }
  .nav a.nav-app { grid-column: span 2; margin-left: 0; }
}

/* Clean line breaks: balance headings and the centered footer; body copy is left-aligned, so only avoid lone last words */
h2, h3, .eyebrow, .signoff, .disclaimer { text-wrap: balance; }
.story p, .earn li, .mission li, .about .lead, .basics li, .steps p, .fine, .verify, .lore p { text-wrap: pretty; }

@media (max-width: 640px) {
  .about .verify span { display: none; }
  .about .verify a { display: block; margin: 8px 0 0; }
}

@media (max-width: 640px) {
  .art-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

.st-addr code.empty { word-break: normal; }

/* Built on INK badge */

.ink-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 36px 0 24px;
  padding: 9px 18px 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ink-badge:hover { border-color: var(--accent); box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 28%, transparent); }
.ink-badge svg { width: 20px; height: 20px; flex: none; }
.ink-badge .bo { font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ink-badge strong { font-size: 16px; font-weight: 900; letter-spacing: 0.04em; }

/* Profile */

.profile { padding: clamp(64px, 10vw, 112px) 0; border-top: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.profile h3 { margin: 48px 0 16px; font-size: 22px; }
.profile .lead { max-width: 640px; margin: 20px 0 0; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.45; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 36px 0 0; }
.facts > div { padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.facts dt { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.facts dd { margin: 4px 0 0; color: var(--ink); }
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.quotes li { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.quotes blockquote { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 700; }
.quotes a { font-size: 14px; color: var(--muted); }
.quotes a:hover { color: var(--accent); }
@media (max-width: 640px) { .facts, .quotes { grid-template-columns: 1fr; } }

/* About me: her own words, with a portrait from her posts (generated by scripts/refresh-lore.py) */

.profile .lead { font-weight: 700; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.profile-photo { margin: 0; }
.profile-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); border-radius: 24px; transition: transform 0.25s; }
.profile-photo a:hover img { transform: rotate(-1deg) scale(1.01); }
.lore { max-width: 620px; margin-top: 24px; }
.lore p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.lore p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-photo img { aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) { .profile-photo a:hover img { transform: none; } }

/* Learn pages */

.learn-top { display: flex; justify-content: center; padding: 8px 16px 0; }
.learn-top .nav { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.learn-top .nav::-webkit-scrollbar { display: none; }
.nav a[aria-current="page"] { background: var(--nav-hover); }

.learn-head { padding: clamp(56px, 9vw, 96px) 0 24px; }
.learn-head h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.learn-head .lead, .lsec .sub { max-width: 640px; margin: 20px 0 0; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.45; }

.lsec { padding: clamp(40px, 7vw, 72px) 0; }
.lsec.alt { border-block: 1px solid var(--line); background: var(--bg-alt); }
.lsec h2 { font-size: clamp(26px, 4.5vw, 40px); margin-bottom: 24px; }
.lsec p { max-width: 680px; }
.lsec .sub { margin: 0 0 20px; font-size: 18px; color: var(--muted); }
.lsec .sub a, .gl a, .steps a { color: var(--accent); }

.rgrid, .tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.tiles { grid-template-columns: repeat(4, 1fr); margin: 40px 0 0; }
.lsec .tiles { margin: 0 0 32px; }

.rcard, .tiles a {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--muted); line-height: 1.5;
}
.rcard p, .rcard h3 { margin: 0; }
.rc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rcard h3 { font-size: 22px; color: var(--ink); }
.tag { flex: none; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.rc-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 6px; }
.ext { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.ext:hover { color: var(--accent); }
.lsec > .wrap > p > .ext { margin-right: 18px; }

.tiles a { height: 100%; text-decoration: none; transition: background 0.15s; }
.tiles a:hover { background: #2a2a36; }
.tiles strong { font-size: 20px; color: var(--ink); }

.steps, .bul { margin: 0; padding-left: 1.3em; max-width: 680px; }
.steps li, .bul li { margin-bottom: 12px; padding-left: 4px; }
.steps li::marker { font-weight: 900; color: var(--accent); }
.bul li::marker { color: var(--accent); }

.net, .gl { display: grid; gap: 12px; margin: 0 0 24px; }
.net { grid-template-columns: 1fr; max-width: 680px; }
.gl { grid-template-columns: repeat(2, 1fr); }
.net > div, .gl > div { padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.net dt, .gl dt { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.net dd, .gl dd { margin: 4px 0 0; word-break: break-all; }
.gl dd { word-break: normal; color: var(--muted); }

.pn { display: flex; justify-content: space-between; gap: 16px; padding: 40px 0 56px; font-weight: 700; }
.pn a { color: var(--accent); text-decoration: none; }
.pn a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .rgrid, .gl { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

/* Brand kit page */

.brand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 0 0 24px; }
.bprev { margin: 0; padding: 40px 28px 20px; border: 1px solid var(--line); border-radius: 20px; text-align: center; }
.bprev.dark { background: #0F0E12; }
.bprev.violet { background: #7132F5; }
.bprev img { width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.bprev figcaption { margin-top: 20px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; color: var(--muted); }
.bprev.violet figcaption { color: rgb(255 255 255 / 0.8); }
.dl { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 32px; }
.button.small { margin-top: 0; padding: 12px 24px; font-size: 16px; box-shadow: none; }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button.ghost:hover { background: var(--surface); }
.lsec code { font-family: var(--font-mono); padding: 1px 6px; border-radius: 6px; background: var(--surface); }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.sw { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s; }
.sw:hover { border-color: var(--accent); }
.sw .chip { width: 100%; height: 56px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; }
.sw code { padding: 0; background: none; font-family: var(--font-mono); color: var(--accent); }
.sw .note { font-size: 14px; color: var(--muted); }
.brand-art { grid-template-columns: repeat(4, 1fr); margin: 32px 0 20px; }
.rgrid.two { grid-template-columns: repeat(2, 1fr); }
.rcard h3 { font-size: 22px; }
.badge-demo { margin-top: 8px; }
.badge-demo .ink-badge { margin: 0; }
@media (max-width: 720px) {
  .brand-grid, .rgrid.two { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .brand-art { grid-template-columns: repeat(2, 1fr); }
}

.bprev.violet { background: #F7931A; }
.bprev.violet figcaption { color: rgb(26 18 12 / 0.8); }
.bprev.dark { background: #1A120C; }

.sibling { margin: 14px 0 0; font-size: 14px; }
.sibling a { color: var(--accent); text-decoration: none; }
.sibling a:hover { text-decoration: underline; }

.legal { max-width: 60ch; margin: 12px auto 0; font-size: 12px; line-height: 1.5; color: var(--muted); opacity: 0.85; }


/* Site nav: fixed to the viewport, scrolls with the page, one row on every width.
   .nav-fixed sits before the hero in index.html. Learn/stats pages keep their own .nav. */

[data-theme="octochan"] { --nav-solid: rgb(13 14 20 / 0.82); --nav-ink: #F1EEE4; }
[data-theme="satsuma"] { --nav-solid: rgb(26 18 12 / 0.88); --nav-ink: #FFF6E8; }

.nav.nav-fixed {
  position: fixed;
  top: 12px;
  left: 50%;
  translate: -50% 0;
  z-index: 50;
  width: max-content;
  max-width: calc(100vw - 24px);
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.16);
  background: var(--nav-solid);
  color: var(--nav-ink);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.25);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.nav.nav-fixed::-webkit-scrollbar { display: none; }
.nav.nav-fixed a { flex: none; padding: 8px 16px; font-size: 15px; white-space: nowrap; text-align: center; }
.nav.nav-fixed a:hover { background: rgb(255 255 255 / 0.12); }
.nav.nav-fixed a[aria-current="location"] { background: rgb(255 255 255 / 0.18); }
.nav.nav-fixed a.nav-cta:hover { background: #C4A6FF; }
.nav.nav-fixed a.nav-app { margin-left: 4px; }
.nav.nav-fixed a.nav-app:hover { background: var(--btn-ink); color: var(--accent); }
.nav.nav-fixed a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.nav-fixed + .hero { padding-top: 66px; }
section[id] { scroll-margin-top: 76px; }

@media (max-width: 640px) {
  .nav.nav-fixed { top: 8px; padding: 4px; }
  .nav.nav-fixed a { padding: 8px 12px; font-size: 14px; }
  .nav-fixed + .hero { padding-top: 60px; }
}


/* Nav dropdown. The menu sits outside the scrolling bar so the bar cannot clip it. */
.nav.nav-fixed button.nav-drop {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.nav.nav-fixed button.nav-drop:hover,
.nav.nav-fixed button.nav-drop[aria-expanded="true"] { background: rgb(255 255 255 / 0.12); }
.nav.nav-fixed button.nav-drop[aria-current] { background: rgb(255 255 255 / 0.18); }
.nav.nav-fixed button.nav-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-drop svg { transition: rotate 0.15s; }
.nav-drop[aria-expanded="true"] svg { rotate: 180deg; }

.nav-menu {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 20px;
  background: var(--nav-solid);
  color: var(--nav-ink);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav-menu[hidden] { display: none; }
.nav-menu a { padding: 10px 16px; border-radius: 14px; font-weight: 700; text-decoration: none; }
.nav-menu a:hover { background: rgb(255 255 255 / 0.12); }
.nav-menu a[aria-current="location"] { background: rgb(255 255 255 / 0.18); }
.nav-menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
[data-theme="octochan"] .nav-menu,
[data-theme="octochan"] .nav-drop { font-family: var(--font-mono); }


/* kBTC cards: learn-page list rules (.steps, .bul) were stripping the card padding. */
.about .steps {
  max-width: none;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.about .steps li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 24px;
}
.about .steps h3 { margin: 16px 0 8px; }
.about .steps p { flex: 1; }
@media (max-width: 759px) { .about .steps li { padding: 20px; } }
