:root {
  color-scheme: light;
  --blue: #73b3de;
  --blue-dark: #5da4d3;
  --blue-text: #64a9d5;
  --page: #f1f1f1;
  --card: #ffffff;
  --text: #555f67;
  --muted: #88949c;
  --pink: #ef6aa6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 18px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--page);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.hero { color: #fff; background: var(--blue); border-bottom: 1px solid rgba(255,255,255,.35); }
.header-inner, .layout-shell, .footer-inner { width: min(1170px, calc(100% - 32px)); margin: 0 auto; }
.header-inner { display: flex; align-items: baseline; gap: 12px; min-height: 78px; padding: 14px 0; }
.brand { flex: 0 0 auto; color: #fff; font-size: 34px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; text-shadow: 0 1px 1px rgba(31,89,127,.18); }
.hero-copy { margin: 0; color: rgba(255,255,255,.95); font-size: 15px; font-weight: 600; }
.hero-copy strong { color: #d4144d; }
.updated { margin-left: auto; color: rgba(255,255,255,.8); font-size: 12px; white-space: nowrap; }

.layout-shell { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 28px; padding: 12px 0 54px; }
.sidebar { position: sticky; top: 12px; align-self: start; }
.back-top, .quick-nav a { display: block; padding: 10px 8px; color: #fff; background: var(--blue); border-bottom: 1px solid rgba(255,255,255,.22); text-align: center; text-decoration: none; }
.back-top:hover, .quick-nav a:hover { background: var(--blue-dark); }
.quick-nav { display: block; }

.content-shell { min-width: 0; }
.tools-row { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.search-shell { display: flex; align-items: center; width: min(390px, 100%); height: 36px; padding: 0 10px; background: #fff; border: 1px solid #ddd; }
.search-icon { margin-right: 7px; color: var(--blue-text); font-size: 20px; }
.search-shell input { width: 100%; color: var(--text); background: transparent; border: 0; outline: 0; }
.search-shell input::placeholder { color: #a7afb4; }
.results-bar { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.results-bar p { margin: 0; }
.text-button { padding: 0; color: var(--blue-dark); background: none; border: 0; cursor: pointer; }

.notice { margin-bottom: 12px; padding: 9px 12px; color: #77838a; background: #fff; border-left: 4px solid var(--blue); font-size: 12px; }
.groups { display: grid; gap: 14px; }
.group { scroll-margin-top: 14px; }
.group-heading { display: flex; align-items: center; justify-content: space-between; min-height: 46px; margin-bottom: 8px; }
.group-title-wrap { display: flex; align-items: center; }
h2 { margin: 0; padding: 10px 18px; color: #fff; background: var(--blue); font-size: 18px; font-weight: 500; line-height: 1.3; }
.group-count { color: var(--muted); font-size: 12px; }
.site-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.site-card { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 40px; padding: 8px 7px; color: var(--blue-text); background: var(--card); border: 1px solid transparent; text-align: center; text-decoration: none; transition: color .15s ease, border-color .15s ease, transform .15s ease; }
.site-card:hover { color: var(--pink); border-color: #d5e9f5; transform: translateY(-1px); }
.group:first-child .site-card { border-color: #d8eaf5; }
.group:first-child h2 { background: #ef75aa; }
.site-title { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.featured { margin-left: 5px; color: #9b7700; font-family: Arial, sans-serif; font-size: 9px; font-weight: 800; }

.empty-state { padding: 70px 20px; text-align: center; }
.empty-icon { color: var(--blue-text); font-size: 38px; }
.empty-state h2 { display: inline-block; margin-top: 10px; }
.empty-state p { color: var(--muted); }
.primary-button { padding: 9px 18px; color: #fff; background: var(--blue); border: 0; cursor: pointer; }

footer { background: #e8e8e8; border-top: 1px solid #ddd; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; padding: 30px 0 38px; color: #7d878d; font-size: 12px; }
.footer-inner p { margin: 3px 0; }
.footer-brand { color: var(--blue-dark); font-size: 18px; font-weight: 700; }
.footer-meta { text-align: right; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.footer-links a { color: var(--blue-dark); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.subpage-main { width: min(920px, calc(100% - 32px)); min-height: calc(100vh - 190px); margin: 28px auto 54px; }
.subpage-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.subpage-nav a { padding: 8px 13px; color: #fff; background: var(--blue); text-decoration: none; }
.article-panel { padding: clamp(22px, 5vw, 48px); background: #fff; box-shadow: 0 2px 10px rgba(53,83,102,.08); }
.article-panel h1 { margin: 0 0 24px; color: var(--blue-dark); font-size: clamp(28px, 5vw, 42px); }
.article-panel h2 { display: inline-block; margin: 30px 0 10px; padding: 7px 12px; font-size: 18px; }
.article-panel p, .article-panel li { font-size: 15px; line-height: 1.9; }
.article-panel ul { padding-left: 22px; }
.contact-card { margin-top: 24px; padding: 18px; background: #f4f9fc; border-left: 4px solid var(--blue); }
.contact-card a { color: var(--blue-dark); }
.policy-frame { width: 100%; min-height: 72vh; background: #fff; border: 0; }
.policy-note { margin: 0 0 12px; padding: 12px 14px; background: #fff; border-left: 4px solid var(--blue); }
.policy-note a { color: var(--blue-dark); }
.policy-card { min-height: 360px; }
.policy-button { display: inline-block; margin-top: 10px; padding: 11px 18px; color: #fff; background: var(--blue); text-decoration: none; }
.policy-button:hover { background: var(--blue-dark); }

@media (max-width: 1080px) {
  .site-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; gap: 2px 10px; }
  .brand { font-size: 29px; }
  .updated { display: none; }
  .layout-shell { display: block; padding-top: 0; }
  .sidebar { position: sticky; z-index: 5; top: 0; margin: 0 -16px 10px; background: var(--blue); overflow: hidden; }
  .back-top { display: none; }
  .quick-nav { display: flex; overflow-x: auto; scrollbar-width: none; }
  .quick-nav::-webkit-scrollbar { display: none; }
  .quick-nav a { flex: 0 0 auto; padding: 10px 13px; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 0; }
  .site-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .header-inner, .layout-shell, .footer-inner { width: min(100% - 20px, 1170px); }
  .header-inner { min-height: 70px; padding: 10px 0; }
  .brand { width: 100%; font-size: 28px; }
  .hero-copy { font-size: 12px; }
  .sidebar { margin-right: -10px; margin-left: -10px; }
  .tools-row { display: block; padding: 11px 0; }
  .search-shell { width: 100%; }
  .results-bar { margin-top: 8px; }
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .group-heading { min-height: 40px; }
  h2 { padding: 8px 14px; font-size: 16px; }
  .site-card { min-height: 38px; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}

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