:root {
  color-scheme: dark;
  --bg: #07100f;
  --bg-alt: #0b1818;
  --panel: rgba(13, 30, 30, 0.86);
  --panel-strong: #102525;
  --text: #f2fff9;
  --muted: #9bb6ae;
  --line: rgba(132, 255, 216, 0.18);
  --accent: #21f6b9;
  --accent-2: #4ea8ff;
  --warn: #ffcc66;
  --danger: #ff5c8a;
  --ok: #37f29b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5faf7;
  --bg-alt: #eaf3f1;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --text: #10201d;
  --muted: #637770;
  --line: rgba(8, 96, 82, 0.18);
  --accent: #008f6f;
  --accent-2: #2268d8;
  --warn: #aa6a00;
  --danger: #c72e5f;
  --ok: #008d59;
  --shadow: 0 24px 70px rgba(39, 77, 72, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(33, 246, 185, 0.13), transparent 34rem),
    linear-gradient(280deg, rgba(78, 168, 255, 0.12), transparent 32rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.app-header,
.hero-panel,
.control-grid,
.dashboard-grid {
  position: relative;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand-lockup,
.header-actions,
.card-top,
.inline-heading,
.receipt-status,
.feed-row {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 0.86rem;
  font-weight: 900;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.header-actions {
  gap: 10px;
}

.network-pill,
#policyMode,
#lastEvaluated {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  font-weight: 800;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--panel);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  margin-top: 18px;
}

.hero-copy,
.hero-metrics article,
.scenario-rail,
.mint-console,
.receipt-panel,
.policy-panel,
.reserve-panel,
.activity-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  min-height: 0;
  padding: clamp(24px, 4vw, 42px);
}

.hero-copy h2 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 5.6vw, 4.9rem);
  line-height: 0.96;
}

.hero-copy p:last-child {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-metrics {
  display: grid;
  gap: 12px;
}

.hero-metrics article {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
}

.hero-metrics span,
label span,
dt,
.feed-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-metrics strong {
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.control-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
}

.scenario-rail,
.mint-console,
.receipt-panel,
.policy-panel,
.reserve-panel,
.activity-panel {
  padding: 20px;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 1.12rem;
}

.scenario-list,
.policy-chain,
.activity-list,
.mint-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.scenario-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.scenario-button span,
.scenario-button strong {
  padding: 0 12px;
}

.scenario-button strong {
  color: var(--muted);
  font-size: 0.78rem;
}

.scenario-button.is-active {
  border-color: rgba(33, 246, 185, 0.58);
  background: rgba(33, 246, 185, 0.12);
}

.mint-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
}

input,
select,
.amount-field {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

input,
select {
  padding: 0 12px;
}

select option {
  color: #10201d;
}

.amount-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  overflow: hidden;
}

.amount-field input {
  min-height: 46px;
  border: 0;
  background: transparent;
}

.amount-field span {
  padding-right: 12px;
  color: var(--accent);
  font-weight: 900;
}

.primary-button {
  display: inline-flex;
  min-width: 160px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
}

.mint-form .primary-button {
  width: 100%;
  grid-column: 1 / -1;
}

.receipt-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.receipt-status {
  width: fit-content;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.receipt-status p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 900;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warn);
}

.receipt-status.approved .status-dot {
  background: var(--ok);
}

.receipt-status.blocked .status-dot {
  background: var(--danger);
}

.receipt-panel h2 {
  margin-bottom: 0;
  font-size: 1.75rem;
}

.receipt-panel > p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.receipt-grid div {
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.receipt-grid dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  gap: 18px;
  margin-top: 18px;
}

.policy-panel {
  grid-row: span 2;
}

.inline-heading {
  justify-content: space-between;
  gap: 14px;
}

.policy-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.policy-card.blocked {
  border-color: rgba(255, 92, 138, 0.55);
  background: rgba(255, 92, 138, 0.1);
}

.policy-card.passed {
  border-color: rgba(55, 242, 155, 0.34);
}

.policy-index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--bg);
  background: var(--accent);
  font-weight: 950;
}

.policy-card.blocked .policy-index {
  background: var(--danger);
}

.policy-card h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.policy-card p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.policy-card span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
}

.policy-card.blocked span {
  color: var(--danger);
}

.reserve-gauge {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}

.gauge-ring {
  display: grid;
  width: 150px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel-strong) 58%, transparent 59%),
    conic-gradient(var(--accent) 0 78%, rgba(255, 255, 255, 0.08) 78% 100%);
}

.gauge-ring span {
  font-size: 1.65rem;
  font-weight: 950;
}

.reserve-gauge p {
  color: var(--muted);
  line-height: 1.55;
}

.feed-row {
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.activity-list {
  padding-left: 0;
  list-style: none;
}

.activity-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.activity-list li.approved {
  border-color: rgba(55, 242, 155, 0.3);
}

.activity-list li.blocked {
  border-color: rgba(255, 92, 138, 0.42);
}

.activity-list span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.activity-list strong {
  display: block;
  margin-top: 4px;
}

.activity-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1120px) {
  .hero-panel,
  .control-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .mint-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 20px, 1480px);
    padding-top: 14px;
  }

  .app-header,
  .inline-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero-copy h2 {
    font-size: clamp(2rem, 10vw, 2.45rem);
  }

  .hero-copy {
    padding: 22px;
  }

  .hero-metrics article {
    align-items: flex-start;
    flex-direction: column;
  }

  .mint-form,
  .receipt-grid,
  .reserve-gauge {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .gauge-ring {
    width: min(100%, 170px);
  }
}
