:root {
  --deep: #0b365b;
  --night: #082946;
  --surface: #154f78;
  --surface-2: #103f66;
  --mint: #8fd5b5;
  --mint-deep: #57ad8c;
  --mint-soft: #c9eddd;
  --white: #f5f7f6;
  --fog: #e8eff1;
  --blue-gray: #9db2be;
  --ink: #172733;
  --violet: #6f8ff7;
  --gold: #f1bd56;
  --coral: #e36c91;
  --line-dark: rgba(232, 239, 241, 0.18);
  --line-light: #d8e2e6;
  --shadow: 0 18px 46px rgba(3, 24, 42, 0.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--white);
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.55;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--night);
  border-bottom: 1px solid var(--line-dark);
}
.nav { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; color: var(--white); text-decoration: none; }
.brand-logo { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: 9px; }
.nav-actions { display: flex; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--mint);
  border-radius: 8px;
  padding: 9px 15px;
  color: var(--mint-soft);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { border-color: var(--white); outline: 3px solid rgba(143, 213, 181, 0.2); }
.btn.primary, .download-btn { background: var(--mint); color: var(--night); border-color: var(--mint); }
.btn.primary:hover, .download-btn:hover { background: var(--mint-soft); border-color: var(--mint-soft); }

.hero { padding: 34px 0 36px; background: var(--deep); border-bottom: 1px solid var(--line-dark); }
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 70px; align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--blue-gray); font: 600 0.78rem/1.2 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0.14em; }
.eyebrow span { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }
.hero h1 { margin: 15px 0 0; font-size: clamp(2.55rem, 4.5vw, 4rem); line-height: 1.04; letter-spacing: -0.055em; }
.hero h1 em { color: var(--mint); font-style: normal; }
.hero-search-panel { position: relative; padding: 22px; background: var(--night); border: 1px solid rgba(143, 213, 181, 0.2); border-radius: 14px; box-shadow: var(--shadow); }
.hero-search-panel::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 3px; background: linear-gradient(90deg, var(--mint) 0 58%, var(--violet) 58% 74%, var(--coral) 74% 86%, var(--gold) 86% 100%); border-radius: 0 0 4px 4px; }
.search-label { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin: 1px 2px 12px; }
.search-label span { color: var(--blue-gray); font-size: 0.8rem; }
.search-label b { color: var(--mint); font-size: 1.05rem; }
.live-status { display: inline-flex; align-items: center; gap: 7px; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(143, 213, 181, 0.11); }

