.page-custom {
  display: block;
}

/* ---------- 首屏 ---------- */
.page-custom .custom-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6) var(--section-y);
  color: var(--color-contrast-ink);
  background:
    radial-gradient(100% 82% at 6% -12%, color-mix(in srgb, var(--color-primary) 58%, transparent) 0%, transparent 62%),
    radial-gradient(78% 70% at 98% 2%, color-mix(in srgb, var(--color-accent) 44%, transparent) 0%, transparent 58%),
    var(--color-contrast-surface);
}

.page-custom .custom-hero .breadcrumbs {
  margin-bottom: var(--space-4);
}

.page-custom .custom-hero .breadcrumbs a {
  color: color-mix(in srgb, var(--color-contrast-ink) 66%, transparent);
  text-decoration: none;
  transition: color 180ms ease;
}

.page-custom .custom-hero .breadcrumbs a:hover {
  color: var(--color-contrast-accent);
}

.page-custom .custom-hero .breadcrumbs [aria-current="page"] {
  color: var(--color-contrast-ink);
}

.page-custom .custom-hero__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(var(--space-8) + var(--space-1));
  padding: var(--space-2) var(--space-3);
  border: var(--border-thin) solid var(--color-contrast-line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 11%, transparent);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-heading);
  letter-spacing: var(--tracking-heading);
  color: var(--color-contrast-ink);
}

.page-custom .custom-hero__title {
  margin: var(--space-3) 0 0;
  font-family: var(--font-heading);
  font-size: var(--text-display);
  font-weight: var(--weight-heading);
  line-height: 1.06;
  letter-spacing: var(--tracking-heading);
  color: var(--color-contrast-ink);
  text-wrap: balance;
}

.page-custom .custom-hero__meta {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
  align-items: start;
}

.page-custom .custom-hero__meta > * {
  min-width: 0;
}

.page-custom .custom-hero__lead .lede {
  margin: 0;
  max-width: var(--measure);
  color: color-mix(in srgb, var(--color-contrast-ink) 88%, transparent);
}

.page-custom .custom-hero__hint {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: color-mix(in srgb, var(--color-contrast-ink) 62%, transparent);
}

.page-custom .custom-hero__cta {
  margin: var(--space-3) 0 0;
}

.page-custom .custom-hero__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.page-custom .custom-stat {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border: var(--border-thin) solid var(--color-contrast-line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 8%, transparent);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.page-custom .custom-stat:hover {
  border-color: var(--color-contrast-accent);
  background: color-mix(in srgb, var(--color-surface) 13%, transparent);
}

.page-custom .custom-stat__num {
  font-size: var(--text-2xl);
  line-height: 1;
  color: var(--color-contrast-ink);
}

.page-custom .custom-stat__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-heading);
  color: var(--color-contrast-ink);
}

.page-custom .custom-stat__note {
  font-size: var(--text-xs);
  line-height: var(--leading-body);
  color: color-mix(in srgb, var(--color-contrast-ink) 62%, transparent);
}

.page-custom .custom-hero__plans {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.page-custom .custom-plan {
  position: relative;
  padding: var(--space-3);
  border: var(--border-thin) solid var(--color-contrast-line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 9%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--space-3)), calc(100% - var(--space-3)) 100%, 0 100%);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.page-custom .custom-plan:hover,
.page-custom .custom-plan:focus-within {
  border-color: var(--color-contrast-accent);
  background: color-mix(in srgb, var(--color-surface) 14%, transparent);
}

.page-custom .custom-plan__flag {
  display: inline-block;
  padding-bottom: var(--border-thin);
  border-bottom: var(--border-thin) solid color-mix(in srgb, var(--color-contrast-accent) 55%, transparent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-contrast-accent);
}

.page-custom .custom-plan__title {
  margin: var(--space-2) 0 var(--space-1);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-contrast-ink);
}

.page-custom .custom-plan__for {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: color-mix(in srgb, var(--color-contrast-ink) 76%, transparent);
}

