:root {
  color-scheme: dark;
}

.app-wrap {
  max-width: 1180px;
}

.app-nav {
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.brand-link {
  color: inherit;
  text-decoration: none;
  margin-right: auto;
}

.app-hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
  padding: 52px 0 28px;
}

.app-hero h1 {
  margin: 14px 0 14px;
}

.health-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #394150;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.status-badge.good {
  border-color: #2d7b5a;
  background: #123428;
}

.status-badge.warn {
  border-color: #8b6b31;
  background: #342912;
}

.status-badge.bad {
  border-color: #8c4343;
  background: #381919;
}

.status-badge.neutral {
  background: #1c2330;
}

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

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

.section-block {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.card h2 {
  margin: 2px 0 8px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 800;
  opacity: .68;
}

.muted,
.field-note {
  color: #aab3c2;
}

.field-note {
  font-size: 12px;
  line-height: 1.5;
  margin: 9px 0 0;
}

.connect-form {
  margin-top: 20px;
}

.connect-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.token-row {
  display: flex;
  gap: 10px;
}

.token-row input {
  width: 100%;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid #394150;
  background: #111722;
  color: #f5f7fb;
  padding: 12px 13px;
  font: inherit;
}

.button {
  border: 1px solid #465064;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #f5f7fb;
  background: #232b39;
}

.button:hover {
  filter: brightness(1.08);
}

.button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.button.primary {
  background: #f5f7fb;
  color: #10151e;
  border-color: #f5f7fb;
}

.button.secondary {
  background: #263a58;
  border-color: #36567f;
}

.button.ghost {
  background: transparent;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.metrics div {
  padding: 13px;
  border: 1px solid #303847;
  border-radius: 12px;
  background: #111722;
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  font-size: 24px;
}

.metrics span {
  margin-top: 3px;
  font-size: 12px;
  color: #aab3c2;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.project-card {
  border: 1px solid #303847;
  border-radius: 14px;
  padding: 16px;
  background: #141b27;
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.project-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.meta-chip {
  border: 1px solid #3a4557;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  color: #c7cfdb;
}

.project-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.inline-message,
.locked-summary {
  margin-top: 14px;
  border: 1px solid #465064;
  border-radius: 12px;
  padding: 12px 14px;
  background: #171f2c;
}

.inline-message.error {
  border-color: #8c4343;
  background: #381919;
}

.inline-message.success {
  border-color: #2d7b5a;
  background: #123428;
}

.locked-summary {
  border-style: dashed;
  text-align: center;
  color: #c5cedb;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #3b4658;
  border-radius: 14px;
  padding: 24px;
  color: #aab3c2;
  text-align: center;
}

.safety-card {
  margin-top: 34px;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .two-col,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .app-hero {
    flex-direction: column;
  }

  .health-stack {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .token-row,
  .section-heading {
    flex-direction: column;
  }

  .token-row .button {
    width: 100%;
  }

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