/* ============================================================
   投资学习知识库 — 现代简洁体系
   白底 / 无衬线 / 细线 / 大留白 / 六流派数据色
   ============================================================ */

:root {
  --bg:        #FFFFFF;
  --bg-sub:    #FAFAFA;
  --bg-card:   #FFFFFF;
  --text:      #0F1012;
  --text-2:    #5F6368;
  --text-3:    #8B8F96;
  --line:      #E8E8EA;
  --line-2:    #D6D7DA;
  --accent:    #0F1012;

  /* 六流派数据色 */
  --s-value: #10795A;
  --s-macro: #2463D8;
  --s-trend: #D8452F;
  --s-vol:   #7444D6;
  --s-quant: #0A8298;
  --s-cycle: #B57407;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text",
               "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  --maxw: 1120px;
  --r: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0B0B0D;
    --bg-sub:  #111113;
    --bg-card: #131316;
    --text:    #F2F2F3;
    --text-2:  #9B9DA3;
    --text-3:  #71747A;
    --line:    #232327;
    --line-2:  #313136;
    --accent:  #F2F2F3;

    --s-value: #34D399;
    --s-macro: #60A5FA;
    --s-trend: #F87171;
    --s-vol:   #A78BFA;
    --s-quant: #22D3EE;
    --s-cycle: #FBBF24;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--s-macro);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-seal {
  width: 26px; height: 26px; background: var(--accent); color: var(--bg);
  font-size: 13px; font-weight: 700; letter-spacing: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; flex-shrink: 0;
}
.brand-name {
  font-size: 16px; font-weight: 650; letter-spacing: -0.01em; color: var(--text);
}
.brand-sub {
  font-size: 10px; color: var(--text-3); letter-spacing: .14em;
  display: block; line-height: 1.3; font-weight: 500;
}

.site-nav { display: flex; gap: 2px; }
.site-nav a {
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--text); background: var(--bg-sub); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

@media (max-width: 760px) {
  .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; }
  .site-nav { width: 100%; overflow-x: auto; padding-bottom: 4px; margin-left: -4px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding: 6px 10px; }
}

/* ---------- 首页 Hero ---------- */

.hero { padding: 104px 0 0; }
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em;
  color: var(--text-3); text-transform: uppercase; margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(34px, 5.6vw, 60px);
  font-weight: 680; line-height: 1.24; letter-spacing: -0.025em;
  max-width: 18em;
}
.hero h1 em { font-style: normal; color: var(--text-3); }
.hero-sub {
  margin-top: 24px; max-width: 38em; color: var(--text-2); font-size: 17px; line-height: 1.72;
}
.hero-actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; text-decoration: none;
  font-size: 14.5px; font-weight: 550; padding: 10px 20px; border-radius: 9px;
  transition: opacity .15s, background .15s, border-color .15s;
}
.btn-seal { background: var(--accent); color: var(--bg); }
.btn-seal:hover { opacity: .84; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--bg-sub); border-color: var(--text-3); }

/* 百年时间轴(签名元素) */
.timeline { margin-top: 88px; padding-bottom: 8px; }
.timeline-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  color: var(--text-3); margin-bottom: 20px; text-transform: uppercase;
}
.timeline-track {
  display: flex; overflow-x: auto; padding: 26px 0 10px;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
}
.timeline-track::-webkit-scrollbar { display: none; }
.tl-node {
  min-width: 86px; flex: 1; position: relative; text-decoration: none; padding-right: 10px;
}
.tl-node::before {
  content: ""; position: absolute; top: -20px; left: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--node, var(--text-3));
}
.tl-year { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); display: block; }
.tl-name {
  font-size: 15px; font-weight: 580; color: var(--text); display: block;
  margin-top: 3px; white-space: nowrap; letter-spacing: -0.01em;
}
.tl-school { font-size: 11.5px; color: var(--text-3); display: block; margin-top: 1px; }
.tl-node:hover .tl-name { color: var(--node, var(--text)); }

