/* Tramline — Transit Map Editorial (tl-) */
:root {
  --tl-paper: #f3f1ea;
  --tl-gray: #eef1f4;
  --tl-ink: #111827;
  --tl-muted: #6b7280;
  --tl-teal: #14b8a6;
  --tl-blue: #2563eb;
  --tl-coral: #f97316;
  --tl-line-1: var(--tl-teal);
  --tl-line-2: var(--tl-blue);
  --tl-line-3: var(--tl-coral);
  --tl-grid: rgba(17, 24, 39, 0.06);
  --tl-display: "Outfit", system-ui, sans-serif;
  --tl-sans: "IBM Plex Sans", system-ui, sans-serif;
  --tl-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.tl-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--tl-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tl-ink);
  background: var(--tl-gray);
  -webkit-font-smoothing: antialiased;
}

body.tl-nav-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.tl-preview {
  background: var(--tl-ink);
  color: var(--tl-gray);
  text-align: center;
  padding: .45rem;
  font-size: .8rem;
}
.tl-preview a { text-decoration: underline; }

/* Header */
.tl-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.35rem;
}

.tl-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.tl-brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tl-teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}

.tl-brand-name {
  font-family: var(--tl-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

body.tl-body--map .tl-brand-name { color: var(--tl-ink); }

.tl-nav-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(238, 241, 244, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 4px;
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}
.tl-nav-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--tl-ink);
}

.tl-drawer {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: linear-gradient(160deg, var(--tl-ink) 0%, #1f2937 100%);
  color: var(--tl-gray);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .75rem;
  padding: 4rem 2rem;
}
.tl-drawer[hidden] { display: none !important; }
.tl-drawer-label {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .55;
  margin: 0 0 .5rem;
}
.tl-drawer a {
  font-family: var(--tl-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.tl-drawer a.is-active { opacity: .55; }
.tl-drawer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tl-line, var(--tl-teal));
  flex-shrink: 0;
}
.tl-search input {
  width: min(300px, 100%);
  border: 0;
  border-bottom: 1px solid rgba(238, 241, 244, 0.3);
  background: transparent;
  color: var(--tl-gray);
  padding: .5rem 0;
  font: inherit;
  margin-top: 1rem;
}
.tl-search input::placeholder { color: rgba(238, 241, 244, 0.45); }
.tl-admin { font-size: .85rem; opacity: .7; margin-top: .5rem; }

.tl-main { padding-top: 4.5rem; }

/* Labels */
.tl-label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tl-muted);
  margin: 0 0 .35rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.tl-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tl-teal);
}

/* Atlas hero */
.tl-atlas {
  position: relative;
  min-height: calc(100vh - 4.5rem);
  min-height: calc(100dvh - 4.5rem);
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(20, 184, 166, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(37, 99, 235, 0.06), transparent 55%),
    linear-gradient(180deg, var(--tl-paper) 0%, var(--tl-gray) 100%);
  overflow: hidden;
}

.tl-atlas-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--tl-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--tl-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 85%);
  pointer-events: none;
}

.tl-atlas-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.35rem 3rem;
}

@media (min-width: 900px) {
  .tl-atlas-inner {
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    min-height: calc(100vh - 4.5rem);
    min-height: calc(100dvh - 4.5rem);
    padding: 2rem 2.5rem;
  }
}

.tl-atlas-name {
  font-family: var(--tl-display);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0;
}

.tl-schematic {
  position: relative;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
  background: rgba(238, 241, 244, 0.65);
  backdrop-filter: blur(6px);
  padding: 1rem;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.06);
}

.tl-map { width: 100%; height: auto; display: block; }

.tl-map-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: tl-draw 2.2s var(--tl-ease) forwards;
}
.tl-map-line--b { animation-delay: .25s; }
.tl-map-line--c { animation-delay: .5s; }

@keyframes tl-draw {
  to { stroke-dashoffset: 0; }
}

.tl-map-terminus-ring {
  transform-origin: 340px 80px;
  animation: tl-pulse 3s ease-in-out infinite;
}

