:root {
    --forest-900: #183b38;
    --forest-700: #246357;
    --forest-100: #e7f1ea;
    --stone-900: #23332f;
    --stone-600: #63716d;
    --stone-100: #f4f3ec;
    --cream: #fffdf6;
    --orange: #ed7c3a;
    --shadow: 0 12px 34px rgba(19, 49, 44, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--stone-900);
    background: var(--cream);
    font-family: "Segoe UI", "Aptos", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.hero {
    min-height: 600px;
    position: relative;
    overflow: hidden;
    background: #e7f1e9;
    isolation: isolate;
}
.hero::after {
    position: absolute;
    inset: auto 0 0;
    height: 110px;
    content: "";
    background: linear-gradient(transparent, var(--cream));
    z-index: -1;
}
.navbar {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -.03em;
}
.brand-mark {
    display: grid;
    place-items: center;
    height: 42px;
    width: 42px;
    border-radius: 13px;
    color: white;
    background: var(--forest-900);
    font-weight: 800;
}
.admin-link {
    padding: 10px 15px;
    border: 1px solid rgba(24, 59, 56, .14);
    border-radius: 999px;
    color: var(--forest-900);
    font-size: .9rem;
}
.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 65px auto 0;
    padding: 0 20px;
    width: 100%;
}
.eyebrow {
    display: inline-block;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--forest-700);
    background: rgba(255, 253, 246, .82);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
h1 {
    margin: 18px 0 13px;
    max-width: 450px;
    color: var(--forest-900);
    font-size: clamp(2.45rem, 5vw, 4.25rem);
    line-height: .98;
    letter-spacing: -.07em;
}
.hero-copy p {
    max-width: 380px;
    color: #405d57;
    font-size: 1.08rem;
    line-height: 1.55;
}
.primary-button {
    display: inline-flex;
    margin-top: 18px;
    padding: 15px 22px;
    border-radius: 13px;
    color: #fff;
    background: var(--orange);
    font-weight: 700;
    box-shadow: 0 9px 20px rgba(237, 124, 58, .3);
}
.hero-image {
    position: absolute;
    z-index: -2;
    top: 0;
    right: 0;
    width: min(65vw, 840px);
    height: 100%;
    object-fit: cover;
    object-position: center;
    mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
}

main {
    max-width: 1240px;
    margin: -40px auto 0;
    position: relative;
    padding: 0 20px 46px;
}
.filter-panel {
    display: grid;
    grid-template-columns: minmax(230px, 2fr) repeat(2, minmax(150px, 1fr)) 125px;
    align-items: end;
    gap: 12px;
    padding: 18px;
    background: white;
    border-radius: 19px;
    box-shadow: var(--shadow);
}
.filter-panel label:not(.checkbox) span {
    display: block;
    margin: 0 0 7px 4px;
    font-size: .79rem;
    font-weight: 650;
    color: var(--stone-600);
}
.filter-panel input[type=search],
.filter-panel select {
    height: 48px;
    width: 100%;
    padding: 0 13px;
    border: 1px solid #e1e5df;
    border-radius: 11px;
    background: #fbfbf8;
    color: var(--stone-900);
}
.checkbox {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    background: var(--forest-100);
    border-radius: 11px;
    color: var(--forest-900);
    font-size: .94rem;
}
.checkbox input { accent-color: var(--forest-700); }
.explorer {
    display: grid;
    grid-template-columns: minmax(370px, 1.05fr) minmax(350px, .95fr);
    gap: 22px;
    margin-top: 25px;
}
.map-card {
    overflow: hidden;
    min-height: 650px;
    border-radius: 20px;
    background: #dbe6df;
    box-shadow: var(--shadow);
}
#map { height: 100%; min-height: 650px; }
.results {
    height: 650px;
    display: flex;
    flex-direction: column;
}
.results-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 13px;
}
.results-title h2 { margin: 0; letter-spacing: -.04em; }
#count { color: var(--stone-600); font-size: .9rem; }
.route-list {
    display: grid;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}
.route-card {
    width: 100%;
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid #eef0eb;
    border-radius: 15px;
    color: inherit;
    background: white;
    text-align: left;
    cursor: pointer;
}
.route-card:hover { border-color: #d5e3db; box-shadow: 0 5px 14px rgba(24, 59, 56, .06); }
.grade {
    display: grid;
    place-items: center;
    height: 50px;
    border-radius: 12px;
    background: var(--forest-100);
    color: var(--forest-700);
    font-weight: 750;
}
.grade-k4, .grade-k5, .grade-k6 { color: #9b401d; background: #fbe7db; }
.route-card strong {
    display: block;
    margin-bottom: 5px;
    line-height: 1.25;
}
.route-card small { color: var(--stone-600); }
.card-time { font-size: .82rem; color: var(--stone-600); }
.empty {
    padding: 35px 20px;
    border-radius: 16px;
    background: var(--stone-100);
    text-align: center;
    color: var(--stone-600);
}

.route-dialog {
    width: min(620px, calc(100% - 24px));
    max-height: calc(100svh - 30px);
    padding: 0;
    border: 0;
    border-radius: 23px;
    color: var(--stone-900);
    box-shadow: 0 20px 60px rgba(15, 33, 30, .25);
}
.route-dialog::backdrop { background: rgba(14, 30, 28, .46); }
.close-button {
    position: sticky;
    top: 14px;
    z-index: 2;
    float: right;
    margin: 14px 14px 0 0;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--stone-900);
    cursor: pointer;
    font-size: 1.5rem;
}
.detail-head { padding: 32px 27px 20px; background: var(--forest-100); }
.detail-head h2 { margin: 13px 50px 6px 0; font-size: 1.6rem; letter-spacing: -.04em; }
.detail-head p { margin: 0; color: var(--stone-600); }
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    padding: 19px 27px;
}
.fact {
    padding: 12px 9px;
    border-radius: 12px;
    background: #f7f7f2;
    text-align: center;
}
.fact span { display: block; color: var(--stone-600); font-size: .72rem; margin-bottom: 5px; }
.fact strong { font-size: .93rem; }
.detail-body { padding: 0 27px 28px; }
.detail-body h3 { margin: 15px 0 8px; font-size: 1rem; }
.pending {
    padding: 15px;
    border-radius: 12px;
    color: #52645e;
    background: var(--stone-100);
    font-size: .94rem;
    line-height: 1.45;
}
.detail-links { display: flex; gap: 9px; margin-top: 20px; }
.detail-links a {
    flex: 1;
    padding: 12px;
    border-radius: 11px;
    background: var(--forest-900);
    color: white;
    text-align: center;
    font-weight: 600;
}
footer {
    padding: 25px 20px 42px;
    color: var(--stone-600);
    text-align: center;
    font-size: .88rem;
}

@media (max-width: 820px) {
    .hero { min-height: 560px; }
    .hero-copy { margin-top: 32px; }
    .hero-image {
        opacity: .4;
        width: 100%;
        mask-image: linear-gradient(0deg, #000 0%, #000 55%, transparent 100%);
    }
    main { margin-top: -24px; padding-inline: 12px; }
    .filter-panel {
        grid-template-columns: 1fr 1fr;
        padding: 12px;
    }
    .search { grid-column: span 2; }
    .checkbox { grid-column: span 2; }
    .explorer { display: flex; flex-direction: column; gap: 18px; }
    .map-card, #map { min-height: 320px; height: 320px; }
    .results { height: auto; }
    .route-list { max-height: none; }
}