/* ---------- 章节 ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-sub); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em;
  color: var(--text-3); text-transform: uppercase; margin-bottom: 14px;
}
.section h2 {
  font-size: clamp(24px, 3.2vw, 34px); font-weight: 660;
  letter-spacing: -0.022em; line-height: 1.32;
}
.section-intro { margin-top: 16px; max-width: 42em; color: var(--text-2); font-size: 16.5px; }

/* ---------- 流派卡片 ---------- */

.school-grid {
  margin-top: 48px; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.school-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px 24px 22px; text-decoration: none; display: block;
  transition: border-color .18s ease, transform .18s ease;
}
.school-card:hover { border-color: var(--sc, var(--line-2)); transform: translateY(-2px); }
.school-card h3 {
  font-size: 18px; font-weight: 640; letter-spacing: -0.015em;
  display: flex; align-items: center; gap: 9px;
}
.school-card h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 3px;
  background: var(--sc, var(--text-3)); flex-shrink: 0;
}
.school-card .sc-en {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  color: var(--text-3); display: block; margin: 4px 0 0 17px;
}
.school-card p { font-size: 14.5px; color: var(--text-2); margin-top: 14px; line-height: 1.7; }
.school-card .sc-names { margin-top: 16px; font-size: 13px; color: var(--sc, var(--text-2)); font-weight: 550; }

/* ---------- 大师卡片 ---------- */

.master-grid {
  margin-top: 48px; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}
.master-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 7px;
  transition: border-color .18s ease, transform .18s ease;
}
.master-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.master-card h3 { font-size: 18px; font-weight: 630; letter-spacing: -0.015em; line-height: 1.4; }
.mc-en { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); letter-spacing: .01em; }
.mc-line { font-size: 13.5px; color: var(--text-2); line-height: 1.66; margin-top: 3px; }
.mc-years { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }
.master-card.is-stub { opacity: .55; }
.master-card.is-stub:hover { transform: none; border-color: var(--line); }

.tag {
  display: inline-flex; font-size: 11.5px; font-weight: 550; letter-spacing: .01em;
  padding: 2px 9px; border-radius: 6px; align-self: flex-start;
  color: var(--tc, var(--text-2));
  background: color-mix(in srgb, var(--tc, var(--text-3)) 11%, transparent);
}
.tag-soon {
  background: none; color: var(--text-3); border: 1px dashed var(--line-2);
}

/* ---------- 战役条目 ---------- */

.battle-list { margin-top: 48px; }
.battle-item {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 24px; align-items: baseline;
  padding: 22px 2px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .15s;
}
.battle-item:first-child { border-top: 1px solid var(--line); }
.battle-item:hover h3 { color: var(--s-macro); }
.battle-year { font-family: var(--font-mono); font-size: 14px; color: var(--text-3); }
.battle-item h3 { font-size: 17px; font-weight: 620; letter-spacing: -0.015em; transition: color .15s; }
.battle-item p { font-size: 14px; color: var(--text-2); margin-top: 5px; line-height: 1.66; }
.battle-who { font-size: 13px; color: var(--text-3); white-space: nowrap; }
@media (max-width: 660px) {
  .battle-item { grid-template-columns: 1fr; gap: 6px; }
  .battle-who { display: none; }
}

/* ---------- 名言卡 ---------- */

.quote-grid { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.quote-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 28px 24px 24px;
}
.quote-card blockquote {
  font-size: 17px; font-weight: 520; line-height: 1.7; letter-spacing: -0.012em;
}
.quote-card figcaption { margin-top: 18px; font-size: 13px; color: var(--text-3); }
.quote-card figcaption a { color: var(--text-2); text-decoration: none; font-weight: 550; }
.quote-card figcaption a:hover { color: var(--text); }

/* ---------- 词条页 ---------- */

.article-head {
  padding: 64px 0 40px; border-bottom: 1px solid var(--line);
}
.article-head h1 {
  font-size: clamp(30px, 4.4vw, 46px); font-weight: 680;
  letter-spacing: -0.03em; line-height: 1.2;
}
.article-head .ah-en {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3);
  letter-spacing: .06em; margin-top: 10px;
}
.article-head .ah-line { margin-top: 20px; max-width: 40em; color: var(--text-2); font-size: 16.5px; }

