:root {
    font-family: "Inter", "Segoe UI", sans-serif;
    color: #10253a;
    background: #f7f9fc;
    --ink: #10253a;
    --muted: #4d6376;
    --blue: #0a5bc9;
    --line: #dbe5f0;
    --lime: #d6fc6a;
    --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #0b56b5; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #0665db; outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5.4vw, 3.7rem); letter-spacing: -.06em; line-height: 1.03; }
h2 { font-size: clamp(1.35rem, 3vw, 2.05rem); letter-spacing: -.04em; line-height: 1.16; }
p, li, td { line-height: 1.55; }
input:not([type=checkbox]), select, textarea {
    width: 100%; min-width: 0; color: var(--ink); background: white; border: 1px solid #bdcde0;
    border-radius: 9px; padding: .65rem .75rem; line-height: 1.3;
}
textarea { resize: vertical; }
select { max-width: 100%; }
.wrap { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.topbar { background: white; border-bottom: 1px solid var(--line); }
.header-inner, .section-heading, .footer, .inline-form, .breadcrumb, .pagination {
    display: flex; gap: .9rem; align-items: center;
}
.header-inner { justify-content: space-between; min-height: 70px; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 760; letter-spacing: -.035em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; position: relative; background: var(--blue); display: flex; gap: 3px; align-items: center; justify-content: center; }
.brand-mark::before { content: ""; position: absolute; width: 18px; height: 2px; background: var(--lime); transform: rotate(-35deg); }
.brand-mark i { position: relative; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.brand-mark i:first-child { transform: translateY(5px); }
.brand-mark i:last-child { transform: translateY(-5px); }
.header-inner nav { display: flex; align-items: center; gap: clamp(.65rem, 3vw, 1.65rem); font-size: .94rem; font-weight: 650; }
.header-inner nav a, .admin-nav a { text-decoration: none; }
.header-inner nav > a:not(.button) { color: var(--ink); }
.button, .quiet {
    display: inline-flex; align-items: center; justify-content: center; width: fit-content; white-space: nowrap;
    border-radius: 10px; border: 1px solid transparent; background: var(--blue); color: white;
    padding: .7rem 1.05rem; font-weight: 700; line-height: 1.25; text-decoration: none;
}
.button:hover { filter: brightness(.92); }
.button-small { padding: .52rem .78rem; font-size: .86rem; }
.button-outline, .quiet { color: #144b92; border-color: #b8cce5; background: white; }
.button-lime { background: var(--lime); color: #132900; }
.button.danger { background: #fff3f4; color: #9e1e36; border-color: #f2b8c4; }
.skip, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { z-index: 2; inset: .5rem auto auto .5rem; clip-path: none; width: auto; height: auto; padding: .75rem; background: white; }
.main { padding-top: 28px; padding-bottom: 55px; min-height: 73vh; }
.hero {
    display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr); align-items: center; overflow: hidden;
    min-height: 365px; border-radius: 26px; background: linear-gradient(125deg,#063b86 5%,#0a57bd 56%,#3f9ee4 100%);
    color: white; position: relative;
}
.hero-copy { padding: clamp(1.6rem,5vw,4.25rem); z-index: 1; }
.hero h1 { margin-bottom: .9rem; font-size: clamp(2.2rem, 6.1vw, 4.7rem); }
.hero-copy > p:not(.eyebrow) { color: #e2efff; max-width: 30rem; }
.eyebrow { text-transform: uppercase; font-size: .77rem; letter-spacing: .11em; font-weight: 720; color: #235a8e; margin-bottom: .52rem; }
.hero .eyebrow { color: #d8fc7d; }
.hero-search { margin-top: 1.5rem; display: grid; grid-template-columns: 5.65rem minmax(6rem,1fr) auto; gap: .4rem; max-width: 510px; }
.hero-search input, .hero-search select { background: white; border: 0; }
.hero-graphic {
    position: relative; height: 100%; min-height: 260px;
    background-image: linear-gradient(#d7f2ff28 1px, transparent 1px),linear-gradient(90deg,#d7f2ff28 1px,transparent 1px);
    background-size: 29px 29px; mask-image: linear-gradient(to right,transparent,black 18%);
}
.diagram-track { position: absolute; height: 5px; border-radius: 9px; display: flex; justify-content: space-between; align-items: center; color: #eaffff; background: currentColor; }
.diagram-track i { width: 16px; height: 16px; background: #1261bd; border: 4px solid currentColor; border-radius: 50%; }
.diagram-one { width: 78%; left: 10%; top: 35%; transform: rotate(-30deg); }
.diagram-two { width: 65%; left: 19%; top: 50%; color: var(--lime); transform: rotate(25deg); }
.diagram-three { width: 70%; left: 9%; top: 71%; color: #85dff9; transform: rotate(-23deg); }
.diagram-panel { position: absolute; right: 11%; bottom: 11%; width: 110px; border: 1px solid #f1fbff95; background: #e4f7ff38; border-radius: 13px; padding: .8rem; display: grid; gap: .42rem; transform: rotate(-9deg);}
.diagram-panel span { display: block; height: 5px; background: white; border-radius: 9px; width: 70%; }
.diagram-panel span:nth-child(2) { width: 95%; background: var(--lime); }
.diagram-panel span:nth-child(3) { width: 50%; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; margin-top: 1rem; }
.admin-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.metric, .panel, .item-card, .notice, .map-card, .source {
    background: white; border: 1px solid var(--line); border-radius: 16px;
}
.metric { display: grid; gap: .15rem; padding: 1rem 1.2rem; }
.metric:last-child { background: #eefbc7; border-color: #d6eb9a; }
.metric span, .muted, small { color: var(--muted); }
.metric strong { font-size: clamp(1.45rem,4vw,2.45rem); letter-spacing: -.06em; }
.section { margin-top: clamp(1.5rem,4vw,2.9rem); }
.section-heading { justify-content: space-between; gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap; }
.section > h2 { margin-bottom: .8rem; }
.tabs { display: flex; padding: 4px; background: #e6eef8; border-radius: 10px; }
.tabs a { text-decoration: none; color: #2b517e; padding: .45rem .85rem; border-radius: 7px; font-weight: 630; }
.tabs .current { background: #fff; color: #143b6e; }
.directory { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; margin-top: .65rem; }
.item-card { display: grid; grid-template-columns: max-content 1fr auto; gap: .6rem; align-items: center; padding: .83rem .85rem; color: var(--ink); text-decoration: none; min-height: 74px; }
.item-card:hover { border-color: #7aa6dc; }
.route-chip { display: inline-block; border-radius: 7px; padding: .25rem .46rem; background: #ebf3ff; color: #0b4f9c; font-weight: 750; font-size: .82rem; width: fit-content; }
.arrow { color: #1a66bc; }
.empty { padding: 1rem 0; }
.pagination { justify-content: center; margin-top: 1.35rem; font-size: .9rem; }
.source { padding: 1rem 1.25rem; display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; margin-top: 2rem; color: var(--muted); font-size: .9rem; }
.footer { justify-content: space-between; padding: 1.2rem 0; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.breadcrumb { font-size: .88rem; margin: .25rem 0 1rem; color: var(--muted); flex-wrap: wrap; }
.intro { padding: clamp(1.2rem,4vw,2.75rem); background: #e6f1ff; border-radius: 18px; }
.intro h1 { margin-bottom: .4rem; }
.panel, .map-card, .notice { padding: clamp(.9rem,3vw,1.5rem); }
.panel h2, .panel h1 { margin-bottom: .75rem; }
.split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; align-items: start; }
.stops-list { list-style: none; margin: 0; border: 1px solid var(--line); padding: 0 1rem; border-radius: 15px; background: white; }
.stops-list li { padding: .7rem .25rem; display: flex; gap: .65rem; align-items: center; border-bottom: 1px solid #e6eef6; }
.stops-list li:last-child { border-bottom: 0; }
.stop-dot { flex: 0 0 .65rem; height: .65rem; border: 2px solid var(--blue); border-radius: 50%; }
.map-card { margin: 0; }
.map-card figcaption { font-weight: 700; }
.map-card canvas { display: block; width: 100%; height: clamp(230px,36vw,410px); margin-top: .65rem; border-radius: 9px; background: #edf6ff; }
.notice-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: .8rem; }
.notice { border-left: 5px solid #a9d845; }
.notice strong { display: block; margin: .45rem 0 .15rem; }
.notice small { display: block; }
.filter { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: .65rem; align-items: end; margin-bottom: .6rem; }
.filter label, .form-grid > label, .stack > label { display: grid; gap: .25rem; font-size: .91rem; font-weight: 620; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 13px; margin-top: .65rem; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .93rem; }
td, th { padding: .68rem .82rem; border-bottom: 1px solid #e2ebf5; vertical-align: top; }
th { background: #edf4fd; color: #25496f; font-size: .83rem; font-weight: 750; }
tr:last-child td { border: 0; }
.inline-form { flex-wrap: wrap; margin: .5rem 0; }
.inline-form input, .inline-form select { width: auto; max-width: min(100%,26rem); }
.admin-nav { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; font-size: .83rem; }
.admin-nav a { border: 1px solid var(--line); padding: .42rem .61rem; background: #fff; border-radius: 7px; }
.admin-nav .selected { color: white; background: var(--blue); border-color: var(--blue); }
.admin-search { margin: .75rem 0 1rem; }
.bar-row { display: grid; grid-template-columns: minmax(6rem,1fr) minmax(4rem,1fr) 2rem; gap: .55rem; align-items: center; padding: .44rem 0; }
.bar-row meter { width: 100%; height: 1.4rem; }
.detail-list { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.detail-list dd { margin-left: 1rem; font-weight: 700; }
.login { max-width: 450px; margin: 2rem auto; }
.editor { max-width: 940px; }
.stack { display: grid; gap: .9rem; }
.form-grid { display: grid; gap: .8rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.window { padding: .5rem 0; }
fieldset { border: 1px solid var(--line); padding: .75rem; border-radius: 10px; }
legend { font-weight: 700; }
.checkboxes { display: flex; flex-wrap: wrap; gap: .55rem; }
.checkboxes label { display: flex; flex-wrap: nowrap; align-items: center; gap: .2rem; }
.message { color: #1e4a14; padding: .75rem 1rem; border-radius: 9px; background: #e5f7db; margin-bottom: 1rem; }
.message.error { color: #842837; background: #ffeaf0; }
.message ul { margin: .25rem 0 0; }
.delete-form { margin-top: 1rem; }
@media (max-width: 850px) {
    .directory { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .admin-metrics, .filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
    .wrap { width: min(100% - 1.3rem,1180px); }
    .main { padding-top: .8rem; }
    .header-inner { min-height: 60px; gap: .35rem; }
    .header-inner nav { gap: .65rem; font-size: .82rem; }
    .header-inner nav .button-small { padding-inline: .45rem; }
    .brand { font-size: 1.08rem; }
    .brand-mark { width: 26px; height: 26px; }
    .hero { grid-template-columns: 1fr; min-height: 330px; }
    .hero-graphic { position: absolute; inset: 50% -10% 0 35%; opacity: .36; }
    .hero-copy { padding: 1.25rem; }
    .hero-search { grid-template-columns: 4.5rem minmax(4rem,1fr) auto; }
    .hero-search input, .hero-search select, .hero-search button { padding-inline: .47rem; }
    .directory, .split, .form-grid { grid-template-columns: 1fr; }
    .metrics { gap: .4rem; }
    .metric { padding: .7rem; }
    .metric span { font-size: .78rem; }
    .bar-row { font-size: .88rem; }
    td, th { padding: .54rem; }
}
