.page-home {
  display: block;
}

/* ---------- 页面上下文 ---------- */
.page-home .home-context {
  display: flex;
  align-items: baseline;
  gap: .6em;
  margin: 0 0 clamp(18px, 3vw, 30px);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--t400);
}
.page-home .home-context__idx {
  color: var(--fg400);
}

/* ---------- 首屏 ---------- */
.page-home .home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}
.page-home .home-hero__text > * + * {
  margin-top: clamp(14px, 2vw, 20px);
}
.page-home .home-hero__text .h-display {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(34px, 7.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--t100);
}
.page-home .lede {
  max-width: 68ch;
  font-size: clamp(15px, 1.6vw, 16.5px);
  line-height: 1.9;
  color: var(--t100);
}
.page-home .home-hero__note {
  max-width: 64ch;
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid var(--g700);
  font-size: 13px;
  line-height: 1.85;
  color: var(--t400);
}

.page-home .home-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.page-home .home-jump a {
  display: inline-flex;
  align-items: baseline;
  gap: .5em;
  padding: 7px 14px;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--t100);
  text-decoration: none;
  background: var(--g800);
  border: 1px solid var(--g700);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
  transition: color .18s ease, border-color .18s ease;
}
.page-home .home-jump a:hover,
.page-home .home-jump a:focus-visible {
  color: var(--fg400);
  border-color: var(--fg400);
}
.page-home .home-jump__idx {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t400);
}
.page-home .home-jump a:hover .home-jump__idx {
  color: var(--fg400);
}

.page-home .home-hero__figure {
  margin: 0;
}
.page-home .home-hero__figure .figure__frame {
  position: relative;
}
.page-home .home-hero__figure .figure__frame::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  height: 3px;
  background: linear-gradient(90deg, rgba(198, 242, 78, 0), var(--fg400));
}
.page-home .home-hero__figure img,
.page-home .home-wide img,
.page-home .flow-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- 关键数字条 ---------- */
.page-home .home-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(30px, 5vw, 58px);
  padding: clamp(20px, 3vw, 34px);
  background: var(--g800);
}
.page-home .home-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--g700);
}
.page-home .home-stats .stat--line {
  border-left-color: var(--cb600);
}
.page-home .home-stats .stat--gold {
  border-left-color: var(--ag500);
}
.page-home .home-stats .stat__value {
  font-family: var(--f-mono);
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--fg400);
}
.page-home .home-stats .stat--line .stat__value {
  color: var(--cb600);
}
.page-home .home-stats .stat--gold .stat__value {
  color: var(--ag500);
}
.page-home .home-stats .stat__unit {
  margin-left: .35em;
  font-size: .34em;
  color: var(--t400);
}
.page-home .home-stats .stat__label {
  font-size: 12.5px;
  line-height: 1.65;
  letter-spacing: .04em;
  color: var(--t400);
}

/* ---------- 主体两栏 ---------- */
.page-home .home-body {
  display: flex;
  flex-direction: column;
  padding-bottom: clamp(36px, 5vw, 72px);
}
.page-home .home-body__side {
  order: -1;
  margin-bottom: clamp(26px, 4vw, 44px);
}
.page-home .home-body__main {
  min-width: 0;
}
.page-home .home-block {
  scroll-margin-top: 90px;
}
.page-home .home-block + .home-block {
  margin-top: clamp(44px, 6vw, 84px);
}
.page-home .home-block + .home-block::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-bottom: clamp(24px, 3vw, 40px);
  background: linear-gradient(90deg, var(--g700) 0 20%, var(--fg400) 20% 24%, var(--g700) 24%);
}

.page-home .h-section {
  margin: 0 0 12px;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(26px, 4.2vw, 38px);
  line-height: 1.14;
  letter-spacing: -.015em;
  color: var(--t100);
}

/* ---------- 旁注 / 章节目录 ---------- */
.page-home .aside-note {
  margin: clamp(20px, 3vw, 30px) 0 0;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--g700);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--t400);
}
.page-home .aside-note--accent {
  border-left-color: var(--fg400);
}
.page-home .aside-note p {
  margin: 0 0 10px;
}
.page-home .aside-note p:last-child {
  margin-bottom: 0;
}
.page-home .aside-note a {
  color: var(--t100);
  text-decoration: none;
  border-bottom: 1px solid var(--cb600);
}
.page-home .aside-note a:hover,
.page-home .aside-note a:focus-visible {
  color: var(--fg400);
  border-bottom-color: var(--fg400);
}

.page-home .home-toc {
  margin-top: 0;
  padding-top: 0;
}
.page-home .home-toc__title {
  margin: 0 0 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--t400);
}
.page-home .home-toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.page-home .home-toc__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border-left: 2px solid var(--g700);
  font-size: 14px;
  line-height: 1.5;
  color: var(--t400);
  text-decoration: none;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.page-home .home-toc__link:hover,
.page-home .home-toc__link:focus-visible {
  color: var(--t100);
  border-left-color: var(--cb600);
}
.page-home .home-toc__idx {
  font-family: var(--f-mono);
  font-size: 11px;
  opacity: .8;
}