.search-box { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 9px 15px; background: var(--surface); border: 1px solid rgba(143, 213, 181, 0.32); border-radius: 11px; box-shadow: 0 12px 30px rgba(3, 24, 42, 0.2); }
.hero-search { width: 100%; }
.search-icon { position: relative; width: 19px; height: 19px; flex: 0 0 auto; border: 2px solid var(--mint); border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 8px; height: 2px; right: -6px; bottom: -3px; background: var(--mint); transform: rotate(45deg); border-radius: 2px; }
.search-box input { flex: 1; min-width: 0; color: var(--white); background: transparent; border: 0; outline: 0; font-size: 1rem; }
.search-box input::placeholder { color: #b9cbd3; }
.clear { border: 0; color: var(--mint); background: transparent; font-weight: 700; cursor: pointer; }

.library { min-height: 580px; padding: 30px 0 82px; background: var(--deep); }
.meta-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line-dark); }
.library-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; min-width: 0; }
.meta-row h2 { margin: 0; font-size: 1.65rem; }
.count { color: var(--blue-gray); font-size: 0.84rem; }
.library-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-btn { min-height: 30px; padding: 5px 10px; color: var(--fog); background: var(--night); border: 1px solid var(--line-dark); border-radius: 7px; font-size: 0.76rem; cursor: pointer; }
.filter-btn:hover, .filter-btn:focus-visible { border-color: var(--mint); outline: none; }
.filter-btn.active { color: var(--night); background: var(--mint); border-color: var(--mint); font-weight: 700; }
.result-list { display: block; }
.category-block { margin-bottom: 38px; }
.category-block:last-child { margin-bottom: 0; }
.category-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; color: var(--blue-gray); }
.category-heading::after { content: ""; flex: 1; height: 1px; background: var(--line-dark); }
.category-number { color: var(--mint); font: 700 0.82rem/1 "IBM Plex Mono", ui-monospace, monospace; }
.category-heading h3 { margin: 0; color: var(--fog); font-size: 0.88rem; letter-spacing: 0.08em; }
.category-total { order: 3; color: var(--blue-gray); font-size: 0.75rem; }
.category-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; min-height: 186px; padding: 0; overflow: hidden; text-align: left; color: var(--white); background: var(--surface); border: 1px solid rgba(232, 239, 241, 0.12); border-radius: 10px; cursor: pointer; transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease; }
.card:hover, .card:focus-visible { transform: translateY(-3px); background: #1a5a86; border-color: rgba(143, 213, 181, 0.62); outline: none; }
.card-top { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; color: var(--blue-gray); background: var(--surface-2); border-bottom: 1px solid var(--line-dark); font: 600 0.7rem/1.2 "IBM Plex Mono", ui-monospace, monospace; }
.card-dots { display: flex; align-items: center; gap: 5px; }
.card-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.card-dots i:nth-child(2) { background: var(--violet); }
.card-dots i:nth-child(3) { background: var(--gold); }
.card h3 { margin: 17px 16px 7px; font-size: 1.13rem; line-height: 1.3; }
.card p { margin: 0 16px; color: var(--fog); font-size: 0.86rem; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: auto 16px 0; padding: 14px 0 15px; border-top: 1px solid var(--line-dark); color: var(--mint); font-size: 0.76rem; font-weight: 700; }
.rows { color: var(--blue-gray); font-weight: 500; }
.empty { display: none; padding: 58px 20px; text-align: center; color: var(--blue-gray); background: var(--night); border: 1px dashed rgba(143, 213, 181, 0.42); border-radius: 12px; }

.drawer { position: fixed; inset: 0; z-index: 50; display: none; background: rgba(3, 19, 33, 0.82); }
.drawer.open { display: block; }
.panel { position: absolute; right: 0; top: 0; display: flex; flex-direction: column; width: min(1040px, 96vw); height: 100%; color: var(--ink); background: var(--white); box-shadow: -20px 0 70px rgba(0, 0, 0, 0.3); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 25px; color: var(--white); background: var(--night); border-bottom: 4px solid var(--mint); }
.panel-head small { color: var(--blue-gray); }
.panel-head h2 { margin: 5px 0 0; font-size: 1.55rem; }
.close { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(245, 247, 246, 0.42); border-radius: 8px; color: var(--white); background: transparent; font-size: 1.5rem; cursor: pointer; }
.panel-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 24px; background: var(--fog); border-bottom: 1px solid var(--line-light); }
.panel-search { flex: 1; min-width: 220px; padding: 10px 12px; color: var(--ink); background: var(--white); border: 1px solid #b8c8cf; border-radius: 8px; }
.sheet-tabs { display: flex; gap: 7px; max-width: 100%; overflow-x: auto; }
.sheet-tab { white-space: nowrap; border: 1px solid #bfd0d6; border-radius: 7px; padding: 8px 11px; color: var(--deep); background: var(--white); cursor: pointer; }
.sheet-tab.active { color: var(--night); background: var(--mint); border-color: var(--mint-deep); font-weight: 700; }
.panel-body { flex: 1; overflow: auto; padding: 20px 24px 48px; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line-light); border-radius: 10px; }
.data-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.data-table th { position: sticky; top: 0; z-index: 2; padding: 11px 12px; text-align: center; white-space: nowrap; color: var(--white); background: var(--deep); }
.data-table td { padding: 10px 12px; vertical-align: middle; white-space: nowrap; border-bottom: 1px solid #e2e9eb; }
.data-table th.long, .data-table td.long { width: 310px; min-width: 250px; max-width: 360px; white-space: normal; line-height: 1.55; }
.data-table th.medium, .data-table td.medium { width: 180px; min-width: 140px; max-width: 220px; white-space: normal; }
.data-table th.center, .data-table td.center { text-align: center; }
.data-table th.text, .data-table td.text { text-align: left; }
.data-table tr:nth-child(even) td { background: #f1f6f5; }
.data-table tr:hover td { background: var(--mint-soft); }
.table-note { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 10px; color: #607681; font-size: 0.8rem; }
.pdf-pages { display: grid; gap: 18px; justify-items: center; }
.pdf-page { display: block; width: min(100%, 920px); height: auto; background: #fff; border: 1px solid var(--line-light); box-shadow: 0 8px 24px rgba(11, 54, 91, 0.12); }
.pdf-fallback { padding: 16px 18px; background: var(--fog); border-left: 4px solid var(--mint-deep); }
.mobile-cards { display: none; }
.mrow { margin-bottom: 10px; padding: 14px; background: #fff; border: 1px solid var(--line-light); border-radius: 8px; }
.mrow dl { display: grid; grid-template-columns: 7em 1fr; gap: 7px 12px; margin: 0; }
.mrow dt { color: #68808b; font-size: 0.76rem; }
.mrow dd { margin: 0; overflow-wrap: anywhere; font-size: 0.86rem; }

footer { padding: 34px 0 0; color: var(--blue-gray); background: var(--night); border-top: 1px solid var(--line-dark); }
.foot { display: flex; justify-content: flex-end; padding-bottom: 30px; }
.foot p { max-width: 430px; margin: 0; text-align: right; }
.footer-rhythm { display: grid; grid-template-columns: 44% 18% 10% 8%; gap: 0; width: 100%; height: 6px; }
.footer-rhythm i:nth-child(1) { background: var(--mint); }
.footer-rhythm i:nth-child(2) { background: var(--violet); }
.footer-rhythm i:nth-child(3) { background: var(--coral); }
.footer-rhythm i:nth-child(4) { background: var(--gold); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 0.9fr; gap: 34px; }
  .category-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 24px, 1180px); }
  .nav { height: 56px; }
  .brand-logo { width: 46px; height: 46px; }
  .nav-actions .secondary { display: none; }
  .btn { min-height: 38px; padding: 8px 11px; }
  .hero { padding: 28px 0 30px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { font-size: 2.55rem; }
  .hero-search-panel { padding: 18px; }
  .search-box { padding: 9px 13px; }
  .meta-row { align-items: flex-start; flex-direction: column; }
  .library-heading { align-items: flex-start; flex-direction: column; }
  .library-filters { flex-wrap: nowrap; width: 100%; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .filter-btn { flex: 0 0 auto; }
  .category-cards { grid-template-columns: 1fr; }
  .card { min-height: 178px; }
  .panel { width: 100vw; }
  .panel-head, .panel-tools, .panel-body { padding-left: 14px; padding-right: 14px; }
  .panel-tools { align-items: stretch; }
  .panel-search { width: 100%; }
  .table-wrap { display: none; }
  .mobile-cards { display: block; }
  .pdf-page { width: 100%; }
  .foot { flex-direction: column; }
  .foot p { text-align: left; }
}
