:root { color-scheme: light dark; }
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", Meiryo, sans-serif;
  margin: 0; padding: 0 1rem 2rem; line-height: 1.5; max-width: 1400px; margin-inline: auto;
}
h1 { font-size: 1.4rem; margin-top: 1rem; }
h2 { font-size: 1.1rem; margin-top: 1.5rem; border-bottom: 1px solid #8884; padding-bottom: 0.25rem; }
h3 { font-size: 1rem; }
table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.35rem 0.6rem; border-bottom: 1px solid #8883; }
th { color: #888; font-weight: 500; white-space: nowrap; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; flex-wrap: wrap; }
.topnav a { padding: 0.3rem 0.6rem; border-radius: 0.3rem; }
.topnav a.active { background: #2563eb22; font-weight: 600; }
.topnav .generated-at { margin-left: auto; font-size: 0.8rem; color: #888; }

.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.summary-grid section.wide { grid-column: 1 / -1; }

.filters { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.filters label { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.25rem; }

.list-table { overflow-x: auto; display: block; }
.list-table td, .list-table th { word-break: keep-all; overflow-wrap: normal; }
.list-table td:nth-child(2) { min-width: 11rem; }

.error-box { border: 1px solid #cf222e; background: #cf222e11; padding: 1rem; border-radius: 0.4rem; margin-top: 1rem; }
.error-detail { white-space: pre-wrap; font-size: 0.8rem; color: #888; }
.gap { color: #9a6700; font-style: italic; }
.data-gap-note { font-size: 0.85rem; color: #9a6700; }

.explain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

@media (max-width: 720px) {
  .summary-grid, .explain-grid { grid-template-columns: 1fr; }
  .topnav .generated-at { margin-left: 0; width: 100%; }
}
