:root {
  color-scheme: light;
  --ink: #1c3142;
  --muted: #486370;
  --navy: #1f5b68;
  --navy-dark: #173444;
  --link: #136f7a;
  --paper: #ffffff;
  --page: #f3f7f8;
  --line: #a8b9c1;
  --notice: #eaf5f4;
  --notice-border: #2d7c7c;
  --good: #2e7a58;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { color: #0e5360; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 4px solid #c47d2a;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 5;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.8rem 1rem;
  transform: translateY(-160%);
  color: #fff;
  background: var(--navy-dark);
  border-radius: 0.45rem;
  font-weight: 750;
}
.skip-link:focus { transform: translateY(0); }

.site-header { color: #fff; background: var(--navy-dark); }
.header-inner, .page-shell, .footer-inner {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
}
.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.brand {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-size: 1.16rem;
  font-weight: 800;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand-mark {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  padding: 0.16rem;
  background: #fff;
  border-radius: 0.75rem;
  object-fit: contain;
}
.edition { color: #f5d98a; font-size: 0.95rem; font-weight: 700; text-align: right; }

.page-shell { padding-block: 1.25rem 2rem; }
.intro { padding-block: 0.75rem 1rem; }
.eyebrow { margin: 0 0 0.3rem; color: #2f6672; font-size: 0.94rem; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 18ch;
  margin-bottom: 0.6rem;
  color: var(--navy-dark);
  font-size: clamp(2.1rem, 10vw, 3.25rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.intro-copy { max-width: 62ch; margin-bottom: 0; color: #2f4657; }

.data-notice, .search-panel, .official-help {
  margin-top: 1rem;
  padding: 1.15rem;
  background: var(--paper);
  border: 1px solid #b9c4ca;
  border-radius: 12px;
}
.data-notice {
  background: var(--notice);
  border: 2px solid var(--notice-border);
}
.data-notice h2, .official-help h2 {
  margin-bottom: 0.45rem;
  color: var(--navy-dark);
  font-size: 1.25rem;
  line-height: 1.25;
}
.data-notice p, .official-help p { margin-bottom: 0.6rem; }
.data-notice p:last-child, .official-help p:last-child { margin-bottom: 0; }
.source-line { font-size: 1rem; }

.search-panel { padding: 1.15rem; }
.panel-heading { margin-bottom: 1.1rem; }
.panel-heading h2, .results > h2 {
  margin-bottom: 0.5rem;
  color: var(--navy-dark);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.panel-heading > p:last-child { margin-bottom: 0; color: var(--muted); }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 0.4rem; }
.field label { color: var(--ink); font-size: 1.08rem; font-weight: 750; }
.required-indicator { color: #9c352b; font-weight: 850; }
.field input, .field select {
  width: 100%;
  min-height: 58px;
  padding: 0.8rem 0.85rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid #687c89;
  border-radius: 8px;
}
.field input::placeholder { color: #607985; opacity: 1; }
.field input:disabled, .field select:disabled { color: #536d7a; background: #e8eff1; }
.field-help, .form-help { color: #384e5e; font-size: 1rem; }
.field-help { margin-top: -0.1rem; }
.form-help { margin: 1rem 0 0; }
.form-actions { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-top: 1rem; }
.button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
.button:disabled { cursor: not-allowed; opacity: 0.6; }
.button-primary { color: #fff; background: var(--navy); }
.button-primary:hover:not(:disabled) { color: #fff; background: #1a6572; }
.button-secondary { color: var(--navy-dark); background: #fff; border-color: #526a79; }
.button-secondary:hover:not(:disabled) { background: #e7f0f1; }
.button-official { width: 100%; margin-block: 0.25rem 0.9rem; color: #fff; background: var(--navy); }
.button-official:hover { color: #fff; background: #1a6572; }

.data-status, .result-status {
  margin: 1rem 0 0;
  padding: 0.85rem;
  color: #244653;
  background: #edf4f5;
  border-left: 4px solid #63838d;
  border-radius: 0 7px 7px 0;
}
.data-status--error, .result-status--error { color: #6d251f; background: #fff0ed; border-left-color: #9c352b; }
.result-status--warning { color: #6e4b0d; background: #fff6dc; border-left-color: #bc822b; }
.result-status--success { color: #12452f; background: #e8f3ec; border-left-color: var(--good); }
.results { margin-top: 1.35rem; }
.results > h2 { font-size: 1.4rem; }
.result-status { margin-top: 0; }
.result-list { display: grid; gap: 0.85rem; margin: 0.85rem 0 0; padding: 0; list-style: none; }
.result-card { padding: 1rem; background: #fff; border: 1px solid #8ca3ad; border-radius: 9px; box-shadow: 0 0.25rem 0.8rem rgba(23, 52, 68, 0.06); }
.result-card h3 { margin-bottom: 0.65rem; color: var(--navy-dark); font-size: 1.2rem; line-height: 1.3; }
.result-card dl { display: grid; gap: 0.65rem; margin: 0; }
.result-card dt { color: #344d5e; font-weight: 750; }
.result-card dd { margin: 0.12rem 0 0; overflow-wrap: anywhere; }
.location-old, .location-new {
  padding: 0.8rem;
  border: 2px solid;
  border-radius: 0 8px 8px 0;
}
.location-old {
  color: #6d251f;
  background: #fff0ed;
  border-color: #9c352b;
}
.location-new {
  color: #12452f;
  background: #e8f3ec;
  border-color: var(--good);
}
.location-old dt, .location-new dt { color: inherit; }
.location-old dd, .location-new dd { font-weight: 750; }
.pagination { display: grid; grid-template-columns: 1fr; gap: 0.65rem; margin-top: 1rem; text-align: center; }
.pagination span { align-self: center; font-weight: 700; }
.official-help { margin-top: 1rem; }
.site-footer { color: #fff; background: var(--navy-dark); border-top: 1px solid rgb(255 255 255 / 18%); }
.site-footer a { color: #fff; }
.footer-inner { display: grid; justify-items: center; gap: 0.65rem; padding-block: 1.1rem; text-align: center; }
.footer-inner p { margin: 0; font-size: 0.95rem; }
.footer-disclaimer { color: #d3e0e4; }
.footer-credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem; }
.footer-credit a { font-weight: 700; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
.footer-credit a:hover { color: #d3e0e4; }
.footer-credit a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 2px; }

@media (min-width: 700px) {
  .header-inner, .page-shell, .footer-inner { width: min(100% - 48px, 760px); }
  .page-shell { padding-block: 2rem 2.5rem; }
  .data-notice, .search-panel, .official-help { padding: 1.5rem; }
  .fields { grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
  .form-actions { display: flex; flex-wrap: wrap; }
  .form-actions .button { min-width: 190px; }
  .button-official { width: fit-content; }
  .result-card dl { grid-template-columns: 1fr 1fr; }
  .pagination { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; text-align: left; }
  .footer-credit { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
