/*
  SPL MINER cohesive interface layer.
  Keeps the existing mine/terminal identity while giving every route one shared
  frame, panel, type, focus, and responsive grammar.
*/

:root {
  --spl-ink: #032d28;
  --spl-deep: #06483f;
  --spl-teal: #0c7f70;
  --spl-teal-soft: #73bfb5;
  --spl-paper: #f7fbfa;
  --spl-paper-deep: #dcefeb;
  --spl-line: rgba(3, 45, 40, 0.32);
  --spl-copy: Consolas, "Courier New", monospace;
  --spl-pixel: "SPL Pixel", "Courier New", monospace;
  --spl-frame-shadow: 5px 6px 0 rgba(3, 45, 40, 0.62);
  --spl-panel-shadow: 3px 4px 0 rgba(3, 45, 40, 0.44);
  --spl-scanlines: repeating-linear-gradient(
    0deg,
    transparent 0 3px,
    rgba(12, 127, 112, 0.04) 3px 4px
  );
}

/* One legible type hierarchy: pixel display type, mono operational copy. */
body main > section[data-page] :where(p, li, dd, small, label, input, select, output),
body footer,
body .sidebar-census,
body .desk-rails {
  font-family: var(--spl-copy);
  font-variant-numeric: tabular-nums slashed-zero;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: auto;
}

body .desk-tape__track span,
body .desk-context,
body .sidebar-census,
body footer {
  font-size: 10px;
  line-height: 1.35;
}

body main > section[data-page] :where(h1, h2, h3, h4, button, summary, dt, .panel-code, .section-index) {
  font-family: var(--spl-pixel);
}

body main > section[data-page] :where(h1, h2, h3) {
  text-wrap: balance;
}

body main > section[data-page] :where(p, li, dd) {
  overflow-wrap: anywhere;
}

body main > section[data-page] :where(.section-index, .panel-code, .micro-label) {
  font-size: max(0.68rem, 10.5px);
  line-height: 1.3;
  letter-spacing: 0.11em;
}

/* Every route sits in the same industrial registry frame. */
body main > .site-section:not(.mine-overview):not(.embedded-docs),
body main > #mint.mint-layout,
body main > #home.mine-overview,
body main > #docs.embedded-docs {
  width: min(calc(100% - 24px), 1280px);
  margin-inline: auto;
}

body main > #mint.mint-layout {
  width: min(calc(100% - 24px), 1320px);
}

body main > .site-section:not(.mine-overview):not(.embedded-docs) {
  padding: clamp(18px, 1.8vw, 24px);
  color: var(--spl-ink);
  background: var(--spl-scanlines), var(--spl-paper);
  border: 3px solid var(--spl-ink);
  border-top: 6px solid var(--spl-teal);
  box-shadow: var(--spl-frame-shadow);
}

body main > #home.mine-overview {
  border: 3px solid var(--spl-ink);
  border-top: 6px solid var(--spl-teal);
  box-shadow: var(--spl-frame-shadow);
}

body main > #docs.embedded-docs .docs-hero,
body main > #docs.embedded-docs .docs-chapter-rail,
body main > #docs.embedded-docs .docs-document-shell {
  border-width: 3px;
  box-shadow: var(--spl-panel-shadow);
}

/* Shared route masthead. */
body main .section-heading {
  position: relative;
  min-height: 104px;
  margin: 0 0 18px;
  padding: 6px 0 15px;
  align-items: end;
  border-bottom: 3px solid var(--spl-ink);
}

body main .section-heading::before {
  content: none;
}

body main .section-heading h2 {
  max-width: 18ch;
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
}

body main .section-heading > p {
  max-width: 62ch;
  margin: 0;
  font-size: clamp(0.8rem, 0.9vw, 0.92rem);
  line-height: 1.55;
}

/* Shared cream-panel components across all modules. */
body main :where(
  .process-grid li,
  .supply-card,
  .serial-checker,
  .serial-ladder,
  .mine-activation-console,
  .tool-power-deck,
  .trait-preview-panel,
  .trait-browser-panel,
  .machine-simulator,
  .fusion-concept-panel,
  .fusion-terminal,
  .wallet-bay,
  .miner-blueprint,
  .overview-panel
) {
  border-radius: 0;
  box-shadow: var(--spl-panel-shadow);
}

body main :where(
  .process-grid li,
  .supply-card,
  .serial-checker,
  .serial-ladder,
  .mine-activation-console,
  .tool-power-deck,
  .trait-preview-panel,
  .trait-browser-panel,
  .machine-simulator,
  .fusion-concept-panel,
  .fusion-terminal,
  .wallet-bay,
  .miner-blueprint
) {
  border: 2px solid var(--spl-ink);
}

