/* 球不落 · 三栏目静态站   v1.1
   皮棕 + 墨色 + 暖白纸张，三栏目色只做标签/细线/悬停。浅色主题，本地 file:// 可直接看。
   v1.1 只调视觉层（间距节奏、字重层级、卡片与列表的对齐、正文measure），
   不动任何生成逻辑与历史页正文。 */

:root {
  --paper: #faf9f7;
  --sheet: #ffffff;
  --ink: #23212a;
  --ink-soft: #5f5965;
  --ink-faint: #8f8891;
  --line: #e7dfd5;
  --line-soft: #f1ebe3;
  --brand: #d9925a;
  --brand-ink: #b4733a;      /* 皮棕做正文/标题时压深一档，浅底上才够对比 */
  --report: #c2410c;
  --english: #3f70ab;
  --ncaa: #1f6b58;
  --serif-num: Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5.5vw, 46px);
}

/* ---------- 站点头 ---------- */
/* 吸顶：正文很长的战报页，滚到中段也能直接换栏目。 */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 247, .92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.brand-mark img {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 50%;
}
.brand-mark img.logo {
  width: auto;
  height: 29px;
  border-radius: 0;
}
.brand-mark b {
  font-size: 20px;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.brand-mark small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  font-family: var(--serif-num);
  line-height: 1.3;
  margin-top: 1px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: 13.5px;
}
.site-nav a {
  color: var(--ink-soft);
  padding: 5px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--brand); }
.site-nav a.on { color: var(--ink); border-bottom-color: var(--brand-ink); font-weight: 600; }

/* ---------- 首页 ---------- */
/* 注意：下面这些容器都同时挂了 .wrap，所以只能用 padding-top / padding-bottom。
   写成 padding 简写会把 .wrap 的左右内边距清成 0，手机上文字就顶到屏幕边缘。 */
