:root {
  --ground: #eef1ec;
  --surface: #f8f9f5;
  --ink: #132320;
  --ink-2: #4c5c58;
  --ink-3: #5f6f69;
  --line: #d2d9d0;
  --line-strong: #aeb9ad;
  --pine: #1d5348;
  --pine-bright: #2c7462;
  --seal: #b8452f;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ground);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1120px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 32px;
}

/* 顶栏：左域名、右身份，用一条细线收口 */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--line);
}

.masthead-domain,
.footer-domain {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--pine);
}

.masthead-owner,
.footer-note {
  font-size: 13px;
  color: var(--ink-3);
}

.main {
  flex: 1;
}

/* 首屏：大标题靠左、导语压在右下，形成不对称的重心 */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 24px 56px;
  align-items: end;
  padding: 72px 0 60px;
}

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.lead {
  margin: 0;
  max-width: 34ch;
  padding-bottom: 6px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.85;
}

/* 拓扑：根节点 + 三条委派分支，页面唯一的结构签名 */
.topology {
  padding-bottom: 24px;
}

.apex {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 8px;
}

.apex-host {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pine);
}

.apex-note {
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.route-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-link {
  position: relative;
  display: grid;
  grid-template-columns: 26px 214px minmax(0, 1fr) auto;
  align-items: start;
  padding: 34px 0 34px 0;
  color: inherit;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.route-link::before {
  content: "";
  position: absolute;
  inset: 0 0 0 52px;
  background: var(--surface);
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: -1;
}

.route-link:hover::before,
.route-link:focus-visible::before {
  opacity: 1;
}

.route-link:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 6px;
}

/* 分支线：竖线沿左缘贯穿，横线在每个入口处引出 */
.branch {
  position: relative;
  display: block;
  align-self: stretch;
  min-height: 74px;
}

.branch::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--line-strong);
}

.branch::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 20px;
  height: 1px;
  background: var(--line-strong);
}

.route:first-child .branch::before {
  top: -8px;
}

.route:last-child .branch::before {
  bottom: auto;
  height: 10px;
}

.node {
  position: absolute;
  top: 6px;
  left: -3.5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--seal);
  transform: scale(0);
  transition: transform 180ms ease;
}

.route-link:hover .node,
.route-link:focus-visible .node {
  transform: scale(1);
}

.route-link:hover .branch::after,
.route-link:focus-visible .branch::after {
  background: var(--seal);
}

.route-host {
  display: block;
  padding: 0 0 0 14px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
  transition: color 180ms ease;
}

.route-apex {
  color: var(--ink-3);
  font-weight: 400;
}

.route-link:hover .route-host,
.route-link:focus-visible .route-host {
  color: var(--pine-bright);
}

.route-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 32px 0 26px;
}

.route-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.route-desc {
  max-width: 46ch;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.75;
}

.route-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.tag {
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.tag-note {
  border-style: dashed;
}

.route-go {
  padding: 0 6px 0 0;
  font-size: 13.5px;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 180ms ease, transform 180ms ease;
}

.route-link:hover .route-go,
.route-link:focus-visible .route-go {
  color: var(--seal);
  transform: translateX(3px);
}

.footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
}

/* 入场：根节点先落位，三条分支依次浮现，只播一次 */
.apex,
.route {
  animation: settle 420ms ease-out both;
}

.route:nth-child(1) {
  animation-delay: 60ms;
}

.route:nth-child(2) {
  animation-delay: 130ms;
}

.route:nth-child(3) {
  animation-delay: 200ms;
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 52px 0 44px;
  }

  .lead {
    max-width: 46ch;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 0 20px;
  }

  .route-link {
    grid-template-columns: minmax(0, 1fr);
    padding: 26px 0 26px 18px;
    border-left: 1px solid var(--line-strong);
  }

  .route-link::before {
    inset: 0;
  }

  .branch {
    display: none;
  }

  .route-host,
  .route-body,
  .route-go {
    padding: 0;
  }

  .route-body {
    margin-top: 8px;
  }

  .route-go {
    margin-top: 14px;
  }

  .masthead,
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
