:root {
  color-scheme: light;
  --bg: #f4efe7;
  --bg-accent: #e2d4be;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-border: rgba(84, 61, 38, 0.14);
  --text: #20150c;
  --muted: #655241;
  --primary: #0f6c5c;
  --primary-strong: #0a4f43;
  --danger: #8a2f22;
  --shadow: 0 24px 80px rgba(37, 21, 7, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 32%),
    linear-gradient(135deg, var(--bg) 0%, #efe2d0 45%, var(--bg-accent) 100%);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0 2rem;
}

.eyebrow,
.section-label,
.stat-label {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero h1,
.panel h2,
.subpanel h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 4.6rem);
  line-height: 0.95;
  max-width: 10ch;
}

.hero-copy {
  margin: 0.9rem 0 0;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.6;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  white-space: nowrap;
}

.status-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 0.3rem rgba(15, 108, 92, 0.14);
}

.layout {
  display: grid;
  gap: 1.5rem;
}

.panel,
.subpanel,
.stat-card {
  backdrop-filter: blur(14px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.5rem;
}

.panel-header {
  margin-bottom: 1.2rem;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.token-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(84, 61, 38, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.primary,
.ghost {
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease;
}

.primary {
  border: none;
  background: var(--primary);
  color: #f7fffc;
}

.ghost {
  border: 1px solid rgba(84, 61, 38, 0.18);
  background: transparent;
  color: var(--text);
}

.primary:hover,
.ghost:hover {
  transform: translateY(-1px);
}

.message {
  margin: 1rem 0 0;
  color: var(--muted);
}

.message[data-kind="error"] {
  color: var(--danger);
}

.message[data-kind="success"] {
  color: var(--primary-strong);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 1rem 1.1rem;
}

.stat-card strong,
.stat-card span {
  display: block;
}

.stat-card strong {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 1rem;
  margin-top: 1rem;
}

.subpanel {
  padding: 1.25rem;
}

.code-block {
  margin: 0.85rem 0 0;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: #20150c;
  color: #f3ede7;
  overflow-x: auto;
}

.notes-list {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .hero,
  .panel-header-row,
  .dashboard-columns {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

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

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 1rem;
  }

  .panel,
  .subpanel,
  .stat-card {
    border-radius: 22px;
  }

  .hero h1 {
    max-width: none;
  }

  .actions {
    flex-direction: column;
  }
}
