:root {
  color-scheme: light;
  --paper: #f6f8fb;
  --white: #fff;
  --ink: #172943;
  --muted: #4a5a70;
  --blue: #153e73;
  --line: #ccd7e5;
  --accent: #a63a70;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.7 "Yu Gothic UI", "Hiragino Sans", Meiryo, sans-serif;
}
a { color: var(--blue); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(54rem, 100% - 2rem); margin-inline: auto; }
.skip-link { position: absolute; top: 0; left: 1rem; padding: .5rem 1rem; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 1rem; }
.site-header a { display: inline-flex; align-items: center; min-height: 3.25rem; }
.site-title { font-weight: 700; }

.search-panel {
  margin-top: clamp(1.25rem, 5vw, 3.25rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  padding: clamp(1rem, 4vw, 2rem);
  border-radius: .55rem;
}
h1 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.3; }
.intro { margin: .55rem 0 1.35rem; color: var(--muted); }
label { font-weight: 700; }
.query-row { display: flex; gap: .5rem; margin-top: .35rem; }
input, button, select { font: inherit; min-height: 2.85rem; border-radius: .35rem; }
input, select { border: 1px solid #788ba3; background: var(--white); color: var(--ink); padding: .4rem .65rem; }
input { flex: 1; min-width: 0; }
input::placeholder { color: var(--muted); }
button { cursor: pointer; padding: .45rem 1rem; font-weight: 700; }
button:disabled { cursor: default; opacity: .65; }
.submit { border: 1px solid var(--blue); background: var(--blue); color: var(--white); white-space: nowrap; }
.submit:hover { background: #0c2b54; }
.secondary { border: 1px solid var(--blue); background: var(--white); color: var(--blue); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .75rem; margin-top: .85rem; }

.results-section { margin-top: 1.35rem; padding-bottom: 3rem; }
.coverage, .result-meta { margin: 0; color: var(--muted); font-size: .875rem; }
#search-status { margin: .45rem 0 .65rem; font-weight: 700; }
#results { list-style: none; margin: 0 0 1rem; padding: 0; }
#results li { border-top: 1px solid var(--line); padding: 1rem 0; overflow-wrap: anywhere; }
#results h2 { margin: .2rem 0; font-size: 1.125rem; line-height: 1.5; }
.excerpt { margin: .35rem 0 0; color: var(--muted); }
mark { background: #ffedb4; color: var(--ink); }