.page-custom .custom-plan__detail {
  margin: var(--space-2) 0 0;
  display: grid;
  gap: var(--space-1);
}

.page-custom .custom-plan__detail > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  align-items: baseline;
}

.page-custom .custom-plan__detail dt {
  flex: 0 0 auto;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--color-contrast-ink) 56%, transparent);
}

.page-custom .custom-plan__detail dd {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--color-contrast-ink);
}

.page-custom .custom-plan__link {
  display: inline-block;
  margin-top: var(--space-3);
  padding-bottom: var(--border-thin);
  border-bottom: var(--border-thin) solid currentColor;
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--color-contrast-accent);
  transition: color 180ms ease;
}

.page-custom .custom-plan__link:hover {
  color: var(--color-contrast-ink);
}

/* 方案卡在指针设备上悬停展开细节 */
@media (hover: hover) and (pointer: fine) {
  .page-custom .custom-plan__detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 220ms ease, opacity 180ms ease;
  }

  .page-custom .custom-plan:hover .custom-plan__detail,
  .page-custom .custom-plan:focus-within .custom-plan__detail {
    max-height: 320px;
    opacity: 1;
  }
}

/* ---------- 通用区块头 ---------- */
.page-custom .custom-overview__head {
  display: grid;
  gap: var(--space-2);
  max-width: var(--measure);
}

.page-custom .custom-overview__head .section-title {
  margin: 0;
}

.page-custom .custom-overview__head .lede {
  margin: 0;
}

.page-custom .custom-group__aside {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
}

.page-custom .custom-group__aside a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: var(--border-thin) solid color-mix(in srgb, var(--color-primary) 42%, transparent);
  transition: color 180ms ease, border-color 180ms ease;
}

.page-custom .custom-group__aside a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ---------- 选择路径 ---------- */
.page-custom .custom-overview {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--color-primary-soft) 62%, transparent) 0%, transparent 62%),
    var(--color-surface);
}

.page-custom .custom-path {
  margin-top: var(--space-6);
}

.page-custom .custom-path__root {
  margin: 0 0 var(--space-4);
  padding: var(--space-2) var(--space-3);
  border: var(--border-thin) solid var(--color-line);
  border-inline-start: calc(var(--border-thin) * 3) solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--color-ink-muted);
}

.page-custom .custom-path__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.page-custom .custom-path__list > li {
  position: relative;
  min-width: 0;
}

.page-custom .custom-path__card {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.page-custom .custom-path__card:hover,
.page-custom .custom-path__card:focus-visible {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary-soft) 70%, var(--color-surface));
}

.page-custom .custom-path__cond {
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
}

.page-custom .custom-path__arrow {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  line-height: 1;
  color: var(--color-primary);
}

.page-custom .custom-path__pick {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-heading);
  color: var(--color-ink);
}

/* ---------- 分组：难处 / 做法 / 结果 ---------- */
.page-custom .custom-group {
  display: block;
}

.page-custom .custom-group__trouble {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-y);
  background:
    radial-gradient(90% 130% at 94% 0%, color-mix(in srgb, var(--color-primary) 36%, transparent) 0%, transparent 62%),
    var(--color-contrast-surface);
  color: var(--color-contrast-ink);
}

.page-custom .custom-group__trouble-grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}

.page-custom .custom-group__trouble-grid > * {
  min-width: 0;
}

.page-custom .custom-group__trouble-text {
  min-width: 0;
}

.page-custom .custom-group__kicker {
  margin: 0 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  color: var(--color-contrast-accent);
}

.page-custom .custom-group__trouble h2 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-contrast-ink);
  text-wrap: balance;
}

.page-custom .custom-group__trouble p {
  margin: 0;
  max-width: var(--measure);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: color-mix(in srgb, var(--color-contrast-ink) 78%, transparent);
}

.page-custom .custom-group__figure {
  margin: 0;
}

.page-custom .custom-group__body {
  padding-block: var(--section-y);
  background:
    linear-gradient(200deg, color-mix(in srgb, var(--color-primary-soft) 74%, transparent) 0%, transparent 58%),
    var(--color-surface);
}