.page-home .home-body:has(#season-index:target) .home-toc__link[href="#season-index"],
.page-home .home-body:has(#topic-index:target) .home-toc__link[href="#topic-index"],
.page-home .home-body:has(#data-anchors:target) .home-toc__link[href="#data-anchors"],
.page-home .home-body:has(#archive-flow:target) .home-toc__link[href="#archive-flow"],
.page-home .home-body:has(#latest-log:target) .home-toc__link[href="#latest-log"] {
  color: var(--fg400);
  background: rgba(198, 242, 78, .07);
  border-left-color: var(--fg400);
  border-bottom-color: var(--fg400);
}

/* ---------- 赛季进程 ---------- */
.page-home .home-wide {
  margin: clamp(22px, 3.6vw, 40px) 0;
}
.page-home .filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(12px, 2vw, 20px);
  padding: 12px 0;
  border-top: 1px solid var(--g700);
  border-bottom: 1px solid var(--g700);
}
.page-home .filter-bar__label {
  margin-right: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--t400);
}
.page-home .filter-btn {
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--t100);
  cursor: pointer;
  background: var(--g800);
  border: 1px solid var(--g700);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 100%, 0 100%);
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.page-home .filter-btn:hover {
  color: var(--fg400);
}
.page-home .filter-btn[aria-pressed="true"] {
  color: var(--fg400);
  border-color: var(--fg400);
  background: rgba(198, 242, 78, .08);
}
.page-home .filter-count {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--t400);
}

.page-home .season-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(36, 43, 56, .7);
}
.page-home .season-row {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  grid-template-areas:
    "ord label value"
    "ord tags note";
  gap: 6px 12px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(36, 43, 56, .85);
}
.page-home .season-row__ord {
  grid-area: ord;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--t400);
}
.page-home .season-row__label {
  grid-area: label;
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--t100);
}
.page-home .season-row__tags {
  grid-area: tags;
}
.page-home .season-row__value {
  grid-area: value;
  font-family: var(--f-mono);
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1;
  color: var(--t100);
  text-align: right;
  white-space: nowrap;
}
.page-home .season-row__unit {
  margin-left: .3em;
  font-size: 12px;
  color: var(--t400);
}
.page-home .season-row__note {
  grid-area: note;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--t400);
  text-align: right;
}
.page-home .season-row .tag {
  display: inline-block;
  padding: 3px 9px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--cb600);
  background: rgba(122, 147, 184, .12);
  border-left: 2px solid var(--cb600);
}
.page-home .season-row .tag--cup {
  color: var(--ag500);
  background: rgba(242, 178, 60, .12);
  border-left-color: var(--ag500);
}

.page-home .home-caption {
  max-width: 76ch;
  margin: clamp(16px, 2.4vw, 24px) 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--g700);
  font-size: 13.5px;
  line-height: 1.88;
  color: var(--t400);
}

/* ---------- 专项目录 ---------- */
.page-home .topic-list {
  display: grid;
  gap: clamp(14px, 2vw, 18px);
  margin: clamp(22px, 3.4vw, 36px) 0 0;
  padding: 0;
  list-style: none;
}
.page-home .topic-item {
  padding: clamp(18px, 2.6vw, 28px);
  background: var(--g800);
}
.page-home .topic-item__body {
  min-width: 0;
}
.page-home .topic-item__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.page-home .topic-item__idx {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--fg400);
}
.page-home .topic-item__title {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(19px, 2.4vw, 24px);
  letter-spacing: -.01em;
  color: var(--t100);
}
.page-home .topic-item__desc {
  max-width: 62ch;
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.88;
  color: var(--t400);
}
.page-home .topic-item__link-row {
  margin: 0;
}
.page-home .topic-item__link {
  display: inline-block;
  padding-bottom: 2px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--fg400);
  text-decoration: none;
  border-bottom: 1px solid rgba(198, 242, 78, .35);
}
.page-home .topic-item__link:hover,
.page-home .topic-item__link:focus-visible {
  border-bottom-color: var(--fg400);
}
.page-home .topic-item--penalty {
  display: grid;
  gap: 18px;
}
.page-home .topic-item__figure {
  margin: 0;
  max-width: 220px;
}
.page-home .topic-item__figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* ---------- 节奏指标 ---------- */
.page-home .metric-grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
  margin-top: clamp(22px, 3.4vw, 36px);
}
.page-home .metric-panel {
  padding: clamp(20px, 3vw, 32px);
  background: var(--g800);
}
.page-home .metric-panel__kicker {
  margin: 0 0 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--t400);
}
.page-home .metric-panel__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
}
.page-home .metric-panel__num {
  font-family: var(--f-mono);
  font-size: clamp(38px, 7vw, 62px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--fg400);
}
.page-home .metric-panel__num--gold {
  color: var(--ag500);
}
.page-home .metric-panel__unit {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--t400);
}
.page-home .metric-panel__note {
  margin: 18px 0 0;
  font-size: 13.5px;
  line-height: 1.88;
  color: var(--t400);
}
.page-home .metric-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
}
.page-home .metric-chart__grid line {
  stroke: rgba(122, 147, 184, .2);
  stroke-width: 1;
}
.page-home .metric-chart__line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.page-home .metric-chart__line--league {
  stroke: var(--cb600);
}
.page-home .metric-chart__line--cup {
  stroke: var(--ag500);
}
.page-home .metric-chart__peak {
  fill: var(--fg400);
}

