:root{--red:#b91c1c;--green:#059669;--blue:#2563eb;--sand:#f8f4ec;--night:#07111f}.brand-logo{display:block;width:min(245px,52vw);height:auto}.footer-brand{filter:brightness(0) invert(1);opacity:.96;max-width:240px;height:auto}.site-footer{background:var(--night)}.footer-columns{display:grid;gap:2rem}.footer-columns section h2{font-size:1rem;color:#fff}.footer-columns nav{display:grid;gap:.4rem}.footer-columns a{color:#d8e2ee;text-decoration:none}.footer-columns a:hover{text-decoration:underline}.footer-bottom{border-top:1px solid rgba(255,255,255,.14);margin-top:2rem;padding-top:1.25rem;display:flex;justify-content:space-between;gap:1rem;color:#91a2b7;font-size:.8rem}.dubai-hero{background:radial-gradient(circle at 85% 10%,rgba(5,150,105,.13),transparent 26%),radial-gradient(circle at 15% 80%,rgba(185,28,28,.09),transparent 30%),linear-gradient(135deg,#fbfcfe,#f4f8fb)}.dubai-hero h1{max-width:820px}.quick small,.quick strong{display:block}.quick small{color:var(--muted)}.network-band{background:#0b1728;color:#dbe7f4}.network-band h2{color:#fff;font-size:clamp(1.8rem,4vw,3rem);line-height:1.1}.network-band p{color:#afbed0}.network-band .fact-grid div{background:rgba(255,255,255,.05)}.network-band .fact-grid strong{color:#fff}.network-band .button.secondary{background:#fff;color:#102a43}.legacy-chip{display:inline-flex;margin-top:1rem;padding:.55rem .8rem;border-radius:999px;background:#fff;border:1px solid var(--border);font-size:.86rem}.station-facts,.line-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:.75rem;margin-bottom:2rem}.station-facts div,.line-summary div{padding:1rem;border:1px solid var(--border);border-radius:14px;background:#fff}.station-facts span,.station-facts strong,.line-summary span,.line-summary strong{display:block}.station-facts span,.line-summary span{color:var(--muted);font-size:.8rem}.station-facts strong{font-size:1.05rem}.line-summary strong{font-size:1.45rem}.neighbor-grid,.featured-routes{display:grid;grid-template-columns:repeat(2,1fr);gap:.75rem}.neighbor-grid a,.route-snippet{display:flex;flex-direction:column;padding:1rem;border:1px solid var(--border);border-radius:12px;text-decoration:none;color:var(--ink);background:#fff}.neighbor-grid small,.neighbor-grid span,.route-snippet span{color:var(--muted);font-size:.82rem}.sticky-card{position:sticky;top:98px}.sticky-card hr{border:0;border-top:1px solid var(--border);margin:1.25rem 0}.line-route-block{margin:1.5rem 0;padding:1rem;border:1px solid var(--border);border-radius:14px}.line-route-block h3{margin-top:0}.line-route-block h3 small{display:block;color:var(--muted);font-weight:500}.compact-stops{display:flex;gap:.5rem;flex-wrap:wrap;padding:0;list-style:none}.compact-stops li{padding:.35rem .55rem;border-radius:8px;background:var(--bg);font-size:.8rem}.compact-stops .current-stop{background:#fee2e2;outline:2px solid var(--red)}.station-filter{max-width:660px;margin-bottom:2rem}.station-groups{display:grid;gap:3rem}.station-directory{display:grid;grid-template-columns:repeat(3,1fr);gap:.8rem}.line-title{display:flex;gap:.65rem;align-items:center;margin-bottom:1rem}.line-title h2{margin:0}.line-title i{width:14px;height:14px;border-radius:50%}.red-line-title i{background:var(--red)}.green-line-title i{background:var(--green)}.interchange-title i{background:linear-gradient(90deg,var(--red) 50%,var(--green) 50%)}.line-title span{color:var(--muted);font-size:.82rem}.fare-planner{margin-top:3rem}.fare-detail{font-size:.88rem;color:var(--muted)}.map-key{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem}.map-key span{display:flex;align-items:center;gap:.4rem;font-weight:700;font-size:.85rem}.map-key i{width:28px;height:6px;border-radius:99px}.red-key{background:var(--red)}.green-key{background:var(--green)}.interchange-key{background:linear-gradient(90deg,var(--red) 50%,var(--green) 50%)}.metro-map-scroll{overflow:auto;border:1px solid var(--border);border-radius:18px;background:#fbfcfe;padding:1.25rem}.map-route{min-width:1200px;margin:1.5rem 0 3rem}.map-route header{display:flex;gap:1rem;align-items:baseline;margin-bottom:1rem}.map-route header strong{font-size:1.25rem}.map-route header span{color:var(--muted)}.map-stops{display:flex;align-items:flex-start;position:relative;padding-top:.4rem}.map-stops:before{content:"";position:absolute;left:0;right:0;top:13px;height:8px;border-radius:999px}.red-route .map-stops:before{background:var(--red)}.green-route .map-stops:before{background:var(--green)}.map-node{position:relative;z-index:1;flex:1;min-width:74px;text-align:center;text-decoration:none;color:var(--ink)}.map-node i{display:block;width:22px;height:22px;border:5px solid;margin:0 auto .6rem;border-radius:50%;background:#fff}.red-route .map-node i{border-color:var(--red)}.green-route .map-node i{border-color:var(--green)}.map-node.is-interchange i{border-color:var(--night);box-shadow:inset 0 0 0 3px #fff}.map-node span{display:block;font-size:.68rem;line-height:1.15;font-weight:800;transform:rotate(-40deg);transform-origin:center;margin-top:1.2rem;white-space:nowrap}.map-node small{display:block;margin-top:2.7rem;color:var(--muted)}.line-overview-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}.metro-line-card{display:flex;align-items:center;gap:1rem;padding:1.4rem;border:1px solid var(--border);border-radius:16px;text-decoration:none;color:var(--ink);background:#fff}.metro-line-card h2{margin:.1rem 0}.metro-line-card p{margin:.2rem 0;color:var(--muted)}.line-badge{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;color:#fff;font-weight:900;font-size:1.25rem}.red-card .line-badge{background:var(--red)}.green-card .line-badge{background:var(--green)}.blue-card .line-badge{background:var(--blue)}.line-services-heading{margin-top:3rem}.red-head{border-top:6px solid var(--red)}.green-head{border-top:6px solid var(--green)}.service-route{margin:3rem 0}.vertical-line{list-style:none;padding:0;margin:1.5rem 0}.vertical-line li{display:grid;grid-template-columns:22px 1fr;gap:.8rem;position:relative;min-height:56px}.vertical-line li:not(:last-child):before{content:"";position:absolute;left:8px;top:18px;bottom:-2px;width:5px}.vertical-red li:not(:last-child):before{background:var(--red)}.vertical-green li:not(:last-child):before{background:var(--green)}.vertical-line i{width:20px;height:20px;border:5px solid;border-radius:50%;background:#fff;position:relative;z-index:1}.vertical-red i{border-color:var(--red)}.vertical-green i{border-color:var(--green)}.vertical-line a{text-decoration:none;color:var(--ink)}.vertical-line a strong,.vertical-line a small{display:block}.vertical-line a small{color:var(--muted)}.static-prose{max-width:840px}.content-section{margin-bottom:2.5rem}.content-links{display:flex;flex-direction:column;gap:.55rem}.content-links a{font-weight:750}.faq-list details{padding:1rem 0;border-bottom:1px solid var(--border)}.faq-list summary{font-weight:800}.static-cta{margin-top:3rem;padding:1.5rem;border-radius:18px;background:#f5f8fb;border:1px solid var(--border)}.source-line{margin-top:1.25rem;font-size:.82rem;color:var(--muted)}.narrow{max-width:780px}.back-to-top{position:fixed;right:18px;bottom:18px;width:42px;height:42px;padding:10px;border-radius:50%;z-index:30}.back-to-top svg{width:22px;fill:none;stroke:currentColor;stroke-width:2}.footer-cookie-settings{padding:0;background:none;color:#fff;justify-content:flex-start;font-weight:500}.cookie-consent{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:70}.cookie-consent-inner{max-width:960px;margin:auto;padding:1rem;border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:var(--shadow);display:flex;gap:1rem;align-items:center}.cookie-consent-copy{flex:1}.cookie-consent-copy p{margin:.2rem 0}.cookie-consent-actions{display:flex;gap:.5rem}.route-card h2{margin-top:.25rem}.route-card .eyebrow{margin-bottom:.2rem}.quick span{font-size:.8rem}.page-head p{max-width:800px}@media(min-width:760px){.footer-columns{grid-template-columns:2fr 1fr 1fr 1fr}}@media(max-width:900px){.station-directory{grid-template-columns:repeat(2,1fr)}.line-overview-grid{grid-template-columns:1fr}.station-facts,.line-summary{grid-template-columns:repeat(2,1fr)}}@media(max-width:640px){.station-directory,.neighbor-grid,.featured-routes{grid-template-columns:1fr}.station-facts,.line-summary{grid-template-columns:1fr 1fr}.footer-bottom{flex-direction:column}.cookie-consent-inner{align-items:stretch;flex-direction:column}.cookie-consent-actions{flex-direction:column}.map-node span{font-size:.64rem}.hero{padding:3rem 0}}
.gold-card .line-badge{background:#b88a16}.gold-card{border-color:#ead9a9}

.station-hero{padding:2.5rem 0 3.5rem;overflow:hidden;background:radial-gradient(circle at 84% 28%,rgba(215,25,32,.08),transparent 24%),linear-gradient(135deg,#f7fafc,#fff)}
.journey-directions{margin:1.25rem 0;padding:1rem 1.15rem;border:1px solid var(--border);border-radius:12px;background:var(--bg)}
.journey-directions h3{margin:0 0 .55rem;font-size:1rem}.journey-directions p{margin:.35rem 0;color:var(--muted)}
.station-hours{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;margin:1rem 0}
.station-hours div,.station-service-item{padding:1rem;border:1px solid var(--border);border-radius:12px;background:#fff}
.station-hours span,.station-hours strong,.station-hours small{display:block}.station-hours span,.station-hours small{color:var(--muted);font-size:.8rem}
.station-service-list{display:grid;gap:.75rem}.station-service-item p{margin:.35rem 0}.station-service-item .source-line,.station-details .source-line{margin-bottom:0}
@media(max-width:700px){.station-hours{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Phase 3: reconnect the existing component system and add Dubai line identity. */
:root {
    --ui: #0b5a74;
    --ui-dark: #07384d;
    --green-dark: #047857;
    --muted: #526b82;
    --border: #d2dde7;
    --control-border: #758da4;
    --surface-soft: #f4f7fa;
    --surface-tint: #eef5f8;
    --sand: #f7f0e4;
    --gold: #b7791f;
    --shadow-sm: 0 7px 20px rgba(16,42,67,.07);
    --shadow-md: 0 16px 42px rgba(16,42,67,.11);
    --shadow-lg: 0 28px 70px rgba(4,21,37,.16);
}

body {
    background: #f8fafc;
    background-image: linear-gradient(rgba(255,255,255,.7),rgba(255,255,255,.7)),radial-gradient(circle at 8% 12%,rgba(185,28,28,.045),transparent 24%),radial-gradient(circle at 92% 36%,rgba(5,150,105,.05),transparent 26%);
}

main { overflow: clip; }
h1,h2,h3 { color: var(--ink); }
h2 { line-height: 1.16; letter-spacing: -.025em; }
a,.station-card,.quick,.metro-line-card,.route-snippet,.neighbor-grid a { transition: color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease,background-color .2s ease; }
.metro-line-card .line-badge { flex: 0 0 52px; min-width: 52px; aspect-ratio: 1 / 1; }

button,.button {
    min-height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg,var(--primary),#8f161c);
    box-shadow: 0 8px 18px rgba(185,28,28,.18);
}
button:hover,.button:hover { filter: none; box-shadow: 0 11px 24px rgba(185,28,28,.25); transform: translateY(-1px); }
.button.secondary { border: 1px solid #b9cfdb; background: #fff; color: var(--ui-dark); box-shadow: var(--shadow-sm); }
.button.secondary:hover { border-color: var(--ui); background: #f2f8fa; box-shadow: var(--shadow-sm); }
.button.ghost { border: 1px solid var(--border); background: transparent; color: var(--ui-dark); box-shadow: none; }
.button.ghost:hover { border-color: var(--ui); background: #fff; box-shadow: var(--shadow-sm); }

input,select,textarea {
    border-color: var(--control-border);
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(16,42,67,.045);
}
input:hover,select:hover,textarea:hover { border-color: var(--ui); }
input:focus,select:focus,textarea:focus { border-color: var(--ui); box-shadow: 0 0 0 4px rgba(11,90,116,.11); }
select:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230b5a74' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}

.panel,.result,.route-card,.three article {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}
.section { position: relative; }
.section-head h2 { margin: .2rem 0 0; }
.section-head > a { font-weight: 800; text-decoration: none; }
.eyebrow { color: #925c08; }
.source-line { line-height: 1.55; }
.source-line a { font-weight: 700; }

.site-header {
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg,var(--red) 0 48%,var(--green) 52% 100%) 1;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 30px rgba(7,24,40,.09);
}
.site-header #main-nav { top: 100%; }
.site-header #main-nav a { border-radius: 9px; color: var(--ui-dark); }
.site-header #main-nav a:hover,.site-header #main-nav a[aria-current] { color: var(--primary); background: #fff2f2; }
.site-header #main-nav a::after { right: .35rem; left: .35rem; background: linear-gradient(90deg,var(--red),var(--green)); }
.menu-button { background: var(--night); box-shadow: none; }
.menu-button:hover { background: var(--ui-dark); box-shadow: none; }

.page-head {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #dbe5ed;
    background: radial-gradient(circle at 82% 16%,rgba(11,90,116,.12),transparent 25%),linear-gradient(135deg,#f8fbfd,#edf4f7);
}
.page-head::after {
    content: "";
    position: absolute;
    right: -6rem;
    bottom: -8rem;
    width: 22rem;
    height: 22rem;
    border: 2.5rem solid rgba(255,255,255,.55);
    border-radius: 50%;
    pointer-events: none;
}
.page-head .container { position: relative; z-index: 1; }
.page-stat-row,.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1.4rem;
}
.page-stat-row span,.hero-points span {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    padding: .48rem .7rem;
    border: 1px solid rgba(11,90,116,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.page-stat-row strong,.hero-points strong { color: var(--ink); }

.dubai-hero {
    position: relative;
    color: #fff;
    background: radial-gradient(circle at 80% 18%,rgba(5,150,105,.24),transparent 23%),radial-gradient(circle at 6% 88%,rgba(185,28,28,.28),transparent 29%),linear-gradient(135deg,#07111f 0%,#0a2638 62%,#0b4050 100%);
}
.dubai-hero::before,.dubai-hero::after { content: ""; position: absolute; right: -5%; height: 8px; border-radius: 99px; transform: rotate(-8deg); opacity: .8; }
.dubai-hero::before { top: 28%; width: 38%; background: var(--red); }
.dubai-hero::after { top: 36%; width: 31%; background: var(--green); }
.dubai-hero .container { position: relative; z-index: 1; }
.dubai-hero h1 { color: #fff; text-wrap: balance; }
.dubai-hero .hero-copy > p { color: #c7d7e4; }
.dubai-hero .eyebrow { color: #f6cb72; }
.dubai-hero .button.secondary { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); color: #fff; box-shadow: none; backdrop-filter: blur(8px); }
.dubai-hero .button.secondary:hover { background: rgba(255,255,255,.18); }
.dubai-hero .hero-points span { border-color: rgba(255,255,255,.17); background: rgba(255,255,255,.07); color: #bdd0df; }
.dubai-hero .hero-points strong { color: #fff; }
.route-card { position: relative; overflow: hidden; padding: clamp(1.3rem,3vw,2rem); border: 1px solid rgba(255,255,255,.65); box-shadow: var(--shadow-lg); }
.route-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg,var(--red) 0 48%,var(--green) 52% 100%); }
.route-card h2 { margin-bottom: .25rem; }
.route-card > p { margin-top: 0; color: var(--muted); font-size: .9rem; }

.quick-access-section { z-index: 3; padding: 0; }
.quick-access-section .quick-grid { position: relative; margin-top: -1.35rem; }
.quick {
    border: 1px solid var(--border);
    border-top: 4px solid var(--quick-color,var(--ui));
    background: #fff;
    box-shadow: var(--shadow-md);
}
.quick-map { --quick-color: var(--red); }
.quick-time { --quick-color: #2563eb; }
.quick-stations { --quick-color: var(--green); }
.quick-fares { --quick-color: var(--gold); }
.quick .quick-icon { background: color-mix(in srgb,var(--quick-color) 12%,white); color: var(--quick-color); }
.quick:hover,.quick:focus-visible { border-color: var(--quick-color); box-shadow: var(--shadow-md); }

.station-card {
    --station-color: var(--red);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--station-color);
    box-shadow: var(--shadow-sm);
}
.station-card.station-green { --station-color: var(--green); }
.station-card.station-interchange { --station-color: var(--night); }
.station-card.station-interchange::after { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg,var(--red) 0 50%,var(--green) 50%); }
.station-card .dot { border-color: var(--station-color); }
.station-card.station-interchange .dot { border: 0; background: linear-gradient(90deg,var(--red) 0 50%,var(--green) 50%); box-shadow: 0 0 0 3px #e6edf2; }
.station-card:hover,.station-card:focus-visible { border-color: var(--station-color); box-shadow: var(--shadow-md); transform: translateY(-3px); }

.network-band { border-block: 1px solid rgba(255,255,255,.08); background: radial-gradient(circle at 88% 18%,rgba(5,150,105,.19),transparent 25%),linear-gradient(135deg,#07111f,#0b2235); }
.network-band::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg,var(--red) 0 48%,var(--green) 52% 100%); }
.network-band .fact-grid div { border-color: rgba(255,255,255,.14); background: linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.035)); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.network-band .fact-grid strong { font-size: 2rem; }

.explore-lines-section { background: var(--sand); }
.line-explore-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin-top: 1.35rem; }
.network-cluster-card { --cluster-color: var(--red); display: flex; gap: 1rem; min-width: 0; padding: 1.3rem; border: 1px solid color-mix(in srgb,var(--cluster-color) 28%,#d8e1e8); border-top: 5px solid var(--cluster-color); border-radius: 18px; background: rgba(255,255,255,.88); box-shadow: var(--shadow-sm); }
.network-cluster-card h3 { margin: .1rem 0 .4rem; }
.network-cluster-card p { color: var(--muted); }
.network-cluster-card a { color: var(--cluster-color); font-weight: 800; text-decoration: none; }
.network-cluster-card .line-badge { flex: 0 0 48px; width: 48px; height: 48px; background: var(--cluster-color); }
.cluster-green { --cluster-color: var(--green-dark); }
.cluster-blue { --cluster-color: var(--blue); }
.cluster-gold { --cluster-color: var(--gold); }
.network-cluster-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.home-section-head { margin-bottom: 1.5rem; }
.home-section-head > div > p { max-width: 760px; margin: .55rem 0 0; color: var(--muted); }
.home-network-section { background: radial-gradient(circle at 88% 8%,rgba(5,150,105,.08),transparent 25%),linear-gradient(180deg,#fff,#f4f8fa); }
.home-network-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; }
.home-line-card { --line-color: var(--red); display: flex; min-width: 0; flex-direction: column; padding: clamp(1.25rem,3vw,1.75rem); border: 1px solid color-mix(in srgb,var(--line-color) 26%,var(--border)); border-top: 6px solid var(--line-color); border-radius: 20px; background: linear-gradient(145deg,color-mix(in srgb,var(--line-color) 5%,#fff),#fff 46%); box-shadow: var(--shadow-md); }
.home-line-green { --line-color: var(--green-dark); }
.home-line-card header { display: flex; align-items: center; gap: .85rem; }
.home-line-card header .line-badge { flex: 0 0 48px; width: 48px; height: 48px; background: var(--line-color); }
.home-line-card header small { display: block; color: var(--muted); font-weight: 750; }
.home-line-card h3 { margin: .05rem 0 0; font-size: 1.5rem; }
.home-line-card > p { color: #425b70; }
.home-line-diagram { margin: .45rem 0 1.1rem; padding: 1rem; border: 1px solid color-mix(in srgb,var(--line-color) 18%,var(--border)); border-radius: 14px; background: rgba(255,255,255,.82); }
.home-route-main { display: grid; grid-template-columns: auto minmax(50px,1fr) auto; align-items: center; gap: .6rem; color: var(--ink); font-size: .78rem; font-weight: 850; }
.home-route-main i { height: 7px; border-radius: 99px; background: var(--line-color); }
.home-route-branches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin: .8rem 0 0 34%; }
.home-route-branches span { display: grid; grid-template-columns: minmax(20px,1fr) auto; align-items: center; gap: .45rem; color: var(--ink); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.home-route-branches i { height: 5px; border-radius: 99px; background: var(--line-color); }
.home-line-facts { display: grid; gap: .55rem; margin: 0 0 1.15rem; padding: 0; list-style: none; color: #425b70; font-size: .9rem; }
.home-line-facts li { position: relative; padding-left: 1.15rem; }
.home-line-facts li::before { content: ""; position: absolute; top: .62rem; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--line-color); }
.home-card-link { display: inline-flex; width: fit-content; margin-top: auto; color: var(--ui-dark); font-weight: 850; text-decoration: none; }
.home-card-link:hover { text-decoration: underline; }
.home-line-card .home-card-link { color: var(--line-color); }
.home-network-math { margin: 1.25rem 0 0; padding: .9rem 1rem; border: 1px solid #c9dae3; border-radius: 14px; background: rgba(255,255,255,.82); color: var(--muted); text-align: center; }
.home-network-math strong { color: var(--ink); }

.home-essentials-section { background: #fff; }
.home-essentials-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.1rem; }
.home-essential-card { --essential-color: var(--ui); display: flex; min-width: 0; flex-direction: column; padding: clamp(1.2rem,3vw,1.6rem); border: 1px solid var(--border); border-top: 5px solid var(--essential-color); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.home-essential-card:hover { border-color: color-mix(in srgb,var(--essential-color) 42%,var(--border)); box-shadow: var(--shadow-md); }
.essential-hours { --essential-color: var(--blue); }
.essential-fares { --essential-color: var(--gold); }
.essential-airport { --essential-color: var(--red); }
.essential-changes { --essential-color: var(--green-dark); }
.home-essential-card header { display: flex; align-items: center; gap: .85rem; margin-bottom: .8rem; }
.home-essential-card header small { display: block; color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.home-essential-card h3 { margin: .05rem 0 0; font-size: 1.3rem; }
.essential-mark { display: grid; flex: 0 0 58px; width: 58px; height: 50px; place-items: center; border-radius: 13px; background: color-mix(in srgb,var(--essential-color) 12%,white); color: color-mix(in srgb,var(--essential-color) 84%,#000); font-size: .82rem; font-weight: 900; }
.home-essential-card > p { color: #4f6476; }
.home-hours-list { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.home-hours-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid #e5edf2; }
.home-hours-list dt { color: #425b70; font-size: .86rem; }
.home-hours-list dd { color: var(--ink); font-weight: 850; text-align: right; }
.home-hours-list dd small { display: block; color: var(--muted); font-size: .68rem; font-weight: 700; }
.home-fare-tiers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem; }
.home-fare-tiers div { padding: .75rem .55rem; border: 1px solid #ead9a9; border-radius: 12px; background: #fffaf0; text-align: center; }
.home-fare-tiers span,.home-fare-tiers strong { display: block; }
.home-fare-tiers span { color: #755b1d; font-size: .72rem; font-weight: 800; }
.home-fare-tiers strong { margin-top: .15rem; color: var(--ink); font-size: 1.05rem; }
.home-inline-links { display: flex; flex-wrap: wrap; gap: .45rem 1rem; margin-top: auto; }
.home-inline-links a { font-weight: 800; }
.home-connection-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.home-connection-list li { padding: .7rem; border: 1px solid #d7e6df; border-radius: 11px; background: #f5fbf8; }
.home-connection-list a,.home-connection-list span { display: block; }
.home-connection-list a { color: var(--green-dark); font-weight: 850; }
.home-connection-list span { color: var(--muted); font-size: .76rem; }

.home-popular { background: linear-gradient(180deg,#f5f8fa,#fff); }
.home-station-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.home-station-guide { --station-color: var(--red); display: flex; min-width: 0; min-height: 210px; flex-direction: column; padding: 1.2rem; border: 1px solid var(--border); border-top: 5px solid var(--station-color); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.home-station-guide.station-green { --station-color: var(--green-dark); }
.home-station-guide.station-interchange { --station-color: var(--night); background: linear-gradient(135deg,#fff5f5,#f4fbf8); }
.home-station-guide:hover,.home-station-guide:focus-visible { border-color: var(--station-color); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.home-station-meta { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .76rem; font-weight: 800; }
.home-station-meta i { width: 10px; height: 10px; border: 3px solid var(--station-color); border-radius: 50%; background: #fff; }
.home-station-guide > strong { margin-top: .65rem; font-size: 1.08rem; }
.home-station-guide p { margin: .4rem 0 1rem; color: var(--muted); font-size: .9rem; }
.home-station-guide > small { margin-top: auto; color: var(--station-color); font-weight: 850; }
.station-alias-note { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 1.1rem; padding: 1rem 1.2rem; border: 1px solid #d8cba9; border-left: 5px solid var(--gold); border-radius: 14px; background: #fffbef; }
.station-alias-note p { margin: .15rem 0 0; color: #645a42; }
.station-alias-note a { flex: 0 0 auto; font-weight: 850; }

.home-start-section { color: #dbe7f4; background: radial-gradient(circle at 8% 90%,rgba(185,28,28,.24),transparent 28%),radial-gradient(circle at 88% 12%,rgba(5,150,105,.21),transparent 25%),linear-gradient(135deg,#07111f,#0b2c3d); }
.home-start-section .eyebrow { color: #f6cb72; }
.home-start-section h2 { max-width: 620px; color: #fff; font-size: clamp(2rem,4vw,3.1rem); }
.home-start-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
.home-steps { display: grid; gap: .9rem; margin: 1.4rem 0 1.6rem; padding: 0; list-style: none; }
.home-steps li { display: grid; grid-template-columns: 42px 1fr; gap: .8rem; align-items: start; }
.home-steps li > span { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(255,255,255,.09); color: #fff; font-weight: 900; }
.home-steps strong { color: #fff; }
.home-steps p { margin: .15rem 0 0; color: #afc2d2; }
.home-start-links { display: grid; gap: .8rem; }
.home-start-links > a { display: grid; grid-template-columns: 52px 1fr; gap: .9rem; align-items: center; padding: 1rem; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; backdrop-filter: blur(8px); }
.home-start-links > a:hover,.home-start-links > a:focus-visible { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.13); }
.home-start-links > a > span { color: #f6cb72; font-size: 1.3rem; font-weight: 900; }
.home-start-links strong { display: block; }
.home-start-links p { margin: .1rem 0 0; color: #b7cad8; font-size: .88rem; }

.home-future-section { background: var(--sand); }
.home-future-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.home-future-card { --future-color: var(--blue); display: flex; gap: 1rem; min-width: 0; padding: 1.25rem; border: 1px solid color-mix(in srgb,var(--future-color) 28%,var(--border)); border-radius: 17px; background: rgba(255,255,255,.86); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.home-future-card.future-gold { --future-color: var(--gold); }
.home-future-card:hover,.home-future-card:focus-visible { border-color: var(--future-color); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.home-future-card .line-badge { flex: 0 0 48px; width: 48px; height: 48px; background: var(--future-color); }
.home-future-card small,.home-future-card strong,.home-future-card em { display: block; }
.home-future-card small { color: var(--future-color); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.home-future-card strong { margin-top: .1rem; font-size: 1.25rem; }
.home-future-card p { margin: .35rem 0 .65rem; color: var(--muted); }
.home-future-card em { color: var(--future-color); font-size: .84rem; font-style: normal; font-weight: 850; }

.home-faq-section { background: #fff; }
.faq-list.home-faq-list { max-width: none; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; border: 0; padding: 0; background: transparent; box-shadow: none; }
.faq-list.home-faq-list details { padding: 1rem 1.15rem; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.faq-list.home-faq-list details[open] { border-color: var(--ui); }
.faq-list.home-faq-list summary { color: var(--ink); }
.faq-list.home-faq-list p { color: var(--muted); }

.stations-head { background: radial-gradient(circle at 80% 15%,rgba(5,150,105,.12),transparent 25%),linear-gradient(135deg,#f9fbfc,#edf5f3); }
.station-directory-section { background: linear-gradient(180deg,#f8fafc,#fff); }
.station-filter { display: grid; grid-template-columns: minmax(220px,.75fr) minmax(300px,1.25fr); gap: 1.2rem 2rem; max-width: none; margin: 0 0 3rem; padding: clamp(1.2rem,3vw,1.8rem); border-top: 5px solid var(--ui); }
.station-filter h2,.station-filter p { margin: .2rem 0; }
.station-filter-control { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: end; }
.station-filter-control label { margin: 0; }
.station-filter-control .button { margin-bottom: 0; }
.filter-status { grid-column: 1/-1; color: var(--muted); font-size: .85rem; }
.station-groups > section { scroll-margin-top: 100px; }
.station-groups > section[hidden],.station-filter-item[hidden] { display: none; }
.station-directory { grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); }
.line-title { padding-bottom: .7rem; border-bottom: 1px solid var(--border); }
.line-title i { box-shadow: 0 0 0 5px rgba(16,42,67,.06); }

.map-head { background: radial-gradient(circle at 82% 15%,rgba(37,99,235,.16),transparent 27%),linear-gradient(135deg,#f8fbff,#eef4fb); }
.map-product { background: linear-gradient(180deg,#fff,#f1f5f8); }
.map-toolbar { display: grid; grid-template-columns: auto minmax(260px,1fr) auto; gap: 1rem 1.5rem; align-items: end; margin-bottom: 1.25rem; padding: 1.2rem; border-top: 5px solid var(--ui); box-shadow: var(--shadow-sm); }
.toolbar-label { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.map-filter-buttons { display: flex; gap: .45rem; }
.map-filter { gap: .4rem; min-height: 42px; padding: .5rem .75rem; border: 1px solid var(--border); background: #fff; color: var(--ink); box-shadow: none; }
.map-filter i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.map-filter:hover { border-color: var(--ui); background: var(--surface-tint); color: var(--ui-dark); box-shadow: none; transform: none; }
.map-filter.is-active { border-color: var(--ui); background: var(--ui-dark); color: #fff; }
.map-filter.red-filter.is-active { border-color: var(--red); background: var(--red); }
.map-filter.green-filter.is-active { border-color: var(--green-dark); background: var(--green-dark); }
.map-search { margin: 0; }
.map-filter-status { margin: 0 0 .7rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.map-key { padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.terminal-key { position: relative; height: 10px!important; border: 3px solid var(--night); background: #fff!important; }
.branch-explainer { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(330px,.9fr); gap: 2rem; align-items: center; margin: 1.5rem 0; padding: clamp(1.25rem,3vw,2rem); border: 1px solid #e6c4c4; border-left: 6px solid var(--red); border-radius: 18px; background: linear-gradient(135deg,#fff7f7,#fff); box-shadow: var(--shadow-sm); }
.branch-explainer h2 { margin: .25rem 0 .55rem; }
.branch-explainer p { margin: 0; color: var(--muted); }
.branch-mini-map { display: grid; grid-template-columns: auto minmax(40px,1fr) auto minmax(120px,1fr); gap: .55rem; align-items: center; color: var(--ink); font-size: .78rem; font-weight: 800; }
.branch-mini-map > i { height: 5px; border-radius: 9px; background: var(--red); }
.branch-mini-map > div { display: grid; gap: .55rem; }
.branch-mini-map > div b { position: relative; padding-left: 1.25rem; }
.branch-mini-map > div b::before { content: ""; position: absolute; left: 0; top: 50%; width: .9rem; height: 4px; background: var(--red); }
.metro-map-scroll { position: relative; padding: 1rem; border-color: #bdcdda; background: linear-gradient(145deg,#eef3f6,#f9fbfc); box-shadow: inset 0 1px 0 #fff,var(--shadow-md); scrollbar-color: var(--ui) #dbe5eb; scrollbar-gutter: stable; overscroll-behavior-inline: contain; touch-action: pan-x pan-y; }
.metro-map-scroll:focus-visible { outline: 4px solid rgba(11,90,116,.28); outline-offset: 3px; }
.map-scroll-hint { position: sticky; left: 0; z-index: 4; width: max-content; margin: 0 0 .5rem; padding: .45rem .65rem; border-radius: 8px; background: var(--night); color: #fff; font-size: .75rem; font-weight: 750; }
.map-route { min-width: 1420px; margin: 1rem 0 1.5rem; padding: 1.2rem 1rem 4.3rem; border: 1px solid var(--border); border-top: 5px solid var(--route-color); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.map-route[hidden] { display: none; }
[data-map-segment][hidden] { display: none!important; }
.red-route { --route-color: var(--red); }
.green-route { --route-color: var(--green-dark); }
.map-route header { gap: .75rem; margin-bottom: 1rem; }
.map-route header > div { display: grid; }
.map-route header span { color: var(--muted); font-size: .8rem; }
.map-line-pill { display: grid!important; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--route-color); color: #fff!important; font-weight: 900; }
.green-route .map-line-pill { background: var(--green-dark); }
.map-node { min-width: 108px; padding-inline: .2rem; }
.map-node span { min-height: 2.5rem; margin-top: .65rem; font-size: .72rem; line-height: 1.25; transform: none; white-space: normal; }
.map-node small { margin-top: .2rem; font-size: .62rem; line-height: 1.2; }
.map-node.is-terminal i { box-shadow: 0 0 0 4px rgba(7,17,31,.12); }
.map-node.is-branch-point i { border-style: double; border-width: 6px; }
.map-node.is-search-match { color: var(--ui-dark); transform: translateY(-4px); }
.map-node.is-search-match i { box-shadow: 0 0 0 7px rgba(245,158,11,.3); }
.map-node:hover,.map-node:focus-visible { color: var(--route-color); transform: translateY(-3px); }
.red-network-route { min-width: 2840px; padding-bottom: 1.2rem; }
.map-segment-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: .9rem 0 1rem; padding-bottom: .65rem; border-bottom: 1px solid #efd3d3; }
.map-segment-heading span,.red-branch-card-head > span { color: var(--red); font-size: .7rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.map-segment-heading h3,.red-branch-card-head h3 { margin: .15rem 0 0; }
.map-segment-heading > strong { color: var(--muted); font-size: .78rem; }
.red-trunk-segment { padding-bottom: 1rem; }
.red-branches-segment { margin-top: 1rem; padding: 1rem; border: 1px solid #efcccc; border-radius: 14px; background: linear-gradient(135deg,#fff7f7,#fff); }
.red-branch-choice { display: flex; align-items: center; gap: .8rem; width: max-content; max-width: 100%; margin-bottom: 1rem; padding: .7rem .85rem; border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.red-branch-choice > i { flex: 0 0 18px; width: 18px; height: 18px; border: 5px double var(--red); border-radius: 50%; background: #fff; }
.red-branch-choice strong,.red-branch-choice span { display: block; }
.red-branch-choice span { color: var(--muted); font-size: .76rem; }
.red-branch-grid { display: grid; grid-template-columns: 1180px; gap: 1rem; }
.red-branch-card { padding: 1rem 1rem .65rem; border: 1px solid #e9c9c9; border-top: 4px solid var(--red); border-radius: 13px; background: #fff; }
.red-branch-card-head { display: flex; align-items: end; gap: .8rem; margin-bottom: .75rem; }
.red-branch-card-head small { margin-left: auto; color: var(--muted); font-weight: 750; }
.map-note-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.map-note-grid .notice { margin-top: 1.25rem; box-shadow: var(--shadow-sm); }

.timings-head { background: radial-gradient(circle at 83% 16%,rgba(245,158,11,.18),transparent 26%),linear-gradient(135deg,#fbfcfd,#f6f1e8); }
.timing-overview-section { background: #fff; }
.weekly-hours-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin-top: 1.2rem; }
.day-hours-card { position: relative; overflow: hidden; padding: 1.15rem; border: 1px solid var(--border); border-top: 4px solid #9fb0be; border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.day-hours-card h3,.day-hours-card strong,.day-hours-card small { display: block; }
.day-hours-card h3 { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 800; }
.day-hours-card strong { margin-top: .35rem; font-size: 1.25rem; }
.day-hours-card small { margin-top: .2rem; color: var(--muted); }
.day-hours-card.is-selected { border-color: #dba84e; border-top-color: var(--gold); background: #fffbf2; box-shadow: 0 14px 32px rgba(183,121,31,.13); }
.timing-today-section { background: linear-gradient(145deg,#edf4f8,#f9fbfc); }
.timing-today-grid { display: grid; grid-template-columns: minmax(0,1.22fr) minmax(280px,.78fr); gap: 1.25rem; align-items: stretch; }
.selected-timing-panel { padding: clamp(1.3rem,3vw,2rem); border: 1px solid var(--border); border-top: 5px solid var(--gold); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-md); }
.selected-timing-panel h2 { margin: .2rem 0; font-size: clamp(1.7rem,4vw,2.6rem); }
.selected-day-label { margin-top: 0; color: var(--muted); font-weight: 800; }
.selected-hours { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; margin-top: 1.3rem; padding: 1.25rem; border-radius: 15px; background: linear-gradient(135deg,#eaf4f8,#f7fafb); }
.selected-hours div { text-align: center; }
.selected-hours span,.selected-hours strong,.selected-hours small { display: block; }
.selected-hours span,.selected-hours small { color: var(--muted); font-size: .78rem; }
.selected-hours strong { font-size: 1.8rem; }
.selected-hours > i { color: var(--ui); font-size: 1.5rem; font-style: normal; }
.timing-guidance-panel { display: flex; flex-direction: column; justify-content: center; max-width: none; margin: 0; border-top: 5px solid var(--ui); }
.timing-guidance-panel h2 { margin: .25rem 0; font-size: clamp(1.35rem,2.5vw,1.8rem); }
.timing-guidance-panel p { margin: .35rem 0 1.1rem; color: var(--muted); }
.timing-guidance-panel .button { align-self: flex-start; }
.line-hours-section { background: #fff; }
.service-endpoint-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1.2rem; }
.service-endpoint-card { --endpoint-color: var(--red); display: flex; gap: 1rem; padding: 1.25rem; border: 1px solid color-mix(in srgb,var(--endpoint-color) 25%,var(--border)); border-top: 5px solid var(--endpoint-color); border-radius: 17px; background: #fff; box-shadow: var(--shadow-sm); }
.service-endpoint-card .line-badge { flex: 0 0 45px; width: 45px; height: 45px; background: var(--endpoint-color); }
.service-endpoint-card small { color: var(--endpoint-color); font-weight: 850; }
.service-endpoint-card h3 { margin: .2rem 0; }
.service-endpoint-card p { color: var(--muted); }
.service-endpoint-card a { color: var(--endpoint-color); font-weight: 800; text-decoration: none; }
.endpoint-green { --endpoint-color: var(--green-dark); }
.timetable-explainer-section { color: #d6e4ef; background: radial-gradient(circle at 85% 12%,rgba(37,99,235,.2),transparent 23%),linear-gradient(135deg,#07111f,#0c2d42); }
.timetable-explainer-section h2 { color: #fff; }
.timetable-explainer-section p { color: #bed0de; }
.timetable-explainer-section .eyebrow { color: #f3c76c; }
.timetable-explainer-section .source-line { margin-top: 2rem; color: #aebfcc; }
.timetable-explainer-section .source-line a { color: #fff; }
.timing-rule-cards { display: grid; gap: .7rem; }
.timing-rule-cards div { display: flex; align-items: center; gap: .8rem; padding: 1rem; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(255,255,255,.07); }
.timing-rule-cards strong { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--ui-dark); }

.line-detail-head { border-top-width: 0; padding-block: 3.3rem; }
.line-detail-head.red-head { background: radial-gradient(circle at 82% 15%,rgba(185,28,28,.16),transparent 27%),linear-gradient(135deg,#fffafa,#f8eeee); }
.line-detail-head.green-head { background: radial-gradient(circle at 82% 15%,rgba(5,150,105,.16),transparent 27%),linear-gradient(135deg,#f9fdfa,#ecf6f1); }
.line-identity { display: inline-flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.line-identity i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-style: normal; }
.green-head .line-identity i { background: var(--green-dark); }
.line-essentials-section { background: #fff; }
.branch-clarity-card,.continuous-line-card { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(330px,.85fr); gap: 2rem; align-items: center; padding: clamp(1.3rem,3vw,2rem); border: 1px solid #e7caca; border-left: 6px solid var(--red); border-radius: 18px; background: linear-gradient(135deg,#fff7f7,#fff); box-shadow: var(--shadow-md); }
.continuous-line-card { border-color: #bde1d2; border-left-color: var(--green); background: linear-gradient(135deg,#f3fbf7,#fff); }
.branch-clarity-card h2,.continuous-line-card h2 { margin: .25rem 0 .55rem; }
.branch-clarity-card p,.continuous-line-card p { margin: 0; color: var(--muted); }
.line-branch-diagram { display: grid; grid-template-columns: auto minmax(30px,1fr) auto minmax(100px,1fr); gap: .5rem; align-items: center; font-size: .78rem; font-weight: 800; }
.line-branch-diagram > i { height: 5px; background: var(--red); }
.line-branch-diagram > div { display: grid; gap: .6rem; }
.line-branch-diagram > div a { padding: .45rem .6rem; border-left: 5px solid var(--red); border-radius: 7px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
.continuous-route { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.continuous-route a { padding: .45rem .6rem; border: 1px solid #b9dccc; border-radius: 9px; background: #fff; color: var(--green-dark); font-weight: 800; text-decoration: none; }
.continuous-route i { flex: 1; min-width: 30px; height: 5px; background: var(--green); }
.line-tool-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .75rem; margin-top: 1rem; }
.line-tool-strip a { display: grid; gap: .2rem; padding: 1rem; border: 1px solid #cfe1d8; border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
.line-tool-strip a::after { content: "→"; justify-self: end; color: var(--green-dark); font-weight: 900; }
.line-tool-strip a:hover,.line-tool-strip a:focus-visible { border-color: var(--green-dark); transform: translateY(-2px); }
.line-tool-strip a.is-primary { border-color: var(--green-dark); background: var(--green-dark); color: #fff; }
.line-tool-strip a.is-primary::after,.line-tool-strip a.is-primary small { color: #fff; }
.line-tool-strip small { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.red-line-tool-strip a { border-color: #edcaca; }
.red-line-tool-strip a::after { color: var(--red); }
.red-line-tool-strip a:hover,.red-line-tool-strip a:focus-visible { border-color: var(--red); }
.red-line-tool-strip a.is-primary { border-color: var(--red); background: var(--red); }
.red-line-map-section { background: linear-gradient(180deg,#fff3f3,#fffafa); }
.red-line-map-section .section-head p { max-width: 760px; margin-bottom: 0; color: var(--muted); }
.red-line-page-map { background: #fff; box-shadow: var(--shadow-md); }
.branch-point-key { background: repeating-linear-gradient(90deg,var(--red) 0 5px,#fff 5px 8px); border: 1px solid var(--red); }
.green-line-map-section { background: linear-gradient(180deg,#eef8f3,#f9fcfa); }
.green-line-map-section .section-head p { max-width: 720px; margin-bottom: 0; color: var(--muted); }
.green-line-page-map { background: #fff; box-shadow: var(--shadow-md); }
.green-line-page-map .map-route { margin-bottom: 4.5rem; }
.map-node.is-zone-start i { box-shadow: 0 0 0 5px rgba(245,158,11,.3); }
.zone-start-key { background: linear-gradient(90deg,var(--green-dark) 0 45%,var(--gold) 45% 55%,var(--green-dark) 55%); }
.map-scale-note { margin: .8rem 0 0; color: var(--muted); font-size: .8rem; }
.line-highlight-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.line-highlight { padding: 1.15rem; border: 1px solid var(--border); border-top: 4px solid var(--ui); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.line-highlight > span { color: var(--muted); font-size: .75rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.line-highlight h3 { margin: .3rem 0; }
.line-highlight p { margin: .35rem 0 0; color: var(--muted); }
.interchange-highlight { border-top-color: var(--green); }
.airport-highlight { border-top-color: #2563eb; }
.fare-highlight { border-top-color: var(--gold); }
.service-patterns-section { background: linear-gradient(180deg,#f2f6f8,#fff); }
.service-route-card { --service-color: var(--red); overflow: hidden; margin: 1.5rem 0; border: 1px solid var(--border); border-top: 6px solid var(--service-color); border-radius: 19px; background: #fff; box-shadow: var(--shadow-md); }
.service-route-card.service-green { --service-color: var(--green-dark); }
.service-route-card > header { display: flex; align-items: center; gap: .85rem; padding: 1.2rem 1.35rem; border-bottom: 1px solid var(--border); background: linear-gradient(135deg,color-mix(in srgb,var(--service-color) 7%,white),#fff); }
.service-route-card > header .line-badge { flex: 0 0 44px; width: 44px; height: 44px; background: var(--service-color); }
.service-route-card > header small { color: var(--muted); }
.service-route-card > header h3 { margin: .1rem 0; }
.service-route-card > header > strong { margin-left: auto; color: var(--muted); font-size: .82rem; }
.service-route-card .vertical-line { columns: 2; column-gap: 2rem; margin: 0; padding: 1.35rem; }
.service-route-card .vertical-line li { break-inside: avoid; }
.service-route-card.service-green .vertical-line { columns: 1; }
.red-service-directory { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(330px,.85fr); }
.red-service-directory .vertical-line { columns: 1; }
.red-shared-directory { padding: 1.35rem; border-right: 1px solid #edcaca; }
.red-branch-directory { display: grid; align-content: start; gap: 1rem; padding: 1.35rem; background: linear-gradient(180deg,#fff4f4,#fff); }
.red-directory-branch { padding: 1rem; border: 1px solid #edcece; border-radius: 14px; background: #fff; }
.red-route-group-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .15rem 1rem; padding-bottom: .75rem; border-bottom: 1px solid #efdada; }
.red-route-group-heading > span { grid-column: 1/-1; color: var(--red); font-size: .7rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.red-route-group-heading h3 { margin: 0; }
.red-route-group-heading small { color: var(--muted); font-weight: 750; }
.red-directory-branch .vertical-line { padding: .95rem 0 0; }
.green-service-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); }
.green-route-notes { padding: 1.35rem; border-left: 1px solid #cfe1d8; background: linear-gradient(180deg,#f3faf6,#fff); }
.green-route-notes > h3 { margin-top: 0; }
.green-route-note { padding: 1rem 0; border-top: 1px solid #dbe8e1; }
.green-route-note > span { color: var(--green-dark); font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.green-route-note h4 { margin: .3rem 0; }
.green-route-note p { margin: .3rem 0; color: var(--muted); }
.green-route-note a { color: var(--green-dark); font-weight: 750; }
.vertical-line em { display: inline-flex; margin-top: .2rem; padding: .12rem .45rem; border-radius: 99px; background: #eef3f6; color: var(--muted); font-size: .68rem; font-style: normal; font-weight: 800; }
.vertical-line .is-interchange em { background: #e8f7ef; color: #087443; }
.vertical-line .is-airport em { background: #eaf2ff; color: #174ea6; }
.vertical-line .is-branch em { background: #fff0f0; color: var(--red); }
.line-page-actions { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: 18px; background: var(--sand); }
.line-page-actions h2 { margin: .2rem 0 0; }
.green-line-actions .button:not(.secondary):not(.ghost) { background: var(--green-dark); }

.station-hero { position: relative; border-top: 0; padding: 3rem 0; }
.station-hero.station-red { background: radial-gradient(circle at 84% 20%,rgba(185,28,28,.16),transparent 25%),linear-gradient(135deg,#fffafa,#f8eeee); }
.station-hero.station-green { background: radial-gradient(circle at 84% 20%,rgba(5,150,105,.16),transparent 25%),linear-gradient(135deg,#f9fdfa,#edf7f2); }
.station-hero.station-interchange { background: radial-gradient(circle at 78% 20%,rgba(5,150,105,.13),transparent 24%),radial-gradient(circle at 91% 56%,rgba(185,28,28,.14),transparent 25%),linear-gradient(135deg,#f9fbfc,#f1f5f7); }
.station-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7px; background: var(--red); }
.station-hero.station-green::before { background: var(--green); }
.station-hero.station-interchange::before { background: linear-gradient(var(--red) 0 50%,var(--green) 50%); }
.station-hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-top: 1.35rem; }
.station-connection-preview { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .1rem 1rem; width: min(100%,720px); margin-top: 1rem; padding: .8rem 1rem; border: 1px solid #b9dccc; border-left: 5px solid var(--green-dark); border-radius: 12px; background: rgba(255,255,255,.86); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
.station-connection-preview span { grid-column: 1/-1; color: var(--green-dark); font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.station-connection-preview strong { line-height: 1.35; }
.station-connection-preview small { align-self: end; color: var(--muted); font-weight: 750; white-space: nowrap; }
.station-connection-preview:hover,.station-connection-preview:focus-visible { border-color: var(--green-dark); transform: translateY(-2px); }
#station-connections { scroll-margin-top: 100px; }
.line-action-link { display: inline-flex; align-items: center; min-height: 44px; gap: .4rem; padding: .55rem .7rem; border-radius: 10px; color: var(--ink); background: rgba(255,255,255,.78); font-size: .82rem; font-weight: 800; text-decoration: none; box-shadow: var(--shadow-sm); }
.line-action-link i { width: 9px; height: 9px; border-radius: 50%; }
.red-dot { background: var(--red); }.green-dot { background: var(--green); }
.station-facts div { position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.station-facts div::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ui); }
.station-facts div:nth-child(2)::before { background: var(--gold); }
.station-facts div:nth-child(3)::before { background: var(--red); }
.station-hero.station-green + .section .station-facts div:nth-child(3)::before { background: var(--green); }
.station-details { grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); }
.station-details article { border-top: 4px solid var(--green); box-shadow: var(--shadow-sm); }
.station-details article h3 { margin-top: 0; }
.station-line-services { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: .8rem; }
.station-line-service-card { --station-service-color: var(--red); padding: 1rem; border: 1px solid var(--border); border-top: 5px solid var(--station-service-color); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.station-line-service-card.service-green { --station-service-color: var(--green-dark); }
.station-line-service-card > span { color: var(--station-service-color); font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.station-line-service-card h3 { margin: .25rem 0 .65rem; }
.station-line-service-card p { margin: .65rem 0; color: var(--muted); font-size: .82rem; }
.station-service-endpoints { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: .45rem; align-items: center; }
.station-service-endpoints a { color: var(--ink); font-weight: 800; text-decoration-color: var(--station-service-color); }
.station-service-endpoints a:last-child { text-align: right; }
.station-service-endpoints i { color: var(--station-service-color); font-style: normal; font-weight: 900; }
.station-service-item { border-left: 4px solid var(--ui); box-shadow: var(--shadow-sm); }
.station-hours div { border-top: 4px solid var(--gold); box-shadow: var(--shadow-sm); }
.neighbor-grid a,.route-snippet { box-shadow: var(--shadow-sm); }
.neighbor-grid a:hover,.neighbor-grid a:focus-visible,.route-snippet:hover,.route-snippet:focus-visible { border-color: var(--ui); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.route-snippet-plan { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.route-snippet-guide { margin-top: .65rem; padding-top: .55rem; border-top: 1px solid var(--border); color: var(--ui-dark); font-size: .76rem; font-weight: 800; }
.line-route-block { border-top: 5px solid var(--red); background: #fff; box-shadow: var(--shadow-sm); }
.station-hero.station-green + .section .line-route-block { border-top-color: var(--green); }
.line-route-block h3 a { color: var(--ink); }
.station-hero.station-green + .section .compact-stops .current-stop { outline-color: var(--green); background: #e7f7ef; }
.sticky-card { border-top: 5px solid var(--ui); }

.planner-section { background: linear-gradient(180deg,#f1f6f8,#fff); }
.planner-search { border-top: 5px solid var(--ui); box-shadow: var(--shadow-md); }
.planner-result { box-shadow: var(--shadow-lg); }
.planner-result:focus { outline: 3px solid var(--focus); outline-offset: 4px; scroll-margin-top: 6rem; }
.planner-result-head { background: radial-gradient(circle at 92% 20%,rgba(5,150,105,.12),transparent 23%),linear-gradient(135deg,#f4f8fa,#fff); }
.planner-route-list li > span { border-color: var(--ui); }
.planner-route-list li:not(:last-child) > span::after { background: var(--ui); }
.planner-route-list a { color: var(--ink); text-decoration: none; }
.planner-route-list a:hover { color: var(--ui); text-decoration: underline; }
.planner-route-panel,.planner-details-panel { box-shadow: inset 0 1px 0 #fff; }
.planner-error { margin-top: 0; box-shadow: var(--shadow-md); }

.table-wrap { border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
table caption { padding: .75rem 1rem; color: var(--muted); font-weight: 800; text-align: left; }
thead th { border-bottom: 2px solid #bdcbd7; background: #eaf1f5; color: var(--ui-dark); }
tbody tr:nth-child(even) { background: #fafcfd; }
tbody tr:hover { background: #f1f7f9; }
.notice { border-radius: 12px; box-shadow: var(--shadow-sm); }
.notice:not(.warning):not(.critical) { border-color: var(--ui); background: #edf6f8; }

.static-prose { display: grid; gap: 1rem; max-width: 980px; }
.static-prose .content-section { margin: 0; padding: clamp(1.2rem,3vw,1.8rem); border: 1px solid var(--border); border-left: 5px solid var(--ui); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.static-prose .content-section:nth-child(2n) { border-left-color: var(--green); }
.static-prose .content-section:nth-child(3n) { border-left-color: var(--gold); }
.static-prose .content-section h2 { margin-top: 0; }
.contact-email-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1.2rem,3vw,1.8rem); border: 1px solid #bcd6e1; border-left: 5px solid var(--ui); border-radius: 16px; background: linear-gradient(135deg,#edf7fa,#fff); box-shadow: var(--shadow-md); }
.contact-email-card strong { display: block; margin-top: .15rem; font-size: clamp(1rem,2.5vw,1.3rem); overflow-wrap: anywhere; }
.faq-list { padding: 1rem 1.4rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.static-cta { border: 1px solid #bfd5df; background: radial-gradient(circle at 90% 10%,rgba(5,150,105,.12),transparent 24%),linear-gradient(135deg,#edf6f8,#fff); box-shadow: var(--shadow-md); }

.site-footer { border-top: 5px solid transparent; border-image: linear-gradient(90deg,var(--red) 0 48%,var(--green) 52% 100%) 1; background: radial-gradient(circle at 12% 20%,rgba(11,90,116,.25),transparent 25%),var(--night); }
.footer-brand { max-width: 240px; padding: .45rem .65rem; border-radius: 10px; background: rgba(255,255,255,.94); filter: none; }
.cookie-consent { left: 50%; right: auto; width: min(calc(100% - 2rem),1120px); transform: translateX(-50%); }
.back-to-top { width: 48px; height: 48px; }

@media (max-width: 1100px) {
    .line-explore-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .map-toolbar { grid-template-columns: 1fr 1fr; }
    .map-filter-status { grid-column: 1/-1; }
}

@media (max-width: 900px) {
    .site-header #main-nav { top: 100%; box-shadow: 0 18px 30px rgba(7,24,40,.13); }
    .home-network-grid,.home-start-grid { grid-template-columns: 1fr; }
    .home-station-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .branch-explainer,.branch-clarity-card,.continuous-line-card { grid-template-columns: 1fr; }
    .line-highlight-grid,.service-endpoint-grid { grid-template-columns: 1fr; }
    .line-tool-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .service-route-card .vertical-line { columns: 1; }
    .red-service-directory { grid-template-columns: 1fr; }
    .red-shared-directory { border-right: 0; border-bottom: 1px solid #edcaca; }
    .green-service-layout { grid-template-columns: 1fr; }
    .green-route-notes { border-top: 1px solid #cfe1d8; border-left: 0; }
    .line-page-actions { align-items: flex-start; flex-direction: column; }
    .station-facts,.line-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
    .quick-access-section .quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .home-essentials-grid,.home-future-grid,.faq-list.home-faq-list { grid-template-columns: 1fr; }
    .station-filter,.map-toolbar,.timing-today-grid { grid-template-columns: 1fr; }
    .station-filter-control { grid-template-columns: 1fr; }
    .station-filter-control .button { width: 100%; }
    .weekly-hours-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .station-hours { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .map-note-grid { grid-template-columns: 1fr; }
    .map-filter-status { grid-column: auto; }
}

@media (max-width: 640px) {
    .page-head { padding: 2.35rem 0; }
    .page-head::after { right: -12rem; }
    .home-section-head { align-items: flex-start; flex-direction: column; }
    .home-section-head > a { align-self: flex-start; }
    .home-station-grid { grid-template-columns: 1fr; }
    .home-station-guide { min-height: 0; }
    .station-alias-note { align-items: flex-start; flex-direction: column; }
    .home-route-branches { margin-left: 12%; }
    .quick-access-section .quick { gap: .55rem; padding: .75rem; }
    .quick-access-section .quick .quick-icon { flex-basis: 40px; width: 40px; min-width: 40px; height: 40px; }
    .quick-access-section .quick strong { font-size: .9rem; }
    .quick-access-section .quick small { font-size: .7rem; }
    .quick-access-section .quick-arrow { display: none; }
    .page-stat-row,.hero-points { align-items: stretch; flex-direction: column; }
    .page-stat-row span,.hero-points span { width: fit-content; }
    .quick-access-section .quick-grid { margin-top: -1rem; }
    .line-explore-grid { grid-template-columns: 1fr; }
    .network-cluster-card { align-items: flex-start; }
    .map-filter-buttons { display: grid; grid-template-columns: repeat(3,1fr); }
    .map-filter { padding-inline: .45rem; }
    .branch-mini-map,.line-branch-diagram { grid-template-columns: 1fr; }
    .branch-mini-map > i,.line-branch-diagram > i { width: 5px; height: 28px; margin-left: 1rem; }
    .continuous-route { display: grid; grid-template-columns: 1fr; justify-items: stretch; }
    .continuous-route i { width: 5px; min-width: 0; height: 24px; margin-left: 1.15rem; }
    .line-tool-strip { grid-template-columns: 1fr; }
    .selected-hours { gap: .55rem; }
    .selected-hours strong { font-size: 1.45rem; }
    .station-hero-actions .button,.station-hero-actions .line-action-link { width: 100%; justify-content: center; }
    .station-connection-preview { grid-template-columns: 1fr; }
    .station-connection-preview small { margin-top: .35rem; white-space: normal; }
    .station-facts,.line-summary,.station-hours { grid-template-columns: 1fr; }
    .service-route-card > header { align-items: flex-start; flex-wrap: wrap; }
    .service-route-card > header > strong { width: 100%; margin-left: 0; }
}

@media (max-width: 430px) {
    .home-fare-tiers { gap: .35rem; }
    .home-fare-tiers div { padding-inline: .3rem; }
    .home-connection-list { grid-template-columns: 1fr; }
    .home-route-main { font-size: .7rem; }
    .home-route-branches { grid-template-columns: 1fr; margin-left: 0; }
    .weekly-hours-grid { grid-template-columns: 1fr; }
    .selected-hours { grid-template-columns: 1fr; }
    .selected-hours > i { transform: rotate(90deg); text-align: center; }
    .map-toolbar { padding: .9rem; }
    .line-page-actions .actions,.line-page-actions .button { width: 100%; }
    .contact-email-card { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto!important; }
    a,.button,button,.station-card,.quick,.metro-line-card,.route-snippet,.neighbor-grid a,.map-node,.network-cluster-card,.home-station-guide,.home-future-card { transition: none!important; }
    .button:hover,button:hover,.station-card:hover,.quick:hover,.map-node:hover,.network-cluster-card:hover,.home-station-guide:hover,.home-future-card:hover { transform: none; }
}

/* Footer navigation: four equal menus with the site identity below. */
.site-footer .footer-lower { margin-top: clamp(2rem,5vw,3.5rem); }
.site-footer .footer-lower .footer-intro { max-width: 680px; padding-bottom: 0; }
@media (min-width: 760px) {
    .site-footer .footer-columns { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

.footer-social { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; margin-top:1.15rem; }
.footer-social a { display:grid; place-items:center; width:42px; height:42px; border:1px solid rgba(216,226,238,.35); border-radius:50%; color:#d8e2ee; background:rgba(255,255,255,.04); transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease; }
.footer-social a:hover { color:#fff; border-color:rgba(255,255,255,.75); background:rgba(255,255,255,.11); text-decoration:none; transform:translateY(-2px); }
.footer-social a:focus-visible { outline:3px solid #fff; outline-offset:3px; }
.footer-social svg { display:block; width:20px; height:20px; fill:currentColor; }
