:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #64748b;
  --line: #d8e0ea;
  --soft: #f4f8fb;
  --green: #149447;
  --blue: #2563eb;
  --orange: #b45309;
  --red: #b91c1c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--ink);
  background: #eef5f8;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.topbar strong { font-size: 20px; }
.topbar span { color: var(--muted); margin-left: 8px; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}
h1, h2, p { margin-top: 0; }
h1 { max-width: 760px; font-size: 34px; line-height: 1.15; margin-bottom: 12px; }
h2 { font-size: 20px; }
.hero p:last-child { max-width: 720px; color: var(--muted); margin-bottom: 0; }

.status-card {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 18px;
  text-align: center;
  font-weight: 800;
  border-radius: 8px;
  background: #fff7ed;
  color: var(--orange);
  border: 1px solid #fdba74;
}
.status-card.ready {
  background: #ecfdf3;
  color: var(--green);
  border-color: #86efac;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.stat {
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stat strong {
  display: block;
  font-size: 28px;
  margin-bottom: 6px;
}
.stat span { color: var(--muted); }

.panel {
  margin-top: 18px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 700;
}
input, textarea, select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #b9c5d4;
  border-radius: 6px;
  padding: 9px 11px;
  font: inherit;
}
textarea {
  min-height: 130px;
  resize: vertical;
}
.hint { color: var(--muted); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
button, .link-button {
  min-height: 38px;
  border: 1px solid #bfd0e2;
  border-radius: 6px;
  padding: 8px 13px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
button:first-child {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}
button.danger { color: var(--red); border-color: #fecaca; background: #fff5f5; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th { background: var(--soft); }
.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  background: #dbeafe;
  color: #1e40af;
}
.pill.opted-in, .pill.installed { background: #dcfce7; color: #166534; }
.small { color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 800px) {
  .hero, .grid.two, .stats { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
}
