/* CityLab: cities you arrive in by train. Shared by the hub and each ride's about page.
   Railway-poster palette over the site's editorial layer: deep teal, cream paper, copper, signal green.
   Load this AFTER editorial.css. Every rule is scoped under .citylab-page so the editorial link and
   text colours never win against it (that was why buttons and the dark board lost their text). */
.citylab-page {
  --cl-ink: #13262a; --cl-teal: #1d5c63; --cl-deep: #0f2a2e; --cl-cream: #f4ecd8; --cl-paper: #fbf7ee;
  --cl-copper: #b8683a; --cl-copper-2: #e39a5f; --cl-signal: #2f8a4f; --cl-amber: #ffc46b;
  --cl-muted: #5b6967; --cl-body: #2c3b3d; --cl-rule: #ddd2bb; --cl-card: #fffdf8;
  --cl-serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --cl-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--cl-paper);
  color: var(--cl-body);
}
.citylab-page .citylab-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.citylab-page img { max-width: 100%; }
.citylab-page code { font-family: var(--cl-mono); font-size: .9em; background: rgba(29, 92, 99, .08); padding: .05em .35em; border-radius: 4px; }

/* ---------- the lab bar under the site nav ---------- */
.citylab-page .citylab-header { border-bottom: 1px solid var(--cl-rule); background: var(--cl-cream); position: relative; z-index: 2; }
.citylab-page .citylab-header-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding: 12px 0; }
.citylab-page a.citylab-home { font-family: var(--cl-serif); font-weight: 700; font-size: 1.2rem; color: var(--cl-ink); text-decoration: none; letter-spacing: -.01em; }
.citylab-page .citylab-home span { color: var(--cl-copper); }
.citylab-page .citylab-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; }
.citylab-page .citylab-nav a { color: var(--cl-teal); text-decoration: none; font-weight: 650; }
.citylab-page .citylab-nav a:hover, .citylab-page .citylab-nav a:focus-visible { color: var(--cl-copper); text-decoration: underline; }

