.page-home {
  --home-rule: rgba(11, 59, 74, 0.13);
  --home-gold-soft: rgba(201, 162, 39, 0.14);
  --home-card-pad: clamp(18px, 2.4vw, 30px);
  display: block;
  background: var(--paper);
  overflow-x: clip;
}

/* ---------- 页面上下文 ---------- */
.page-home .page-context {
  margin: 0;
  padding: 18px 0 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--meta);
}

/* ---------- 首屏框景 ---------- */
.page-home .hero {
  padding: clamp(14px, 2.4vw, 26px) 0 clamp(26px, 4vw, 52px);
}

.page-home .hero-frame {
  position: relative;
  padding: clamp(22px, 3.4vw, 46px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(0deg, rgba(11, 59, 74, 0.026) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(11, 59, 74, 0.026) 0 1px, transparent 1px 22px),
    linear-gradient(172deg, #FDFBF6 0%, #F6F1E7 100%);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.page-home .hero-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--home-gold-soft);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}

.page-home .hero-ruler {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  color: var(--ink-3);
  margin-bottom: clamp(14px, 2vw, 22px);
}

.page-home .hero-body {
  display: grid;
  gap: clamp(24px, 3.4vw, 44px);
  align-items: center;
}

.page-home .hero-copy {
  min-width: 0;
}

.page-home .hero h1 {
  margin: 0.4rem 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 5.2vw, 50px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.page-home .hero .lede {
  margin: 1rem 0 0;
  max-width: 46ch;
}

.page-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.5rem;
}

.page-home .hero .note {
  margin-top: 1rem;
  max-width: 48ch;
}

.page-home .hero-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.page-home .hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
}

/* ---------- 走法对照 ---------- */
.page-home .route-switch {
  padding: clamp(22px, 3.6vw, 44px) 0;
  background: linear-gradient(180deg, rgba(11, 59, 74, 0.04), rgba(11, 59, 74, 0));
}

.page-home .route-head {
  max-width: 56ch;
  margin-bottom: clamp(16px, 2.4vw, 26px);
}

.page-home .route-head h2 {
  margin: 0.5rem 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.page-home .switch {
  position: relative;
}

.page-home .switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.page-home .switch__bar {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-1);
}

.page-home .switch__tab {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--meta);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.page-home .switch__input:focus-visible ~ .switch__bar {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.page-home #route-view-new:checked ~ .switch__bar .switch__tab[for="route-view-new"],
.page-home #route-view-old:checked ~ .switch__bar .switch__tab[for="route-view-old"] {
  background: var(--ink);
  color: var(--gold-hi);
}

.page-home .switch__panes {
  margin-top: 20px;
}

.page-home .switch__pane {
  display: none;
}

.page-home #route-view-new:checked ~ .switch__panes > .switch__pane:nth-child(1),
.page-home #route-view-old:checked ~ .switch__panes > .switch__pane:nth-child(2) {
  display: block;
  animation: home-fade 0.22s ease both;
}

@keyframes home-fade {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-home .route-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.page-home .route-steps li {
  position: relative;
  padding: 18px 20px 18px 26px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 4px var(--radius) var(--radius) 4px;
  background: var(--card);
  box-shadow: var(--shadow-1);
}

.page-home .route-steps--old li {
  border-left-color: var(--meta);
  background: rgba(110, 126, 130, 0.06);
}

.page-home .route-step-no {
  display: block;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 6px;
}

.page-home .route-steps--old .route-step-no {
  color: var(--meta);
}

.page-home .route-steps h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.page-home .route-steps p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text);
}

/* ---------- 反馈进展窄条 ---------- */
.page-home .feedback {
  padding: clamp(22px, 3.6vw, 44px) 0;
}

.page-home .feedback-strip {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  padding: var(--home-card-pad);
  background: var(--card);
}

.page-home .feedback-main {
  min-width: 0;
}

.page-home .feedback-main h2 {
  margin: 0.5rem 0 1.2rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.35;
  color: var(--ink);
}

.page-home .feedback-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.page-home .feedback-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.page-home .feedback-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.page-home .feedback-head .mono {
  font-size: 12.5px;
  color: var(--meta);
  white-space: nowrap;
}

.page-home .feedback-type {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 15.5px;
  color: var(--text);
}

.page-home .feedback-detail {
  display: grid;
  grid-template-rows: 0fr;
  margin: 0;
  opacity: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--meta);
  overflow: hidden;
  transition: grid-template-rows 0.24s ease, opacity 0.24s ease, margin-top 0.24s ease;
}

.page-home .feedback-detail > * {
  min-height: 0;
}

.page-home .feedback-item:hover .feedback-detail,
.page-home .feedback-item:focus-within .feedback-detail {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 8px;
}

.page-home .feedback-main .note {
  margin-top: 1rem;
}

