:root {
  color-scheme: light;
  --blue-700: #0b51c5;
  --blue-600: #1264dd;
  --blue-100: #e9f2ff;
  --blue-050: #f5f9ff;
  --navy-950: #071a38;
  --navy-800: #183354;
  --slate-600: #5e7189;
  --slate-500: #718197;
  --line: #d7e0eb;
  --line-strong: #becbd9;
  --surface: #ffffff;
  --surface-muted: #f7f9fc;
  --danger: #a92626;
  --shadow-focus: 0 0 0 3px rgb(18 100 221 / 16%);
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--surface); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--navy-950);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

a { color: var(--blue-700); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner {
  max-width: 1320px;
  min-height: 118px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.brand {
  color: var(--navy-950);
  text-decoration: none;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.brand:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 6px; }

.byline { font-weight: 650; }

.brand-mark {
  width: 42px;
  height: 42px;
  color: var(--blue-600);
  flex: 0 0 auto;
}

.brand-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.header-motif {
  position: absolute;
  right: 42px;
  width: 260px;
  height: 130px;
  opacity: .42;
  transform: rotate(-8deg);
  background:
    linear-gradient(110deg, transparent 46%, #d9edff 47% 49%, transparent 50%) 0 0 / 36px 36px,
    linear-gradient(70deg, transparent 46%, #d9edff 47% 49%, transparent 50%) 0 0 / 36px 36px;
  mask-image: linear-gradient(to left, #000, transparent);
}

.page-shell {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  flex: 1;
}

.search-region { padding: 44px 0 34px; }

.search-form { display: grid; grid-template-columns: minmax(0, 1fr) 190px 150px; gap: 14px; }

.search-control { position: relative; }

.search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--slate-500);
  stroke-width: 1.8;
  stroke-linecap: round;
}

#search-input {
  width: 100%;
  height: 72px;
  padding: 0 56px 0 62px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  color: var(--navy-950);
  background: #fff;
  font-size: 21px;
  line-height: 1;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

#search-input::placeholder { color: #8695a8; }

#search-input:focus { outline: none; border-color: var(--blue-600); box-shadow: var(--shadow-focus); }

#search-scope {
  width: 100%;
  height: 72px;
  padding: 0 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  color: var(--navy-950);
  background: #fff;
  font-size: 17px;
  cursor: pointer;
}

#search-scope:focus { outline: none; border-color: var(--blue-600); box-shadow: var(--shadow-focus); }

#search-button {
  height: 72px;
  border: 1px solid var(--blue-700);
  border-radius: 8px;
  background: var(--blue-700);
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

#search-button:hover { background: #073f9e; }
#search-button:active { transform: translateY(1px); }
#search-button:focus-visible { outline: 3px solid #91bdff; outline-offset: 3px; }
#search-button:disabled { cursor: wait; opacity: .72; }

.search-help { margin: 15px 3px 0; color: var(--slate-600); font-size: 15px; line-height: 1.6; }

.results-region { padding: 10px 0 60px; }

.initial-state { text-align: center; padding: 64px 24px 86px; color: var(--slate-600); }
.initial-state h2 { color: var(--navy-800); margin: 18px 0 8px; font-size: 21px; }
.initial-state p { margin: 0; }
.initial-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #bcd7fa;
  color: var(--blue-700);
  background: var(--blue-050);
  border-radius: 50%;
  font-size: 17px;
  font-weight: 700;
}

.status-state { padding: 76px 20px; text-align: center; color: var(--slate-600); }
.error-state { color: var(--danger); }
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd9e8;
  border-top-color: var(--blue-600);
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
  vertical-align: -4px;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } * { scroll-behavior: auto !important; } }

.result-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.result-heading h2 { margin: 0; font-size: 22px; line-height: 1.4; }
.page-size { color: var(--slate-600); font-size: 14px; white-space: nowrap; }

.result-list { border-top: 1px solid var(--line-strong); }

.result-item { border-bottom: 1px solid var(--line); }

