/* index.html（一覧・横断ビュー）用。style.css に続けて読む。 */
.index h1 small { font-size: 0.8rem; font-weight: normal; margin-left: 8px; }
#nav a { margin-right: 14px; } #nav a.on { font-weight: bold; text-decoration: none; color: var(--fg); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.controls input[type="search"] { flex: 1 1 260px; padding: 6px 8px; font: inherit; }
.controls select, .controls button { padding: 6px 8px; font: inherit; }
table.rows { font-size: 0.9rem; } table.rows th { position: sticky; top: 0; background: var(--bg); }
table.rows th.num, table.rows td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.rows td.id { color: var(--muted); white-space: nowrap; }
table.rows td.name { min-width: 260px; }
td.name .nm a { font-weight: 600; }
td.name .nm-sub { font-size: 0.8rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 2px; }
td.name .nm-sub .id { margin: 0; font-variant-numeric: tabular-nums; }
td.name .spark { width: 48px; height: 10px; display: inline-block; vertical-align: middle; }
.tablewrap { overflow-x: auto; }
table.rows td.refl { min-width: 5.5em; } table.rows td.loop { min-width: 7.5em; } table.rows td.badges { min-width: 8em; } table.rows td.verdict { white-space: nowrap; }
table.rows th abbr { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.controls .toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9rem; color: var(--muted); }
table.rows td.rate { min-width: 110px; } table.rows td.rate .bar { width: 100%; height: 8px; } table.rows td.rate span { font-size: 0.85rem; color: var(--muted); }
table.rows td.badges .badge { margin: 1px 4px 1px 0; font-size: 0.78rem; white-space: nowrap; }
table.rows td.rates { font-size: 0.8rem; max-width: 220px; }
.more { text-align: center; } .more button { padding: 8px 16px; font: inherit; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 8px 0; }
.tile { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; cursor: pointer; }
.tile.on { border-color: var(--bar); background: var(--accent-bg); }
.tile .n { font-weight: bold; font-variant-numeric: tabular-nums; } .tile .th { grid-column: 2 / 4; font-size: 0.78rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.tabs button { padding: 6px 10px; font: inherit; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; cursor: pointer; }
.tabs button.on { border-color: var(--bar); background: var(--accent-bg); } .tabs .n { font-weight: bold; margin-left: 4px; }
.histwrap { max-width: 720px; } .histwrap svg.hist { height: 200px; } .hist text { font-size: 4px; fill: var(--muted); } .hist text.count { fill: var(--fg); }
.error { color: var(--neg); }
table.cross { width: auto; margin: 8px 0; } table.cross th, table.cross td { padding: 4px 12px; }
table.cross button { font: inherit; background: none; border: none; color: var(--link); cursor: pointer; padding: 0; text-decoration: underline; }
table.cross td.on button, table.cross tr.on th button { font-weight: bold; color: var(--fg); }
td.loop .arrow { color: var(--muted); } td.loop.attn .arrow, td.attn { color: var(--attn); font-weight: bold; } td.loop.good .arrow, td.good { color: var(--good); }
td.name .stale { display: inline-block; margin-left: 6px; font-size: 0.75rem; color: var(--badgefg); background: var(--badge); border-radius: 999px; padding: 0 8px; }
@media (max-width: 600px) { table.rows td.name { min-width: 11em; } table.rows th, table.rows td { padding: 6px 6px; } }

/* 概要（一覧の上） */
.overview { margin: 8px 0 28px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 12px 0 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; }
a.stat:hover, a.stat:focus-visible { border-color: var(--accent); }
.stat .label { font-size: 0.8rem; color: var(--muted); }
.stat .value { font-size: 1.5rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat .note { font-size: 0.78rem; color: var(--muted); }
a.stat .note { color: var(--link); }
.overview h3 { margin: 20px 0 6px; }
.ministries { display: grid; gap: 2px; }
.ministry { display: grid; grid-template-columns: 12em minmax(0, 1fr) 6.5em 14em; align-items: center; gap: 10px; padding: 4px 8px; font: inherit; font-size: 0.9rem; color: inherit; text-align: left; background: none; border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
.ministry:hover { background: var(--surface2); } .ministry.on { border-color: var(--accent); background: var(--accent-bg); }
.ministry svg.bar { height: 10px; } .ministry svg.bar rect { fill: var(--accent-soft); } .ministry.on svg.bar rect { fill: var(--accent); }
.ministry .mval { text-align: right; font-variant-numeric: tabular-nums; }
.ministry .msig { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.linklike { font: inherit; font-size: 0.9rem; background: none; border: none; padding: 4px 8px; color: var(--link); cursor: pointer; text-decoration: underline; }
.scroll-hint { display: none; margin: 0 0 4px; font-size: 0.8rem; color: var(--muted); text-align: right; }
@media (max-width: 600px) {
  .scroll-hint { display: block; }
  .ministry { grid-template-columns: minmax(0, 1fr) 5.5em; grid-template-areas: "n v" "b b" "s s"; gap: 2px 8px; padding: 6px 8px; }
  .ministry .mname { grid-area: n; } .ministry .mval { grid-area: v; } .ministry svg.bar { grid-area: b; } .ministry .msig { grid-area: s; }
  .stat .value { font-size: 1.25rem; }
}
.overview .note { font-size: 0.8rem; margin: 0 0 6px; }
