html {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

:root {
  --bg: #060909;
  --panel: rgba(10, 14, 15, 0.9);
  --panel-strong: rgba(12, 17, 18, 0.96);
  --line: rgba(73, 211, 238, 0.18);
  --line-soft: rgba(255, 255, 255, 0.08);
  --red: #ff675f;
  --gold: #f0be6d;
  --cyan: #53dfff;
  --green: #7effa3;
  --text: #f0f1df;
  --text-soft: rgba(240, 241, 223, 0.82);
  --text-dim: rgba(240, 241, 223, 0.48);
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 103, 95, 0.16), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(83, 223, 255, 0.14), transparent 24%),
    linear-gradient(180deg, #040606 0%, #091111 56%, #050707 100%);
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
}

.backdrop-a {
  top: -10rem;
  left: -10rem;
  background: #8c231c;
}

.backdrop-b {
  right: -12rem;
  bottom: -14rem;
  background: #0f5a69;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.84' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1490px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 18px 0 52px;
}

.frame,
.flash {
  position: relative;
  background:
    linear-gradient(180deg, rgba(13, 17, 18, 0.96), rgba(8, 11, 12, 0.94));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.frame::before,
.flash::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px 18px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.brand-mark,
.hero-emblem {
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid rgba(255, 103, 95, 0.34);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 103, 95, 0.3), transparent 48%),
    linear-gradient(180deg, rgba(39, 9, 9, 0.98), rgba(12, 5, 5, 0.96));
  color: var(--red);
  font-family: var(--font-display);
  text-shadow: 0 0 24px rgba(255, 103, 95, 0.38);
}

.brand-mark {
  width: 70px;
  height: 70px;
  font-size: 2.2rem;
}

.brand-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.96;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-copy p:last-child {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 1rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.ghost-button,
.withdraw-button {
  appearance: none;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

.primary-button {
  border: 1px solid rgba(255, 103, 95, 0.42);
  background: linear-gradient(135deg, rgba(139, 32, 27, 0.96), rgba(255, 103, 95, 0.84) 62%, rgba(240, 190, 109, 0.88));
  color: #140806;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ghost-button,
.withdraw-button {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.withdraw-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

button:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 18px;
}

.flash-error {
  border-color: rgba(255, 103, 95, 0.34);
  color: #ffb7ad;
}

.flash-success {
  border-color: rgba(126, 255, 163, 0.28);
  color: var(--green);
}

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

.hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
}

.lower-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  margin-top: 18px;
}

.panel {
  padding: 26px;
}

.hero-head {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.hero-emblem {
  width: 128px;
  min-height: 128px;
  font-size: 4.4rem;
}

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

.hero-copy h2,
.section-head h3,
.tier-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.04em;
}

.hero-copy h2 {
  max-width: 11ch;
  font-size: clamp(3rem, 6vw, 6rem);
}

.muted,
.empty-state,
.fine-print,
.directive,
.model-chip span,
.contribution-meta {
  color: var(--text-soft);
  line-height: 1.6;
}

.banner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.banner {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-red {
  border: 1px solid rgba(255, 103, 95, 0.3);
  background: linear-gradient(180deg, rgba(70, 15, 15, 0.96), rgba(26, 10, 10, 0.94));
  color: #ffb8ae;
}

.badge-cyan {
  border: 1px solid rgba(83, 223, 255, 0.26);
  background: linear-gradient(180deg, rgba(7, 30, 35, 0.96), rgba(7, 17, 20, 0.94));
  color: var(--cyan);
}

.stat-grid,
.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stat-card,
.tier-grid div,
.model-chip,
.contribution-card,
.directive {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(83, 223, 255, 0.16);
  background: linear-gradient(180deg, rgba(7, 11, 12, 0.96), rgba(4, 8, 9, 0.94));
}

.stat-card,
.tier-grid div {
  padding: 16px 18px;
}

.stat-card span,
.tier-grid dt,
.fine-print {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stat-card strong,
.tier-grid dd {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.7rem, 2.4vw, 3rem);
  line-height: 1;
  color: var(--green);
  overflow-wrap: anywhere;
}

.tier-grid dd {
  margin-left: 0;
  font-size: clamp(1.2rem, 1.8vw, 2.1rem);
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h3,
.tier-panel h3 {
  font-size: clamp(2.3rem, 4.6vw, 4.2rem);
  max-width: 12ch;
}

.directive {
  margin-top: 18px;
  padding: 16px;
}

.mono-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 10px;
}

.form-grid label span {
  color: var(--text);
}

.wide {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line-soft);
  background: rgba(2, 8, 9, 0.84);
  color: var(--text);
  border-radius: 16px;
  padding: 15px 16px;
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(83, 223, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(83, 223, 255, 0.12);
}

.fine-print {
  margin-top: 14px;
}

.list-stack,
.model-grid {
  display: grid;
  gap: 12px;
}

.contribution-card,
.model-chip {
  padding: 16px;
}

.contribution-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.contribution-card strong,
.model-chip strong {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
}

.contribution-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.contribution-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
}

.model-panel {
  margin-top: 18px;
}

.model-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .hero-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-head,
  .stat-grid,
  .tier-grid,
  .form-grid,
  .model-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .hero-copy h2,
  .section-head h3,
  .tier-panel h3 {
    max-width: none;
  }

  .hero-emblem {
    width: 96px;
    min-height: 96px;
    font-size: 3.2rem;
  }
}
