/* 风格 15 · 线路图 Metro Map
   白底 + 十二条线路色（hsl(hue 60% 42%)，只用于线与站标，文字始终黑）。导视人文无衬线。
   圆端粗线、圆形站标、换乘双环；线路徽标是白底彩边黑字，任何色相下都可读。 */
html[data-style="metro"] {
  --paper: #ffffff;
  --ink: #111111;
  --sec: #5a5a5a;
  --rule: #e1e1e1;
  --rule-strong: #111111;
  --tint: #f5f5f5;
  --sign: "Source Sans 3 Variable", "Avenir Next", "Segoe UI", Seravek, Candara, "Helvetica Neue", Arial, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sign);
  font-size: 14.5px;
  line-height: 1.5;
}
html[data-style="metro"] body { background: var(--paper); }
html[data-style="metro"] ::selection { background: var(--ink); color: var(--paper); }

.mt-page { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 120px; }

/* ---- 徽标 ---- */
.mt-badge { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 7px; border: 3px solid var(--c, var(--ink)); background: var(--paper); color: var(--ink); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .02em; flex: none; }
.mt-badge-lg { min-width: 52px; height: 40px; font-size: 20px; border-width: 4px; border-radius: 10px; }
.mt-badge-k { border-color: var(--ink); }

/* ---- 站牌头 ---- */
.mt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 24px 0 16px; border-bottom: 6px solid var(--rule-strong); flex-wrap: wrap; }
.mt-brand { display: flex; align-items: center; gap: 14px; }
.mt-roundel { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 26px; flex: none; }
.mt-brand h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.mt-brand h1 small { font-size: 16px; font-weight: 600; margin-left: 6px; }
.mt-brand p { margin: 4px 0 0; color: var(--sec); font-size: 13px; }
.mt-transfer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 640px; justify-content: flex-end; }
.mt-transfer-l { font-size: 11.5px; color: var(--sec); margin-right: 4px; flex-basis: 100%; text-align: right; }
.mt-tbadge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px 0 0; border: 2px solid var(--rule); border-radius: 7px; text-decoration: none; color: var(--ink); font-size: 12px; background: var(--paper); }
.mt-tbadge b { height: 100%; display: grid; place-items: center; padding: 0 6px; background: #fff; color: var(--ink); border-right: 3px solid var(--c); border-radius: 4px 0 0 4px; font-size: 11px; font-weight: 800; }
.mt-tbadge:hover { border-color: var(--ink); }
.mt-tbadge[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.mt-tbadge[aria-current="page"] b { background: var(--ink); color: #fff; border-right-color: #fff; }

/* ---- 须知条 / 图例 ---- */
.mt-notice-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.mt-lede { margin: 0; font-size: 14px; color: var(--ink); max-width: 76ch; }
.mt-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 12px; color: var(--sec); white-space: nowrap; }
.mt-legend span { display: flex; align-items: center; gap: 8px; }
.mt-m { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; display: inline-block; flex: none; }
.mt-m-S { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 5px var(--ink); }
.mt-m-B { width: 8px; height: 8px; border: 0; background: var(--ink); margin: 0 3px; }
.mt-m-sec { width: 18px; height: 18px; border-radius: 5px; }

/* ---- 查询 ---- */
.mt-query { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 0; border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; background: var(--paper); }
.mt-q { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mt-q span { font-size: 11.5px; color: var(--sec); font-weight: 600; }
.mt-q input { height: 40px; border: 3px solid var(--ink); border-radius: 8px; padding: 0 12px; font-size: 15px; font-family: inherit; background: var(--paper); color: var(--ink); }
.mt-q input:focus { outline: 0; box-shadow: 0 0 0 3px var(--rule); }
.mt-query select, #mt-reset { height: 40px; border: 2px solid var(--ink); border-radius: 8px; padding: 0 10px; font-size: 13px; font-family: inherit; background: var(--paper); color: var(--ink); font-weight: 600; }
#mt-reset { background: var(--ink); color: #fff; padding: 0 16px; }
#mt-reset:hover { background: #333; }

/* ---- 线路图 ---- */
.mt-map-wrap { padding: 22px 0 8px; }
/* overflow-x 不是 visible 时，另一轴会变成 auto，横向滚动条会压住最底下那条线。
   线画完之后再留出滚动条的高度，车站始终在线上面。 */
.mt-map-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding-bottom: 16px; }
.mt-map { display: block; min-width: 860px; width: 100%; height: auto; }
.mt-l-bg { fill: none; stroke: none; }
.mt-l { fill: none; stroke: var(--c); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .15s; }
.mt-l-hit { fill: none; stroke: transparent; stroke-width: 22; cursor: pointer; }
.mt-line:hover .mt-l { stroke-width: 12; }
.mt-stops { pointer-events: none; }
.mt-st, .mt-term-c, .mt-tl, .mt-tn { pointer-events: auto; }
.mt-st { fill: #fff; stroke: var(--c); stroke-width: 3.5; cursor: pointer; transition: r .15s; }
.mt-st:hover { r: 9; stroke: var(--ink); }
.mt-term-c { fill: #fff; stroke: var(--ink); stroke-width: 4; }
.mt-tl { font-family: var(--sign); font-size: 15px; font-weight: 700; fill: var(--ink); cursor: pointer; }
.mt-tn { font-family: var(--mono); font-size: 11.5px; fill: var(--sec); }
.mt-stops:hover .mt-tl { text-decoration: underline; }
.mt-train {
  fill: var(--ink); pointer-events: none; opacity: 0;
  offset-path: var(--track); offset-rotate: 0deg;
  animation-name: mt-run; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes mt-run {
  0% { offset-distance: 0%; opacity: 1; }
  100% { offset-distance: 100%; opacity: 1; }
}
.mt-hub { fill: #fff; stroke: var(--ink); stroke-width: 5; }
.mt-hub-t { font-family: var(--sign); font-size: 11px; font-weight: 800; fill: var(--ink); }
.mt-map-hint { margin: 6px 0 0; font-size: 12px; color: var(--sec); }

/* 线路表 */
.mt-lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; padding: 14px 0 26px; border-bottom: 1px solid var(--rule); }
.mt-linecard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; padding: 10px 12px 10px 10px; border: 0; border-left: 8px solid var(--c); border-radius: 0 8px 8px 0; background: var(--tint); color: var(--ink); font: inherit; cursor: pointer; }
.mt-linecard:hover { background: var(--ink); color: #fff; }
.mt-linecard:hover .mt-badge { background: var(--ink); color: #fff; }
.mt-linecard:hover small, .mt-linecard:hover .mt-lc-n { color: #ddd; }
.mt-lc-t { display: flex; flex-direction: column; min-width: 0; }
.mt-lc-t b { font-size: 15px; font-weight: 700; }
.mt-lc-t small { font-size: 11.5px; color: var(--sec); line-height: 1.35; }
.mt-lc-n { font-size: 11px; color: var(--sec); text-align: right; white-space: nowrap; }
.mt-lc-n b { display: block; font-size: 18px; color: inherit; font-weight: 800; }

/* ---- 一条线：竖向路线条 ---- */
.mt-route { padding: 24px 0 10px; }
.mt-rhead { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px 16px; align-items: center; padding-bottom: 16px; border-bottom: 6px solid var(--c); margin-bottom: 8px; }
.mt-back, .mt-linkbtn { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; }
.mt-back { grid-column: 1 / -1; justify-self: start; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mt-linkbtn { font-weight: 800; }
.mt-linkbtn:hover, .mt-back:hover { text-decoration: underline; }
.mt-rhead h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.mt-rhead h2 small { font-size: 14px; font-weight: 600; color: var(--sec); margin-left: 6px; }
.mt-rhead > div > p { margin: 2px 0 0; color: var(--sec); font-size: 13px; }
.mt-rnav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.mt-rnav a { font-size: 12px; color: var(--ink); text-decoration: none; border: 1.5px solid var(--rule); border-radius: 999px; padding: 3px 10px; }
.mt-rnav a:hover { border-color: var(--ink); }

.mt-strip { list-style: none; margin: 0; padding: 0 0 0 64px; position: relative; --stop: 22px; --reach: 8px; }
/* 线路按每一站分段。站标用 --stop 对齐站名（不再取整行中点，否则点掉进说明里、
   看起来在线下面）；线的起止盖住首尾站标全身，不让半个点露在线外。 */
.mt-strip > li { position: relative; padding: 10px 0; }
.mt-strip > li::before {
  content: ""; position: absolute; z-index: 0; left: -42px; width: 10px; top: 0; bottom: 0;
  background: var(--c);
}
.mt-strip > li:first-child::before { top: calc(var(--stop) - var(--reach)); border-radius: 5px 5px 0 0; }
.mt-strip > li:last-child::before { bottom: calc(100% - var(--stop) - var(--reach)); border-radius: 0 0 5px 5px; }
.mt-strip > li:only-child::before { top: calc(var(--stop) - var(--reach)); height: calc(var(--reach) * 2); bottom: auto; border-radius: 5px; }
.mt-strip > li > i { position: absolute; z-index: 1; left: -64px; top: var(--stop); translate: 0 -50%; display: block; background: #fff; border-radius: 50%; margin-left: 22px; }
/* 站标：大站方圆角 / S 双环 / A 圆 / B 小点 */
.mt-major { --stop: 37px; --reach: 13px; padding: 22px 0 12px !important; }
.mt-major > i { width: 26px; height: 26px; margin-left: 14px !important; border: 4px solid var(--ink); border-radius: 8px; }
.mt-major h3 { margin: 0; font-size: 20px; font-weight: 800; display: flex; align-items: baseline; gap: 10px; }
.mt-major h3 small { font-family: var(--mono); font-size: 12px; color: var(--sec); font-weight: 400; }
.mt-major p { margin: 2px 0 0; font-size: 12.5px; color: var(--sec); }
.mt-stop { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; align-items: start; border-bottom: 1px solid var(--rule); }
.mt-stop:last-child { border-bottom: 0; }
.mt-stop > i { width: 16px; height: 16px; border: 3px solid var(--c); margin-left: 19px !important; }
.mt-tS { --reach: 11px; }
.mt-tS > i { width: 22px; height: 22px; margin-left: 16px !important; border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--c); }
.mt-tB { --stop: 22px; --reach: 9px; }
.mt-tB > i { width: 14px; height: 14px; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 2px var(--c); margin-left: 20px !important; }
.mt-stop-a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mt-stop-n { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-tS .mt-stop-n { font-size: 17px; }
.mt-stop-a:hover .mt-stop-n { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.mt-lang, .mt-tier { font-style: normal; font-size: 10.5px; font-weight: 700; border: 2px solid var(--ink); border-radius: 5px; padding: 0 5px; line-height: 15px; }
.mt-tier { font-family: var(--mono); }
.mt-tS .mt-tier { background: var(--ink); color: #fff; }
.mt-tB .mt-tier { border-color: var(--rule); color: var(--sec); }
.mt-stop-d { font-size: 13.5px; color: var(--ink); line-height: 1.5; max-width: 76ch; }
.mt-stop-m { font-size: 11.5px; color: var(--sec); font-family: var(--mono); }
.mt-shot { width: 96px; aspect-ratio: 8/5; object-fit: cover; border: 1px solid var(--rule); border-radius: 4px; margin-top: 3px; }
/* skill 线 */
.mt-strip-k > li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.mt-stop-k > i { width: 16px; height: 16px; border: 3px solid var(--ink); margin-left: 19px !important; }
.mt-stop-k.mt-term { --reach: 11px; }
.mt-stop-k.mt-term > i { width: 22px; height: 22px; margin-left: 16px !important; border-width: 4px; }
.mt-stop-k code { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.mt-stop-k a { color: var(--ink); text-decoration: none; }
.mt-stop-k a:hover code { text-decoration: underline; }
.mt-stop-k p { margin: 2px 0 0; font-size: 13px; color: var(--sec); }

/* 结果 / 空态 */
.mt-rsum { margin: 20px 0 0; font-size: 14px; color: var(--sec); }
.mt-rsum b { color: var(--ink); font-size: 20px; font-weight: 800; }
.mt-route-s { padding-top: 14px; }
.mt-route-s .mt-rhead { grid-template-columns: auto minmax(0, 1fr); border-bottom-width: 4px; padding-bottom: 10px; }
.mt-route-s .mt-rhead h2 { font-size: 22px; }
.mt-empty { padding: 60px 0; text-align: center; color: var(--sec); border-bottom: 1px solid var(--rule); }
.mt-empty p { margin: 0 0 12px; }

/* ---- 其它区块 ---- */
.mt-block { padding: 28px 0 12px; }
.mt-bh { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 4px solid var(--ink); }
.mt-bh h2 { margin: 0; font-size: 22px; font-weight: 800; }
.mt-bh h2 small { font-size: 13px; font-weight: 500; color: var(--sec); margin-left: 8px; }
.mt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.mt-code { margin: 0 0 12px; background: var(--ink); color: #fff; border-radius: 8px; padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; overflow-x: auto; }
.mt-sub { margin: 0 0 6px; font-weight: 700; font-size: 13.5px; }
.mt-prompts { margin: 0; padding: 0 0 0 1.2em; font-size: 13.5px; }
.mt-prompts li { padding: 3px 0; }
.mt-method { margin: 0; }
.mt-method div { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.mt-method dt { font-weight: 700; }
.mt-method dd { margin: 2px 0 0; color: var(--sec); font-size: 13.5px; }
.mt-about p { margin: 0 0 12px; max-width: 76ch; }
.mt-axes { margin: 0 0 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
.mt-axes div { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.mt-axes dt { color: var(--sec); flex: 0 0 3em; }
.mt-axes dd { margin: 0; font-weight: 600; }
.mt-risk { color: var(--sec) !important; font-size: 13px !important; }
.mt-risk b { display: block; color: var(--ink); font-size: 12px; margin-bottom: 2px; }
.mt-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 6px solid var(--ink); margin-top: 20px; font-size: 12px; color: var(--sec); }
.mt-foot a { color: var(--ink); font-weight: 700; }

/* ---- 动效：站点点亮。只淡内容，不淡 ::before 线路，否则线会一段段消失。 ---- */
.mt-stop > i, .mt-stop > .mt-stop-a, .mt-stop > .mt-shot, .mt-stop > div,
.mt-major > i, .mt-major > div { opacity: .35; transition: opacity .4s ease var(--d, 0ms); }
.mt-stop.mt-on > i, .mt-stop.mt-on > .mt-stop-a, .mt-stop.mt-on > .mt-shot, .mt-stop.mt-on > div,
.mt-major.mt-on > i, .mt-major.mt-on > div,
.mt-strip-k .mt-stop > i, .mt-strip-k .mt-stop > div { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .mt-stop > i, .mt-stop > .mt-stop-a, .mt-stop > .mt-shot, .mt-stop > div,
  .mt-major > i, .mt-major > div { opacity: 1 !important; transition: none !important; }
  .mt-l, .mt-st { transition: none; }
  .mt-train { animation: none !important; opacity: 0 !important; }
}

/* ---- 响应式 ---- */
@media (max-width: 1000px) {
  .mt-notice-bar { grid-template-columns: 1fr; }
  .mt-lines { grid-template-columns: 1fr 1fr; }
  .mt-two { grid-template-columns: 1fr; }
  .mt-axes { grid-template-columns: 1fr 1fr; }
  .mt-transfer { justify-content: flex-start; max-width: none; }
  .mt-transfer-l { text-align: left; }
}
@media (max-width: 640px) {
  .mt-brand h1 { font-size: 20px; }
  .mt-lines { grid-template-columns: 1fr; }
  .mt-legend { grid-template-columns: 1fr 1fr; }
  .mt-strip { padding-left: 46px; }
  .mt-strip > li::before { left: -31px; width: 8px; }
  .mt-strip > li > i { left: -46px; margin-left: 14px; }
  .mt-major > i { margin-left: 6px !important; }
  .mt-stop > i { margin-left: 11px !important; }
  .mt-tS > i { margin-left: 8px !important; }
  .mt-tB > i { margin-left: 13px !important; }
  .mt-stop-k > i { margin-left: 11px !important; }
  .mt-stop-k.mt-term > i { margin-left: 8px !important; }
  .mt-stop { grid-template-columns: 1fr; }
  .mt-shot { display: none; }
  .mt-rhead { grid-template-columns: auto minmax(0, 1fr); }
  .mt-rhead h2 { font-size: 24px; }
  .mt-axes { grid-template-columns: 1fr; }
  .mt-query { position: static; }
}
