/* Small, dependency-free stylesheet. Light and dark follow the reader's system setting. */
:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #5d6066;
  --border: #dfe1e4;
  --accent: #0b5cab;
  --accent-soft: #e8f1fb;
  --warn-bg: #fff6e0;
  --warn-border: #e2b54a;
  --new: #b3261e;
  --future: #7a4b00;
  --radius: 10px;
  --maxw: 60rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1e2125;
    --text: #e9eaec;
    --muted: #a3a8b0;
    --border: #353a41;
    --accent: #7cb7f5;
    --accent-soft: #1f2e40;
    --warn-bg: #3a3014;
    --warn-border: #a8822a;
    --new: #ff8a80;
    --future: #f0c070;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; }
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 10; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.25rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.brand small { font-weight: 400; color: var(--muted); font-size: 0.78rem; margin-left: 0.5rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.92rem; }
.site-nav a[aria-current="page"] { font-weight: 700; text-decoration: none; color: var(--text); }

main { padding: 1.5rem 0 3rem; }
h1 { font-size: 1.6rem; line-height: 1.35; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; line-height: 1.4; margin: 2.2rem 0 0.8rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--border); }
h3 { font-size: 1.05rem; line-height: 1.5; margin: 0 0 0.35rem; }
p { margin: 0.6rem 0; }
.lead { color: var(--muted); margin-bottom: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

.notice { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); padding: 0.7rem 1rem; margin: 1rem 0; font-size: 0.92rem; }
.notice p { margin: 0.2rem 0; }
.pr-label { display: inline-block; border: 1px solid var(--muted); color: var(--muted); border-radius: 4px; padding: 0 0.4rem; font-size: 0.75rem; line-height: 1.5; margin-right: 0.4rem; }

.stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0 0.5rem; padding: 0; list-style: none; }
.stats li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 1rem; min-width: 9rem; }
.stats strong { display: block; font-size: 1.5rem; line-height: 1.2; }
.stats span { color: var(--muted); font-size: 0.82rem; }

.cards { display: grid; gap: 0.9rem; margin: 1rem 0; padding: 0; list-style: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.95rem 1.1rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; align-items: center; margin: 0.15rem 0 0.45rem; font-size: 0.82rem; color: var(--muted); }
.tag { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 0.6rem; font-size: 0.78rem; line-height: 1.7; white-space: nowrap; }
.tag.new { background: transparent; border: 1px solid var(--new); color: var(--new); }
.tag.future { background: transparent; border: 1px solid var(--future); color: var(--future); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.9rem; margin: 0.5rem 0; font-size: 0.92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.ai-summary { border-left: 3px solid var(--border); padding: 0.1rem 0 0.1rem 0.8rem; margin: 0.6rem 0 0.3rem; font-size: 0.93rem; }
.ai-summary .label { display: block; color: var(--muted); font-size: 0.75rem; }
.source-links { font-size: 0.86rem; margin-top: 0.4rem; }

.table-scroll { overflow-x: auto; margin: 0.8rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; background: var(--surface); }
th, td { border: 1px solid var(--border); padding: 0.45rem 0.65rem; text-align: left; vertical-align: top; }
th { background: var(--accent-soft); white-space: nowrap; }
td.nowrap { white-space: nowrap; }
/* Cells holding a free-text note wrap, but keep a readable width. */
td.note { min-width: 13rem; max-width: 22rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: end; margin: 1rem 0; padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.toolbar label { display: grid; gap: 0.15rem; font-size: 0.82rem; color: var(--muted); }
input[type="text"], input[type="search"], input[type="date"], select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.4rem 0.6rem; max-width: 100%;
}
textarea { width: 100%; min-height: 9rem; line-height: 1.5; }
button, .button {
  font: inherit; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--surface); border-radius: 6px; padding: 0.45rem 1rem; text-decoration: none; display: inline-block;
}
button.secondary, .button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.empty { color: var(--muted); padding: 1.5rem; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 1.5rem 0 2.5rem; font-size: 0.86rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-bottom: 0.8rem; }
.site-footer p { margin: 0.3rem 0; }

@media (max-width: 34rem) {
  h1 { font-size: 1.35rem; }
  .brand small { display: block; margin-left: 0; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { margin-top: 0.35rem; font-size: 0.8rem; }
}
@media print {
  .site-header, .site-footer, .toolbar, .skip, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card, table { border-color: #999; }
  a { color: #000; text-decoration: none; }
  main { padding: 0; }
}