.page-custom .custom-group__layers {
  display: grid;
  gap: var(--space-4);
}

.page-custom .custom-group__layers > * {
  min-width: 0;
}

.page-custom .custom-group__how {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
}

.page-custom .custom-group__how h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-ink);
  text-wrap: balance;
}

.page-custom .custom-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  counter-reset: custom-step;
}

.page-custom .custom-steps > li {
  position: relative;
  counter-increment: custom-step;
  padding-inline-start: var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-ink-soft);
}

.page-custom .custom-steps > li::before {
  content: counter(custom-step, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.page-custom .custom-group__result {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  padding: var(--space-4);
  border: var(--border-thin) solid var(--color-contrast-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--color-accent) 36%, transparent) 0%, transparent 62%),
    var(--color-contrast-surface);
  color: var(--color-contrast-ink);
}

.page-custom .custom-group__result-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  color: var(--color-contrast-accent);
}

.page-custom .custom-group__result-num {
  margin: 0;
  font-size: var(--text-figure);
  line-height: 1;
  color: var(--color-contrast-ink);
}

.page-custom .custom-group__result-text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: color-mix(in srgb, var(--color-contrast-ink) 80%, transparent);
}

.page-custom .custom-group__result-text a {
  color: var(--color-contrast-accent);
  text-decoration: none;
  border-bottom: var(--border-thin) solid color-mix(in srgb, var(--color-contrast-accent) 60%, transparent);
}

.page-custom .custom-group__result-text a:hover {
  color: var(--color-contrast-ink);
  border-color: var(--color-contrast-ink);
}

.page-custom .custom-group__result .custom-group__figure {
  margin-top: var(--space-2);
}

/* ---------- 对照表 ---------- */
.page-custom .custom-compare {
  background: var(--color-surface-alt);
}

.page-custom .custom-compare__figure {
  margin: var(--space-6) 0 0;
}

.page-custom .custom-compare__scroll {
  margin-top: var(--space-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.page-custom .custom-compare table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.page-custom .custom-compare th,
.page-custom .custom-compare td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: top;
  border-bottom: var(--border-thin) solid var(--color-line);
  line-height: var(--leading-body);
}

.page-custom .custom-compare thead th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-body);
  letter-spacing: 0.1em;
  color: var(--color-ink-muted);
  background: var(--color-surface-deep);
  white-space: nowrap;
}

.page-custom .custom-compare tbody tr {
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.page-custom .custom-compare tbody tr:hover,
.page-custom .custom-compare tbody tr:focus-within {
  background: color-mix(in srgb, var(--color-primary-soft) 68%, transparent);
  box-shadow: inset calc(var(--border-thin) * 3) 0 0 var(--color-accent);
}

.page-custom .custom-compare tbody th {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  color: var(--color-ink);
}

.page-custom .custom-compare tbody td {
  color: var(--color-ink-soft);
}

.page-custom .custom-compare tbody td:nth-child(2) {
  font-family: var(--font-mono);
  color: var(--color-primary);
}

.page-custom .custom-compare tbody tr:last-child th,
.page-custom .custom-compare tbody tr:last-child td {
  border-bottom: 0;
}

.page-custom .custom-compare td a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: var(--border-thin) solid color-mix(in srgb, var(--color-primary) 40%, transparent);
  transition: color 180ms ease, border-color 180ms ease;
}

.page-custom .custom-compare td a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ---------- 下一步 ---------- */
.page-custom .custom-next {
  padding-block: var(--section-y-lg);
  background:
    radial-gradient(90% 130% at 0% 100%, color-mix(in srgb, var(--color-primary) 42%, transparent) 0%, transparent 58%),
    var(--color-contrast-surface);
  color: var(--color-contrast-ink);
}

.page-custom .custom-next__grid {
  display: grid;
  gap: var(--space-4);
}

.page-custom .custom-next__grid > * {
  min-width: 0;
}

