:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --ok-bg: #f0fdf4;
  --ok-border: #86efac;
  --ok-text: #166534;
  --warn-bg: #fffbeb;
  --warn-border: #fcd34d;
  --warn-text: #92400e;
  --err-bg: #fef2f2;
  --err-border: #fca5a5;
  --err-text: #991b1b;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header.site-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.brand-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.35;
  margin: 0.25rem 0 0.5rem;
}

.lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

h2 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.card:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.card-title {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  color: var(--text);
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.badge.ready {
  background: var(--accent-soft);
  color: var(--accent);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.status-box {
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 0.95rem;
}

.status-box.ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}

.status-box.warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.status-box.err {
  background: var(--err-bg);
  border-color: var(--err-border);
  color: var(--err-text);
}

pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0.5rem 0 0;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

pre code {
  background: transparent;
  padding: 0;
}

dl.metrics {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 1.25rem;
  margin: 0;
  font-size: 0.94rem;
}

dl.metrics dt {
  color: var(--text-muted);
  font-weight: 600;
}

dl.metrics dd {
  margin: 0;
  font-family: var(--mono);
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  border: none;
  border-radius: 7px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

footer.site-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