body main :where(
  .process-grid p,
  .utility-flow p,
  .supply-card p,
  .serial-checker p,
  .tool-power-deck p,
  .machine-simulator p,
  .fusion-section p,
  .wallet-section p,
  .overview-panel p
) {
  font-size: 0.78rem;
  line-height: 1.52;
}

body main :where(
  .network-status span,
  .network-status small,
  .route-capacity-ledger span,
  .route-capacity-ledger small,
  .catalog-panel-head span,
  .catalog-panel-head small,
  .overview-status span,
  .overview-status small,
  .overview-census dt,
  .overview-census small,
  .wallet-metrics dt,
  .wallet-offline-state small,
  .fusion-result dt,
  .fusion-slots label > span
) {
  font-family: var(--spl-copy);
  font-size: 0.66rem;
  line-height: 1.35;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

body main :where(
  .special-signal-card small,
  .special-signal-card span,
  .trait-tabs button,
  .trait-card small,
  .trait-card span,
  .integrity-strip,
  .utility-guardrail,
  .fusion-guardrail,
  .reroll-rule-strip,
  .wallet-connect-button,
  .fusion-connect-button,
  .fusion-action-button
) {
  font-size: max(0.68rem, 10.5px);
  line-height: 1.35;
}

/* Resolve legacy 6–9px labels with route-specific specificity. */
body main #home :is(
  .overview-mark dt,
  .overview-mark dd,
  .catalog-panel-head span,
  .catalog-panel-head small,
  .overview-census dt,
  .overview-census small,
  .overview-status span,
  .overview-status small
),
body main #mint .mint-guide__head span,
body main #rarity .serial-checker label,
body main #specials .special-signal-card :is(span, small),
body main #mine-network .network-status :is(span, small),
body main #mine-network .route-capacity-ledger :is(span, small),
body main #miner-lab .trait-tabs button,
body main #miner-lab .trait-card :is(span, small),
body main #fusion :is(.fusion-wallet-state, .fusion-result dt, .fusion-result dd, .fusion-action-button small),
body main #my-miners :is(
  .wallet-offline-state small,
  .wallet-metrics dt,
  .wallet-metrics dd,
  .wallet-connect-button,
  .reroll-rule-strip,
  .reroll-rule-strip strong,
  .reroll-rule-strip span
),
body main #docs :is(
  .docs-hero-search label,
  .docs-nav-group-title,
  .docs-rail-status span,
  .docs-rail-status small,
  .docs-document-meta > span,
  .docs-document-pager span
) {
  font-family: var(--spl-copy);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.055em;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

body main #home :is(.overview-route-count, .overview-route-count span, .overview-route-tool, .overview-route-card b),
body main #mine-network .mine-activation-console :is(.mine-activation-copy > span, dt, dd, small),
body main #miner-lab :is(.simulator-controls label, .simulator-controls select, .simulator-readout dt, .simulator-readout dd),
body main #docs .docs-document-content :is(
  .fact span,
  .status-card span,
  .status-card strong,
  .flow-step span,
  .manual-card small
) {
  font-family: var(--spl-copy);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

body main :where(
  .network-status strong,
  .route-capacity-ledger strong,
  .overview-status strong,
  .overview-census dd,
  .wallet-metrics dd,
  .fusion-result dd
) {
  font-variant-numeric: tabular-nums slashed-zero;
}

/* WL above Public: two real mint controls sharing one onchain allowance. */
body main #mint .pixel-mint-frame .mint-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

body main #mint .mint-phase-actions,
body main #mint .mint-extra-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 7px;
  min-width: 0;
}

body main #mint .mint-phase-actions .mint-phase-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  min-height: 76px;
  padding: 7px 9px;
  color: var(--spl-paper);
  background: var(--spl-teal);
  border: 4px solid var(--spl-paper);
  box-shadow: inset 0 -6px 0 rgba(3, 45, 40, 0.36), 4px 4px 0 var(--spl-ink);
  text-align: left;
  opacity: 1;
  filter: none;
}

body main #mint .mint-phase-button .mint-phase-heading,
body main #mint .mint-phase-button .mint-phase-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
}

body main #mint .mint-phase-heading strong { font: 700 12px/1.2 var(--spl-pixel); }
body main #mint .mint-phase-heading > span { font: 400 10px/1.2 var(--spl-copy); }
body main #mint .mint-phase-button time { font: 400 10px/1.3 var(--spl-copy); letter-spacing: 0; }