.page-home .feedback-main .note a {
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-home .feedback-figure {
  margin: 0;
  max-width: 240px;
  align-self: start;
}

.page-home .feedback-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---------- 本期更新 Bento ---------- */
.page-home .update {
  padding: clamp(26px, 4vw, 52px) 0;
}

.page-home .update-head {
  max-width: 62ch;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.page-home .update-head h2 {
  margin: 0.5rem 0 0.8rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.page-home .bento {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.page-home .bento-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--home-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.page-home .bento-kicker {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.page-home .bento-item h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.page-home .bento-item p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text);
}

.page-home .bento-item--new {
  background: linear-gradient(160deg, #FDFBF6 0%, rgba(201, 162, 39, 0.09) 100%);
  border-color: var(--line-strong);
}

.page-home .bento-item--fix .bento-kicker {
  color: var(--brick);
}

.page-home .bento-item--more {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.page-home .bento-item--more h3 {
  color: var(--paper);
}

.page-home .bento-item--more p {
  color: rgba(246, 241, 231, 0.78);
}

.page-home .bento-item--more .bento-kicker {
  color: var(--gold-hi);
}

.page-home .bento-arrow {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--gold-hi);
}

.page-home .bento-item--more:hover,
.page-home .bento-item--more:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}

.page-home .bento-item--more:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

/* ---------- 核心能力 ---------- */
.page-home .capability {
  padding: clamp(26px, 4vw, 52px) 0;
}

.page-home .cap-hero {
  margin: 0 0 clamp(22px, 3vw, 34px);
}

.page-home .cap-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.page-home .cap-head {
  max-width: 60ch;
  margin-bottom: clamp(18px, 2.6vw, 28px);
}

.page-home .cap-head h2 {
  margin: 0.5rem 0 0.8rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.page-home .cap-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.page-home .cap-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--home-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.page-home .cap-item:hover {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: var(--shadow-2);
}

.page-home .cap-index {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.page-home .cap-item h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.page-home .cap-item p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text);
}

/* ---------- 旧版本资料 ---------- */
.page-home .archive {
  padding: clamp(24px, 3.6vw, 48px) 0;
  background: linear-gradient(180deg, rgba(11, 59, 74, 0) 0%, rgba(11, 59, 74, 0.05) 100%);
}

.page-home .archive-grid {
  display: grid;
  gap: clamp(22px, 3.4vw, 40px);
  align-items: start;
}

.page-home .archive-copy {
  min-width: 0;
}

.page-home .archive-copy h2 {
  margin: 0.5rem 0 0.9rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(23px, 3.2vw, 32px);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.page-home .archive-copy > p {
  margin: 0 0 1.2rem;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--text);
  max-width: 52ch;
}

.page-home .archive-fold {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.page-home .archive-fold summary {
  padding: 15px 20px;
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-home .archive-fold summary::-webkit-details-marker {
  display: none;
}

.page-home .archive-fold summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

.page-home .archive-fold summary::after {
  content: "展开";
  margin-left: auto;
  font-size: 12px;
  color: var(--meta);
}

.page-home .archive-fold[open] summary::after {
  content: "收起";
}

.page-home .archive-fold .timeline {
  margin: 0;
  padding: 4px 20px 20px;
}

.page-home .archive-fold .timeline-item p {
  font-size: 15px;
  line-height: 1.75;
}

.page-home .archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.page-home .archive-figure {
  margin: 0;
}

.page-home .archive-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---------- 收尾 ---------- */
.page-home .signoff {
  padding: clamp(26px, 4vw, 52px) 0 clamp(40px, 5vw, 72px);
}

.page-home .signoff-plate {
  position: relative;
  padding: clamp(24px, 3.6vw, 48px);
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(90deg, rgba(246, 241, 231, 0.045) 0 1px, transparent 1px 30px),
    linear-gradient(150deg, #0E4A5C 0%, #0B3B4A 100%);
  color: var(--paper);
  overflow: hidden;
}

.page-home .signoff-plate::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-hi) 45%, transparent 100%);
}

.page-home .signoff-plate h2 {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(23px, 3.2vw, 32px);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--paper);
  max-width: 26ch;
}

.page-home .signoff-plate p {
  margin: 0;
  max-width: 60ch;
  font-size: 16.5px;
  line-height: 1.85;
  color: rgba(246, 241, 231, 0.82);
}

.page-home .signoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.6rem;
}

.page-home .signoff-sign {
  margin-top: 1.8rem !important;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-dark);
  font-family: var(--serif);
  font-size: clamp(19px, 2.4vw, 24px);
  letter-spacing: 0.12em;
  color: var(--gold-hi) !important;
}

/* ---------- 响应式 ---------- */
@media (min-width: 720px) {
  .page-home .route-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .feedback-strip {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 240px);
    align-items: start;
  }

  .page-home .feedback-figure {
    max-width: 100%;
  }
}

@media (min-width: 900px) {
  .page-home .hero-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr);
  }

  .page-home .bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "new new opt opt"
      "new new fix more";
  }

  .page-home .bento-item--new {
    grid-area: new;
  }

  .page-home .bento-item--opt {
    grid-area: opt;
  }

  .page-home .bento-item--fix {
    grid-area: fix;
  }

  .page-home .bento-item--more {
    grid-area: more;
  }

  .page-home .cap-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .page-home .cap-item:nth-child(1) {
    grid-column: span 4;
  }

  .page-home .cap-item:nth-child(2),
  .page-home .cap-item:nth-child(3) {
    grid-column: span 2;
  }

  .page-home .cap-item:nth-child(4),
  .page-home .cap-item:nth-child(5) {
    grid-column: span 3;
  }

  .page-home .archive-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .page-home .archive-fold .timeline {
    padding: 4px 20px 22px;
  }
}

@media (min-width: 1180px) {
  .page-home .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
      "new new new opt opt opt"
      "new new new fix fix more";
  }
}

@media (hover: none) {
  .page-home .feedback-detail {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .switch__pane,
  .page-home .bento-item--more,
  .page-home .feedback-detail {
    animation: none !important;
    transition: none !important;
  }
}
