:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: #15273b;
  background: #edf2f7;
  --navy: #112d4b;
  --accent: #14569b;
  --line: #c4d3e1;
}
* { box-sizing: border-box; }
body { margin: 0; }
.masthead { background: var(--navy); color: white; }
.masthead-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: .5rem 1rem; width: min(100% - 2rem, 66rem); margin: auto; min-height: 3.7rem;
}
.brand, .header-link { color: white; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; text-decoration: none; }
.card {
  width: min(100% - 1.5rem, 34rem); padding: clamp(1rem, 5vw, 2.25rem);
  margin: clamp(1rem, 5vw, 3rem) auto; background: white; border: 1px solid var(--line);
  border-radius: .8rem; box-shadow: 0 .5rem 1.6rem #173d6010; overflow-wrap: anywhere;
}
.wide { width: min(100% - 1.5rem, 59rem); }
h1, h2 { line-height: 1.35; color: var(--navy); }
h1 { margin: 0 0 1rem; font-size: clamp(1.5rem, 5vw, 2.05rem); }
h2 { margin: 0 0 .8rem; font-size: 1.35rem; }
p { margin: 0 0 1rem; }
label { display: block; font-weight: 700; margin: .85rem 0 .3rem; }
input:not([type=hidden]), select, button, .button {
  font: inherit; border-radius: .4rem; min-height: 3rem;
}
input:not([type=hidden]), select {
  width: 100%; min-width: 0; padding: .5rem .6rem; border: 1px solid #74899e; background: white; color: inherit;
}
button, .button {
  cursor: pointer; padding: .48rem .8rem; font-weight: 750;
  border: 1px solid transparent; text-align: center; display: inline-grid; place-items: center;
}
[hidden] { display: none !important; }
a { color: #12487e; text-underline-offset: .2em; }
.primary { width: 100%; margin-top: 1.15rem; background: var(--accent); color: white; text-decoration: none; }
.secondary, .toggle { background: #edf4fb; color: #123d66; border-color: #9eb7cf; }
.primary:hover { background: #104577; }
.secondary:hover, .toggle:hover, .candidate:hover { background: #dfeaf6; }
:focus-visible { outline: 3px solid #a64b00; outline-offset: 3px; }
.masthead :focus-visible { outline-color: #ffbd64; }
.password-row, .search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .45rem; }
.links, .pagination, .back { margin-top: 1rem; }
.links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.back, .links a, .pagination a { display: inline-flex; align-items: center; min-height: 2.5rem; }
.pagination { display: flex; gap: 1rem; }
.notice { border-left: 4px solid var(--accent); padding: .6rem .7rem; background: #edf4fb; margin: .8rem 0; }
.error { color: #811e20; border-color: #a82b28; background: #fff2ef; }
dl { margin: .75rem 0; }
dt { color: #364e68; font-weight: 700; }
dd { margin: 0 0 .65rem; }
.summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap: 0 .8rem; }
.results, .members { list-style: none; padding: 0; margin: .85rem 0; }
.results li + li { margin-top: .5rem; }
.candidate {
  width: 100%; text-align: left; border-color: var(--line); color: inherit; background: #f6f9fc;
  justify-items: start; grid-template-columns: minmax(0,1fr) auto; gap: .1rem .5rem;
}
.candidate strong, .candidate small, .candidate span:not(.select-label) { grid-column: 1; }
.candidate small { font-size: .78rem; font-weight: 500; }
.select-label { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: #12487e; }
section { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .4rem .7rem; }
.filters > div { flex: 1 1 12rem; }
.members li { border-bottom: 1px solid var(--line); padding: .6rem 0; display: grid; }
.members a { display: inline-flex; align-items: center; min-height: 2.5rem; justify-self: start; }
.audit-detail { font-size: .9rem; white-space: pre-wrap; }