.hero {
  padding-top: clamp(46px, 7.5vw, 82px);
  padding-bottom: clamp(34px, 5vw, 52px);
}
.hero .kicker, .col-kicker, .archive-kicker, .entry-kicker {
  font-family: var(--serif-num);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin: 0 0 16px;
}
.hero .kicker::before, .archive-kicker::before, .entry-kicker::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: currentColor;
  vertical-align: 4px;
  margin-right: 10px;
  opacity: .75;
}
.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5.3vw, 56px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand-ink);
}
.hero .dek {
  /* 640 正好和 h1 第二行等宽：整句一行排完，不会留下「近况。」这种两三字的孤行 */
  max-width: 640px;
  text-wrap: pretty;
  margin: 20px 0 0;
  font-size: clamp(14.5px, 1.7vw, 17px);
  line-height: 1.8;
  color: var(--ink-soft);
}
.hero .site-domain {
  margin: 14px 0 0;
  font-family: var(--serif-num);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.hero .site-domain a {
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(180, 115, 58, .45);
  padding-bottom: 1px;
}
.hero .site-domain a:hover { border-bottom-color: var(--brand-ink); }
.hero .rule {
  width: 44px;
  height: 2px;
  background: var(--brand-ink);
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(19px, 2.4vw, 23px);
  letter-spacing: -0.01em;
  font-weight: 700;
}
.section-head span {
  font-family: var(--serif-num);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: .12em;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.8vw, 18px);
  padding-top: clamp(24px, 3.4vw, 34px);
  padding-bottom: clamp(48px, 6.5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.col {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-top: 3px solid var(--col-color);
  padding: 24px 22px 20px;
  min-height: 252px;
  transition: transform .28s var(--ease), border-color .28s var(--ease),
              box-shadow .28s var(--ease);
}
.col:hover {
  transform: translateY(-3px);
  border-color: var(--col-color);
  box-shadow: 0 20px 40px -30px rgba(35, 33, 42, .55);
}
.col-no {
  position: absolute;
  right: 20px;
  top: 18px;
  font-family: var(--serif-num);
  font-size: 26px;
  color: #ded5c9;
  line-height: 1;
  letter-spacing: .02em;
}
.col .col-kicker {
  font-family: var(--serif-num);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  margin: 0 0 10px;
}
.col h3 {
  margin: 0 0 9px;
  font-size: 21px;
  letter-spacing: -0.015em;
  line-height: 1.4;
}
.col p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.72;
}
/* 最新一条沉到卡片底部：三张卡内容长短不一，底边必须齐。 */
.col-latest {
  display: block;
  margin-top: auto;
  padding: 12px 0 0 11px;
  border-left: 2px solid var(--col-color);
  font-size: 13px;
  color: var(--col-color);
  font-weight: 600;
  line-height: 1.55;
}
.col-latest span {
  display: block;
  color: var(--ink-faint);
  font-family: var(--serif-num);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .08em;
  margin-bottom: 2px;
}

.recent {
  padding-top: clamp(38px, 5.5vw, 58px);
  padding-bottom: clamp(56px, 8vw, 88px);
}

/* ---------- 列表（首页最近更新 + 归档共用） ---------- */
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry-list li { border-bottom: 1px solid var(--line); }
.entry-list li:last-child { border-bottom: 0; }
.entry-list a {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 22px;
  gap: 18px;
  align-items: start;
  margin: 0 -12px;
  padding: 19px 12px;
  transition: background .2s var(--ease);
}
.entry-list a:hover { background: var(--sheet); }
.entry-list .date {
  font-family: var(--serif-num);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: .02em;
  line-height: 1.5;
  white-space: nowrap;
}
/* 日期下面那行小字（（美国时间）/ 比赛日），单独成行，别在中间断成「美国时 / 间」 */
.entry-list .date i {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .04em;
  color: #a8a1aa;
  margin-top: 1px;
}
.entry-list .ttl {
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.entry-list .sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 5px;
  line-height: 1.7;
}
/* 战报标题后的「（共 N 场）」：比标题轻一档，不抢比分 */
.entry-list .cnt {
  font-size: 13px;
  font-weight: 400;
  color: #a8a1aa;
  margin-left: 2px;
  white-space: nowrap;
}
.entry-list .arrow {
  color: var(--col-color);
  font-size: 15px;
  text-align: right;
  opacity: .5;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.entry-list a:hover .arrow { opacity: 1; transform: translateX(3px); }

/* 首页「最近更新」：日期与栏目标签同占左侧一栏，一栏放得下才不会被挤到第二行 */
.recent .entry-list a { grid-template-columns: 116px minmax(0, 1fr) 22px; }
.recent .entry-list .meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.recent .entry-list .tag {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.recent .entry-list .tag::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 2px;
  margin-right: 5px;
}

/* ---------- 归档 ---------- */
.archive {
  padding-top: clamp(38px, 6vw, 64px);
  padding-bottom: clamp(18px, 2.5vw, 28px);
}
.archive-head {
  padding-bottom: 24px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--col-color);
}
.archive-head h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.2vw, 42px);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.archive-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 600px;
}

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 24px 0 4px;
  font-size: 13.5px;
}
.pager .num,
.pager .step {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.4;
  background: var(--sheet);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.pager .num:hover,
.pager .step:hover { border-color: var(--col-color); color: var(--col-color); }
.pager .num.on {
  background: var(--col-color);
  border-color: var(--col-color);
  color: #fff;
  font-weight: 600;
}
.pager .step.disabled { color: var(--ink-faint); opacity: 0.45; background: transparent; }

/* ---------- 正文页 ---------- */
.breadcrumb {
  padding-top: 24px;
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: .02em;
}
.breadcrumb a:hover { color: var(--brand-ink); }
.article { padding-bottom: 8px; }
/* 正文 measure 收窄：战报那套内联排版是按公众号手机宽度写的，
   铺到 780 的卡里表格会散架，收到 700 上下反而更像原稿。 */
.article-inner { max-width: 700px; margin: 0 auto; }
.article-head { padding: 26px 0 22px; }
.article-head h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.32;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.article-head .meta {
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: .01em;
}
.article-head .meta i { font-style: normal; color: var(--col-color); font-weight: 600; }
.article-body {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: clamp(18px, 3.6vw, 38px);
  font-size: 15.5px;
  line-height: 1.85;
}
/* 稿件原本是为公众号全内联排的，进站点后剥掉外层容器尺寸 */
.article-body > div {
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-family: inherit !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}
.article-body img { max-width: 100% !important; height: auto !important; }

/* 比分表与球员表是按公众号手机宽度画的，桌面端铺满 700 会显得空旷散开：
   居中收窄，四节的列宽才回到正常比例。（class 由 tag_tables_for_mobile 打上） */
.article-body .rb-score {
  max-width: 440px;
  margin-left: auto !important;
  margin-right: auto !important;
}
.article-body .rb-roster {
  max-width: 580px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.article-foot-nav { padding: 28px 0 4px; text-align: center; }
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 0 8px;
  font-size: 13.5px;
}
.article-nav a {
  color: var(--ink-soft);
  max-width: 47%;
  line-height: 1.6;
  transition: color .2s var(--ease);
}
.article-nav a:hover { color: var(--col-color); }
.article-nav .next { text-align: right; }
.empty { color: var(--ink-faint); }

/* ---------- 回首页按钮 ---------- */
.back-home { padding: 30px 0 30px; text-align: center; }
.back-home-link,
.back-home a {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid #e2cdb6;
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink-soft);
  font-size: 13.5px;
  text-decoration: none;
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background .2s var(--ease);
}
.back-home-link:hover,
.back-home a:hover {
  color: var(--col-color, var(--brand-ink));
  border-color: var(--col-color, var(--brand-ink));
  background: #fff;
}

