:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #17202a;
  --muted: #65717d;
  --border: #d9dee5;
  --primary: #1769e0;
  --primary-strong: #0d4eaa;
  --success: #1f8a5b;
  --warning: #ad6b00;
  --danger: #c4382b;
  --shadow: 0 18px 45px rgba(28, 39, 55, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

button:disabled {
  color: #9aa4af;
  background: #edf0f4;
}

button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

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

button.danger {
  border-color: #e7b2ad;
  color: var(--danger);
}

.shell {
  width: min(960px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
}

.call-surface {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

h2 {
  font-size: 16px;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid #b8c6d8;
  border-radius: 999px;
  padding: 7px 12px;
  color: #285171;
  background: #edf5fb;
  font-size: 13px;
  font-weight: 800;
}

.status-pill.ok {
  color: #0f6040;
  border-color: #9ccfb7;
  background: #e9f7ef;
}

.status-pill.warn {
  color: #764a00;
  border-color: #e3bd75;
  background: #fff5df;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.status-item {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.status-item:nth-child(3n) {
  border-right: 0;
}

.status-item:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-item strong {
  display: block;
  min-height: 24px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.notice {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--warning);
  background: #fff8eb;
}

.notice p {
  margin: 4px 0;
  color: #4a3a1f;
  line-height: 1.5;
}

.actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 10px;
}

.diagnostics {
  margin-top: 18px;
}

.diagnostics h2 {
  margin-bottom: 8px;
}

pre {
  min-height: 90px;
  max-height: 180px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #101820;
  color: #d8f3dc;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .shell {
    align-items: stretch;
    padding: 12px;
  }

  .call-surface {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
  }

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

  .status-item:nth-child(3n) {
    border-right: 1px solid var(--border);
  }

  .status-item:nth-child(2n) {
    border-right: 0;
  }

  .status-item:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--border);
  }

  .status-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

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

