:root {
  --ink: #111827;
  --text: #252b36;
  --muted: #767d89;
  --line: #dde1e8;
  --soft-line: #edf0f4;
  --paper: #ffffff;
  --page: #ffffff;
  --hero: #eef4ff;
  --hero-strong: #e4efff;
  --cyan: #12c5df;
  --purple: #8858ef;
  --green: #24c88a;
  --orange: #ff9b42;
  --shadow: 0 18px 42px rgba(36, 49, 78, .12);
  --width: 1080px;
  --nav-width: 1260px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; letter-spacing: 0; }
button, summary { cursor: pointer; }
img { max-width: 100%; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 10px;
  z-index: 50;
  width: min(var(--nav-width), calc(100% - 32px));
  margin: 10px auto 0;
}
.header-inner {
  min-height: 58px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: #f3f6ff;
  background: rgba(9, 18, 36, .54);
  border: 1px solid rgba(174, 195, 255, .26);
  border-radius: 30px;
  box-shadow: 0 14px 34px rgba(0, 4, 17, .32);
  backdrop-filter: blur(18px) saturate(120%);
}
.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: #ffffff;
  font-weight: 800;
}
.brand-orbit {
  position: relative;
  width: 19px;
  height: 19px;
  margin-right: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.brand-orbit::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 7px;
  width: 5px;
  height: 5px;
  background: #74deff;
  border: 2px solid rgba(10, 22, 45, .8);
  border-radius: 50%;
}
.brand-word { font-size: 19px; line-height: 1; }
.brand-sub { margin-left: 5px; color: #aeb9ce; font-size: 11px; font-weight: 600; }
.main-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
}
.main-nav a {
  padding: 17px 9px;
  color: #aeb7c9;
  font-size: 14px;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.is-active { color: #ffffff; font-weight: 700; }
.main-nav .nav-agent {
  padding: 8px 13px;
  color: #dce5ff;
  background: rgba(93, 111, 220, .2);
  border: 1px solid rgba(162, 177, 255, .16);
  border-radius: 18px;
}
.search-shortcut {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aeb7c9;
  white-space: nowrap;
}
.search-shortcut > span { font-size: 21px; line-height: 1; }
.search-shortcut small { font-size: 11px; }
.account-link {
  flex: 0 0 auto;
  padding: 8px 15px;
  color: #0f172a;
  background: rgba(255, 255, 255, .92);
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
}
.account-link:hover { color: #ffffff; background: var(--purple); }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { color: #ffffff; list-style: none; font-size: 22px; line-height: 1; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu nav {
  position: absolute;
  top: 38px;
  right: -6px;
  width: 170px;
  padding: 8px;
  display: grid;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.mobile-menu nav a { padding: 10px 12px; border-radius: 7px; font-size: 13px; }
.mobile-menu nav a:hover { background: var(--hero); }

.catalog-hero {
  position: relative;
  margin-top: -68px;
  overflow: hidden;
  color: #ffffff;
  background: #020814 url("assets/iphc-hero-bg.webp") center center / cover no-repeat;
  border-bottom: 1px solid #17254b;
}
.catalog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 19, .36);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--width);
  min-height: 690px;
  margin: 0 auto;
  padding: 158px 22px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-inner h1 {
  margin: 0;
  color: #ffffff;
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 10px 38px rgba(0, 0, 0, .34);
}
.hero-inner > p {
  margin: 24px 0 28px;
  color: #b8c0cf;
  font-size: 17px;
}
.search-console {
  width: min(610px, 100%);
  padding: 26px 24px 20px;
  background: rgba(16, 25, 46, .58);
  border: 1px solid rgba(174, 191, 255, .22);
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(0, 3, 14, .38);
  backdrop-filter: blur(18px) saturate(115%);
}
.audience-toggle {
  width: max-content;
  margin: 0 auto 18px;
  padding: 3px;
  display: flex;
  background: rgba(8, 15, 30, .64);
  border-radius: 22px;
}
.audience-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.audience-toggle label {
  min-width: 116px;
  padding: 7px 13px;
  color: #aeb7c9;
  border-radius: 18px;
  font-size: 13px;
}
.audience-toggle input:checked + label {
  color: #111827;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .26);
}
.hero-search {
  height: 52px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  background: rgba(5, 13, 28, .4);
  border: 1px solid rgba(165, 182, 222, .3);
  border-radius: 28px;
  overflow: hidden;
}
.search-icon { color: #a9b4c9; font-size: 24px; }
.hero-search input {
  min-width: 0;
  height: 50px;
  padding: 0 8px;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
}
.hero-search input::placeholder { color: #9ca8bd; }
.hero-search button {
  min-width: 92px;
  height: 40px;
  margin-right: 5px;
  color: var(--paper);
  background: #7257ea;
  border: 0;
  border-radius: 21px;
  font-weight: 700;
}
.hero-search button:hover { background: #2ba7d8; }
.search-suggestions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-suggestions a {
  padding: 4px 11px;
  color: #aab4c7;
  background: rgba(94, 109, 142, .3);
  border-radius: 14px;
  font-size: 10px;
}
.search-suggestions a:hover { color: #ffffff; background: rgba(133, 151, 190, .42); }
.platform-row {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.platform-row span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #e8ecf7;
  font: 800 17px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.platform-row span:nth-child(2n) { color: #98a5bd; }

.intro-stats { background: #fafbff; border-bottom: 1px solid var(--soft-line); }
.intro-stats-inner {
  max-width: var(--width);
  min-height: 180px;
  margin: 0 auto;
  padding: 28px 22px;
  display: grid;
  grid-template-columns: minmax(380px, 1.8fr) repeat(3, minmax(125px, .65fr));
  align-items: center;
}
.onboarding {
  display: flex;
  align-items: center;
  gap: 16px;
}
.onboarding-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border: 4px solid #d7e1ff;
  border-radius: 17px;
  font: 800 30px/1 Georgia, serif;
  box-shadow: 0 6px 14px rgba(62, 86, 140, .2);
}
.onboarding h2 { margin: 0; font-size: 23px; line-height: 1.25; }
.onboarding p { margin: 3px 0 8px; color: var(--muted); font-size: 13px; }
.onboarding a {
  display: inline-flex;
  padding: 5px 13px;
  border: 1px solid #ccd2dc;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
}
.onboarding a:hover { border-color: var(--ink); }
.stat {
  min-height: 78px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
}
.stat strong {
  font: 700 37px/1.1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.stat span { margin-top: 7px; color: var(--muted); font-size: 12px; }

.home-section {
  max-width: var(--width);
  margin: 0 auto;
  padding: 70px 20px 10px;
}
.ornament-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}
.ornament-heading > span {
  color: var(--ink);
  font: 700 44px/1 Georgia, serif;
  transform: rotate(-20deg);
}
.ornament-heading > span.mirror { transform: scaleX(-1) rotate(-20deg); }
.ornament-heading h2 { margin: 0; font-size: 31px; line-height: 1.2; }
.ornament-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.ornament-heading.compact { margin-bottom: 34px; }

.ranking-board {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}
.ranking-categories {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 1px solid var(--line);
}
.ranking-categories a {
  padding: 13px 14px;
  text-align: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.ranking-categories a:hover { background: var(--hero); }
.ranking-categories a.is-active { color: var(--paper); background: var(--ink); }
.ranking-list { padding: 18px 24px 24px; }
.ranking-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 1fr) 58px 76px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--soft-line);
}
.ranking-row:last-child { border-bottom: 0; }
.ranking-row:hover .rank-copy strong { color: var(--cyan); }
.rank-number { color: var(--ink); font-size: 20px; text-align: center; }
.rank-number.medal { color: var(--orange); font-weight: 800; }
.rank-icon { font-size: 24px; text-align: center; }
.rank-copy { min-width: 0; display: flex; flex-direction: column; }
.rank-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font: 700 15px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.rank-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.grade-badge {
  justify-self: center;
  min-width: 34px;
  padding: 4px 7px;
  color: #0e8c64;
  background: #ecfff7;
  border: 1px solid #72e4bd;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.rank-meta { color: var(--muted); font-size: 11px; text-align: right; }

.topics-section { padding-top: 88px; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.topic-card {
  min-height: 340px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}
.topic-card:hover { border-color: #aeb6c4; box-shadow: var(--shadow); transform: translateY(-3px); }
.topic-copy > span {
  padding: 3px 9px;
  color: var(--muted);
  background: #f3f4f6;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 10px;
}
.topic-copy h3 { margin: 16px 0 4px; color: var(--ink); font-size: 21px; line-height: 1.45; }
.topic-copy small { color: var(--muted); }
.topic-art {
  position: relative;
  height: 155px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: #17334d;
  border-radius: 12px;
  overflow: hidden;
}
.topic-2 .topic-art { background: #0e5660; }
.topic-3 .topic-art { background: #3a315d; }
.topic-art b { font: 700 78px/1 Georgia, serif; opacity: .86; }
.topic-art i {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: rgba(255, 255, 255, .7);
  font: 700 12px/1 ui-monospace, monospace;
  font-style: normal;
}

.popular-section { padding-top: 100px; padding-bottom: 90px; }
.popular-tabs {
  margin-bottom: 26px;
  padding: 7px;
  display: flex;
  gap: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.popular-tabs a {
  min-width: 92px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #606774;
  border-radius: 14px;
  white-space: nowrap;
}
.popular-tabs a b { font-size: 18px; }
.popular-tabs a span { font-size: 12px; }
.popular-tabs a:hover { color: var(--ink); background: var(--hero); }
.popular-tabs a.is-active { color: var(--paper); background: var(--ink); }
.popular-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.popular-card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
}
.popular-card:hover { border-color: #aeb6c4; box-shadow: 0 10px 24px rgba(32, 43, 67, .08); }
.popular-card > a { height: 100%; padding: 18px; display: flex; flex-direction: column; }
.popular-slug {
  overflow: hidden;
  color: #4f596b;
  font: 700 12px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.popular-card h3 {
  margin: 9px 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.popular-card h3 span { margin-right: 7px; color: var(--purple); }
.popular-card p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.popular-card footer {
  margin-top: auto;
  padding-top: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  border-top: 1px solid var(--soft-line);
  font-size: 10px;
}
.mini-grade { color: var(--green); font-weight: 800; }

.pagination { margin-top: 34px; }
.pagination .page-navigator {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.pagination .page-navigator li { list-style: none; margin: 0; padding: 0; }
.pagination .page-navigator li::marker { content: ""; }
.pagination .page-navigator a {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  color: #5f6672;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 12px;
  white-space: nowrap;
}
.pagination .page-navigator .current a { color: var(--paper); background: var(--cyan); border-color: var(--cyan); }

.archive-head {
  max-width: var(--width);
  margin: 42px auto 0;
  padding: 40px 20px 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.archive-head > div > span, .page-shell > header > span, .detail-eyebrow, .content-block > header > span, .download-panel > header > span {
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.archive-head h1 { margin: 4px 0 0; color: var(--ink); font-size: 34px; line-height: 1.2; }
.compact-search { display: flex; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.compact-search input { width: 220px; height: 40px; padding: 0 14px; border: 0; outline: 0; }
.compact-search button { padding: 0 18px; color: var(--paper); background: var(--ink); border: 0; }
.archive-results { padding-top: 22px; padding-bottom: 80px; }
.empty-state, .empty-page {
  max-width: 720px;
  margin: 80px auto;
  padding: 70px 28px;
  text-align: center;
  background: var(--hero);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.empty-state strong, .empty-page h1 { color: var(--ink); font-size: 24px; }

.detail-shell { max-width: var(--width); margin: 0 auto; padding: 34px 20px 90px; }
.breadcrumbs {
  margin: 18px 0 30px;
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumbs strong {
  min-width: 0;
  overflow: hidden;
  color: #535c6b;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}
.detail-heading h1 {
  margin: 7px 0 5px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font: 800 48px/1.05 ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.detail-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.4;
}
.detail-heading h2 span { margin-right: 8px; color: var(--purple); }
.detail-heading > p { max-width: 720px; margin: 16px 0 0; color: #59616d; font-size: 15px; }
.quick-action {
  min-width: 164px;
  min-height: 44px;
  padding: 10px 18px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: #171a21;
  border-radius: 12px;
  font-weight: 700;
}
.quick-action:hover { background: var(--purple); }
.quick-action.is-disabled { color: var(--muted); background: #eef0f3; }
.detail-metrics {
  margin-top: 28px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #f8fffc;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.detail-metrics > div { min-width: 0; padding: 7px 18px; border-right: 1px solid var(--line); }
.detail-metrics > div:last-child { border-right: 0; }
.detail-metrics span { display: block; color: var(--muted); font-size: 10px; }
.detail-metrics strong { display: block; margin-top: 5px; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
.detail-metrics .metric-grade { color: var(--green); font-size: 17px; }
.detail-layout {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}
.content-block, .download-panel, .related-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.content-block { padding: 28px 30px 36px; }
.content-block > header h2, .download-panel > header h2 { margin: 3px 0 22px; color: var(--ink); font-size: 24px; }
.prose { color: #3e4652; font-size: 14px; }
.prose h2, .prose h3 { margin-top: 28px; color: var(--ink); }
.prose pre {
  overflow-x: auto;
  padding: 18px;
  color: #dfe8ff;
  background: var(--ink);
  border-radius: 9px;
}
.prose code { font-family: "SFMono-Regular", Consolas, monospace; }
.prose a { color: #137d98; text-decoration: underline; }
.prose img { height: auto; max-width: 100%; }
.detail-tags { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 7px; }
.detail-tags a {
  padding: 4px 11px;
  color: var(--muted);
  background: #f4f5f7;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 10px;
}
.detail-sidebar { display: grid; gap: 18px; }
.download-panel { padding: 22px; }
.download-ready, .locked-box, .pending-box {
  padding: 16px;
  background: #f5f7f4;
  border-left: 3px solid var(--cyan);
}
.locked-box { border-left-color: var(--green); }
.pending-box { border-left-color: var(--orange); }
.download-ready strong, .locked-box strong, .pending-box strong { display: block; color: var(--ink); }
.download-ready p, .locked-box p, .pending-box p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.lock-mark {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 6px;
  color: #0e7757;
  background: #e8fff6;
  border: 1px solid #70dcb8;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
}
.primary-action, .secondary-action {
  width: 100%;
  min-height: 43px;
  margin-top: 11px;
  padding: 9px 13px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.primary-action { color: var(--paper); background: var(--ink); }
.primary-action:hover { background: var(--purple); border-color: var(--purple); }
.secondary-action { background: var(--paper); }
.extract-code { margin-top: 10px; padding: 9px 11px; border: 1px dashed var(--line); font-size: 12px; }
.member-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; }
.related-panel { padding: 20px; }
.related-panel h2 { margin: 0 0 10px; color: var(--ink); font-size: 17px; }
.related-panel a { padding: 13px 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--soft-line); }
.related-panel a:last-child { border-bottom: 0; }
.related-panel a > span {
  overflow: hidden;
  color: #667080;
  font: 600 10px/1.4 ui-monospace, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-panel a > strong { margin: 4px 0; color: var(--ink); font-size: 13px; }
.related-panel a > small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-shell { max-width: 860px; margin: 56px auto 90px; padding: 0 20px; }
.page-shell > header { padding: 36px; text-align: center; background: var(--hero); border: 1px solid var(--line); border-radius: 20px 20px 0 0; }
.page-shell > header h1 { margin: 4px 0 0; color: var(--ink); font-size: 38px; line-height: 1.2; }
.page-shell > header p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.page-content { padding: 34px; background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 20px 20px; }
.page-content h2 { margin-top: 30px; color: var(--ink); }
.page-content table { width: 100%; border-collapse: collapse; }
.page-content th, .page-content td { padding: 12px; border: 1px solid var(--line); text-align: left; }

.site-footer { margin-top: 90px; background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--width);
  min-height: 190px;
  margin: 0 auto;
  padding: 45px 20px 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}
.footer-links { margin-bottom: 16px; display: flex; gap: 20px; font-size: 12px; }
.footer-links a:hover { color: var(--ink); }
.footer-inner p { margin: 2px 0; font-size: 12px; }
.footer-inner p strong { color: var(--ink); }
.footer-inner .safety-note { font-size: 10px; }
.footer-inner small { margin-top: 8px; font-size: 10px; }

@media (max-width: 900px) {
  .header-inner { gap: 14px; }
  .main-nav a:nth-child(n+4) { display: none; }
  .intro-stats-inner { grid-template-columns: 1.6fr repeat(3, .7fr); }
  .onboarding { align-items: flex-start; }
  .onboarding-icon { width: 48px; height: 48px; }
  .topic-grid, .popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-width: 640px) {
  .site-header { top: 8px; width: calc(100% - 28px); margin-top: 8px; }
  .header-inner { min-height: 48px; padding: 0 12px; gap: 10px; }
  .brand-word { font-size: 17px; }
  .brand-sub, .main-nav, .search-shortcut, .account-link { display: none; }
  .mobile-menu { display: block; margin-left: auto; }
  .catalog-hero { margin-top: -56px; }
  .hero-inner { min-height: 520px; padding: 125px 14px 38px; }
  .hero-inner h1 { font-size: 58px; }
  .hero-inner > p { max-width: 270px; margin: 22px 0 28px; font-size: 13px; }
  .search-console { padding: 18px 13px 16px; border-radius: 19px; }
  .audience-toggle { margin-bottom: 16px; }
  .audience-toggle label { min-width: 108px; padding: 6px 10px; font-size: 12px; }
  .hero-search { grid-template-columns: 30px 1fr auto; }
  .hero-search button { min-width: 76px; }
  .search-suggestions { gap: 6px; }
  .search-suggestions a { padding: 3px 8px; }
  .platform-row { gap: 13px; }
  .platform-row span { width: 24px; height: 24px; font-size: 15px; }
  .intro-stats-inner {
    padding: 25px 20px;
    grid-template-columns: repeat(3, 1fr);
  }
  .onboarding { grid-column: 1 / -1; margin-bottom: 22px; }
  .onboarding h2 { font-size: 18px; }
  .onboarding p { font-size: 11px; }
  .onboarding-icon { width: 48px; height: 48px; }
  .stat { min-height: 68px; padding: 0 5px; }
  .stat:first-of-type { border-left: 0; }
  .stat strong { font-size: 24px; }
  .stat span { font-size: 9px; }
  .home-section { padding-left: 15px; padding-right: 15px; }
  .ornament-heading { gap: 12px; }
  .ornament-heading > span { font-size: 35px; }
  .ornament-heading h2 { font-size: 25px; }
  .ornament-heading p { font-size: 11px; line-height: 1.5; }
  .ranking-board { grid-template-columns: 1fr; border-radius: 20px; }
  .ranking-categories {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .ranking-categories a { padding: 9px 7px; font-size: 12px; }
  .ranking-list { padding: 12px 14px 18px; }
  .ranking-row {
    min-height: 75px;
    grid-template-columns: 30px 32px minmax(0, 1fr) 36px;
    gap: 7px;
  }
  .rank-number { font-size: 18px; }
  .rank-icon { font-size: 20px; }
  .rank-copy strong { font-size: 13px; }
  .rank-copy small { font-size: 10px; }
  .grade-badge { min-width: 30px; padding: 3px; font-size: 9px; }
  .rank-meta { display: none; }
  .topics-section { padding-top: 76px; }
  .topic-grid, .popular-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 330px; }
  .popular-section { padding-top: 84px; padding-bottom: 60px; }
  .popular-tabs { justify-content: flex-start; }
  .popular-tabs a { min-width: 58px; padding: 9px; }
  .popular-tabs a span { display: none; }
  .popular-tabs a.is-active { min-width: 82px; }
  .popular-tabs a.is-active span { display: inline; }
  .popular-card { min-height: 176px; }
  .archive-head { margin-top: 25px; padding: 35px 15px 10px; flex-direction: column; align-items: stretch; }
  .archive-head h1 { font-size: 28px; }
  .compact-search input { width: 100%; }
  .detail-shell { padding: 20px 15px 70px; }
  .breadcrumbs { margin: 15px 0 24px; }
  .detail-intro { grid-template-columns: 1fr; }
  .detail-heading h1 { font-size: 31px; }
  .detail-heading h2 { font-size: 17px; }
  .detail-heading > p { font-size: 13px; }
  .quick-action { width: 100%; }
  .detail-metrics { grid-template-columns: repeat(2, 1fr); padding: 8px; }
  .detail-metrics > div { padding: 11px; }
  .detail-metrics > div:nth-child(2) { border-right: 0; }
  .detail-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .detail-layout { grid-template-columns: 1fr; gap: 18px; }
  .content-block { padding: 22px 20px 28px; }
  .detail-sidebar { grid-row: 1; }
  .page-shell { margin-top: 38px; padding: 0 15px; }
  .page-shell > header, .page-content { padding: 24px 20px; }
  .page-shell > header h1 { font-size: 30px; }
  .site-footer { margin-top: 55px; }
}

/* IPHC dark catalog: transparent over the hero, solid after scrolling. */
.header-inner {
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled .header-inner,
.inner-view .header-inner {
  background: rgba(8, 13, 25, .94);
  border-color: rgba(148, 163, 184, .34);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
}
.lucide {
  width: 1em;
  height: 1em;
  display: inline-block;
  stroke: currentColor;
}
.audience-toggle label,
.hero-search button,
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.audience-toggle label .lucide,
.hero-search button .lucide { font-size: 15px; }
.search-icon {
  display: grid;
  place-items: center;
}
.search-icon .lucide { font-size: 19px; }
.platform-row .lucide { font-size: 20px; }

.home-view,
.home-view main { background: #070709; }
.home-view .intro-stats {
  color: #f4f5f7;
  background: #0d0d0f;
  border-color: #27282d;
}
.home-view .intro-stats-inner { border-color: #27282d; }
.home-view .onboarding-icon {
  color: #0d0d0f;
  background: #f6f7f8;
  border-color: #35373f;
  box-shadow: none;
}
.home-view .onboarding p,
.home-view .stat span { color: #9699a2; }
.home-view .onboarding a {
  color: #f2f3f5;
  border-color: #3a3b42;
}
.home-view .onboarding a:hover { border-color: #f2f3f5; }
.home-view .stat { border-color: #292a2f; }

.home-view .home-section { color: #f5f6f8; }
.home-view .ornament-heading > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #f5f6f8;
  transform: rotate(-30deg);
}
.home-view .ornament-heading > span.mirror { transform: scaleX(-1) rotate(-30deg); }
.home-view .ornament-heading > span .lucide { font-size: 44px; }
.home-view .ornament-heading h2 { color: #ffffff; }
.home-view .ornament-heading p { color: #92959e; }

.home-view .ranking-board {
  background: #151517;
  border-color: #2b2c31;
}
.home-view .ranking-categories { border-color: #2b2c31; }
.home-view .ranking-categories a { color: #e8e9ec; }
.home-view .ranking-categories a:hover {
  color: #ffffff;
  background: #222327;
}
.home-view .ranking-categories a.is-active {
  color: #101114;
  background: #f7f7f8;
}
.home-view .ranking-row { border-color: #292a2e; }
.home-view .ranking-row:hover { background: #1b1c20; }
.home-view .ranking-row:hover .rank-copy strong { color: #63d8ef; }
.home-view .rank-number,
.home-view .rank-copy strong { color: #f4f5f7; }
.home-view .rank-number.medal { color: #f2a64a; }
.home-view .rank-icon {
  display: grid;
  place-items: center;
  color: #9ca3af;
}
.home-view .rank-icon .lucide { font-size: 24px; }
.home-view .rank-copy small,
.home-view .rank-meta { color: #92959e; }
.home-view .grade-badge {
  color: #48d6a0;
  background: rgba(19, 112, 80, .16);
  border-color: rgba(72, 214, 160, .36);
}
.home-view .grade-badge .lucide { font-size: 13px; }

.home-view .topic-card {
  min-height: 390px;
  padding: 24px;
  justify-content: flex-start;
  color: #f4f5f7;
  background: #171719;
  border-color: #2c2d31;
  border-radius: 20px;
}
.home-view .topic-card:hover {
  border-color: #4b4d55;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}
.home-view .topic-copy h3 {
  min-height: 62px;
  margin: 0 0 15px;
  color: #ffffff;
  font-size: 21px;
}
.home-view .topic-copy > span {
  display: inline-flex;
  color: #a6a9b1;
  background: #222226;
  border-color: #35363c;
}
.home-view .topic-copy p {
  min-height: 42px;
  margin: 16px 0 0;
  padding-top: 13px;
  color: #979aa3;
  border-top: 1px solid #2b2c31;
  font-size: 12px;
}
.topic-media {
  margin-top: 18px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d1017;
  border-radius: 12px;
}
.topic-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .28s ease;
}
.topic-card:hover .topic-media img { transform: scale(1.025); }

.home-view .popular-tabs {
  min-height: 112px;
  padding: 10px;
  align-items: stretch;
  background: #171719;
  border-color: #2c2d31;
}
.home-view .popular-tabs a {
  min-width: 106px;
  min-height: 90px;
  flex: 1 0 0;
  flex-direction: column;
  gap: 8px;
  color: #a4a7af;
  border-radius: 14px;
}
.home-view .popular-tabs a b {
  display: grid;
  place-items: center;
}
.home-view .popular-tabs a b .lucide { font-size: 27px; }
.home-view .popular-tabs a span { font-size: 12px; }
.home-view .popular-tabs a:hover {
  color: #ffffff;
  background: #212226;
}
.home-view .popular-tabs a.is-active {
  color: #111216;
  background: #f7f7f8;
}
.home-view .popular-card {
  background: #171719;
  border-color: #2c2d31;
  border-radius: 12px;
}
.home-view .popular-card:hover {
  border-color: #4b4d55;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
.home-view .popular-slug,
.home-view .popular-card h3 { color: #f3f4f6; }
.home-view .popular-card h3 span {
  display: inline-grid;
  place-items: center;
  color: #62d8ef;
  vertical-align: -2px;
}
.home-view .popular-card h3 span .lucide { font-size: 17px; }
.home-view .popular-card p,
.home-view .popular-card footer { color: #989ba4; }
.home-view .popular-card footer { border-color: #2b2c31; }
.home-view .pagination .page-navigator a {
  color: #b3b6be;
  background: #171719;
  border-color: #323339;
}
.home-view .pagination .page-navigator .current a {
  color: #111216;
  background: #f4f5f7;
  border-color: #f4f5f7;
}
.filter-empty {
  margin: 20px 0 4px;
  padding: 26px 18px;
  color: #9da0a8;
  text-align: center;
  background: #171719;
  border: 1px dashed #34353b;
  border-radius: 12px;
  font-size: 13px;
}
.ranking-list .filter-empty { margin: 14px 0 0; }
.home-view .site-footer {
  margin-top: 0;
  color: #999ca5;
  background: #070709;
  border-color: #27282d;
}
.home-view .footer-inner p strong { color: #f5f6f8; }
.home-view .footer-links a:hover { color: #ffffff; }

@media (max-width: 640px) {
  .home-view .ornament-heading > span {
    width: 34px;
    height: 34px;
  }
  .home-view .ornament-heading > span .lucide { font-size: 32px; }
  .home-view .ranking-categories {
    padding: 12px;
    display: flex;
    flex-direction: row;
    gap: 7px;
    overflow-x: auto;
    border-bottom-color: #2b2c31;
    scrollbar-width: none;
  }
  .home-view .ranking-categories::-webkit-scrollbar,
  .home-view .popular-tabs::-webkit-scrollbar { display: none; }
  .home-view .ranking-categories a {
    min-width: max-content;
    flex: 0 0 auto;
    padding: 9px 14px;
  }
  .home-view .ranking-list { padding: 8px 12px 14px; }
  .home-view .ranking-row { min-height: 72px; }
  .home-view .topic-card {
    min-height: 0;
    padding: 20px;
  }
  .home-view .topic-copy h3 {
    min-height: 0;
    font-size: 19px;
  }
  .home-view .topic-copy p { min-height: 0; }
  .home-view .popular-tabs {
    min-height: 102px;
    padding: 7px;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .home-view .popular-tabs a,
  .home-view .popular-tabs a.is-active {
    min-width: 82px;
    min-height: 86px;
    flex: 0 0 82px;
    padding: 8px 6px;
  }
  .home-view .popular-tabs a span,
  .home-view .popular-tabs a.is-active span {
    display: inline;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .home-view .popular-grid { gap: 12px; }
  .home-view .popular-card { min-height: 170px; }
}