.result-main {
  display: grid;
  grid-template-columns: 108px minmax(180px, 1.25fr) 78px 112px 112px minmax(250px, 1.7fr) minmax(190px, 1.2fr);
  align-items: stretch;
}

.result-main > div { padding: 19px 15px; border-right: 1px solid var(--line); min-width: 0; }
.result-main > div:first-child { border-left: 1px solid var(--line); }
.result-label { display: block; margin-bottom: 8px; color: var(--slate-600); font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.result-value { color: var(--navy-950); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.search-highlight {
  padding: 0 .12em;
  border-radius: 3px;
  background: #ffe66b;
  color: #4a3200;
  font-weight: 750;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.result-link { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-700); font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.result-link:hover { color: #073f9e; text-decoration-thickness: 2px; }
.result-link:focus-visible, .detail-toggle:focus-visible, .page-button:focus-visible { outline: 3px solid #91bdff; outline-offset: 3px; }
.external-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: 0 0 auto; }
.hpo-list { display: flex; flex-wrap: wrap; gap: 6px 10px; }

.detail-bar { display: flex; justify-content: flex-end; padding: 10px 14px; border: 1px solid var(--line); border-top: 0; background: var(--surface-muted); }
.detail-toggle { border: 0; padding: 5px 4px; background: transparent; color: var(--blue-700); font-size: 14px; font-weight: 650; cursor: pointer; }
.detail-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
.detail-toggle svg { width: 15px; height: 15px; margin-left: 4px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 140ms ease; }
.detail-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.result-details { border: 1px solid var(--line); border-top: 0; background: var(--blue-050); padding: 22px 25px 8px; }
.detail-field { margin-bottom: 20px; }
.detail-field h3 { margin: 0 0 7px; color: var(--navy-800); font-size: 14px; }
.detail-field p { margin: 0; color: #334b68; font-size: 14px; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding-top: 34px; }
.page-button, .current-page { min-width: 104px; height: 46px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; }
.page-button { border: 1px solid var(--line-strong); background: #fff; color: var(--navy-800); cursor: pointer; font-size: 15px; gap: 5px; }
.page-button:hover:not(:disabled) { border-color: var(--blue-600); color: var(--blue-700); background: var(--blue-050); }
.page-button:disabled { color: #a0adbc; background: var(--surface-muted); cursor: not-allowed; }
.page-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.current-page { min-width: 46px; background: var(--blue-700); color: #fff; font-weight: 700; }

.site-footer {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  min-height: 78px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--slate-600);
  font-size: 13px;
}
[hidden] { display: none !important; }

@media (max-width: 1040px) {
  .header-motif { right: -40px; opacity: .25; }
  .result-main { grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .result-main > div, .result-main > div:first-child { border: 0; border-bottom: 1px solid var(--line); }
  .result-main > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .result-main > div:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

@media (max-width: 700px) {
  .header-inner { min-height: 88px; padding: 0 20px; justify-content: flex-start; }
  .brand { font-size: 23px; gap: 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .byline { display: block; margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--slate-600); }
  .page-shell, .site-footer { width: min(100% - 32px, 1320px); }
  .search-region { padding: 28px 0 24px; }
  .search-form { grid-template-columns: 1fr; gap: 10px; }
  #search-input, #search-scope, #search-button { height: 58px; }
  #search-input { padding-left: 51px; font-size: 17px; }
  .search-icon { left: 17px; width: 21px; }
  #search-button { font-size: 18px; }
  .search-help { font-size: 13px; }
  .result-heading h2 { font-size: 19px; }
  .result-main { grid-template-columns: 1fr; }
  .result-main > div:nth-child(odd) { border-right: 0; }
  .result-main > div:last-child { grid-column: auto; }
  .result-main > div { display: grid; grid-template-columns: 108px 1fr; gap: 8px; padding: 13px 14px; }
  .result-label { margin: 1px 0 0; }
  .result-details { padding: 18px 16px 2px; }
  .pagination { gap: 8px; }
  .page-button { min-width: 90px; }
  .site-footer { min-height: 92px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; }
}