.page-custom .custom-next__lead h2 {
  margin: var(--space-2) 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-contrast-ink);
  text-wrap: balance;
}

.page-custom .custom-next__lead p {
  margin: 0;
  max-width: var(--measure);
  color: color-mix(in srgb, var(--color-contrast-ink) 80%, transparent);
}

.page-custom .custom-next__links {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.page-custom .custom-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border: var(--border-thin) solid var(--color-contrast-line);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--color-contrast-ink);
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.page-custom .custom-link:hover {
  border-color: var(--color-contrast-accent);
  background: color-mix(in srgb, var(--color-contrast-accent) 20%, transparent);
}

.page-custom .custom-link--accent {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}

.page-custom .custom-link--accent:hover {
  background: var(--color-contrast-accent);
  border-color: var(--color-contrast-accent);
  color: var(--color-accent-ink);
}

.page-custom .custom-next__channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.page-custom .custom-channel {
  display: grid;
  gap: var(--space-1);
  justify-items: start;
  padding: var(--space-2) var(--space-3);
  border: var(--border-thin) solid var(--color-contrast-line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 7%, transparent);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.page-custom .custom-channel:hover {
  border-color: var(--color-contrast-accent);
  background: color-mix(in srgb, var(--color-surface) 11%, transparent);
}

.page-custom .custom-channel__key {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--color-contrast-ink) 58%, transparent);
}

.page-custom .custom-channel__val {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--color-contrast-ink);
  word-break: break-all;
}

.page-custom .custom-channel__val--wide {
  font-family: var(--font-body);
  font-size: var(--text-base);
  word-break: break-word;
}

.page-custom .custom-channel__note {
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: color-mix(in srgb, var(--color-contrast-ink) 72%, transparent);
}

.page-custom .custom-copy {
  margin-top: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border: var(--border-thin) solid var(--color-contrast-line);
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--color-contrast-ink) 76%, transparent);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.page-custom .custom-copy:hover,
.page-custom .custom-copy:focus-visible {
  border-color: var(--color-contrast-accent);
  color: var(--color-contrast-ink);
}

.page-custom .custom-copy[data-copied="true"] {
  border-color: var(--color-contrast-accent);
  background: color-mix(in srgb, var(--color-contrast-accent) 26%, transparent);
  color: var(--color-contrast-ink);
}

/* ---------- 图片基础 ---------- */
.page-custom .figure__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

.page-custom .figure__tag {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

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

@media (min-width: 900px) {
  .page-custom .custom-hero__meta {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-6);
  }

  .page-custom .custom-hero__stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-custom .custom-hero__plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .page-custom .custom-hero__plans > li:nth-child(2) {
    margin-top: var(--space-4);
  }

  .page-custom .custom-hero__plans > li:nth-child(3) {
    margin-top: var(--space-8);
  }

  .page-custom .custom-path__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-custom .custom-path__list > li {
    padding-top: var(--space-3);
  }

  .page-custom .custom-path__list > li::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: var(--space-3);
    width: var(--space-4);
    height: var(--space-3);
    border-inline-start: var(--border-thin) solid var(--color-line);
    border-block-end: var(--border-thin) solid var(--color-line);
    border-end-start-radius: var(--radius-sm);
    transform: translateY(calc(-1 * var(--space-3)));
    pointer-events: none;
  }

  .page-custom .custom-group__trouble-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: var(--space-6);
  }

  .page-custom .custom-group__layers {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .page-custom .custom-next__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-6);
  }
}

@media (min-width: 1080px) {
  .page-custom .custom-group__trouble {
    padding-block: var(--section-y-lg);
  }

  .page-custom .custom-plan {
    padding: var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-custom .custom-plan,
  .page-custom .custom-plan__detail,
  .page-custom .custom-stat,
  .page-custom .custom-path__card,
  .page-custom .custom-compare tbody tr,
  .page-custom .custom-link,
  .page-custom .custom-copy,
  .page-custom .custom-channel {
    transition: none;
  }
}
</main>