body main #mint .mint-phase-button .button-main {
  flex: 1 1 auto;
  min-width: 0;
  font: 700 11px/1.3 var(--spl-copy);
  text-align: left;
}

body main #mint .mint-phase-button .button-key {
  flex: 0 1 auto;
  width: auto;
  max-width: 55%;
  min-height: 24px;
  padding: 3px 7px;
  color: var(--spl-paper) !important;
  background: var(--spl-ink) !important;
  border: 2px solid var(--spl-paper);
  font: 700 11px/1.3 var(--spl-copy);
  white-space: normal;
  text-align: center;
}

body main #mint .mint-phase-button[data-phase-state="current"] {
  color: var(--spl-paper);
  background: var(--spl-teal);
  border-color: var(--spl-paper);
}

body main #mint .mint-phase-button[data-phase-state="ended"] {
  color: var(--spl-paper-deep);
  background: var(--spl-deep);
}

body main #mint .mint-phase-button:disabled { cursor: not-allowed; }
body main #mint .mint-phase-button:enabled:hover { background: var(--spl-deep); }
body main #mint .mint-phase-button:focus-visible { outline: 3px solid var(--spl-paper); outline-offset: 3px; }

body main #mint .mint-phase-note {
  margin: 7px 0 0;
  padding: 0;
  color: var(--spl-paper);
  font: 400 10px/1.5 var(--spl-copy);
  text-align: center;
}

/* Budget space for stacked controls without cropping or stretching the art. */
@media (min-width: 1121px) {
  body main #mint .pixel-mint-frame .machine-stage {
    width: min(100%, clamp(300px, calc(100vh - 560px), 408px));
  }
}

@media (min-width: 1121px) and (max-height: 820px) {
  body main #mint .pixel-mint-frame .machine-stage {
    width: min(100%, clamp(240px, calc(100vh - 530px), 280px));
  }
}

@media (max-width: 620px) {
  body main #mint .pixel-mint-frame .mint-actions { grid-template-columns: minmax(0, 1fr); }
  body main #mint .mint-extra-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  body main #mint .mint-phase-actions .mint-phase-button { min-height: 80px; padding: 9px 10px; }
}

/* Mint Brief: keep core answers visible, place deeper collection rules in one drawer. */
body main #mint .mint-guide__questions > .mint-guide__more {
  border-bottom: 0;
}

body main #mint .mint-guide__questions > details:not(.mint-guide__more) > summary {
  min-height: 44px;
}

body main #mint .mint-guide__questions > .mint-guide__more > summary {
  min-height: 44px;
  justify-content: space-between;
  color: var(--spl-paper);
  background: var(--spl-deep);
  border-top: 2px solid var(--spl-ink);
}

body main #mint .mint-guide__questions > .mint-guide__more > summary::before {
  color: var(--spl-teal-soft);
}

body main #mint .mint-guide__more > summary span {
  flex: 1;
}

body main #mint .mint-guide__more > summary b {
  flex: 0 0 auto;
  padding: 3px 6px;
  color: var(--spl-deep);
  background: var(--spl-paper);
  border: 1px solid var(--spl-teal-soft);
  font: 700 10px/1.2 var(--spl-copy);
  letter-spacing: 0.06em;
}

body main #mint .mint-guide__more-list {
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--spl-ink);
  background: var(--spl-paper);
  border-top: 1px solid var(--spl-ink);
  scrollbar-color: var(--spl-teal) var(--spl-paper-deep);
  scrollbar-width: thin;
}

body main #mint .mint-guide__more-list > details {
  border-bottom: 1px solid var(--spl-line);
}

body main #mint .mint-guide__more-list > details > summary,
body main #mint .mint-guide__more-list > details[open] > summary {
  min-height: 42px;
  padding: 8px 10px;
  color: var(--spl-ink);
  background: var(--spl-paper);
  font-size: 0.69rem;
  line-height: 1.35;
}

body main #mint .mint-guide__more-list > details > summary::before,
body main #mint .mint-guide__more-list > details[open] > summary::before {
  color: var(--spl-teal);
}

body main #mint .mint-guide__more-list > details[open] > summary::before {
  content: "▾";
}

body main #mint .mint-guide__more-list > details > p {
  padding: 9px 12px 11px 27px;
  font-size: 0.72rem;
  line-height: 1.55;
  background: var(--spl-paper-deep);
}