/* ---------- type ---------- */
.citylab-page .cl-eyebrow, .citylab-page .citylab-eyebrow { margin: 0 0 .6rem; color: var(--cl-copper); font-size: .74rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.citylab-page h1, .citylab-page h2, .citylab-page h3, .citylab-page h4 { font-family: var(--cl-serif); color: var(--cl-ink); letter-spacing: -.01em; }
.citylab-page h1 { margin: 0; font-size: clamp(2.3rem, 5.2vw, 3.8rem); line-height: 1.02; letter-spacing: -.02em; }
.citylab-page h1 em { color: var(--cl-teal); }
.citylab-page h2 { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.1; }
.citylab-page p { line-height: 1.65; color: var(--cl-body); }
.citylab-page main a { color: var(--cl-teal); text-decoration-color: rgba(29, 92, 99, .35); text-underline-offset: .17em; }
.citylab-page main a:hover { color: var(--cl-copper); text-decoration-color: currentColor; }
.citylab-page .cl-deck, .citylab-page .citylab-deck { max-width: 44rem; font-size: 1.05rem; }
.citylab-page .cl-lede, .citylab-page .citylab-lede { margin: 1rem 0 1.2rem; font-size: 1.12rem; line-height: 1.6; max-width: 34rem; }

/* ---------- buttons ---------- */
.citylab-page .cl-actions, .citylab-page .citylab-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 1.2rem; }
.citylab-page a.cl-button, .citylab-page a.citylab-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--cl-teal); color: #fff; border: 2px solid var(--cl-teal); font-weight: 700; text-decoration: none; line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s;
}
.citylab-page a.cl-button:hover, .citylab-page a.cl-button:focus-visible,
.citylab-page a.citylab-button:hover, .citylab-page a.citylab-button:focus-visible { background: var(--cl-deep); border-color: var(--cl-deep); color: #fff; }
.citylab-page a.cl-button.is-quiet, .citylab-page a.citylab-button.secondary { background: transparent; color: var(--cl-teal); }
.citylab-page a.cl-button.is-quiet:hover, .citylab-page a.citylab-button.secondary:hover { background: var(--cl-teal); color: #fff; }
.citylab-page a.citylab-link { color: var(--cl-copper); font-weight: 650; }

/* ---------- hero ---------- */
.citylab-page .cl-hero, .citylab-page .citylab-hero { padding: 48px 0 40px; background: linear-gradient(180deg, var(--cl-cream), var(--cl-paper)); }
.citylab-page .cl-hero-grid, .citylab-page .citylab-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: center; }
.citylab-page .cl-hero-figure, .citylab-page .citylab-figure { margin: 0; }
.citylab-page .cl-hero-figure img, .citylab-page .citylab-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; box-shadow: 0 20px 50px rgba(19, 38, 42, .22); background: #20393c; }
.citylab-page .cl-hero-figure figcaption, .citylab-page .citylab-figure figcaption { margin-top: .6rem; font-size: .86rem; line-height: 1.45; color: var(--cl-muted); }
.citylab-page .cl-counter { margin: 0; font: 600 .82rem var(--cl-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--cl-muted); }
.citylab-page .cl-counter strong { color: var(--cl-signal); font-size: 1.05rem; }

/* ---------- sections ---------- */
.citylab-page .cl-section, .citylab-page .citylab-section { padding: 52px 0; }
.citylab-page .citylab-section + .citylab-section { border-top: 1px solid var(--cl-rule); }
.citylab-page .cl-tint { background: var(--cl-cream); border-top: 1px solid var(--cl-rule); border-bottom: 1px solid var(--cl-rule); }
.citylab-page .cl-dark { background: var(--cl-deep); }
.citylab-page .cl-dark h2 { color: #fff; }
.citylab-page .cl-dark p { color: #cdd8d4; }
.citylab-page .cl-dark .cl-eyebrow { color: var(--cl-copper-2); }

/* ---------- the departure board ---------- */
.citylab-page .cl-board { margin: 1.4rem 0 0; padding: 6px; list-style: none; border-radius: 14px; background: #0a1d20; box-shadow: inset 0 0 0 1px rgba(255, 196, 107, .15), 0 18px 40px rgba(0, 0, 0, .25); }
.citylab-page .cl-board-row { display: grid; grid-template-columns: 56px minmax(0, 15rem) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 9px; font-family: var(--cl-mono); color: #e8dcc0; }
.citylab-page .cl-board-row + .cl-board-row { border-top: 1px dashed rgba(232, 220, 192, .14); border-radius: 0 0 9px 9px; }
.citylab-page .cl-board-no { font-size: 1.45rem; font-weight: 700; color: var(--cl-amber); }
.citylab-page .cl-board-name { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.citylab-page .cl-board-name a { color: #fff; text-decoration: none; border-bottom: 2px solid var(--cl-amber); }
.citylab-page .cl-board-name a:hover { color: var(--cl-amber); }
.citylab-page .cl-board-route { font-size: .88rem; color: #b9c6c1; line-height: 1.45; }
.citylab-page .cl-board-status { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8fe3a0; white-space: nowrap; padding: 4px 9px; border: 1px solid currentColor; border-radius: 6px; }
.citylab-page .cl-board-row.is-later .cl-board-no, .citylab-page .cl-board-row.is-later .cl-board-name { color: #8b9a96; }
.citylab-page .cl-board-row.is-later .cl-board-status { color: #8b9a96; }

/* ---------- a city card ---------- */
.citylab-page .cl-city { margin-top: 1.6rem; padding: clamp(18px, 3vw, 32px); background: var(--cl-card); border: 1px solid var(--cl-rule); border-radius: 18px; box-shadow: 0 10px 30px rgba(19, 38, 42, .07); }
.citylab-page .cl-city + .cl-city { margin-top: 2.4rem; }
.citylab-page .cl-city-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.citylab-page .cl-city-figure { margin: 0; }
.citylab-page .cl-city-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #20393c; }
.citylab-page .cl-city h3 { margin: 0; font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.05; }
.citylab-page .cl-city-route { margin: .35rem 0 0; font: 600 .86rem var(--cl-mono); color: var(--cl-teal); }
.citylab-page .cl-city-question { margin: .8rem 0 .4rem; font-family: var(--cl-serif); font-style: italic; font-size: 1.12rem; color: var(--cl-ink); }
.citylab-page .cl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: .9rem 0 0; padding: 0; list-style: none; }
.citylab-page .cl-tags li { padding: 3px 10px; border-radius: 999px; background: rgba(29, 92, 99, .09); color: var(--cl-teal); font-size: .78rem; font-weight: 650; }
.citylab-page .cl-sub { margin: 2rem 0 .8rem; font-size: 1.25rem; }

.citylab-page .cl-facts, .citylab-page .citylab-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.citylab-page .cl-facts li, .citylab-page .citylab-facts li { padding: 14px 16px; border-radius: 12px; background: var(--cl-cream); border: 1px solid var(--cl-rule); }
.citylab-page .cl-facts strong, .citylab-page .citylab-facts strong { display: block; font: 700 1.7rem var(--cl-serif); color: var(--cl-teal); }
.citylab-page .cl-facts span, .citylab-page .citylab-facts span { font-size: .86rem; color: var(--cl-muted); line-height: 1.4; }

.citylab-page .cl-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.citylab-page .cl-feature { --k: var(--cl-teal); padding: 16px 18px 6px; border-radius: 12px; background: #fff; border: 1px solid var(--cl-rule); border-top: 5px solid var(--k); }
.citylab-page .cl-feature[data-kind="ride"] { --k: var(--cl-teal); }
.citylab-page .cl-feature[data-kind="city"] { --k: #6a4fa0; }
.citylab-page .cl-feature[data-kind="shapes"] { --k: #c0392b; }
.citylab-page .cl-feature[data-kind="build"] { --k: var(--cl-copper); }
.citylab-page .cl-feature[data-kind="land"] { --k: var(--cl-signal); }
.citylab-page .cl-feature h4 { margin: 0 0 .5rem; font-size: 1.08rem; color: var(--k); }
.citylab-page .cl-feature ul { margin: 0; padding-left: 1.1rem; }
.citylab-page .cl-feature li { margin: 0 0 .55rem; font-size: .93rem; line-height: 1.5; color: var(--cl-body); }
.citylab-page .cl-feature li::marker { color: var(--k); }

.citylab-page .cl-controls { margin-top: 1.4rem; border: 1px solid var(--cl-rule); border-radius: 12px; background: var(--cl-cream); }
.citylab-page .cl-controls summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--cl-teal); }
.citylab-page .cl-controls dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 20px; margin: 0; padding: 0 16px 14px; }
.citylab-page .cl-controls dl div { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--cl-rule); font-size: .9rem; }
.citylab-page .cl-controls dt { min-width: 8.5rem; font-weight: 700; color: var(--cl-ink); }
.citylab-page .cl-controls dd { margin: 0; color: var(--cl-body); }

.citylab-page .cl-gallery, .citylab-page .citylab-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 1rem; }
.citylab-page .citylab-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.citylab-page .cl-gallery figure, .citylab-page .citylab-gallery figure { margin: 0; }
.citylab-page .cl-gallery img, .citylab-page .citylab-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #20393c; }
.citylab-page .cl-gallery figcaption, .citylab-page .citylab-gallery figcaption { margin-top: .4rem; font-size: .84rem; color: var(--cl-muted); line-height: 1.45; }

/* ---------- shared parts, lineage, rules ---------- */
.citylab-page .cl-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.citylab-page .cl-parts li { padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--cl-rule); }
.citylab-page .cl-parts strong { display: block; font-family: var(--cl-serif); font-size: 1.1rem; color: var(--cl-ink); }
.citylab-page .cl-where { display: block; margin-top: .15rem; font: 600 .76rem var(--cl-mono); color: var(--cl-copper); }
.citylab-page .cl-parts p { margin: .5rem 0 0; font-size: .9rem; line-height: 1.5; }

.citylab-page .cl-lineage, .citylab-page .lineage { margin: 1.2rem 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.citylab-page .cl-lineage li, .citylab-page .lineage li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 14px 16px; border-left: 4px solid var(--cl-copper); background: #fff; border-radius: 0 10px 10px 0; }
.citylab-page .cl-lineage strong, .citylab-page .lineage strong { color: var(--cl-ink); }
.citylab-page .cl-lineage p, .citylab-page .lineage p { margin: 0; }

.citylab-page .cl-placard { max-width: 620px; margin: 0 auto; padding: 28px 30px 22px; background: var(--cl-card); border: 2px solid var(--cl-ink); border-radius: 6px; box-shadow: 8px 8px 0 var(--cl-teal); }
.citylab-page .cl-placard h2 { margin: 0; text-align: center; text-transform: uppercase; letter-spacing: .08em; font-size: 1.5rem; }
.citylab-page .cl-placard-sub { margin: .2rem 0 1rem; text-align: center; font-style: italic; color: var(--cl-muted); }
.citylab-page .cl-rules { margin: 0; padding-left: 1.4rem; }
.citylab-page .cl-rules li { margin: 0 0 .6rem; line-height: 1.55; color: var(--cl-body); }
.citylab-page .cl-rules strong { color: var(--cl-ink); }
.citylab-page .cl-placard-sign { margin: 1rem 0 0; text-align: right; font-family: var(--cl-serif); font-style: italic; color: var(--cl-copper); }

/* ---------- the notebook: City Explorer notes, oldest first ---------- */
.citylab-page .cl-notebook-section { padding-top: 12px; scroll-margin-top: 90px; }
.citylab-page .cl-notebook { margin: 1.4rem 0 0; padding: 0 0 0 26px; list-style: none; position: relative; display: grid; gap: 14px; }
.citylab-page .cl-notebook::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: repeating-linear-gradient(var(--cl-copper) 0 10px, transparent 10px 16px); }
.citylab-page .cl-notebook li { position: relative; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.citylab-page .cl-notebook li::before { content: ""; position: absolute; left: -24px; top: .45em; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 3px solid var(--cl-copper); }
.citylab-page .cl-notebook time { font-family: var(--cl-serif); font-style: italic; color: var(--cl-muted); font-size: .92rem; }
.citylab-page .cl-notebook a { font-weight: 700; color: var(--cl-ink); }
.citylab-page .cl-notebook p { margin: .2rem 0 0; color: var(--cl-body); line-height: 1.55; }
.citylab-page .cl-notebook-more { margin: 1.4rem 0 0; color: var(--cl-muted); font-size: .92rem; }
@media (max-width: 760px) {
  .citylab-page .cl-notebook li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- the ride's about page ---------- */
.citylab-page .stops { margin: 1.2rem 0 0; padding: 0; list-style: none; position: relative; }
.citylab-page .stops::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: linear-gradient(var(--cl-muted), var(--cl-copper)); }
.citylab-page .stops li { position: relative; padding: 0 0 18px 40px; }
.citylab-page .stops li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--cl-paper); border: 4px solid var(--cl-teal); }
.citylab-page .stops h3 { margin: 0; font-size: 1.2rem; }
.citylab-page .stops p { margin: .2rem 0 0; }
.citylab-page .controls { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .95rem; }
.citylab-page .controls th { text-align: left; vertical-align: top; padding: 9px 14px 9px 0; color: var(--cl-teal); white-space: nowrap; }
.citylab-page .controls td { padding: 9px 0; border-bottom: 1px solid var(--cl-rule); line-height: 1.5; color: var(--cl-body); }

/* ---------- footer ---------- */
.citylab-page .citylab-footer { padding: 28px 0 40px; border-top: 1px solid var(--cl-rule); background: var(--cl-cream); }
.citylab-page .citylab-footer p { margin: .3rem 0; color: var(--cl-muted); font-size: .92rem; line-height: 1.55; }
.citylab-page .citylab-footer a { color: var(--cl-teal); }

@media (max-width: 900px) {
  .citylab-page .cl-hero-grid, .citylab-page .citylab-hero-grid, .citylab-page .cl-city-head { grid-template-columns: 1fr; }
  .citylab-page .cl-facts, .citylab-page .citylab-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .citylab-page .cl-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .citylab-page .cl-lineage li, .citylab-page .lineage li { grid-template-columns: 1fr; gap: 4px; }
  .citylab-page .cl-board-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .citylab-page .cl-board-route { grid-column: 2 / -1; }
  .citylab-page .cl-board-status { grid-row: 1; grid-column: 3; justify-self: end; }
}
@media (max-width: 560px) {
  .citylab-page .citylab-gallery { grid-template-columns: 1fr; }
  .citylab-page .cl-gallery { gap: 10px; }
  .citylab-page .cl-gallery figcaption { font-size: .78rem; }
  .citylab-page .cl-hero, .citylab-page .citylab-hero { padding-top: 32px; }
  .citylab-page .cl-section, .citylab-page .citylab-section { padding: 40px 0; }
  .citylab-page .cl-board-row { gap: 6px 12px; padding: 12px 10px; }
  .citylab-page .cl-board-no { font-size: 1.15rem; }
  .citylab-page .cl-placard { padding: 22px 18px 18px; box-shadow: 5px 5px 0 var(--cl-teal); }
  .citylab-page .cl-controls dt { min-width: 7rem; }
}
@media (prefers-reduced-motion: reduce) { .citylab-page a.cl-button { transition: none; } }
@media print {
  .citylab-page .citylab-header, .citylab-page .cl-actions { display: none; }
  .citylab-page .cl-dark, .citylab-page .cl-board { background: #fff; box-shadow: none; }
  .citylab-page .cl-dark h2, .citylab-page .cl-board-row, .citylab-page .cl-board-name a { color: #000; }
}
