@import url("https://miaoda.feishu.cn/fonts/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

/*
 * Visual direction: a cartographic research control desk.
 * World: transit maps, route traces, station nodes, evidence tables.
 * Materials: deep drafting-board blue, pale map paper, fine grid lines.
 * Signature: a continuous benchmark route with colored station nodes.
 * Existing content and leaderboard data remain untouched; this file only
 * changes hierarchy, readability, interaction states, and responsiveness.
 */

:root {
  --ink-950: #071c29;
  --ink-900: #0b2635;
  --ink-800: #123747;
  --ink-700: #285565;
  --ink-600: #4c6e79;
  --ink-500: #6d8991;
  --paper-50: #f7faf9;
  --paper-100: #eef5f3;
  --paper-200: #e0ece9;
  --paper-300: #ccdcd8;
  --white: #ffffff;
  --teal-700: #11727b;
  --teal-600: #168c95;
  --teal-500: #29a7ac;
  --teal-200: #a9dcdd;
  --teal-100: #dff1f0;
  --lime-600: #779b39;
  --lime-500: #96b858;
  --lime-200: #dce9bd;
  --lime-100: #eef4df;
  --coral-500: #ed7053;
  --coral-100: #fbe7e0;
  --gold-500: #d6a83b;
  --gold-100: #faf0cf;
  --violet-100: #ece9f5;
  --line: #d6e3e0;
  --shadow-sm: 0 10px 30px #0b26350d;
  --shadow-md: 0 24px 64px #071c2917;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --page: min(1420px, calc(100% - 48px));
  --reading: min(920px, calc(100% - 48px));
  --nav-height: 74px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body.maptab-body {
  margin: 0;
  background: var(--paper-50) !important;
  color: var(--ink-900) !important;
  font-family: "Manrope", "Noto Sans", system-ui, sans-serif !important;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.maptab-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(#168c9508 1px, transparent 1px),
    linear-gradient(90deg, #168c9508 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 720px);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--coral-500);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-950);
  font-weight: 700;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Navigation */
body.maptab-body .navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height) !important;
  border: 0 !important;
  border-bottom: 1px solid #ffffff18 !important;
  background: #071c29f2 !important;
  color: var(--white);
  backdrop-filter: blur(18px) saturate(135%);
  transition: box-shadow 180ms ease, background-color 180ms ease;
}

body.maptab-body .navbar.is-scrolled {
  background: #071c29fa !important;
  box-shadow: 0 16px 38px #071c2930;
}

.nav-shell {
  width: var(--page);
  min-height: var(--nav-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.maptab-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.maptab-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff2b;
  border-radius: 11px;
  background: #ffffff0d;
}

.maptab-brand-mark svg {
  width: 24px;
  height: 24px;
}

.maptab-brand small {
  display: block;
  margin-top: -2px;
  color: var(--teal-200);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a {
  position: relative;
  padding: 9px 12px;
  border-radius: 8px;
  color: #d8e6e7;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--teal-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--white);
  background: #ffffff0d;
}

.nav-links a.is-active::after {
  transform: scaleX(1);
}

.nav-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff26;
  border-radius: 10px;
  background: #ffffff0d;
  color: var(--white);
  cursor: pointer;
}

.nav-menu-button svg {
  width: 22px;
  height: 22px;
}

/* Hero */
.maptab-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 790px;
  background: var(--ink-950) !important;
  color: var(--white);
  font-family: "Manrope", sans-serif !important;
}

.maptab-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.85;
  background:
    radial-gradient(circle at 76% 26%, #29a7ac2b 0 1px, transparent 2px),
    radial-gradient(circle at 20% 70%, #96b85820 0 1px, transparent 2px),
    linear-gradient(120deg, #071c29 0%, #0a2938 55%, #092430 100%);
  background-size: 34px 34px, 52px 52px, auto;
}

.maptab-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 180px;
  background: linear-gradient(to bottom, transparent, #071c298f);
}

.map-route-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  pointer-events: none;
}

.route-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-path.base {
  stroke: #ffffff12;
  stroke-width: 22;
}

.route-path.primary {
  stroke: var(--teal-500);
  stroke-width: 3;
  stroke-dasharray: 12 14;
}

.route-path.secondary {
  stroke: var(--lime-500);
  stroke-width: 2;
  opacity: 0.72;
}

.route-node {
  fill: var(--ink-950);
  stroke-width: 3;
}

.route-node.teal { stroke: var(--teal-200); }
.route-node.lime { stroke: var(--lime-200); }
.route-node.coral { stroke: var(--coral-500); }

.maptab-hero .hero-body {
  position: relative;
  width: var(--page);
  margin: 0 auto;
  padding: 84px 0 188px !important;
}

.maptab-hero .container,
.maptab-hero .columns,
.maptab-hero .column {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.maptab-hero .column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 8px 12px;
  border: 1px solid #a9dcdd42;
  border-radius: 999px;
  background: #dff1f00d;
  color: var(--teal-200);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral-500);
  box-shadow: 0 0 0 5px #ed70531c;
}

.maptab-hero .publication-title {
  max-width: 1210px !important;
  margin: 0 auto 34px !important;
  color: var(--white) !important;
  font-family: "Space Grotesk", sans-serif !important;
  font-size: clamp(2.45rem, 4.6vw, 4.25rem) !important;
  font-weight: 600 !important;
  line-height: 0.98 !important;
  letter-spacing: -0.065em !important;
  text-align: center !important;
}

.maptab-title-line {
  white-space: normal !important;
}

.maptab-title-line:first-child {
  color: var(--white);
}

.maptab-title-line:last-child {
  margin-top: 0.12em;
  color: var(--teal-200);
}

.maptab-author-names {
  max-width: 1050px !important;
  margin: 0 auto 18px !important;
  color: #e8f1f1 !important;
  font-size: clamp(0.94rem, 1.25vw, 1.08rem) !important;
  font-weight: 500 !important;
  line-height: 1.9 !important;
}

.maptab-author-names strong {
  font-weight: 600;
}

.maptab-author-names a {
  color: var(--white) !important;
  text-decoration-color: var(--teal-500) !important;
}

.maptab-year {
  margin: 5px 0 18px !important;
  color: var(--coral-500) !important;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.77rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.maptab-affiliations {
  max-width: 980px !important;
  margin: 0 auto 10px !important;
  color: #afc4c8 !important;
  font-size: 0.84rem !important;
  line-height: 1.72 !important;
}

.maptab-author-notes {
  max-width: 820px !important;
  margin: 8px auto 0 !important;
  color: #91aeb4 !important;
  font-size: 0.78rem !important;
}

.maptab-email {
  color: var(--teal-200) !important;
  font-family: "IBM Plex Mono", monospace !important;
}

.maptab-logo-row {
  order: 2;
  width: min(920px, 100%);
  margin: 40px auto 0 !important;
  padding: 18px 24px;
  border: 1px solid #ffffff17;
  border-radius: 18px;
  background: #ffffff08;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 12px 34px !important;
  backdrop-filter: blur(8px);
}

.maptab-logo-line {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 18px !important;
}

.maptab-logo-row figure {
  height: 64px;
  margin: 0 !important;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f7faf9;
  overflow: hidden;
}

.maptab-logo-row img {
  width: min(150px, 85%) !important;
  height: 46px !important;
  object-fit: contain !important;
  mix-blend-mode: multiply;
}

.maptab-link-row {
  order: 1;
  margin-top: 28px !important;
  gap: 10px !important;
}

.maptab-pill {
  min-height: 46px;
  gap: 9px;
  padding: 12px 18px !important;
  border: 1px solid #ffffff2b !important;
  border-radius: 12px !important;
  background: #ffffff0d !important;
  color: var(--white) !important;
  font-family: "Manrope", sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease !important;
}

.maptab-pill:first-child {
  border-color: var(--teal-500) !important;
  background: var(--teal-600) !important;
}

.maptab-pill:hover {
  transform: translateY(-2px);
  border-color: #ffffff5c !important;
  background: #ffffff1a !important;
}

.maptab-pill:first-child:hover {
  background: var(--teal-700) !important;
}

.maptab-pill svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.hero-metrics {
  order: 3;
  width: min(1040px, 100%);
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid #ffffff17;
  border-radius: 16px;
  background: #0618229c;
  overflow: hidden;
}

.hero-metric {
  position: relative;
  padding: 19px 22px 18px;
  text-align: left;
}

.hero-metric + .hero-metric {
  border-left: 1px solid #ffffff14;
}

.hero-metric strong {
  display: block;
  color: var(--white);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.hero-metric span {
  display: block;
  margin-top: 4px;
  color: #91aeb4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 30px;
  height: 3px;
  background: var(--teal-500);
}

.hero-metric:nth-child(2)::before,
.hero-metric:nth-child(4)::before {
  background: var(--lime-500);
}

.hero-metric:nth-child(3)::before {
  background: var(--coral-500);
}

/* Overview image */
.maptab-teaser {
  position: relative;
  z-index: 3;
  margin-top: -126px;
  background: transparent !important;
}

.maptab-teaser .container {
  width: var(--page);
  max-width: none !important;
}

.maptab-teaser .hero-body {
  padding: 0 !important;
}

.maptab-reading-col {
  width: 100% !important;
  max-width: none !important;
  padding: 14px;
  border: 1px solid #c9ddda;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 10px 18px;
}

.overview-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-800);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-label::before {
  content: "";
  width: 20px;
  height: 3px;
  background: var(--coral-500);
}

.overview-key {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-600);
  font-size: 0.75rem;
  font-weight: 600;
}

.overview-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overview-key i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
}

.overview-key span:last-child i {
  background: var(--lime-500);
}

.maptab-teaser-img {
  width: 100% !important;
  border: 1px solid var(--paper-200);
  border-radius: 17px;
  background: var(--paper-50);
}

.maptab-teaser .content {
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: 24px 26px 16px;
  color: var(--ink-700) !important;
  font-size: clamp(0.98rem, 1.5vw, 1.1rem) !important;
  line-height: 1.75 !important;
  text-align: center !important;
  text-wrap: pretty;
}

/* Shared sections */
body.maptab-body .section {
  padding: 104px 0 !important;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--teal-700);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}

body.maptab-body .section h2.title,
.maptab-lb-section h2.title {
  margin: 0 !important;
  color: var(--ink-950) !important;
  font-family: "Space Grotesk", sans-serif !important;
  font-size: clamp(2rem, 4vw, 3.55rem) !important;
  font-weight: 600 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.045em !important;
  text-align: left !important;
}

.maptab-abstract {
  position: relative;
  overflow: hidden;
}

.maptab-abstract::after {
  content: "";
  position: absolute;
  top: 94px;
  right: max(24px, calc((100vw - 1320px) / 2));
  width: 180px;
  height: 180px;
  border: 1px solid var(--paper-300);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px var(--paper-50),
    0 0 0 23px var(--paper-300),
    0 0 0 48px var(--paper-50),
    0 0 0 49px var(--paper-300);
  opacity: 0.48;
  pointer-events: none;
}

.maptab-abstract .container {
  position: relative;
  z-index: 1;
  width: var(--page);
  max-width: 1240px !important;
  display: grid;
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1.5fr);
  gap: 90px;
  align-items: start;
}

