/* INGOTS — black machine-room UI. Accent is reserved for live status, buttons, and highlights. */

:root {
  --bg: #000000;
  --text: #f4f4f4;
  --muted: #b8b8b8;
  --line: rgba(255, 255, 255, 0.22);
  --line-strong: rgba(255, 255, 255, 0.42);
  --accent: #00ff88;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Barlow Condensed", "Arial Narrow", "Franklin Gothic Medium", Impact, sans-serif;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
}

::selection {
  background: var(--accent);
  color: #000;
}

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

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

.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;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--accent);
  color: #000;
  padding: 8px 12px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

/* ---------- nav ---------- */

.topbar-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #000;
  border-bottom: 1px solid var(--line-strong);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.brand span,
.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.nav-links,
.nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a[aria-current="true"] {
  color: var(--accent);
}

.nav-actions {
  justify-content: flex-start;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms linear, color 120ms linear, border-color 120ms linear;
}

.btn-fill {
  background: var(--accent);
  color: #000;
}

.btn-fill:hover,
.btn-line:hover,
.btn.is-copied {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.btn-fill:focus-visible {
  outline-color: #fff;
}

.btn[aria-disabled="true"],
.btn:disabled {
  border-color: rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #c2c2c2;
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 120ms linear, color 120ms linear;
}

.x-link:hover {
  background: #fff;
  color: #000;
}

.x-link[aria-disabled="true"] {
  color: #c2c2c2;
  border-color: rgba(255, 255, 255, 0.28);
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- bays ---------- */

.stack {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  margin-bottom: 28px;
}

.bay {
  position: relative;
  padding: 22px 18px 20px;
  border: 1px solid var(--line);
  background-color: #000;
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff);
  background-repeat: no-repeat;
  background-size:
    16px 1px,
    1px 16px,
    16px 1px,
    1px 16px,
    16px 1px,
    1px 16px,
    16px 1px,
    1px 16px;
  background-position:
    left 10px top 10px,
    left 10px top 10px,
    right 10px top 10px,
    right 10px top 10px,
    left 10px bottom 10px,
    left 10px bottom 10px,
    right 10px bottom 10px,
    right 10px bottom 10px;
}

.noscript {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  background: #000;
}

.kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bay-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.bay-title h2,
.bay-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 0.85;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.bay-rule {
  flex: 1 1 40px;
  min-width: 24px;
  height: 1px;
  margin-bottom: 0.45rem;
  background: rgba(255, 255, 255, 0.4);
}

/* ---------- hero ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 12vw, 8.2rem);
  line-height: 0.78;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 .line:last-child {
  color: var(--accent);
}

.kicker a {
  color: inherit;
}

.tagline {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.subtitle {
  max-width: 46ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.plate {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plate span {
  margin-right: 8px;
  color: var(--muted);
  font-weight: 500;
}

.plate strong {
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.ca-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
}

.ca-label {
  padding: 3px 8px;
  background: #fff;
  color: #000;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

#ca-line {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 700 0.75rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-btn[aria-disabled="true"],
.text-btn:disabled {
  color: #c2c2c2;
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none;
}

.mascot-block {
  margin: 0;
  min-width: 0;
}

.mascot-frame {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px solid var(--line-strong);
  background-color: #000;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(255, 255, 255, 0.045) 3px 4px
  );
}

.mascot-frame img {
  width: min(100%, 420px);
  height: auto;
  display: block;
}

.frame-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.status-lamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.status-lamp::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  background: transparent;
}

.status-lamp.is-live {
  color: var(--accent);
}

.status-lamp.is-live::before {
  background: var(--accent);
  border-color: var(--accent);
}

.stat-layout {
  display: grid;
  gap: 18px;
}

.stat-main .bay-head {
  align-items: center;
}

.stat-main .status-lamp {
  margin-left: auto;
}

.stat-label {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-hero {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.2rem, 12vw, 7.6rem);
  line-height: 0.82;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-hero.is-empty {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 500;
  line-height: 1;
}

.stat-sub,
.bay-note {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.22);
}

.stat-grid div {
  padding: 14px 12px 16px;
  background: #000;
}

.stat-grid dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-grid dd {
  margin: 10px 0 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* ---------- process ---------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: #000;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}

.ticker-track p {
  margin: 0;
  padding: 12px 1.5rem 12px 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

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

.forge-scroll:not(.hs-on) {
  padding: 4px 0 8px;
}

.hs-head,
.forge-scroll:not(.hs-on) .hs-track {
  width: min(1120px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.hs-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
}

.hs-head h2 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 0.88;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hs-meta {
  display: none;
}

.hs-count,
.hs-hint {
  margin: 0;
}

.hs-count b {
  font-size: 1.35rem;
  letter-spacing: 0;
}

.hs-bar {
  display: block;
  width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.22);
}

.hs-bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.hs-hint {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hs-track {
  list-style: none;
  display: grid;
  gap: 22px;
  margin: 18px 0 0;
  padding: 0;
}

.hs-panel {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line-strong);
  background: #000;
}

.forge-scroll:not(.hs-on) .hs-panel:not(:last-child)::after {
  content: "↓";
  position: absolute;
  left: 16px;
  bottom: -18px;
  z-index: 1;
  padding: 0 4px;
  background: #000;
  font-family: var(--font-mono);
  line-height: 1;
}

.hs-num {
  display: block;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.8;
}

.hs-panel h3 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
}

.hs-panel p {
  margin: 10px 0 0;
  max-width: 38em;
}

.hs-math {
  background: #f4f4f4;
  color: #111;
  border-color: #f4f4f4;
}

.hs-math .kicker {
  color: #444;
}

.hs-eq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28em 0.4em;
  margin: 14px 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hs-frac {
  display: inline-grid;
  justify-items: center;
  font-size: 0.55em;
  line-height: 1;
}

.hs-frac b {
  font-weight: 700;
}

.hs-frac b:first-child {
  padding-bottom: 0.12em;
  border-bottom: 3px solid currentColor;
}

.hs-frac b:last-child {
  padding-top: 0.12em;
}

.hs-math p:last-child {
  color: #333;
}

.hs-on .hs-sticky {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  padding: 108px 0 28px;
  background: #000;
}

.hs-on .hs-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hs-on .hs-track {
  display: flex;
  width: max-content;
  max-width: none;
  gap: 16px;
  margin: 0;
  padding: 0 24px 0 max(16px, calc((100vw - 1120px) / 2));
  will-change: transform;
}

.hs-on .hs-panel {
  flex: 0 0 min(78vw, 860px);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hs-on .hs-panel h3,
.hs-on .hs-panel .hs-eq,
.hs-on .hs-panel p {
  opacity: clamp(0.2, calc(var(--p, 1) * 1.4 - 0.2), 1);
}

/* ---------- furnace ---------- */

.furnace {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.furnace label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.furnace input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: 700 1.15rem var(--font-mono);
}

.furnace small {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.furnace-out {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.22);
}

.furnace-out > div {
  padding: 14px 12px 16px;
  background: #000;
}

.furnace-out .stat-label {
  margin-top: 0;
}

.furnace-num {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.claim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 18px 24px;
  align-items: end;
  margin-top: 8px;
}

.claim-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  word-break: break-all;
}

