:root {
  color-scheme: light;
  --background: #f4f5f2;
  --foreground: #202421;
  --muted: #667067;
  --panel: #ffffff;
  --line: #d8ded7;
  --accent: #1f7a5c;
  --accent-strong: #145940;
  --danger: #a33a2b;
  --warn: #936c12;
  --shadow: 0 18px 45px rgba(28, 37, 31, 0.12);
}

* {
  box-sizing: border-box;
}

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

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--foreground);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.shell {
  width: min(1040px, calc(100vw - 32px));
  margin: 32px auto;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
}

h2 {
  font-size: 1rem;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--warn);
  font-size: 0.85rem;
  font-weight: 750;
  text-align: center;
}

.status-pill[data-tone="good"] {
  border-color: rgba(31, 122, 92, 0.35);
  color: var(--accent-strong);
  background: rgba(31, 122, 92, 0.08);
}

.status-pill[data-tone="bad"] {
  border-color: rgba(163, 58, 43, 0.35);
  color: var(--danger);
  background: rgba(163, 58, 43, 0.08);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.toolbar button:first-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.toolbar button:first-child:hover:not(:disabled) {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.summary {
  padding: 24px 28px;
}

.summary + .summary {
  border-left: 1px solid var(--line);
}

.profile {
  position: relative;
}

#avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 22px;
  right: 28px;
  border: 1px solid var(--line);
}

dl {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.debug {
  padding: 24px 28px 28px;
}

.debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

pre {
  min-height: 220px;
  max-height: 420px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #111713;
  color: #dce8df;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 1040px);
    margin: 10px auto;
  }

  .masthead,
  .toolbar,
  .summary,
  .debug {
    padding-inline: 16px;
  }

  .masthead {
    flex-direction: column;
  }

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

  .summary + .summary {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  #avatar {
    right: 16px;
  }
}
