:root {
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --bg: #fafafa;
  --card: #ffffff;
  --border: #d0d0d0;
  --primary: #24527a;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }

body { margin: 0; padding: 20px 24px 40px; }

header { max-width: 1300px; margin: 0 auto 16px; }
h1 { font-size: 1.7rem; margin: 0 0 4px; }
header p { margin: 0; color: var(--muted); }

.grid {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card.wide { grid-column: span 3; }
.card.wide2 { grid-column: span 2; }
.card h2 { font-size: 1.15rem; margin: 0; }
.explain { margin: 0; color: var(--muted); }

button {
  min-height: 48px;
  min-width: 48px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  align-self: flex-start;
  touch-action: manipulation;
}
button:disabled { background: #8a8a8a; cursor: default; }
button:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }
button.secondary { background: #e8e8e8; color: var(--text); }

.result { display: flex; flex-direction: column; gap: 8px; }

.pill {
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ececec;
  color: #333;
}
.pill.ok { background: #e3f3e7; color: #17692f; }
.pill.warn { background: #fff1cc; color: #7a4f00; }
.pill.fail { background: #fde4e2; color: #a3221a; }
.pill.info { background: #e4eef7; color: #1f4a70; }

.detail { margin: 0; white-space: pre-wrap; }

.ask { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ask p { margin: 0; flex-basis: 100%; }

dl.env { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.env dt { font-weight: 600; }
dl.env dd { margin: 0; word-break: break-word; }

.report textarea {
  width: 100%;
  font: 0.85rem/1.4 ui-monospace, monospace;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
#report-msg { font-weight: 600; }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .card.wide, .card.wide2 { grid-column: span 1; }
}