.claim-actions {
  display: flex;
  gap: 8px;
}

.furnace-num-lg {
  color: var(--accent);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}

/* ---------- terminal ---------- */

.term {
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  background: #000;
}

.term-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.term-utc {
  color: var(--muted);
  font-weight: 500;
}

.term-bar .status-lamp {
  margin: 0 0 0 auto;
}

.term-body {
  min-height: 168px;
  max-height: 380px;
  overflow: auto;
  padding: 6px 12px 14px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 27px,
    rgba(255, 255, 255, 0.04) 27px 28px
  );
  scrollbar-color: #444 #000;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed-wait {
  margin: 0;
  padding: 10px 0;
  color: var(--muted);
}

.feed-line {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 4px 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feed-prompt {
  grid-row: 1 / span 4;
  color: var(--muted);
}

.feed-time,
.feed-agent {
  color: var(--muted);
}

.feed-msg {
  margin: 0;
  overflow-wrap: anywhere;
}

/* ---------- vault ---------- */

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.ingot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  background: #000;
}

.ingot-id {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ingot h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ingot-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.ingot-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- facts ---------- */

.facts {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
}

.facts th,
.facts td {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.facts tr {
  display: grid;
  gap: 4px;
}

.facts th {
  color: var(--muted);
  font-weight: 500;
}

.facts td {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.fact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

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

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px 32px;
  padding: 28px 0 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.disclaimer {
  flex: 1 1 280px;
  max-width: 68ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- breakpoints ---------- */

@media (min-width: 640px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .fact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
  }

  .facts tr {
    display: table-row;
  }

  .facts th {
    width: 42%;
  }

  .facts td {
    text-align: right;
  }

  .facts td.fact-actions {
    display: flex;
    justify-content: flex-end;
  }

  .feed-line {
    grid-template-columns: 1rem 5.5rem 6.2rem minmax(4.5rem, 7rem) 1fr;
    gap: 10px;
    align-items: baseline;
  }

  .feed-prompt {
    grid-row: auto;
  }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.8fr);
    gap: 36px;
  }

  .stat-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.9fr);
    align-items: stretch;
    gap: 0;
  }

  .stat-main {
    padding-right: 22px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    margin: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .furnace {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .furnace label:nth-child(4),
  .furnace label:nth-child(5) {
    grid-column: span 1;
  }
}

@media (min-width: 960px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 24px;
  }

  .nav-links {
    justify-content: center;
  }

  .nav-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 420px) {
  .nav-links {
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-links a {
    flex: 0 0 auto;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 560px) {
  .bay {
    padding: 18px 14px 16px;
  }

  .hero-actions {
    display: grid;
  }

  .claim-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .ticker-track {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
  }

  .ticker-track p {
    white-space: normal;
  }

  .ticker-track p:last-child {
    display: none;
  }
}

@media (forced-colors: active) {
  .bay,
  .hs-panel,
  .ingot,
  .ca-row,
  .mascot-frame,
  .term,
  .btn,
  .x-link,
  .furnace input,
  .furnace-out,
  .stat-grid {
    border: 1px solid CanvasText;
  }
}