.crumb { font-size: 13px; margin-bottom: 24px; color: var(--text-3); }
.crumb a { color: var(--text-3); text-decoration: none; }
.crumb a:hover { color: var(--text); }
.crumb span { color: var(--line-2); margin: 0 7px; }

.article-layout {
  display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 64px;
  padding: 56px 0 96px; align-items: start;
}
.article-layout > .article { grid-column: 2; grid-row: 1; }
.article-layout > .side { grid-column: 1; grid-row: 1; }
@media (max-width: 940px) {
  .article-layout { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .article-layout > .article, .article-layout > .side { grid-column: 1; grid-row: auto; }
}

.article { max-width: 40em; }
.article h2 {
  font-size: 24px; font-weight: 660; letter-spacing: -0.022em; line-height: 1.35;
  margin: 64px 0 18px;
}
.article > section:first-child h2, .article > h2:first-child { margin-top: 0; }
.article h3 { font-size: 17px; font-weight: 620; margin: 32px 0 10px; letter-spacing: -0.015em; }
.article p { margin: 14px 0; color: var(--text); }
.article ul, .article ol { margin: 14px 0 14px 1.4em; color: var(--text); }
.article li { margin: 7px 0; }
.article strong { font-weight: 620; }

/* 速览表 */
.fact-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 6px; }
.fact-table th, .fact-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fact-table th { width: 88px; color: var(--text-3); font-weight: 500; white-space: nowrap; padding-right: 20px; }
.fact-table td { color: var(--text); }

/* 侧栏 */
.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 32px; }
@media (max-width: 940px) { .side { position: static; } }
.side-box { }
.side-box h4 {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--text-3); margin-bottom: 12px; font-weight: 600; text-transform: uppercase;
}
.side-box ul { list-style: none; }
.side-box li { margin: 9px 0; font-size: 13.5px; line-height: 1.55; }
.side-box a { text-decoration: none; color: var(--text-2); transition: color .15s; }
.side-box a:hover { color: var(--text); }
.side-box .rel-school { font-size: 12px; color: var(--text-3); display: block; margin-top: 1px; }

/* 词条目录 */
.toc-list { list-style: none; }
.toc-list li { margin: 0 !important; }
.toc-list a {
  display: flex; gap: 10px; padding: 6px 0; font-size: 13.5px;
  text-decoration: none; color: var(--text-2); line-height: 1.5;
}
.toc-list a:hover { color: var(--text); }
.toc-list .toc-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

/* 高频概念 */
.freq-list { list-style: none; }
.freq-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 7px 0 !important; font-size: 13.5px; color: var(--text-2);
}
.freq-list .freq { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }
.freq-note { font-size: 11.5px; color: var(--text-3); margin-top: 14px; line-height: 1.55; }

/* 战役块 */
.battle-block {
  background: var(--bg-sub); border: 1px solid var(--line);
  border-radius: var(--r); padding: 26px 26px 24px; margin: 24px 0;
}
.battle-block h3 { margin-top: 0; }
.battle-block dl { margin-top: 16px; }
.battle-block dt {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--text-3); margin-top: 18px; font-weight: 600; text-transform: uppercase;
}
.battle-block dd { margin: 6px 0 0; }

/* 词条内名言 */
.article .inline-quote {
  border-left: 2px solid var(--line-2); margin: 24px 0; padding: 2px 0 2px 20px;
}
.article .inline-quote blockquote {
  font-size: 17px; font-weight: 520; line-height: 1.7; letter-spacing: -0.012em;
}
.article .inline-quote figcaption { font-size: 13px; color: var(--text-3); margin-top: 9px; }

/* 书单 / 文献 */
.book-list { list-style: none; margin-left: 0 !important; }
.book-list li {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  display: flex; gap: 14px; align-items: baseline; margin: 0 !important;
}
.book-list .book-title { font-weight: 600; font-size: 15px; white-space: nowrap; letter-spacing: -0.012em; }
.book-list .book-note { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.source-list .src-year {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3);
  min-width: 84px; flex-shrink: 0;
}
@media (max-width: 660px) {
  .book-list li { flex-direction: column; gap: 3px; }
  .book-list .book-title { white-space: normal; }
}

