:root {
  color-scheme: light;
  --bg: #f3efe7;
  --bg-accent: #ddd2be;
  --surface: rgba(255, 250, 242, 0.86);
  --surface-strong: #fffaf2;
  --border: rgba(82, 62, 39, 0.12);
  --text: #1a1815;
  --muted: #62574c;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --danger: #b42318;
  --danger-strong: #912018;
  --success: #166534;
  --shadow: 0 24px 60px rgba(38, 26, 12, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 30%),
    linear-gradient(135deg, var(--bg) 0%, #f7f4ee 46%, var(--bg-accent) 100%);
  color: var(--text);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(26, 24, 21, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 24, 21, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 92%);
}

.page-shell {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.hero h1,
.section-head h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 0.95;
}

.eyebrow,
.card-label {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.hero-text,
.muted,
.placeholder p,
.checklist {
  color: var(--muted);
}

.hero-text {
  max-width: 44rem;
  margin: 14px 0 0;
  font-size: 1.05rem;
  line-height: 1.65;
}

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

.card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

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

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

.stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.field span {
  font-size: 0.95rem;
}

.field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(26, 24, 21, 0.12);
  border-radius: 16px;
  background: var(--surface-strong);
  padding: 0 16px;
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.16);
  border-color: rgba(15, 118, 110, 0.42);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.text-link {
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
}

.button-primary {
  background: var(--brand);
  color: #f4fffd;
}

.button-primary:hover {
  background: var(--brand-strong);
}

.button-secondary {
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-strong);
}

.button-danger {
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger-strong);
}

.message {
  min-height: 24px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.message-error {
  color: var(--danger);
}

.message-success {
  color: var(--success);
}

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

.detail-grid div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(26, 24, 21, 0.08);
}

.detail-grid dt {
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  word-break: break-word;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.pill-idle {
  background: rgba(98, 87, 76, 0.1);
  color: var(--muted);
}

.pill-live {
  background: rgba(22, 101, 52, 0.12);
  color: var(--success);
}

.health-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.dot-idle {
  background: rgba(98, 87, 76, 0.5);
}

.dot-live {
  background: #22c55e;
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.12);
}

.dot-error {
  background: #ef4444;
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.12);
}

.placeholder {
  border: 1px dashed rgba(26, 24, 21, 0.14);
  border-radius: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.45);
}

.checklist {
  margin: 16px 0 0;
  padding-left: 18px;
}

.checklist li + li {
  margin-top: 8px;
}

.text-link {
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
}

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

  .page-shell {
    padding-top: 32px;
  }
}