/* Compact catalog hierarchy: content first, technical references one level deeper. */
body main #home .overview-hero { min-height: 280px; }
body main #docs .docs-hero { min-height: 210px; }

body .wordmark {
  min-height: 86px;
  padding: 11px 16px 10px;
  grid-template-columns: 48px 1fr;
  gap: 10px;
}

body .wordmark img {
  width: 44px;
  height: 44px;
  padding: 4px;
}

body .brand-name { font-size: 0.9rem; }
body .brand-name::after { margin-top: 6px; font-size: 0.56rem; }

body .site-nav {
  padding: 8px 12px 5px;
  gap: 5px;
}

body .site-nav a {
  min-height: 38px;
  padding-block: 7px;
  font-size: 0.68rem;
}

.sidebar-census {
  margin: 7px 12px 0;
  padding: 8px;
  border-top-width: 4px;
}

body .topbar-actions {
  padding: 10px 12px 14px;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  align-items: stretch;
  align-self: stretch;
  border-top: 0;
}
body .wallet-link { min-height: 46px; padding: 9px; font-size: 0.68rem; }

body .topbar-actions .wallet-link { width: 100%; }

.sidebar-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 -12px 2px;
  padding: 0 12px 12px;
  border-bottom: 2px solid var(--spl-ink);
}

.mobile-socials { display: none; }

body .topbar .social-link {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 8px;
  color: var(--spl-teal);
  background: var(--spl-paper);
  border: 1px solid var(--spl-teal);
  box-shadow: 2px 2px 0 rgba(3, 45, 40, 0.18);
  text-decoration: none;
  transform: none;
  transition: color 120ms linear, background-color 120ms linear;
}

body .topbar .social-link::before,
body .topbar .social-link::after { content: none; }

body .topbar .social-link svg { display: block; flex-shrink: 0; fill: currentColor; }

body .topbar .social-link:hover,
body .topbar .social-link:focus-visible {
  color: var(--spl-paper);
  background: var(--spl-teal);
  transform: none;
}

body main #mint > .intro-panel { padding: 27px 23px 22px; }
body main #mint .intro-panel::before { margin-bottom: 14px; }
body main #mint .intro-panel h1 {
  max-width: 9.6ch;
  font-size: clamp(2.2rem, 3vw, 3.25rem);
  line-height: 0.94;
}
body main #mint .intro-panel .lead {
  margin-block: 15px 12px;
  font-size: 0.84rem;
  line-height: 1.52;
}
body main #mint .console-head h2 { font-size: clamp(1.3rem, 2vw, 1.75rem); }

body main #home .overview-copy { padding: clamp(24px, 3vw, 36px); }
body main #home .overview-copy h1 {
  margin: 7px 0 10px;
  font-size: clamp(2.35rem, 3.6vw, 3.25rem);
  line-height: 0.92;
}
body main #home .overview-mark {
  min-height: 210px;
  padding: 20px;
  gap: 17px;
}
body main #home .overview-actions { margin-top: 16px; }
body main #home .catalog-panel-head {
  min-height: 58px;
  padding: 12px 16px 11px;
}
body main #home .catalog-panel-head h2 { font-size: clamp(1.15rem, 1.7vw, 1.55rem); }
body main #home .overview-census > div { padding: 13px 15px 15px; }
body main #home .overview-shaft-grid { padding: 14px 16px 17px; }
body main #home .overview-shaft-card { padding: 12px; gap: 8px; }

body main #rarity .supply-map { gap: 8px; }
body main #rarity .supply-card { min-height: 0; padding: 18px; }
body main #rarity .supply-card strong { font-size: clamp(2rem, 3vw, 2.7rem); }
body main #rarity .rarity-workbench { gap: 10px; }