/* ---------- 概念辞典 ---------- */

.concept-grid { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.concept-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px;
  transition: border-color .18s ease;
}
.concept-card:hover { border-color: var(--line-2); }
.concept-card h3 {
  font-size: 17px; font-weight: 640; letter-spacing: -0.015em;
  display: flex; align-items: center; gap: 9px;
}
.concept-card h3::before {
  content: ""; width: 7px; height: 7px; border-radius: 2.5px;
  background: var(--sc, var(--text-3)); flex-shrink: 0;
}
.concept-card .cc-en {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3);
  letter-spacing: .1em; display: block; margin: 4px 0 0 16px;
}
.concept-card p { font-size: 14.5px; color: var(--text-2); margin-top: 14px; line-height: 1.7; }
.concept-card .cc-src { margin-top: 16px; font-size: 12.5px; color: var(--text-3); }
.concept-card .cc-src a { color: var(--sc, var(--text-2)); text-decoration: none; font-weight: 550; }
.concept-card .cc-src a:hover { text-decoration: underline; }

/* ---------- 流派页 ---------- */

.school-section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.school-section:last-of-type { border-bottom: 0; }
.school-mark {
  display: inline-block; width: 32px; height: 6px; border-radius: 3px;
  background: var(--sc, var(--text-3)); margin-bottom: 20px;
}
.school-section h2 { font-size: 28px; font-weight: 660; letter-spacing: -0.025em; }
.school-section .ss-en {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  color: var(--text-3); display: block; margin-top: 6px;
}
.school-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; margin-top: 28px; align-items: start; }
@media (max-width: 860px) { .school-cols { grid-template-columns: 1fr; gap: 28px; } }
.school-cols p { margin: 14px 0; color: var(--text); }
.school-cols h3 { font-size: 13px; font-weight: 620; margin-bottom: 10px; color: var(--sc, var(--text-2)); letter-spacing: .01em; }
.school-cols ul { margin-left: 1.2em; }
.school-cols li { margin: 8px 0; font-size: 15px; color: var(--text); }
.ss-people { list-style: none !important; margin-left: 0 !important; }
.ss-people li { border-bottom: 1px solid var(--line); padding: 11px 0; margin: 0 !important; font-size: 14.5px; }
.ss-people a { text-decoration: none; font-weight: 580; }
.ss-people a:hover { color: var(--sc, var(--text)); }
.ss-people .p-note { font-size: 12.5px; color: var(--text-3); display: block; font-weight: 400; margin-top: 1px; }

/* ---------- 页脚 ---------- */

.site-footer {
  background: var(--bg-sub); border-top: 1px solid var(--line);
  color: var(--text-2); padding: 56px 0 36px; font-size: 13.5px;
}
.site-footer .wrap { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h5 {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--text-3); margin-bottom: 12px; font-weight: 600; text-transform: uppercase;
}
.site-footer ul { list-style: none; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.footer-brand .brand-name { color: var(--text) !important; }
.footer-disclaimer { line-height: 1.75; color: var(--text-3); font-size: 13px; max-width: 34em; }
.footer-bottom {
  border-top: 1px solid var(--line); margin-top: 44px; padding-top: 24px;
  font-size: 12px; color: var(--text-3); text-align: center;
}

/* ============================================================
   读者票选排行榜
   ============================================================ */

.rank-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-top: 18px;
}
.rank-meta { font-size: 13.5px; color: var(--text-3); }
.rank-meta b { color: var(--text-2); font-weight: 600; }

.rank-list { margin-top: 32px; }

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) 92px 116px 74px;
  align-items: center; gap: 18px;
  padding: 15px 8px 15px 4px; border-bottom: 1px solid var(--line);
  border-radius: 8px;
  transition: background .18s ease;
}
.rank-row:first-child { border-top: 1px solid var(--line); }
.rank-row:hover { background: var(--bg-sub); }
.rank-row.just-voted { background: color-mix(in srgb, var(--rc, var(--text-3)) 10%, transparent); }