/* ---------- 归档流程 ---------- */
.page-home .flow-grid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  margin-top: clamp(22px, 3.4vw, 36px);
  align-items: start;
}
.page-home .flow-folds {
  min-width: 0;
}
.page-home .flow-folds .fold + .fold {
  margin-top: 10px;
}
.page-home .flow-folds .fold {
  background: var(--g800);
  border: 1px solid var(--g700);
  clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 100%, 0 100%);
}
.page-home .flow-folds .fold__trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  font: inherit;
  font-size: 15px;
  color: var(--t100);
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
}
.page-home .flow-folds .fold__icon {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--fg400);
  border-bottom: 2px solid var(--fg400);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.page-home .flow-folds .fold__trigger[aria-expanded="true"] .fold__icon {
  transform: rotate(135deg);
}
.page-home .flow-folds .fold__panel {
  padding: 0 18px 16px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--t400);
}
.page-home .flow-folds .fold__panel p {
  margin: 0;
}
.page-home .flow-figure {
  margin: 0;
}
.page-home .flow-figure .figure__frame {
  position: relative;
}
.page-home .flow-figure .figure__frame::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 38%;
  height: 3px;
  background: linear-gradient(90deg, var(--ag500), rgba(242, 178, 60, 0));
  z-index: 1;
}

/* ---------- 近期写入 ---------- */
.page-home .log-track {
  display: flex;
  gap: 16px;
  margin: clamp(22px, 3.4vw, 36px) 0 0;
  padding: 0 0 16px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.page-home .log-track .timeline__item {
  flex: 0 0 clamp(220px, 66vw, 278px);
  padding: 18px 16px 16px;
  background: var(--g800);
  border-top: 2px solid var(--g700);
  scroll-snap-align: start;
}
.page-home .log-track .timeline__item--event {
  border-top-color: var(--ro450);
}
.page-home .log-track .timeline__item--award {
  border-top-color: var(--ag500);
}
.page-home .log-track .timeline__dot {
  display: block;
  width: 8px;
  height: 8px;
  margin-bottom: 12px;
  background: var(--cb600);
  transform: rotate(45deg);
}
.page-home .log-track .timeline__item--event .timeline__dot {
  background: var(--ro450);
}
.page-home .log-track .timeline__item--award .timeline__dot {
  background: var(--ag500);
}
.page-home .log-track .timeline__label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--t400);
}
.page-home .log-track .timeline__value {
  display: block;
  font-size: 14px;
  line-height: 1.8;
  color: var(--t100);
}

/* ---------- 窄屏章节目录 ---------- */
@media (max-width: 1079px) {
  .page-home .home-toc__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .page-home .home-toc__link {
    padding: 6px 10px;
    border-left: 0;
    border-bottom: 2px solid var(--g700);
  }
  .page-home .home-toc__link:hover,
  .page-home .home-toc__link:focus-visible {
    border-left-color: transparent;
    border-bottom-color: var(--cb600);
  }
  .page-home .home-body:has(#season-index:target) .home-toc__link[href="#season-index"],
  .page-home .home-body:has(#topic-index:target) .home-toc__link[href="#topic-index"],
  .page-home .home-body:has(#data-anchors:target) .home-toc__link[href="#data-anchors"],
  .page-home .home-body:has(#archive-flow:target) .home-toc__link[href="#archive-flow"],
  .page-home .home-body:has(#latest-log:target) .home-toc__link[href="#latest-log"] {
    border-left-color: transparent;
  }
}

/* ---------- 中屏 ---------- */
@media (min-width: 720px) {
  .page-home .home-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .page-home .season-row {
    grid-template-columns: 3.4rem minmax(0, 1fr) 6.5rem 7rem 9rem;
    grid-template-areas: "ord label tags value note";
    gap: 12px;
    padding: 16px 6px;
  }
  .page-home .topic-item--penalty {
    grid-template-columns: minmax(0, 1fr) 200px;
    align-items: center;
  }
}

/* ---------- 大屏 ---------- */
@media (min-width: 900px) {
  .page-home .metric-grid,
  .page-home .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-home .flow-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  }
  .page-home .topic-list {
    padding-right: 2rem;
  }
  .page-home .topic-list > .topic-item:nth-child(2) {
    margin-left: 1.2rem;
  }
  .page-home .topic-list > .topic-item:nth-child(3) {
    margin-left: 2.4rem;
  }
  .page-home .topic-list > .topic-item:nth-child(4) {
    margin-left: 3.6rem;
  }
}

@media (min-width: 1080px) {
  .page-home .home-hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  }
  .page-home .home-body {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
    gap: clamp(32px, 4vw, 64px);
    align-items: start;
  }
  .page-home .home-body__side {
    order: 0;
    margin-bottom: 0;
    position: sticky;
    top: 96px;
    align-self: start;
  }
}