body main #specials .special-signal-grid { gap: 9px; }
body main #specials .special-signal-card {
  display: grid;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
}
body main #specials .special-signal-card .special-signal-preview {
  position: relative;
  display: grid;
  height: clamp(150px, 15vw, 190px);
  margin: 0;
  overflow: hidden;
  place-items: center;
  background: #0c7f70;
  border-bottom: 1px solid var(--desk-muted);
  isolation: isolate;
}
body main #specials .special-signal-card .special-signal-preview::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: repeating-linear-gradient(0deg, rgba(240, 243, 243, 0.045) 0 1px, transparent 1px 4px);
  content: "";
}
body main #specials .special-signal-card .special-signal-preview img {
  width: 92%;
  max-width: none;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
}
body main #specials .special-signal-card .special-signal-plaque {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
  min-height: 66px;
  margin: 0;
  padding: 9px 11px 10px;
  background: var(--desk-white);
}
body main #specials .special-signal-card .special-signal-plaque b {
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--desk-teal);
  font-family: var(--spl-display);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: none;
}
body main #specials .special-signal-card .special-signal-plaque span,
body main #specials .special-signal-card .special-signal-plaque small {
  margin: 0;
  line-height: 1.15;
}
body main #specials .special-signal-card .special-signal-plaque span {
  font-weight: 900;
  letter-spacing: 0.07em;
}
body main #specials .special-signal-card .special-signal-plaque small {
  color: var(--desk-teal);
}
body main #specials .special-signal-card:hover .special-signal-plaque,
body main #specials .special-signal-card:focus-visible .special-signal-plaque {
  background: var(--desk-ink);
}
body main #specials .special-signal-card:hover .special-signal-plaque :is(b, span, small),
body main #specials .special-signal-card:focus-visible .special-signal-plaque :is(b, span, small) {
  color: var(--desk-white);
}

body main #docs .docs-hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 22px;
  padding: clamp(20px, 2.2vw, 28px);
  align-items: center;
}
body main #docs .docs-hero h1 {
  max-width: 13ch;
  margin: 6px 0 9px;
  font-size: clamp(2.2rem, 3.5vw, 3.15rem);
  line-height: 0.92;
}
body main #docs .docs-hero h1 em {
  margin-top: 4px;
  box-shadow: 3px 4px 0 var(--docs-deep);
}
body main #docs .docs-hero-search { padding: 12px; }
body main #docs .docs-hero-search input { min-height: 44px; }
body main #docs .docs-workspace { gap: 10px; margin-top: 10px; }
body main #docs .docs-document-header { padding: clamp(18px, 2vw, 24px); }
body main #docs .docs-document-header h2 {
  margin: 12px 0 7px;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  line-height: 0.96;
}
body main #docs .docs-document-content > section { padding: clamp(18px, 2vw, 24px); }
body main #docs .docs-document-content h2 {
  margin-bottom: 14px;
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
}
body main #docs .docs-document-content h3 { margin: 18px 0 7px; font-size: 1rem; }
body main #docs .docs-document-content p { font-size: 0.84rem; line-height: 1.52; }
body main #docs .status-card,
body main #docs .fact,
body main #docs .flow-step,
body main #docs .manual-card { padding: 11px; }
body main #docs .status-card strong { font-size: 0.96rem; }

body main #home .overview-copy > p,
body main #docs .docs-hero > div > p,
body main #docs .docs-hero-search > p,
body main #docs .docs-document-header > p,
body main #docs .docs-document-content p,
body main #docs .docs-document-content li,
body main #docs .docs-document-content td {
  font-family: var(--spl-copy);
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

body main #home .overview-copy > p,
body main #docs .docs-hero > div > p,
body main #docs .docs-document-header > p {
  font-size: clamp(0.8rem, 0.9vw, 0.92rem);
  line-height: 1.55;
}

body main #home .catalog-panel-head,
body main #docs .docs-document-header {
  border-bottom-width: 3px;
}

body main #docs .docs-nav-group a,
body main #docs .docs-rail-status small,
body main #docs .docs-document-meta > span,
body main #docs .docs-document-pager span {
  font-family: var(--spl-copy);
  font-size: 0.68rem;
  line-height: 1.35;
  -webkit-font-smoothing: auto;
}

body main #docs .docs-nav-group a {
  min-height: 44px;
}

body main #docs .docs-document-content summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Controls remain visibly interactive and keyboard-usable. */
body :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--spl-teal-soft) !important;
  outline-offset: 3px;
}

body main :where(button, select, input, summary) {
  touch-action: manipulation;
}

body main :where(button, select, input):not(.sound-toggle) {
  min-height: 44px;
}

body main canvas,
body main img {
  image-rendering: pixelated;
}

