:root {
  --paper: #f6f7f9;
  --sheet: #ffffff;
  --ink: #1a2230;
  --muted: #566072;
  --rule: #d4d9e2;
  --blue: #2a4a96;
  --blue-soft: #e4e9f5;
  --mark: #ffe45c;
  --warn: #8a4b00;
  --radius: 6px;
  --measure: 72ch;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--sheet); padding: 8px 12px; z-index: 10; }

/* header */
.masthead { background: var(--sheet); border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.brand small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 8px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--blue); }

main { padding: 28px 0 56px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.crumbs a { color: var(--muted); }

h1 { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.35; margin: 0 0 12px; letter-spacing: .01em; word-break: auto-phrase; text-wrap: balance; }
h2, h3 { word-break: auto-phrase; }
.lead, .evidence li, td, th { overflow-wrap: anywhere; }
h2 { font-size: 22px; line-height: 1.45; margin: 44px 0 12px; padding-top: 16px; border-top: 2px solid var(--ink); }
h3 { font-size: 18px; margin: 28px 0 8px; }
p, ul, ol { max-width: var(--measure); }
.lead { font-size: 17px; color: var(--ink); max-width: 62ch; }
.meta { color: var(--muted); font-size: 14px; }

/* hero meter */
.hero { padding: 8px 0 8px; }
.hero h1 { max-width: 20em; }
.meter { list-style: none; margin: 24px 0 8px; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.meter li { display: grid; grid-template-columns: minmax(0, 19em) minmax(0, 1fr) 7.5em; gap: 4px 16px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.meter li:last-child { border-bottom: 0; }
.meter .who { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.meter .who a { font-weight: 700; }
.meter .who span { display: block; color: var(--muted); font-size: 12px; }
.meter .bar { height: 14px; background: var(--blue-soft); border-radius: 2px; position: relative; }
.meter .bar i { position: absolute; inset: 0 auto 0 0; background: var(--blue); border-radius: 2px; }
.meter .bar.api i { background: repeating-linear-gradient(135deg, var(--blue) 0 6px, #4a67ad 6px 9px); }
.meter .yen { text-align: right; font-weight: 700; font-size: 18px; white-space: nowrap; }
.meter .yen small { font-weight: 400; font-size: 12px; color: var(--muted); }
.legend { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 4px; }
.legend b { display: inline-block; width: 22px; height: 10px; vertical-align: middle; margin-right: 6px; background: var(--blue); border-radius: 2px; }
.legend b.api { background: repeating-linear-gradient(135deg, var(--blue) 0 6px, #4a67ad 6px 9px); }

/* category index */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.cats li { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--sheet); }
.cats a { display: block; padding: 14px 16px; text-decoration: none; color: var(--ink); height: 100%; }
.cats a:hover { background: var(--blue-soft); }
.cats strong { display: block; font-size: 17px; }
.cats span { font-size: 13px; color: var(--muted); }

/* tables */
.table-scroll { overflow-x: auto; margin: 12px 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.55; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
thead th { background: #eef1f6; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td .sub, th .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.tag { display: inline-block; font-size: 12px; padding: 0 6px; border: 1px solid var(--rule); border-radius: 3px; color: var(--muted); white-space: nowrap; }
.tag.ok { color: #1d5e2f; border-color: #a9d3b4; }
.tag.no { color: #8a1f1f; border-color: #e3b1b1; }
.new { background: var(--mark); padding: 0 4px; border-radius: 2px; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin: 20px 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); overflow: hidden; }
.facts div { padding: 12px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; line-height: 1.4; }
.facts dd small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

.evidence { margin: 12px 0; padding: 0; list-style: none; }
.evidence li { border-left: 3px solid var(--rule); padding: 4px 0 4px 14px; margin: 0 0 12px; font-size: 14px; }
.evidence q { quotes: "“" "”"; font-style: normal; }
.evidence .src { display: block; color: var(--muted); font-size: 12px; }
.note { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--warn); padding: 12px 16px; border-radius: var(--radius); font-size: 14px; max-width: var(--measure); }
.changes { list-style: none; padding: 0; margin: 12px 0; max-width: none; }
.changes li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.changes time { color: var(--muted); font-size: 14px; }

.ad-slot { margin: 32px 0; min-height: 100px; }
.ad-slot:empty { display: none; }

footer { border-top: 1px solid var(--rule); background: var(--sheet); font-size: 14px; color: var(--muted); }
footer .wrap { padding-top: 24px; padding-bottom: 32px; }
footer ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 20px; }

.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto; background: var(--sheet); border: 1px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; z-index: 20; box-shadow: 0 6px 24px rgba(26, 34, 48, .18); }
.consent[hidden] { display: none; }
.consent .btns { display: flex; gap: 8px; margin-top: 10px; }
.consent button { font: inherit; padding: 6px 14px; border-radius: 4px; border: 1px solid var(--ink); background: var(--sheet); color: var(--ink); cursor: pointer; }
.consent button.yes { background: var(--ink); color: #fff; }

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .meter li { grid-template-columns: minmax(0, 1fr) auto; }
  .meter .bar { grid-column: 1 / -1; order: 3; }
  .changes li { grid-template-columns: 1fr; gap: 0; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td, table.stack th { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  table.stack td, table.stack th { border: 0; padding: 4px 12px; text-align: left; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  td.num { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
