/* v0.7.3: shared content, interaction and responsive polish. */
:root {
  --v073-line: rgba(7, 19, 22, 0.13);
  --v073-soft: #eef4f1;
  --v073-soft-2: #e5eeeb;
  --v073-green: #00a36c;
  --v073-green-dark: #007d54;
  --v073-blue: #2a7897;
  --v073-ink: #071316;
  --v073-muted: #637078;
}

html,
body {
  min-width: 0;
  overflow-x: clip;
}

main {
  overflow-x: clip;
}

body.unav-lock,
body.is-menu-open {
  overflow-y: hidden;
}

.unav-mobile-panel,
.iv2-mobile-panel {
  max-width: 100vw;
  overscroll-behavior: contain;
}

.v073-reading-progress {
  position: fixed;
  z-index: 1700;
  inset: 0 0 auto;
  height: 3px;
  pointer-events: none;
  background: rgba(0, 163, 108, 0.13);
}

.v073-reading-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--v073-green);
  transform-origin: left center;
  transition: width 0.12s linear;
}

.v073-context-rail {
  position: relative;
  z-index: 4;
  border-bottom: 1px solid var(--v073-line);
  background: var(--v073-soft);
}

.v073-context-rail__inner {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
  align-items: stretch;
  min-height: 92px;
}

.v073-context-rail__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 28px 16px 0;
  border-right: 1px solid var(--v073-line);
}

.v073-context-rail__intro span {
  color: var(--v073-green-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v073-context-rail__intro strong {
  margin-top: 7px;
  color: var(--v073-ink);
  font-size: 16px;
  line-height: 1.25;
}

.v073-context-rail__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v073-context-rail__link {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--v073-line);
  color: var(--v073-muted);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.v073-context-rail__link:last-child {
  border-right: 0;
}

.v073-context-rail__link:hover,
.v073-context-rail__link:focus-visible {
  color: var(--v073-ink);
  background: rgba(255, 255, 255, 0.66);
}

.v073-context-rail__link:hover {
  transform: translateY(-2px);
}

.v073-context-rail__link b {
  color: var(--v073-green-dark);
  font-size: 11px;
}

.v073-context-rail__link span {
  min-width: 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.v073-context-rail__link i {
  color: var(--v073-blue);
  font-size: 14px;
  font-style: normal;
  text-align: right;
}

.v073-context-rail__link.is-current {
  color: var(--v073-ink);
  background: #fff;
  box-shadow: inset 0 -3px 0 var(--v073-green);
}

.iv2-anchorbar a {
  position: relative;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
}

.iv2-anchorbar a[aria-current="location"] {
  color: var(--v073-ink);
}

.iv2-anchorbar a[aria-current="location"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--v073-green);
  content: "";
}

.v073-filter-count {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 40px;
  margin: 0 0 30px;
  color: var(--v073-muted);
  font-size: 12px;
}

.v073-filter-count strong {
  color: var(--v073-ink);
  font-size: 20px;
  line-height: 1;
}

.v073-empty-state {
  display: none;
  margin: -4px 0 34px;
  padding: 28px;
  border: 1px solid var(--v073-line);
  border-left: 3px solid var(--v073-green);
  background: #fff;
}

.v073-empty-state.is-visible {
  display: block;
}

.v073-empty-state strong {
  display: block;
  color: var(--v073-ink);
  font-size: 17px;
}

.v073-empty-state p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--v073-muted);
  font-size: 13px;
  line-height: 1.65;
}

.v073-empty-state a {
  display: inline-flex;
  margin-top: 16px;
  color: var(--v073-green-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.v073-home-route-map {
  position: relative;
  overflow: hidden;
  padding: clamp(84px, 10vw, 142px) 0;
  background: var(--v073-soft);
}

.v073-home-route-map::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(7, 19, 22, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(7, 19, 22, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 78%);
  pointer-events: none;
}

.v073-home-route-map .iv2-shell {
  position: relative;
  z-index: 1;
}

.v073-home-route-map__layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.76fr) minmax(0, 1.24fr);
  gap: 22px;
  align-items: stretch;
}

