:root {
  color-scheme: light;
  --navy: #102942;
  --navy-dark: #0c2034;
  --blue: #2458dc;
  --blue-dark: #1746bd;
  --text: #172a3f;
  --muted: #526477;
  --line: #dce4ed;
  --surface: #fff;
  --canvas: #f4f7fb;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 12px;
  padding: 10px 14px;
  background: var(--surface);
}

.page-width { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--surface); }
.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 750; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--blue);
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
}
.site-header nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; }
.site-header nav a { padding-block: 10px; }
.site-header nav a:hover, .site-footer a:hover { color: var(--blue); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(110deg, var(--navy-dark), #173959);
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(#d0e3ff12 1px, transparent 1px),
    linear-gradient(90deg, #d0e3ff12 1px, transparent 1px);
  background-size: 35px 35px;
  mask-image: linear-gradient(90deg, transparent 33%, #000);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -215px;
  right: max(2vw, calc((100vw - 1250px) / 2));
  width: 540px;
  height: 540px;
  border: 1px solid #b5dcff40;
  border-radius: 50%;
  box-shadow: 0 0 0 40px #b5dcff12, 0 0 0 86px #b5dcff0b;
}
.hero-content { padding-block: 66px 62px; }
.hero h1, h2, h3, p { margin: 0; }
.hero h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.18; letter-spacing: -.035em; font-weight: 780; }
.hero p { margin-top: 14px; color: #cad9eb; font-size: clamp(14px, 1.6vw, 17px); line-height: 1.65; }
.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(640px, 100%);
  min-height: 57px;
  padding: 5px 5px 5px 17px;
  margin-top: 29px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 28px #04132350;
}
.search-form:focus-within { box-shadow: 0 0 0 3px #8fb4ff, 0 8px 28px #04132350; }
.search-icon {
  position: relative;
  flex: 0 0 15px;
  height: 15px;
  border: 1.7px solid #4c647e;
  border-radius: 50%;
  margin-right: 3px;
}
.search-icon::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 7px;
  height: 2px;
  background: #4c647e;
  transform: rotate(45deg);
  transform-origin: left center;
}
.search-form input {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}
.search-form input::placeholder { color: #5b6c7f; opacity: 1; }
.search-form button, .empty-state button {
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
}
.search-form button { min-width: 72px; min-height: 45px; }
.search-form button:hover, .empty-state button:hover { background: var(--blue-dark); }

.main-content { padding-block: 34px 55px; }
section[id] { scroll-margin-top: 20px; }
h2 { font-size: 23px; line-height: 1.35; }
.quick-grid, .resource-grid { display: grid; gap: 12px; }
.quick-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 15px; }
.resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.resource-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-content: start;
  align-items: start;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.resource-link:hover { border-color: #9fb6ed; box-shadow: 0 3px 14px #1b3a6710; }
.resource-link:hover .resource-title { color: var(--blue-dark); }
.resource-title { font-size: 15px; font-weight: 720; line-height: 1.5; }
.resource-arrow { color: var(--blue-dark); font-size: 15px; line-height: 1.5; }
.resource-purpose, .resource-domain { grid-column: 1 / -1; }
.resource-purpose { color: var(--muted); font-size: 13px; line-height: 1.55; }
.resource-domain {
  color: #475d75;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.quick-grid .resource-link { min-height: 99px; padding: 13px 12px; border-top: 2px solid #8caaf1; }
.quick-grid .resource-purpose { font-size: 12px; }

.directory-section { margin-top: 34px; padding-top: 25px; border-top: 1px solid var(--line); }
.directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#result-count { color: var(--muted); font-size: 13px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  margin-block: 14px 23px;
}
.filters button {
  min-height: 38px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: #344c64;
  font-size: 13px;
  font-weight: 650;
}
.filters button:hover { border-color: #9fb6ed; color: var(--blue-dark); }
.filters button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.directory-groups { display: grid; gap: 28px; }
.section-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 17px; }
.category-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  background: #e4edff;
  color: #234eaa;
  font-size: 14px;
  font-weight: 700;
}
.empty-state {
  padding: 32px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}
.empty-state button { margin-top: 14px; padding: 9px 13px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { min-height: 62px; }

@media (max-width: 960px) {
  .quick-grid { grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr)); }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .page-width { width: calc(100% - 32px); }
  .header-inner { min-height: 58px; }
  .brand { gap: 8px; font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; font-size: 16px; }
  .site-header nav { gap: 12px; font-size: 12px; }
  .hero-content { padding-block: 39px 36px; }
  .hero h1 { font-size: clamp(26px, 7.7vw, 40px); }
  .hero::after { top: -125px; right: -100px; width: 285px; height: 285px; }
  .search-form { gap: 9px; padding-left: 12px; margin-top: 21px; }
  .search-form input { font-size: 15px; }
  .search-form button { min-width: 55px; }
  .main-content { padding-block: 27px 36px; }
  h2 { font-size: 20px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quick-grid .resource-link:last-child { grid-column: 1 / -1; }
  .quick-grid .resource-link { min-height: auto; }
  .directory-section { margin-top: 27px; padding-top: 21px; }
  .filters { gap: 6px; margin-bottom: 18px; }
  .filters button { min-height: 40px; padding-inline: 10px; }
  .resource-grid { grid-template-columns: 1fr; gap: 8px; }
  .directory-groups { gap: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