@keyframes tl-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: .6; }
}

.tl-terminus {
  margin-top: .5rem;
}

.tl-terminus-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--tl-ink);
  color: var(--tl-gray);
  padding: .25rem .55rem;
  border-radius: 3px;
  margin-bottom: .75rem;
}

.tl-terminus-title {
  font-family: var(--tl-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 .65rem;
}
.tl-terminus-title a:hover { color: var(--tl-teal); }

.tl-terminus-dek {
  color: var(--tl-muted);
  margin: 0 0 1rem;
  max-width: 38ch;
}

.tl-terminus-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--tl-display);
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .02em;
  padding: .55rem 1rem;
  background: var(--tl-teal);
  color: #fff;
  border-radius: 4px;
  transition: transform .2s var(--tl-ease), box-shadow .2s;
}
.tl-terminus-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.35);
}

/* Network lines */
.tl-network {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.35rem 4rem;
}

.tl-network-head {
  margin-bottom: 2.5rem;
}
.tl-network-head h2 {
  font-family: var(--tl-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.tl-line {
  margin-bottom: 2.75rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--tl-ease), transform .7s var(--tl-ease);
}
.tl-line.is-in,
[data-tl-reveal].is-in { opacity: 1; transform: none; }

.tl-line-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .85rem;
}

.tl-line-badge {
  display: grid;
  place-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tl-line-color, var(--tl-teal));
  color: #fff;
  font-family: var(--tl-display);
  font-weight: 700;
  font-size: .82rem;
}