/* ---------- 页脚 ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  color: var(--ink-faint);
  font-size: 12.5px;
  line-height: 1.9;
}
.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
}
.site-foot .wrap > span { max-width: 520px; }
.site-foot b { color: var(--brand-ink); font-weight: 600; letter-spacing: .04em; }
.site-foot a { color: var(--brand-ink); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* ---------- 窄屏 ---------- */
@media (max-width: 760px) {
  /* 手机上页头保持一行：拼音和「一球不落」并排会把导航挤到第二行，
     吸顶时白吃掉 100px 版面。拼音是装饰，先让位。 */
  .site-head .wrap {
    min-height: 58px;
    gap: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-wrap: nowrap;
  }
  .brand-mark { gap: 8px; flex: 0 0 auto; }
  .brand-mark b { font-size: 17px; white-space: nowrap; }
  .brand-mark img.logo { height: 24px; }
  .brand-mark small { display: none; }
  .site-nav { gap: 15px; font-size: 12.5px; width: auto; flex: 0 0 auto; }

  .hero { padding-top: clamp(30px, 7vw, 46px); padding-bottom: 32px; }
  .hero .kicker { margin-bottom: 13px; font-size: 10.5px; }
  .hero h1 { font-size: clamp(29px, 7.6vw, 36px); line-height: 1.2; }
  .hero .dek { margin-top: 16px; font-size: 14px; line-height: 1.75; }
  .hero .site-domain { margin-top: 12px; font-size: 11.5px; }
  .hero .rule { margin-top: 20px; width: 36px; }

  .section-head { padding-bottom: 11px; }
  .section-head h2 { font-size: 18px; }
  .section-head span { font-size: 10px; }

  .columns { grid-template-columns: 1fr; gap: 10px; padding-top: 16px; padding-bottom: 40px; }
  .col { min-height: 0; padding: 20px 18px 16px; }
  .col-no { font-size: 22px; right: 16px; top: 15px; }
  .col h3 { font-size: 19px; margin-bottom: 7px; }
  .col p { font-size: 12.5px; }
  .col-latest { margin-top: 14px; padding: 11px 0 0 10px; font-size: 12.5px; }

  .recent { padding-top: 34px; padding-bottom: 52px; }

  /* 列表：日期（含小字）独占一行；标题与箭头同排。必须显式指定箭头所在的列，
     否则自动排布会把「→」塞进第 1 列，把中文标题挤进 20px 的箭头列，竖着排。 */
  .entry-list a,
  .recent .entry-list a {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 3px 10px;
    padding: 16px 12px;
    align-items: start;
  }
  .entry-list .meta,
  .recent .entry-list .meta { grid-column: 1 / -1; grid-row: 1; }
  .entry-list .date { grid-column: 1 / -1; grid-row: 1; }
  .entry-list .date i { display: inline; margin-left: 5px; font-size: 10px; }
  .entry-list .ttl {
    grid-column: 1; grid-row: 2;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.55;
  }
  .entry-list .arrow { grid-column: 2; grid-row: 2; text-align: right; padding-top: 3px; }

  .archive { padding-top: 30px; padding-bottom: 30px; }
  .archive-head { padding-bottom: 18px; }
  .archive-head h1 { font-size: 27px; margin-bottom: 8px; }
  .archive-head p { font-size: 13px; }

  .pager { padding-top: 20px; }
  .back-home { padding: 24px 0 26px; }

  .breadcrumb { padding-top: 18px; font-size: 12px; }
  .article-head { padding: 18px 0 18px; }
  .article-head h1 { font-size: clamp(23px, 6.4vw, 30px); line-height: 1.34; }
  .article-head .meta { margin-top: 13px; padding-top: 11px; font-size: 12px; }
  .article-body { padding: 16px 14px 18px; font-size: 15px; }
  .article-foot-nav { padding: 24px 0 2px; }
  .article-nav { font-size: 12.5px; gap: 12px; }
  .article-nav a { max-width: 48%; }

  .site-foot { padding: 24px 0 36px; font-size: 12px; }
  .site-foot .wrap { flex-direction: column; gap: 6px; }

  /* 战报正文是公众号用的全内联排版，窄屏下几处固定百分比表格会挤在一起。
     稿件本身不动，只在站点这一份里用 !important 拉开间距（class 由
     site_build.py 的 tag_tables_for_mobile() 打在对应表格上）。 */

  /* 比分：队名右贴、12% 的列放不下 24px 的三位数，会压住队名并吃掉冒号 */
  .article-body .rb-score td:nth-child(1) { padding-right: 12px !important; }
  .article-body .rb-score td:nth-child(5) { padding-left: 12px !important; }
  .article-body .rb-score td:nth-child(2),
  .article-body .rb-score td:nth-child(4) { font-size: 22px !important; }
  .article-body .rb-score td:nth-child(3) { color: #b3b3b3 !important; }

  /* 球员数据行：姓名与得分之间只有 2px，队名与数据列之间只有 9px */
  .article-body .rb-roster td:first-child { padding-right: 12px !important; }
  .article-body .rb-roster td:last-child span[style*="font-size:16px"] {
    padding-left: 6px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
