*{box-sizing:border-box}

body{
margin:0;
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
background:#f4f4f4;
color:#222;
}

.site-header{
background:#111827;
color:#fff;
position:sticky;
top:0;
z-index:1000;
box-shadow:0 2px 10px rgba(0,0,0,.15);
}

.header-inner{
max-width:1300px;
margin:auto;
padding:14px 20px;
display:flex;
align-items:center;
justify-content:space-between;
gap:20px;
}

.logo{
color:#fff;
text-decoration:none;
font-size:22px;
font-weight:700;
}

.nav-menu{
display:flex;
align-items:center;
gap:18px;
flex-wrap:wrap;
}

.nav-menu a{
color:#fff;
text-decoration:none;
font-size:15px;
font-weight:500;
transition:.2s;
}

.nav-menu a:hover{
color:#60a5fa;
}

.container{
max-width:1300px;
margin:auto;
padding:20px;
}

h1{
margin-bottom:20px;
}

/* UNIFIED CONTROLS */
.controls{
display:grid;
grid-template-columns:1fr 1fr 1fr auto;
gap:10px;
margin-bottom:20px;
background:#fff;
padding:20px;
border-radius:12px;
box-shadow:0 2px 10px rgba(0,0,0,.08);
}

input,select,button{
padding:12px;
border-radius:8px;
border:1px solid #ccc;
font-size:14px;
}

/* BUTTON */
button{
background:#0071e3;
color:#fff;
border:none;
cursor:pointer;
font-weight:600;
}

button:hover{
background:#005ec3;
}

/* MAP */
#map{
width:100%;
height:600px;
border-radius:12px;
background:#ddd;
overflow:hidden;
}

/* ROUTE CARDS */
.routes-panel{
margin-top:20px;
display:grid;
grid-template-columns:repeat(auto-fit,minmax(350px,1fr));
gap:15px;
}

.route-card{
background:#fff;
border-radius:12px;
padding:20px;
box-shadow:0 2px 10px rgba(0,0,0,.08);
border:3px solid transparent;
cursor:pointer;
transition:.2s;
}

.route-card:hover{
transform:translateY(-2px);
}

.route-card.active{
border-color:#0071e3;
}

.route-title{
font-size:18px;
font-weight:700;
margin-bottom:10px;
color:#0071e3;
}

.route-meta{
margin-bottom:6px;
color:#555;
}

/* STEPS */
.instructions{
margin-top:15px;
border-top:1px solid #eee;
padding-top:10px;
max-height:250px;
overflow-y:auto;
}

.step{
padding:12px 0;
border-bottom:1px solid #eee;
line-height:1.5;
}

.step:last-child{
border-bottom:none;
}

.step-title{
display:block;
color:#0071e3;
font-weight:700;
margin-bottom:5px;
}

.step-distance{
display:block;
margin-top:5px;
color:#666;
font-size:.85em;
}

/* PLANNER */
.planner-box{
background:#fff;
padding:20px;
border-radius:12px;
box-shadow:0 2px 10px rgba(0,0,0,.08);
margin-bottom:20px;
}

.route-row{
display:grid;
grid-template-columns:1fr auto;
gap:10px;
margin-bottom:12px;
}

.route-row input{
padding:12px;
border:1px solid #ccc;
border-radius:8px;
font-size:14px;
}

.remove-btn{
background:#ef4444;
color:#fff;
border:none;
border-radius:8px;
padding:12px 14px;
cursor:pointer;
}

.remove-btn:hover{
background:#dc2626;
}

/* SUMMARY + RESULTS */
.summary-grid,
.results{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:15px;
margin-top:20px;
}

.summary-card,
.card{
background:#fff;
padding:20px;
border-radius:12px;
box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.summary-title,
.title{
font-size:14px;
color:#0071e3;
font-weight:700;
margin-bottom:8px;
}

.summary-value,
.value{
font-size:26px;
font-weight:700;
}

/* LISTS */
.stop-list,
.directions-box{
margin-top:20px;
background:#fff;
padding:20px;
border-radius:12px;
box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.direction-step{
padding:12px 0;
border-bottom:1px solid #eee;
line-height:1.5;
}

.direction-step:last-child{
border-bottom:none;
}

.step-title{
font-weight:700;
color:#0071e3;
display:block;
margin-bottom:4px;
}

/* FOOTER */
.site-footer{
background:#111827;
color:#fff;
margin-top:50px;
}

.footer-inner{
max-width:1300px;
margin:auto;
padding:40px 20px;
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:30px;
}

.footer-column h3{
margin:0 0 15px 0;
font-size:18px;
}

.footer-column a{
display:block;
color:#d1d5db;
text-decoration:none;
margin-bottom:10px;
transition:.2s;
}

.footer-column a:hover{
color:#60a5fa;
}

.footer-bottom{
border-top:1px solid rgba(255,255,255,.1);
text-align:center;
padding:15px;
color:#ccc;
font-size:14px;
}

/* MOBILE */
@media(max-width:768px){
.controls{
grid-template-columns:1fr;
}

.header-inner{
flex-direction:column;
align-items:flex-start;
}

.nav-menu{
width:100%;
gap:15px;
}

.route-row{
grid-template-columns:1fr;
}
}