.tl-line-name {
  font-family: var(--tl-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.tl-line-name a:hover { color: var(--tl-line-color, var(--tl-teal)); }

.tl-line-count {
  font-size: .78rem;
  color: var(--tl-muted);
  letter-spacing: .04em;
}

.tl-line-track {
  position: relative;
  height: 4px;
  margin-bottom: 1.25rem;
}
.tl-line-rail {
  display: block;
  height: 100%;
  background: var(--tl-line-color, var(--tl-teal));
  border-radius: 2px;
  opacity: .85;
}
.tl-line--flat .tl-line-track {
  background: linear-gradient(90deg, var(--tl-teal), var(--tl-blue), var(--tl-coral));
  border-radius: 2px;
  opacity: .35;
}

.tl-line-stations {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

@media (min-width: 640px) {
  .tl-line-stations {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
  }
}

/* Station */
.tl-station-link {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .65rem .75rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.tl-station-link:hover {
  border-color: rgba(17, 24, 39, 0.08);
  background: rgba(243, 241, 234, 0.7);
}

.tl-station-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--tl-station-line, var(--tl-teal));
  margin-top: .25rem;
  transition: transform .2s var(--tl-ease);
}
.tl-station-link:hover .tl-station-dot { transform: scale(1.2); }

.tl-station-body { min-width: 0; flex: 1; }

.tl-station-code {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--tl-muted);
}

.tl-station-title {
  font-family: var(--tl-display);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: .15rem 0;
  line-height: 1.25;
}

.tl-station-dek {
  font-size: .82rem;
  color: var(--tl-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tl-station-thumb {
  display: block;
  margin-top: .5rem;
  width: 72px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
}
.tl-station-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article */
.tl-piece {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.35rem 4rem;
}

.tl-crumb {
  font-size: .82rem;
  color: var(--tl-muted);
  margin-bottom: 1.5rem;
}
.tl-crumb a:hover { color: var(--tl-teal); }

.tl-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  background: var(--tl-coral);
  color: #fff;
  padding: .2rem .5rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.tl-piece-title {
  font-family: var(--tl-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 .85rem;
}

.tl-piece-lede {
  font-size: 1.1rem;
  color: var(--tl-muted);
  margin: 0 0 1rem;
  line-height: 1.55;
}

.tl-byline {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .85rem;
  color: var(--tl-muted);
  margin-bottom: 1.75rem;
}

.tl-piece-cover {
  margin: 0 0 2rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.08);
}
.tl-piece-cover img { width: 100%; }

.tl-prose {
  font-size: 1.05rem;
  line-height: 1.75;
}
.tl-prose p { margin: 0 0 1.25rem; }
.tl-prose h2, .tl-prose h3 {
  font-family: var(--tl-display);
  letter-spacing: -0.02em;
  margin: 2rem 0 .75rem;
}
.tl-prose a { color: var(--tl-blue); text-decoration: underline; }
.tl-prose img { border-radius: 6px; margin: 1.5rem 0; }

.tl-related {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.35rem 4rem;
}

/* Archive */
.tl-archive {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.35rem 4rem;
}

.tl-archive-title {
  font-family: var(--tl-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.tl-empty {
  color: var(--tl-muted);
  font-style: italic;
}

/* Footer */
.tl-footer {
  text-align: center;
  padding: 2.5rem 1.35rem 3rem;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  background: var(--tl-paper);
}
.tl-footer-brand {
  font-family: var(--tl-display);
  font-weight: 700;
  margin: 0 0 .25rem;
}
.tl-footer-tag {
  font-size: .82rem;
  color: var(--tl-muted);
  margin: 0 0 .75rem;
}
.tl-footer a {
  font-size: .85rem;
  color: var(--tl-teal);
  font-weight: 500;
}

/* Reveal */
[data-tl-reveal],
.tl-atlas-inner {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s var(--tl-ease), transform .65s var(--tl-ease);
}
[data-tl-reveal].is-in,
.tl-atlas-inner.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tl-map-line,
  .tl-map-terminus-ring { animation: none; stroke-dashoffset: 0; }
  [data-tl-reveal], .tl-atlas-inner, .tl-line { opacity: 1; transform: none; transition: none; }
  .tl-station-link:hover .tl-station-dot { transform: none; }
  .tl-terminus-cta:hover { transform: none; }
}
/* === ARTICLE READ v2 — Ticket de trajet === */
.tl-journey{max-width:860px;margin:0 auto;padding:1.25rem 1.25rem 3rem}
.tl-ticket{display:grid;grid-template-columns:18px 1fr 18px;background:#fff;border:1px solid #d1d5db;border-radius:12px;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,.06);margin-bottom:1.25rem}
.tl-ticket-punch{background:radial-gradient(circle at center,#eef1f4 6px,transparent 7px) center/100% 18px,#111827}
.tl-ticket-body{display:grid;grid-template-columns:1fr auto 1fr;gap:.5rem 1rem;align-items:center;padding:1rem 1.1rem;font-family:ui-monospace,monospace}
.tl-ticket-from,.tl-ticket-to{margin:0;font-weight:700;letter-spacing:.06em}
.tl-ticket-arrow{margin:0;opacity:.45}
.tl-ticket-code{grid-column:1/-1;margin:0;font-size:.75rem;opacity:.55}
.tl-ticket-date{grid-column:1/-1;margin:0;font-size:.75rem;opacity:.55}
.tl-journey-map{display:flex;align-items:center;gap:0;margin:0 0 1.5rem;padding:0 .5rem}
.tl-journey-dot{width:10px;height:10px;border-radius:50%;border:2px solid var(--tl-teal,#14b8a6);background:#fff;flex:0 0 auto}
.tl-journey-dot.is-here{background:var(--tl-teal,#14b8a6)}
.tl-journey-rail{flex:1;height:2px;background:#d1d5db}
/* === MEMBER NAV + RELATED FIX === */
.tl-header .member-nav-sep { width: 10px; height: 3px; border-radius: 99px; background: var(--tl-teal,#14b8a6); opacity: 1; }
.tl-header .member-nav-link {
  font-size: .78rem;
  font-weight: 700;
  color: var(--tl-ink,#111827);
  background: #fff;
  border: 2px solid var(--tl-teal,#14b8a6);
  border-radius: 999px;
  padding: .35rem .8rem;
}
.tl-header .member-nav-link--up { background: var(--tl-teal,#14b8a6); color: #fff; }
.tl-related .tl-line { opacity: 1; transform: none; }
.tl-related .tl-station { opacity: 1; transform: none; }