/* Mobile keeps the same hierarchy without shrinking operational copy into noise. */
@media (max-width: 1120px) {
  body main .section-heading {
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
    padding-top: 8px;
  }

  body main #docs .docs-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 900px) {
  body .topbar-actions { padding: 0; align-self: center; }
  .sidebar-socials { display: none; }
  .mobile-socials {
    display: flex;
    grid-column: 1 / -1;
    justify-content: center;
    gap: 10px;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid var(--spl-line);
  }

  body main > .site-section:not(.mine-overview):not(.embedded-docs),
  body main > #mint.mint-layout,
  body main > #home.mine-overview,
  body main > #docs.embedded-docs {
    width: min(calc(100% - 16px), 1280px);
  }

  body main > #mint.mint-layout { width: min(calc(100% - 16px), 1320px); }

  body main > .site-section:not(.mine-overview):not(.embedded-docs) {
    padding: 20px 16px;
    border-width: 2px;
    border-top-width: 5px;
    box-shadow: 4px 5px 0 rgba(3, 45, 40, 0.6);
  }

  body main #home .overview-hero,
  body main #docs .docs-hero {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  body main #specials .special-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body main #specials .special-signal-card .special-signal-preview {
    height: clamp(118px, 36vw, 150px);
  }

  body main #specials .special-signal-card .special-signal-plaque {
    min-height: 61px;
    gap: 2px 7px;
    padding: 8px;
  }
}

@media (max-width: 620px) {
  body main .section-heading h2 {
    max-width: 100%;
    font-size: clamp(1.8rem, 9vw, 2.55rem);
  }

  body main #docs .docs-hero { padding: 18px 16px; }

  body main #mint .mint-guide__more-list {
    max-height: 260px;
  }

  body main #mint .mint-guide__more-list > details > summary {
    font-size: 0.67rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body *, body *::before, body *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Compact wallet picker shared by every connection entry point. */
body .wallet-link {
  appearance: none;
  cursor: pointer;
}

.wallet-connect-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  color: var(--spl-ink);
  background: transparent;
  overflow: auto;
}

.wallet-connect-dialog[open] {
  display: grid;
  place-items: center;
}

.wallet-connect-dialog::backdrop {
  background: rgba(1, 20, 18, 0.72);
  backdrop-filter: blur(2px);
}

.wallet-connect-panel {
  position: relative;
  width: min(100%, 340px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 14px;
  border: 2px solid var(--spl-ink);
  border-top: 4px solid var(--spl-teal);
  background: var(--spl-scanlines), var(--spl-paper);
  box-shadow:
    0 0 0 2px var(--spl-paper),
    5px 6px 0 rgba(1, 20, 18, 0.6);
}

.wallet-connect-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--spl-line);
}

.wallet-connect-header h2 {
  margin: 0;
  color: var(--spl-ink);
  font-family: var(--spl-pixel);
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.wallet-connect-close {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--spl-ink);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: 700 1.6rem/1 var(--spl-copy);
}

.wallet-connect-close:hover,
.wallet-connect-close:focus-visible {
  color: var(--spl-ink);
  background: var(--spl-teal-soft);
}

.wallet-provider-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.wallet-provider-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 9px 12px;
  border: 1px solid var(--spl-line);
  color: var(--spl-ink);
  background: var(--spl-paper-deep);
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms linear, color 120ms linear;
}

.wallet-provider-option:hover,
.wallet-provider-option:focus-visible {
  color: var(--spl-paper);
  background: var(--spl-teal);
  border-color: var(--spl-ink);
}

.wallet-provider-option:focus-visible,
.wallet-connect-close:focus-visible {
  outline: 2px solid var(--spl-teal);
  outline-offset: 2px;
}

.wallet-provider-option[data-active="true"] {
  color: var(--spl-ink);
  background: var(--spl-teal-soft);
}

.wallet-provider-option:disabled {
  cursor: wait;
  opacity: 0.68;
}

.wallet-provider-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  background: var(--spl-paper);
}

.wallet-provider-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.wallet-provider-identity {
  min-width: 0;
  overflow: hidden;
  font: 700 0.9rem/1.3 var(--spl-copy);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-provider-state {
  font: 700 1rem/1 var(--spl-copy);
  text-align: right;
}

.wallet-disconnect-button {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--spl-line);
  color: var(--spl-deep);
  background: transparent;
  font: 700 0.8rem/1.3 var(--spl-copy);
  cursor: pointer;
}

.wallet-disconnect-button[hidden] { display: none; }

.wallet-disconnect-button:hover,
.wallet-disconnect-button:focus-visible {
  color: var(--spl-paper);
  background: var(--spl-deep);
}

.wallet-connect-status {
  margin: 12px 0 0;
  color: var(--spl-ink);
  font: 0.75rem/1.5 var(--spl-copy);
  overflow-wrap: anywhere;
}

.wallet-connect-status[hidden] { display: none; }

.wallet-connect-status a {
  color: var(--spl-deep);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .wallet-provider-option,
  .wallet-connect-close {
    transition: none;
  }
}