.rank-num {
  font-family: var(--font-mono); font-size: 14px; color: var(--text-3);
  text-align: right; font-variant-numeric: tabular-nums;
}
.rank-row:nth-child(-n+3) .rank-num { color: var(--text); font-weight: 700; font-size: 15px; }

.rank-id { min-width: 0; }
.rank-name {
  font-size: 16.5px; font-weight: 620; letter-spacing: -0.015em;
  text-decoration: none; color: var(--text); display: inline-block;
}
.rank-name:hover { color: var(--rc, var(--text)); }
.rank-en {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.rank-school {
  font-size: 11.5px; font-weight: 550; padding: 2px 9px; border-radius: 6px;
  color: var(--rc, var(--text-2));
  background: color-mix(in srgb, var(--rc, var(--text-3)) 11%, transparent);
  justify-self: start; white-space: nowrap;
}

.rank-score { display: flex; flex-direction: column; gap: 6px; }
.rank-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.rank-bar i {
  display: block; height: 100%; width: 0%; border-radius: 2px;
  background: var(--rc, var(--text-3)); transition: width .5s cubic-bezier(.2,.7,.3,1);
}
.rank-count {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.vote-btn {
  font: inherit; font-size: 13px; font-weight: 550; cursor: pointer;
  padding: 7px 0; width: 100%; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-card); color: var(--text);
  transition: background .15s, border-color .15s, color .15s;
}
.vote-btn:hover:not(:disabled) { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.vote-btn:disabled { cursor: default; color: var(--text-3); border-color: var(--line); background: transparent; }
.vote-btn.voted { color: var(--rc, var(--text-2)); border-color: var(--rc, var(--line-2)); background: transparent; }

.rank-cut {
  display: flex; align-items: center; gap: 14px; margin: 6px 0 0;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--text-3); text-transform: uppercase;
}
.rank-cut::before, .rank-cut::after {
  content: ""; flex: 1; height: 1px; background: var(--line-2);
}

.rank-note { margin-top: 22px; font-size: 12.5px; color: var(--text-3); line-height: 1.7; }

.rank-banner {
  margin-top: 20px; padding: 12px 16px; border-radius: 9px;
  border: 1px dashed var(--line-2); background: var(--bg-sub);
  font-size: 13px; color: var(--text-2); line-height: 1.65;
}
.rank-banner b { color: var(--text); font-weight: 600; }
.rank-banner[hidden] { display: none; }

@media (max-width: 780px) {
  .rank-row {
    grid-template-columns: 28px minmax(0,1fr) 72px;
    grid-template-areas: "n id btn" ". score score";
    row-gap: 10px; padding: 14px 4px;
  }
  .rank-num { grid-area: n; }
  .rank-id { grid-area: id; }
  .rank-school { display: none; }
  .rank-score { grid-area: score; }
  .vote-btn { grid-area: btn; }
}

/* 人机校验弹层 */
.gate-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: color-mix(in srgb, #0F1012 46%, transparent);
  backdrop-filter: blur(3px);
}
.gate-backdrop[hidden] { display: none; }
.gate {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; max-width: 400px; width: 100%;
}
.gate h3 { font-size: 18px; font-weight: 640; letter-spacing: -0.015em; }
.gate p { font-size: 14px; color: var(--text-2); margin-top: 8px; line-height: 1.7; }
.gate .gate-target { color: var(--text); font-weight: 600; }
.gate-slot { margin-top: 20px; min-height: 66px; display: flex; align-items: center; }
.gate-quiz { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.gate-quiz input {
  font: inherit; width: 82px; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-card); color: var(--text);
}
.gate-actions { margin-top: 22px; display: flex; gap: 10px; justify-content: flex-end; }
.gate-err { color: var(--s-trend); font-size: 13px; margin-top: 10px; min-height: 18px; }
.gate-btn {
  font: inherit; font-size: 14px; font-weight: 550; cursor: pointer;
  padding: 9px 20px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--bg-card); color: var(--text);
}
.gate-btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.gate-btn:disabled { opacity: .5; cursor: default; }
