/* ==========================================================================
   CommonGood design system

   Visual language taken from the howl.fi reference: a soft gray-white page (#e5e7eb),
   near-black ink, one electric lime accent (#ccff00), heavy geometric display type,
   generous corner radii, pill controls, and dark hero bands with a lime glow.
   ========================================================================== */

:root {
  --bg: #e5e7eb;
  --surface: #f3f4f6;
  --surface-2: #e1e4e9;
  --surface-3: #d6dae1;
  --ink: #0f140f;
  --ink-2: #5b6558;
  --ink-3: #8b958a;
  --line: rgba(15, 20, 15, 0.1);
  --line-2: rgba(15, 20, 15, 0.16);

  --lime: #ccff00;
  --lime-ink: #5f7a00;
  --lime-soft: #f0ffc9;
  --lime-glow: rgba(204, 255, 0, 0.28);

  --dark: #0b0f0b;
  --dark-2: #12180f;
  --on-dark: #f1f4ec;
  --on-dark-2: rgba(241, 244, 236, 0.72);

  --danger: #d92d20;
  --danger-soft: #fee4e2;
  --ok: #067647;
  --ok-soft: #dcfae6;
  --warn-soft: #fff3e0;
  --warn: #b54708;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(15, 20, 15, 0.05);
  --shadow-2:
    0 2px 4px rgba(15, 20, 15, 0.04), 0 18px 40px -22px rgba(15, 20, 15, 0.3);

  --font-sans:
    "Satoshi", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono:
    "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono",
    monospace;
}

[data-theme="dark"] {
  --bg: #0b0f0b;
  --surface: #131a11;
  --surface-2: #182114;
  --surface-3: #1f2a1a;
  --ink: #f1f4ec;
  --ink-2: #a8b3a0;
  --ink-3: #7c8778;
  --line: rgba(241, 244, 236, 0.12);
  --line-2: rgba(241, 244, 236, 0.2);
  --lime-ink: #ccff00;
  --lime-soft: rgba(204, 255, 0, 0.12);
  --danger-soft: rgba(217, 45, 32, 0.16);
  --ok-soft: rgba(6, 118, 71, 0.2);
  --warn-soft: rgba(181, 71, 8, 0.2);
  --shadow-2:
    0 2px 4px rgba(0, 0, 0, 0.4), 0 18px 40px -22px rgba(0, 0, 0, 0.8);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

[hidden] {
  display: none !important;
}

:where(a, button, summary):focus-visible {
  outline: 3px solid var(--lime-ink);
  outline-offset: 3px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

p {
  margin: 0;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------------ shell */

.shell {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 18px;
}

@media (min-width: 720px) {
  .shell {
    padding: 0 28px;
  }
}

/* Dark band used for heroes: near-black with a lime glow and a faint dot field. */
.grid-bg {
  position: relative;
  overflow: hidden;
  /* A colour as well as a gradient: accessibility tooling reads background-color, and if
     the gradient ever fails to paint the band stays dark. Note `background-image`, not the
     `background` shorthand - the shorthand would reset background-color to transparent. */
  background-color: var(--dark);
  background-image: radial-gradient(
    130% 90% at 50% -10%,
    #1e2c10 0%,
    #0b0f0b 58%
  );
  color: var(--on-dark);
}

.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(204, 255, 0, 0.55) 1px,
    transparent 1.7px
  );
  background-size: 46px 46px;
  opacity: 0.09;
  pointer-events: none;
}

.grid-bg::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -70%;
  width: 1000px;
  height: 1000px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--lime-glow), transparent 62%);
  pointer-events: none;
}

.grid-bg > * {
  position: relative;
  z-index: 1;
}

.grid-bg .display,
.grid-bg .headline {
  color: #fff;
  text-wrap: balance;
}

.grid-bg .lede,
.grid-bg .muted {
  color: var(--on-dark-2);
}

.grid-bg .mono-label {
  color: var(--lime);
}

.grid-bg .tick {
  color: var(--on-dark-2);
}

/* A white card inside a dark band keeps its own light-theme text colours. */
.grid-bg .card .display,
.grid-bg .card .headline {
  color: var(--ink);
}

.grid-bg .card .muted,
.grid-bg .card .lede,
.grid-bg .card .tick {
  color: var(--ink-2);
}

.grid-bg .card .stat-label,
.grid-bg .card .tiny {
  color: var(--ink-2);
}

.grid-bg .card .mono-label {
  color: var(--lime-ink);
}

.grid-bg .btn:not(.btn-primary) {
  background: rgba(241, 244, 236, 0.08);
  border-color: rgba(241, 244, 236, 0.22);
  color: var(--on-dark);
}

.grid-bg .btn:not(.btn-primary):hover {
  background: rgba(241, 244, 236, 0.16);
}

/* ...but a button sitting on a white card inside the band is back on a light surface,
   so it must not keep the translucent-on-dark treatment (it went white-on-white). */
.grid-bg .card .btn:not(.btn-primary) {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);
}