.v073-home-route-map__intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
  padding: clamp(28px, 4vw, 54px);
  color: #fff;
  background: var(--v073-ink);
}

.v073-home-route-map__intro .dv2-index {
  color: #8be1c0;
}

.v073-home-route-map__intro h2 {
  max-width: 460px;
  margin: 34px 0 0;
  color: #fff;
  font-size: clamp(38px, 4.4vw, 66px);
  line-height: 0.98;
}

.v073-home-route-map__intro p:not(.dv2-index) {
  max-width: 440px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  line-height: 1.75;
}

.v073-home-route-map__intro a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin-top: 42px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.v073-home-route-map__steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  align-content: stretch;
  border: 1px solid var(--v073-line);
  background: var(--v073-line);
}

.v073-home-route-step {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  gap: 16px;
  min-width: 0;
  min-height: 280px;
  padding: 26px;
  color: var(--v073-ink);
  background: rgba(255, 255, 255, 0.94);
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.v073-home-route-step:hover,
.v073-home-route-step:focus-visible {
  color: #fff;
  background: #193b3b;
}

.v073-home-route-step:hover {
  z-index: 2;
  transform: translateY(-3px);
}

.v073-home-route-step > span {
  color: var(--v073-green-dark);
  font-size: 12px;
  font-weight: 800;
}

.v073-home-route-step > div {
  min-width: 0;
}

.v073-home-route-step small {
  display: block;
  color: var(--v073-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.v073-home-route-step strong {
  display: block;
  margin-top: 34px;
  font-size: 20px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.v073-home-route-step p {
  margin: 13px 0 0;
  color: var(--v073-muted);
  font-size: 13px;
  line-height: 1.65;
}

.v073-home-route-step > i {
  color: var(--v073-blue);
  font-size: 16px;
  font-style: normal;
  text-align: right;
  transition: transform 0.2s ease;
}

.v073-home-route-step:hover small,
.v073-home-route-step:hover p,
.v073-home-route-step:hover > span,
.v073-home-route-step:hover > i {
  color: #8be1c0;
}

.v073-home-route-step:hover > i {
  transform: translateX(4px);
}

.v073-hero-story {
  position: absolute;
  z-index: 7;
  right: 30px;
  bottom: 202px;
  display: grid;
  gap: 6px;
  width: 272px;
  padding-top: 11px;
  border-top: 1px solid rgba(244, 248, 245, 0.35);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.65s var(--ease-film);
}

.r9-hero.is-chapter-ready .v073-hero-story {
  opacity: 1;
  transform: translateY(0);
}

.v073-hero-story span {
  color: rgba(244, 248, 245, 0.58);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.v073-hero-story strong {
  font-size: 18px;
  line-height: 1.1;
}

.v073-hero-story small {
  color: rgba(244, 248, 245, 0.62);
  font-size: 10px;
  line-height: 1.4;
}

.r9-factory-copy h1 {
  overflow-wrap: anywhere;
}

.r9-chapter-progress {
  width: 294px;
  gap: 16px;
}

.r9-progress-track {
  height: 3px;
}

.r9-chapter-nav button {
  min-width: 72px;
  min-height: 44px;
}

.iv2-system,
.p3-resource,
.p4-card,
.zh-system-card,
.zh-article-card {
  min-width: 0;
}

.iv2-system-content,
.p3-resource-main,
.p3-resource-side,
.p4-card-body,
.zh-system-content,
.zh-article-card {
  overflow-wrap: anywhere;
}

.iv2-system-link,
.p3-resource-action,
.p4-text-link,
.zh-article-card a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.iv2-system-link:hover,
.p3-resource-action:hover,
.p4-text-link:hover,
.zh-article-card a:hover {
  transform: translateX(4px);
}

.v073-home-route-step:focus-visible,
.v073-context-rail__link:focus-visible {
  outline: 3px solid rgba(0, 163, 108, 0.45);
  outline-offset: -3px;
}

@media (max-width: 1020px) {
  .v073-context-rail__inner {
    grid-template-columns: 1fr;
  }

  .v073-context-rail__intro {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--v073-line);
  }

  .v073-context-rail__links {
    min-height: 88px;
  }

  .v073-home-route-map__layout {
    grid-template-columns: 1fr;
  }

  .v073-home-route-map__intro {
    min-height: 0;
  }

  .v073-home-route-map__intro h2 {
    max-width: 720px;
  }

  .v073-home-route-map__intro p:not(.dv2-index) {
    max-width: 680px;
  }
}

@media (min-width: 721px) and (max-width: 1020px) {
  /* Give the tablet / short-desktop state a clear copy column and a separate
     control column so the chapter UI never competes with the headline. */
  .r9-factory-copy {
    right: 24px;
    bottom: 24px;
    left: 42px;
    width: auto;
  }

  .r9-factory-copy h1,
  .r9-factory-support,
  .r9-factory-actions {
    max-width: min(430px, calc(100% - 260px));
  }

  .r9-factory-copy h1 {
    font-size: 38px;
    line-height: 1.02;
  }

  .v073-hero-story {
    top: 124px;
    right: 30px;
    bottom: auto;
    width: 245px;
  }

  .r9-chapter-progress {
    top: 220px;
    right: 30px;
    bottom: auto;
    width: 245px;
    gap: 12px;
  }

  .r9-chapter-nav {
    top: 266px;
    right: 30px;
    bottom: auto;
  }

  .r9-chapter-nav button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    justify-content: center;
  }

  .r9-chapter-nav button span {
    display: none;
  }
}

@media (max-width: 720px) {
  .v073-context-rail__links {
    grid-template-columns: 1fr;
  }

  .v073-context-rail__link {
    min-height: 62px;
    border-right: 0;
    border-bottom: 1px solid var(--v073-line);
  }

  .v073-context-rail__link:last-child {
    border-bottom: 0;
  }

  .v073-filter-count {
    margin-bottom: 22px;
  }

  .v073-home-route-map {
    padding: 72px 0;
  }

  .v073-home-route-map__intro {
    padding: 30px 24px 34px;
  }

  .v073-home-route-map__intro h2 {
    margin-top: 27px;
    font-size: 40px;
  }

  .v073-home-route-map__steps {
    grid-template-columns: 1fr;
  }

  .v073-home-route-step {
    min-height: 215px;
    padding: 22px;
  }

  .v073-home-route-step strong {
    margin-top: 24px;
    font-size: 19px;
  }

  .v073-hero-story {
    top: 169px;
    right: 18px;
    bottom: auto;
    width: calc(100% - 36px);
  }

  /* The compact chapter selector is intentionally icon-only on phones. */
  .r9-chapter-nav {
    right: 18px;
    gap: 2px;
  }

  .r9-chapter-nav button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
  }

  .r9-chapter-nav button span {
    display: none;
  }

  .r9-chapter-progress {
    top: 125px;
    right: 18px;
    width: calc(100% - 36px);
  }
}

@media (max-width: 420px) {
  .v073-home-route-step {
    grid-template-columns: 26px minmax(0, 1fr) 14px;
    gap: 10px;
  }

  .v073-home-route-step p {
    font-size: 12px;
  }

  .v073-empty-state {
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v073-reading-progress i,
  .v073-context-rail__link,
  .v073-home-route-step,
  .v073-home-route-step > i,
  .v073-hero-story,
  .iv2-system-link,
  .p3-resource-action,
  .p4-text-link,
  .zh-article-card a {
    transition: none;
  }

  .v073-context-rail__link:hover,
  .v073-home-route-step:hover,
  .iv2-system-link:hover,
  .p3-resource-action:hover,
  .p4-text-link:hover,
  .zh-article-card a:hover {
    transform: none;
  }
}