.maptab-abstract .content {
  position: relative;
  max-width: none !important;
  margin: 7px 0 0 !important;
  padding: 28px 0 0 34px;
  border-left: 3px solid var(--teal-500);
  color: var(--ink-700) !important;
  font-size: clamp(1.03rem, 1.35vw, 1.16rem) !important;
  line-height: 1.9 !important;
  text-align: left !important;
  text-wrap: pretty;
}

.maptab-abstract .content::before {
  content: "328 maps / 200,736 queries / 4 criteria";
  position: absolute;
  top: 0;
  left: 34px;
  color: var(--ink-500);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}



/* Hero clarity pass: keep the map signature below the reading plane. */
.maptab-hero {
  background: #081f2d !important;
}

.maptab-hero::before {
  opacity: 1;
  background: linear-gradient(180deg, #081f2d 0%, #0a2634 62%, #0a2b38 100%);
}

.maptab-hero::after {
  height: 260px;
  background: linear-gradient(to bottom, transparent, #071c29c7);
}

.map-route-art {
  inset: auto 0 0;
  height: 54%;
  opacity: 0.25;
  filter: saturate(0.72);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 100%);
}

.route-path.base {
  stroke: #d9eeee18;
  stroke-width: 16;
}

.route-path.primary {
  stroke: #78c7c8;
  stroke-width: 2.5;
  stroke-dasharray: 16 18;
}

.route-path.secondary {
  display: none;
}

.route-node {
  fill: #0a2634;
  stroke-width: 2;
}

.route-node.teal,
.route-node.lime {
  stroke: #b6d6d6;
}

.route-node.coral {
  stroke: #e2a08f;
}

.hero-kicker {
  background: #0d2d39;
}

.maptab-hero .publication-title {
  text-shadow: 0 3px 24px #04101842;
}

.maptab-logo-row {
  background: #0a2430eb;
}

.hero-metrics {
  background: #061a24eb;
}

@media (max-width: 560px) {
  .map-route-art {
    height: 46%;
    opacity: 0.18;
  }
}