.grid-bg .card .btn:not(.btn-primary):hover {
  background: var(--surface-2);
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(229, 231, 235, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] .site-header {
  background: rgba(11, 15, 11, 0.85);
}

.site-header .shell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.token-image-default {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.token-image-default img {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.nav {
  display: none;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px;
}

@media (min-width: 1180px) {
  .nav {
    display: flex;
  }
}

.nav a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: var(--r-pill);
  transition:
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav a[aria-current="page"] {
  background: var(--lime);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions .nav-toggle {
  display: inline-flex;
}
@media (min-width: 1180px) {
  .header-actions .nav-toggle {
    display: none;
  }
}
.mobile-nav {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 16px;
}
.mobile-nav a {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  background: var(--surface);
  font-weight: 600;
}
.mobile-nav a[aria-current="page"] {
  background: var(--lime);
  color: var(--dark);
}
.wallet-trigger {
  min-height: 40px;
  max-width: 190px;
  gap: 8px;
}
.wallet-trigger-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
  min-width: 0;
}
.wallet-trigger-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wallet-trigger-address {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}
.wallet-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--ok);
}
.wallet-status-dot.needs-network {
  background: var(--warn);
}

.wallet-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-2);
}
.wallet-dialog::backdrop {
  background: rgba(9, 13, 9, 0.6);
  backdrop-filter: blur(5px);
}
.wallet-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.wallet-dialog h2 {
  font-size: 25px;
}
.wallet-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
}
.wallet-dialog-body {
  margin-top: 22px;
}
.wallet-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.wallet-option:hover {
  background: var(--surface-2);
  border-color: var(--lime-ink);
}
.wallet-option:disabled {
  opacity: 0.6;
  cursor: wait;
}
.wallet-option-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 24px;
}
.wallet-option-icon img {
  grid-area: 1 / 1;
  object-fit: contain;
}
.wallet-option-icon > span {
  grid-area: 1 / 1;
}
.wallet-option-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wallet-option-title {
  font-weight: 750;
  overflow-wrap: anywhere;
}
.wallet-option-arrow {
  margin-left: auto;
  color: var(--ink-2);
}
.wallet-feedback {
  overflow-wrap: anywhere;
}
.wallet-feedback:empty {
  display: none;
}
.wallet-feedback.is-error {
  color: var(--danger);
}
.wallet-empty,
.wallet-account-card {
  padding: 18px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.wallet-account-name {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.wallet-account-address {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.wallet-network {
  font-size: 12px;
  font-weight: 650;
  color: var(--ok);
}
.wallet-network.needs-network {
  color: var(--warn);
}
.wallet-disconnect {
  border-color: var(--line-2);
}
.wallet-install {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.wallet-install summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.wallet-install > div {
  margin-top: 12px;
}
.wallet-install-link {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 13px;
}
[data-theme="dark"] .wallet-feedback.is-error {
  color: #ff968d;
}
[data-theme="dark"] .wallet-network {
  color: #75e9ac;
}
[data-theme="dark"] .wallet-network.needs-network {
  color: #ffc880;
}

@media (max-width: 600px) {
  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .wallet-dialog {
    padding: 20px;
  }
  .header-actions button,
  .lang-switch button,
  .btn-sm,
  .copy-btn {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
  }
}

@media (max-width: 600px) {
  .site-header .shell {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding-block: 12px;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions button {
    white-space: nowrap;
  }
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  transition:
    background 0.15s,
    color 0.15s;
}

.theme-toggle:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* language switcher: a small pill, the active language filled with lime */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
}

.lang-switch button {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 6px 12px;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button.is-active {
  background: var(--ink);
  color: var(--bg);
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.08s;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.btn-primary:hover {
  background: #d9ff33;
  border-color: #d9ff33;
}

.btn-lg {
  height: 50px;
  padding: 0 22px;
  font-size: 15px;
  width: 100%;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 12.5px;
  border-radius: var(--r-sm);
}

/* ------------------------------------------------------------------ labels */

.mono-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--lime-ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  background: var(--surface);
}

.badge-ok {
  border-color: transparent;
  color: var(--ok);
  background: var(--ok-soft);
}

.badge-warn {
  border-color: transparent;
  color: var(--warn);
  background: var(--warn-soft);
}

.badge-off {
  border-color: transparent;
  color: var(--ink-2);
  background: var(--surface-2);
}

/* ------------------------------------------------------------------ cards */

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-lg);
  /* A card can sit inside a dark band, where the inherited colour would be near-white.
     Every surface component resets the ink so light-on-light never happens. */
  color: var(--ink);
}

.card-pad {
  padding: 26px;
}

@media (min-width: 640px) {
  .card-pad {
    padding: 32px;
  }
}

.card-hard,
.card-soft {
  box-shadow: var(--shadow-2);
  border-color: transparent;
}

.panel-soft {
  background: var(--surface);
}

.window {
  border: 1px solid rgba(241, 244, 236, 0.1);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--dark-2);
  color: var(--on-dark);
}

.window-bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(241, 244, 236, 0.1);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  display: block;
}

.window-title {
  margin: 0 auto;
  padding-right: 45px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(241, 244, 236, 0.45);
}

/* ------------------------------------------------------------------ layout */

main {
  flex: 1;
}

section {
  border-bottom: 1px solid var(--line);
}

section.grid-bg {
  border-bottom: none;
}

.section-pad {
  padding-block: 60px;
}

@media (min-width: 768px) {
  .section-pad {
    padding-block: 84px;
  }
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-4 {
  gap: 4px;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}
.gap-24 {
  gap: 24px;
}
.gap-32 {
  gap: 32px;
}
.gap-48 {
  gap: 48px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.grid-2,
.grid-3,
.grid-4,
.grid-5 {
  display: grid;
  gap: 18px;
}

@media (min-width: 760px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.split {
  display: grid;
  gap: 40px;
}

@media (min-width: 980px) {
  .split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: start;
  }
}

/* ------------------------------------------------------------------ type */

.display {
  font-size: clamp(2rem, 5.2vw, 3.35rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.headline {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.lede {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: 13px;
}

.tiny {
  font-size: 12px;
}

.tick {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.tick-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

/* ------------------------------------------------------------------ stats */

.stat {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 20px;
  color: var(--ink);
}

.stat-value {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  word-break: break-word;
  margin-top: 8px;
}

.stat-label {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 4px;
}

/* ------------------------------------------------------------------ address pill */

.addr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 7px 11px;
  border-radius: var(--r-pill);
  max-width: 100%;
  color: var(--ink);
}

.addr-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  border: none;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 6px;
  border-radius: var(--r-pill);
}

.copy-btn:hover {
  background: var(--lime);
  color: var(--ink);
}

/* ------------------------------------------------------------------ tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

td.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.empty-row td {
  color: var(--ink-2);
  text-align: center;
  padding: 36px 16px;
}

/* ------------------------------------------------------------------ forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.field .hint {
  font-size: 12px;
  color: var(--ink-2);
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

textarea {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--lime-ink);
  box-shadow: 0 0 0 3px rgba(204, 255, 0, 0.35);
}

.input-row {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .input-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .input-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------ notices */

.notice {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 18px;
  font-size: 13px;
  color: var(--ink-2);
  border-radius: var(--r-md);
  border-left: 4px solid var(--lime);
}

.notice-warn {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: var(--ink);
}

.notice-info {
  border-left-color: var(--lime-ink);
  background: var(--lime-soft);
  color: var(--ink);
}

.notice-ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ink);
}

.notice strong {
  color: var(--ink);
  font-weight: 800;
  display: block;
  margin-bottom: 3px;
}

/* ------------------------------------------------------------------ steps */

.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
}

.step {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  align-items: start;
  color: var(--ink);
}

.step-num {
  counter-increment: step;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.step-num::before {
  content: counter(step, decimal-leading-zero);
}

.step h4 {
  font-size: 15.5px;
  margin-bottom: 4px;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-grid {
  display: grid;
  gap: 34px;
  padding: 56px 0;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-col h5 {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin: 0 0 12px;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 5px 0;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-legal {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ prose */

.prose {
  min-width: 0;
  overflow-wrap: anywhere;
  max-width: 780px;
  font-size: 15.5px;
  line-height: 1.78;
}

.prose h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 58px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  letter-spacing: -0.04em;
}

.prose h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.prose h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 32px 0 10px;
}

.prose p {
  margin: 0 0 16px;
  color: var(--ink-2);
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--ink-2);
}

.prose li {
  margin-bottom: 8px;
}

.prose code {
  font-size: 12.8px;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
}

.toc {
  font-size: 13px;
}

.toc a {
  display: block;
  padding: 6px 0 6px 12px;
  color: var(--ink-2);
  border-left: 2px solid var(--line);
  font-weight: 600;
}

.toc a:hover {
  color: var(--ink);
  border-left-color: var(--lime);
}

.whitepaper-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

@media (min-width: 1024px) {
  .toc {
    position: sticky;
    top: 92px;
    align-self: start;
  }
  .whitepaper-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 64px;
  }
}

/* ------------------------------------------------------------------ misc */

.kbd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--surface-2);
}

.output {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  background: var(--dark);
  color: var(--on-dark);
  border: 1px solid rgba(241, 244, 236, 0.1);
  border-radius: var(--r-md);
  padding: 16px 18px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 44px;
}

.output[data-state="error"] {
  border-color: #ff968d;
}
.output[data-state="success"] {
  border-color: #75e9ac;
}

.window .output {
  border: none;
  border-radius: 0;
  background: transparent;
}

.hidden {
  display: none !important;
}

.center {
  text-align: center;
}

.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

.divider-dashed {
  border: none;
  border-top: 1px solid var(--line);
  height: 0;
  margin: 0;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

/* Technical notes remain keyboard-accessible alongside the public-good story. */
details.card > summary {
  cursor: pointer;
  font-weight: 600;
  line-height: 1.5;
}

@media (min-width: 1180px) {
  .mobile-nav {
    display: none;
  }
}

@media (max-width: 600px) {
  input[type="text"],
  input[type="number"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px;
  }
  :where(h2, h3, summary)[id] {
    scroll-margin-top: 160px;
  }
}
