:root {
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: #1c312c;
  background: #f6f7f2;
  font-size: 100%;
  line-height: 1.72;
  --green: #254a40;
  --deep: #113a32;
  --ink: #1c312c;
  --muted: #4c625a;
  --line: #cbd4cb;
  --paper: #fffefa;
  --tint: #e6eee6;
  --warm: #f3e9d8;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--deep); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .15em; }
button, input, textarea, select { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #8e4b18; outline-offset: 4px;
}
[hidden] { display: none !important; }
p { max-width: 68ch; margin: .65em 0; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .55em; }
h1 { font-size: clamp(1.85rem, 5vw, 3.4rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.06rem; }
.wrap { width: min(100% - 56px, 1160px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 3; top: 8px; left: 8px; background: white; padding: 8px 12px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; min-height: 72px; flex-wrap: wrap; }
.wordmark { font-family: Georgia, serif; font-size: 1.55rem; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .62rem; letter-spacing: -.035em; }
.mark { width: 24px; height: 24px; display: inline-block; border: 1px solid var(--green); background: linear-gradient(150deg, transparent 52%, #d8a76c 52% 57%, transparent 57%), repeating-linear-gradient(0deg, transparent 0 4px, #285346 4px 5px, transparent 5px 7px); }
.masthead nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px clamp(10px, 2vw, 24px); font-size: .88rem; }
.masthead nav a { padding-block: 9px; text-decoration: none; font-weight: 600; }
.masthead nav a[aria-current="page"] { text-decoration: underline; }
.hero { display: grid; grid-template-columns: 1.12fr minmax(0, 1fr); align-items: center; gap: clamp(26px, 5vw, 70px); padding: clamp(30px, 6vw, 76px) 0; }
.hero h1 { font-family: "Hiragino Mincho ProN", YuMincho, "Yu Mincho", serif; font-weight: 700; font-size: clamp(2rem, 4.1vw, 3.2rem); line-height: 1.18; letter-spacing: -.07em; }
.hero h1 span { display: block; }
.hero p { margin-bottom: 1.25rem; }
.hero-panel { background: var(--deep); color: #f5f8f1; padding: clamp(18px, 3vw, 34px); margin: 0; }
.hero-panel a { color: #e6f6e7; }
.hero-panel h2 { margin: .3rem 0 0; }
.hero-panel figure { margin: .9rem 0 .65rem; }
.hero-panel figcaption { color: #d3e0d8; font-size: .875rem; }
.kicker { display: block; font-size: .875rem; color: var(--muted); font-weight: 650; }
.hero-panel .kicker { color: #d3e0d8; }
.search-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.search-inline input { flex: 1 1 165px; min-width: 0; }
.button, button { background: var(--deep); color: white; padding: .62rem .95rem; border: 1px solid var(--deep); border-radius: 2px; font-weight: 650; text-decoration: none; display: inline-block; cursor: pointer; }
.button.secondary, button.secondary { background: var(--paper); color: var(--deep); border-color: #82988c; }
button[disabled] { opacity: .6; cursor: default; }
input:not([type="checkbox"]), select, textarea { width: 100%; padding: .62rem .68rem; min-height: 44px; background: white; border: 1px solid #7f9388; border-radius: 2px; }
input[type="checkbox"] { width: 19px; height: 19px; margin: 3px 6px 3px 0; vertical-align: middle; accent-color: var(--deep); }
label { display: block; font-weight: 630; }
select { appearance: none; -webkit-appearance: none; padding-right: 2rem; background: linear-gradient(45deg, transparent 50%, var(--green) 50%) right 17px center / 6px 6px no-repeat, linear-gradient(135deg, var(--green) 50%, transparent 50%) right 11px center / 6px 6px no-repeat white; }
.field { min-width: 0; }
.field label { margin-bottom: 4px; }
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); margin: 0; }
.counts div { padding: .8rem 1.2rem; border-right: 1px solid var(--line); }
.counts div:first-child { padding-left: 0; }
.counts div:last-child { border-right: 0; }
.counts dt, .counts dd { margin: 0; }
.counts dt { font-size: .875rem; color: var(--muted); }
.counts dd { font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.section { margin-block: 34px; }
.page-heading { padding: clamp(24px, 5vw, 56px) 0 12px; }
.page-heading p { color: var(--muted); }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.result-summary { margin: 0; }
.filters { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); gap: 12px; padding: 1rem; background: var(--tint); }
.filter-actions, .pager { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: .85rem 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; background: var(--paper); }
th, td { padding: .72rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { white-space: nowrap; background: var(--tint); border-bottom-color: #95a99b; }
th[scope="row"] { min-width: 9em; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.small, .muted { color: var(--muted); }
.small { font-size: .875rem; }
.status { font-weight: 650; display: inline-block; }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); }
.split > * { min-width: 0; }
.note { background: var(--tint); padding: .9rem 1rem; border-left: 3px solid #718d7b; max-width: none; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-top: 1px solid var(--line); display: grid; grid-template-columns: 7.8em minmax(0, 1fr); padding: 12px 0; gap: 8px; }
.timeline li p { margin: 4px 0; }
.timeline time { font-weight: 700; font-variant-numeric: tabular-nums; }
.charts { margin-top: 14px; }
.chart { margin: 0 0 18px; }
.chart-values { display: grid; grid-template-columns: 4.8rem minmax(24px, 1fr) auto; gap: 5px 8px; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.chart-values li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; font-size: .875rem; min-width: 0; }
.bar-track { position: relative; display: block; height: 10px; background: #dfe9e0; }
.bar-track span { display: block; position: absolute; height: 100%; background: #3f745f; }
.bar-track .negative { background: #9b4e35; }
.bar-track .axis { background: #456658; width: 1px; }
.hero-panel .bar-track { background: #355b50; }
.hero-panel .bar-track span { background: #a9d1b4; }
.hero-panel .bar-track .negative { background: #e5ad79; }
.hero-panel .bar-track .axis { background: #d6e7df; }
.chart-readout { white-space: nowrap; }
.section details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 650; }
.compare-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.compare-table td { min-width: 12em; }
.compare-table p { margin: 0 0 .4em; }
.correction-form { display: grid; gap: 16px; max-width: 600px; }
.correction-form textarea { resize: vertical; }
.correction-form button { justify-self: start; }
.correction-form .trap { position: absolute; left: -10000px; }
.form-result { margin: 0; }
.weekly-article { padding-block: 18px; border-top: 1px solid var(--line); }
.weekly-body { white-space: pre-wrap; }
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; background: var(--paper); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-block: 18px; }
.footer-inner span { font-family: Georgia, serif; font-weight: 700; margin-right: auto; }
.loading { margin-block: 40px; }

@media (max-width: 790px) {
  .hero, .split { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masthead-inner { padding-block: 10px; }
  .hero { align-items: start; }
}
@media (max-width: 530px) {
  .wrap { width: calc(100% - 32px); }
  .masthead-inner { display: block; min-height: auto; }
  .masthead nav { margin-top: 3px; }
  .hero h1 { font-size: clamp(1.94rem, 8.3vw, 2.65rem); }
  .counts { grid-template-columns: 1fr 1fr; }
  .counts div { padding: .5rem .75rem; }
  .counts div:nth-child(odd) { padding-left: 0; }
  .counts div:nth-child(even) { border-right: 0; }
  .counts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .filters { padding: .75rem; }
  .filters .field:first-child { grid-column: span 2; }
  .compare-fields { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .results-table, .results-table tbody, .results-table tr, .results-table td, .results-table th { display: block; min-width: 0; }
  .results-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .results-table tr { border-bottom: 1px solid var(--line); padding: .6rem .75rem; }
  .results-table td, .results-table th { padding: .16rem 0; border: 0; }
}
