* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --blue: #007AFF;
  --blue2: #5AC8FA;
  --grad: linear-gradient(135deg, #007AFF, #5AC8FA);
  --bg: #f2f2f7;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #8e8e93;
  --line: #e5e5ea;
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
}
a { color: inherit; text-decoration: none; }

/* ===== top bar ===== */
.top-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.top-bar-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px;
}
.brand { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 12px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #f2f2f7; border-radius: 20px; padding: 8px 14px;
  font-size: 13px; color: #8e8e93; width: 230px;
}
.search-box svg { width: 14px; height: 14px; fill: #8e8e93; flex-shrink: 0; }
.search-box input { border: none; outline: none; background: transparent; width: 100%; font-size: 13px; color: #333; }
.search-box:focus-within { background: #e5e5ea; }
/* language switch */
.lang-switch {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: #f2f2f7; border-radius: 20px;
  font-size: 13px; font-weight: 600; color: #333; user-select: none;
}
.lang-switch svg { width: 14px; height: 14px; }
.ls-opt { color: #666; padding: 0 2px; }
.ls-opt:hover { color: var(--blue); }
.ls-opt.active { color: var(--blue); font-weight: 700; }
.ls-sep { color: #c7c7cc; }

.lang-selector {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: #f2f2f7; border-radius: 20px;
  font-size: 13px; font-weight: 600; color: #333; cursor: pointer; user-select: none;
}
.lang-selector:hover { background: #e5e5ea; }
.lang-selector svg { width: 14px; height: 14px; }
.lang-selector .arrow { font-size: 10px; color: #8e8e93; }
.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  min-width: 150px; z-index: 200; overflow: hidden;
}
.lang-dropdown.show { display: block; }
.lang-option { display: block; padding: 10px 16px; font-size: 13px; color: #333; cursor: pointer; }
.lang-option:hover { background: #f2f2f7; }
.lang-option.active { color: var(--blue); font-weight: 600; }

/* ===== main tabs ===== */
.main-tabs-bar { background: #fff; border-bottom: 2px solid var(--line); }
.main-tabs-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; overflow-x: auto; }
.main-tab {
  display: flex; align-items: center; gap: 8px; padding: 13px 20px;
  position: relative; white-space: nowrap; transition: background 0.2s;
}
.main-tab:hover { background: #f8f9fc; }
.mt-icon {
  width: 30px; height: 30px; border-radius: 8px; background: #f2f2f7;
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.25s;
}
.main-tab.active .mt-icon { background: var(--grad); box-shadow: 0 3px 10px rgba(0,122,255,0.3); }
.mt-icon svg { width: 15px; height: 15px; fill: #8e8e93; }
.main-tab.active .mt-icon svg { fill: #fff; }
.mt-label { font-size: 14px; font-weight: 600; color: #666; }
.main-tab.active .mt-label { color: var(--blue); }
.main-tab::after {
  content: ''; position: absolute; bottom: -2px; left: 14px; right: 14px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--grad);
  transform: scaleX(0); transition: transform 0.3s ease;
}
.main-tab.active::after { transform: scaleX(1); }

/* ===== sub tabs ===== */
.sub-tabs-bar { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 24px 10px; }
.sub-tabs-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px 0;
}
.sub-tab {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 4px; border-radius: 12px; white-space: nowrap; transition: all 0.15s;
}
.sub-tab:hover { background: #f2f2f7; }
.st-dot {
  width: 38px; height: 38px; border-radius: 50%; background: #f2f2f7;
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.25s;
}
.sub-tab.active .st-dot { background: var(--grad); box-shadow: 0 3px 10px rgba(0,122,255,0.3); }
.st-dot svg { width: 17px; height: 17px; fill: #8e8e93; }
.sub-tab.active .st-dot svg { fill: #fff; }
.st-label { font-size: 11px; color: #666; font-weight: 500; text-align: center; margin-top: 4px; line-height: 1.2; }
.sub-tab.active .st-label { color: var(--blue); font-weight: 700; }

/* ===== main / shared ===== */
main { min-height: 50vh; }
main > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section, .page-head, .article-card, .sub-card-list, .result-list, .empty-state, .pager, .crumbs { padding-left: 24px; padding-right: 24px; }

/* ===== hero (home) ===== */
.hero {
  padding: 56px 24px 20px; text-align: center;
}
.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin-bottom: 14px; }
.hero p { font-size: 16px; color: #555; max-width: 620px; margin: 0 auto 26px; line-height: 1.7; }
.hero-search {
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 28px; padding: 6px 6px 6px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.hero-search svg { width: 18px; height: 18px; fill: #8e8e93; flex-shrink: 0; }
.hero-search input { flex: 1; border: none; outline: none; font-size: 15px; padding: 10px 0; }
.hero-search button {
  border: none; background: var(--grad); color: #fff; font-size: 14px; font-weight: 700;
  padding: 12px 26px; border-radius: 22px; cursor: pointer;
}
.hero-search button:hover { opacity: 0.9; }

/* ===== sections & cards ===== */
.section { padding-top: 30px; padding-bottom: 10px; }
.section-title { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.group-card {
  background: #fff; border-radius: 16px; padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04); transition: all 0.2s;
}
.group-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,122,255,0.12); }
.gc-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
}
.gc-icon svg { width: 22px; height: 22px; fill: #fff; }
.gc-label { font-size: 16px; font-weight: 700; }
.gc-blurb { font-size: 13px; color: #777; line-height: 1.55; flex: 1; }
.gc-meta { font-size: 13px; color: var(--blue); font-weight: 600; }

.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 30px; }
.feat-card {
  background: #fff; border-radius: 16px; padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04); transition: all 0.2s;
  display: flex; flex-direction: column; gap: 8px;
}
.feat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,122,255,0.12); }
.feat-top { display: flex; align-items: center; gap: 10px; }
.feat-icon {
  width: 34px; height: 34px; border-radius: 10px; background: #eef6ff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feat-icon svg { width: 17px; height: 17px; fill: var(--blue); }
.feat-group { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.4px; }
.feat-title { font-size: 16px; font-weight: 700; }
.feat-desc { font-size: 13px; color: #777; line-height: 1.6; }

/* ===== page head (group/search) ===== */
.page-head { display: flex; align-items: center; gap: 16px; padding-top: 30px; padding-bottom: 22px; }
.page-title { font-size: 26px; font-weight: 800; }
.page-blurb { font-size: 14px; color: #777; margin-top: 4px; max-width: 600px; }
.cc-icon {
  width: 50px; height: 50px; border-radius: 14px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cc-icon svg { width: 24px; height: 24px; fill: #fff; }

/* ===== sub cards (group page + search) ===== */
.sub-card-list, .result-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 36px; }
.sub-card {
  background: #fff; border-radius: 14px; padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03); transition: all 0.15s;
}
.sub-card:hover { box-shadow: 0 6px 18px rgba(0,122,255,0.1); transform: translateX(3px); }
.sc-icon {
  width: 40px; height: 40px; border-radius: 50%; background: #f2f2f7;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sc-icon svg { width: 19px; height: 19px; fill: #8e8e93; }
.sub-card:hover .sc-icon { background: var(--grad); }
.sub-card:hover .sc-icon svg { fill: #fff; }
.sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sc-title { font-size: 15px; font-weight: 700; }
.sc-group-tag { font-size: 11px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.4px; }
.sc-desc { font-size: 13px; color: #777; line-height: 1.55; }
.sc-arrow { color: #c7c7cc; font-size: 18px; flex-shrink: 0; }
.sub-card:hover .sc-arrow { color: var(--blue); }

/* ===== breadcrumbs ===== */
.crumbs { display: flex; align-items: center; gap: 8px; padding-top: 22px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.crumb-cur { color: #555; font-weight: 600; }

/* ===== article ===== */
.article-card {
  background: #fff; border-radius: 20px; padding: 34px 38px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04); margin-top: 14px; margin-bottom: 20px;
}
.article-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article-title { font-size: 26px; font-weight: 800; letter-spacing: -0.3px; }
.article-meta { font-size: 12px; color: var(--muted); margin-top: 5px; }
.article-body { font-size: 15.5px; color: #333; line-height: 1.85; max-width: 760px; }
.article-body p { margin-bottom: 16px; }
.article-body h2 { font-size: 21px; font-weight: 800; margin: 30px 0 12px; }
.article-body h3 { font-size: 18px; font-weight: 700; margin: 26px 0 10px; }
.article-body h4, .article-body h5 { font-size: 16px; font-weight: 700; margin: 22px 0 8px; }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; }
.article-body li { margin-bottom: 7px; }
.article-body strong { color: #111; }
.article-body em { color: #555; }
.article-body a { color: var(--blue); text-decoration: underline; }
.article-body code {
  background: #f2f2f7; border-radius: 5px; padding: 2px 7px;
  font-size: 13.5px; font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.article-body blockquote {
  border-left: 4px solid var(--blue); background: #eef6ff;
  border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 18px 0;
  color: #1d4e89; font-size: 14.5px;
}
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 26px 0; }
.table-wrap { overflow-x: auto; margin: 18px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.article-body th, .article-body td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.article-body th { background: #f8f9fc; font-weight: 700; color: #333; }
.article-body tr:hover td { background: #fafbfd; }

/* ===== pager ===== */
.pager { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 40px; }
.pager-link {
  background: #fff; border-radius: 14px; padding: 14px 20px; max-width: 48%;
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); transition: all 0.15s; color: var(--blue);
}
.pager-link span { display: flex; flex-direction: column; gap: 2px; color: #333; }
.pager-link small { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.pager-link.next { margin-left: auto; text-align: right; }
.pager-link.next span { align-items: flex-end; }
.pager-link:hover { box-shadow: 0 6px 18px rgba(0,122,255,0.12); }

/* ===== empty / 404 ===== */
.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); font-size: 15px; }
.empty-state.big { padding: 90px 24px; }
.es-code { font-size: 72px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.btn-home {
  display: inline-block; margin-top: 18px; background: var(--grad); color: #fff;
  padding: 12px 28px; border-radius: 22px; font-weight: 700; font-size: 14px;
}

/* ===== footer ===== */
.site-footer { max-width: 1100px; margin: 0 auto; padding: 10px 24px 0; }
.footer-inner {
  background: #fff; border-radius: 16px; padding: 30px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px;
}
.footer-brand h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.footer-col h4 { font-size: 12px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; color: var(--muted); transition: color 0.15s; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { max-width: 1100px; margin: 0 auto; padding: 16px 24px 30px; font-size: 12px; color: #bbb; text-align: center; }

/* ===== responsive ===== */
@media (max-width: 900px) {
  .sub-tabs-inner { grid-template-columns: repeat(5, 1fr); }
  .search-box { width: 160px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 32px; }
}
@media (max-width: 560px) {
  .brand { font-size: 17px; }
  .search-box { display: none; }
  .main-tab { flex-direction: column; padding: 9px 4px; gap: 4px; flex: 1; text-align: center; }
  .main-tabs-inner { padding: 0 6px; }
  .mt-label { font-size: 10px; }
  .st-label { font-size: 9.5px; }
  .st-dot { width: 34px; height: 34px; }
  .st-dot svg { width: 15px; height: 15px; }
  .article-card { padding: 24px 20px; }
  .article-title { font-size: 21px; }
  .hero h1 { font-size: 27px; }
  .pager-link { max-width: 100%; }
}
