/* ============ BankBin · Apple 极简风 ============ */
:root {
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-card: #fbfbfd;
  --border: #d2d2d7;
  --border-soft: #e8e8ed;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 12px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 17px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.47;
  letter-spacing: -0.01em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ===== Header ===== */
.site-header {
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-header .logo {
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.site-header .logo:hover { text-decoration: none; }
.site-header .tagline {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 980px;
  transition: all 0.2s;
  font-weight: 400;
}
.site-nav a:hover {
  color: var(--accent);
  background: rgba(0,113,227,0.08);
  text-decoration: none;
}
.site-nav a.nav-active {
  color: #fff;
  background: var(--accent);
  font-weight: 500;
}
@media (max-width: 768px) {
  .site-header .container { flex-wrap: wrap; gap: 10px; }
  .site-nav { order: 3; width: 100%; }
  .site-nav a { font-size: 13px; padding: 5px 10px; }
}

/* ===== Main ===== */
main.container { padding: 32px 22px 80px; min-height: calc(100vh - 200px); }

/* ===== Hero / Search ===== */
.hero { text-align: center; padding: 40px 0 32px; }
.hero-title {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.1;
}
.hero-sub {
  font-size: 19px;
  color: var(--text-2);
  margin-bottom: 28px;
  font-weight: 400;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.search-box {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}
.search-box input {
  flex: 1;
  padding: 14px 20px;
  font-size: 17px;
  border: 1px solid var(--border);
  border-radius: 980px;
  outline: none;
  background: var(--bg-alt);
  color: var(--text);
  transition: all 0.2s;
}
.search-box input:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,113,227,0.1);
}
.search-box input::placeholder { color: var(--text-3); }
.search-box button {
  padding: 0 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s;
}
.search-box button:hover { background: var(--accent-hover); }

/* ===== Home sections ===== */
.home-section { margin-top: 56px; }
.home-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-hint {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 400;
  margin-left: 8px;
}
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.section-card:hover {
  background: #fff;
  border-color: var(--border);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.section-card .section-code {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.section-card .section-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.section-card .section-count {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ===== Chapter grid ===== */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.chapter-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.2s;
}
.chapter-item:hover {
  background: #fff;
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.chapter-item .chapter-code {
  font-family: "SF Mono", "Courier New", monospace;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 13px;
}
.chapter-item .chapter-name {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 28px;
  padding: 8px 0;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: var(--text-3); }

/* ===== Detail page ===== */
.detail-wrap { max-width: 860px; margin: 0 auto; }

.code-header { text-align: center; padding: 28px 0 32px; }
.code-big {
  display: inline-block;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 40px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.code-header h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.status-tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 980px;
  background: rgba(52,199,89,0.12);
  color: var(--green);
  font-weight: 500;
  margin-left: 6px;
  vertical-align: middle;
}
.update-time {
  display: inline-block;
  font-size: 12px;
  color: var(--text-3);
  margin-left: 10px;
  vertical-align: middle;
}

.info-section {
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.info-section:hover { border-color: var(--border); }
.section-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 18px 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 20px;
}
.kv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid var(--border-soft);
}
.kv-item.highlight {
  background: rgba(255,149,0,0.06);
  border-color: rgba(255,149,0,0.3);
}
.kv-k { color: var(--text-3); font-size: 13px; }
.kv-v { color: var(--text); font-weight: 500; text-align: right; word-break: break-all; }
.kv-v.code { font-family: "SF Mono", "Courier New", monospace; font-size: 13px; }
.kv-v.big-rate {
  font-size: 22px;
  font-weight: 600;
  color: var(--orange);
  font-family: "SF Mono", "Courier New", monospace;
  letter-spacing: -0.02em;
}

.remarks-box {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(0,113,227,0.04);
  border: 1px solid rgba(0,113,227,0.15);
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  gap: 12px;
  line-height: 1.5;
}
.remarks-label { flex-shrink: 0; font-weight: 600; color: var(--accent); }
.remarks-text { color: var(--text); }

.code-desc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.code-desc-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 980px;
  font-size: 13px;
}
.code-tag {
  font-family: "SF Mono", "Courier New", monospace;
  font-weight: 600;
  color: var(--orange);
  background: rgba(255,149,0,0.12);
  padding: 2px 8px;
  border-radius: 980px;
  font-size: 12px;
}
.code-tag.ciq { color: var(--accent); background: rgba(0,113,227,0.1); }
.code-desc { color: var(--text-2); }

.declare-list { padding-left: 22px; margin: 0; }
.declare-list li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  line-height: 1.5;
}
.declare-list li:last-child { border-bottom: none; }
.declare-idx { color: var(--accent); font-family: "SF Mono", "Courier New", monospace; margin-right: 8px; }

.rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.rate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.rate-item span { color: var(--text-2); }
.rate-item strong { color: var(--green); font-family: "SF Mono", "Courier New", monospace; font-weight: 600; }

.chapter-tree { font-family: "SF Mono", "Courier New", monospace; font-size: 13px; }
.tree-item { padding: 6px 0; color: var(--text-2); }
.tree-code { color: var(--accent); font-weight: 600; margin-right: 10px; }
.tree-name { color: var(--text); }

.disclaimer {
  margin-top: 32px;
  padding: 18px 22px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}
.disclaimer a { color: var(--text-2); }

/* ===== Section page ===== */
.section-page h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.section-page .section-desc {
  font-size: 17px;
  color: var(--text-2);
  margin-bottom: 32px;
}

/* ===== Search results ===== */
.search-meta {
  font-size: 13px;
  color: var(--text-3);
  margin: 24px 0 16px;
}
.result-card {
  display: block;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.result-card:hover {
  background: #fff;
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.result-card .r-code {
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 17px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 4px;
}
.result-card .r-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.result-card .r-meta {
  font-size: 13px;
  color: var(--text-3);
}
.result-card .r-meta strong {
  color: var(--text-2);
  font-weight: 500;
  margin-right: 14px;
}
mark {
  background: rgba(255,200,0,0.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  padding: 28px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.footer-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
}

/* ===== Responsive ===== */
@media (max-width: 734px) {
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 17px; }
  .code-big { font-size: 32px; }
  .code-header h1 { font-size: 22px; }
  .info-section { padding: 18px 20px; }
  .kv-grid { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr; }
}
