@charset "UTF-8";

.map-section { padding-block: clamp(2rem, 4.5vw, 4rem) clamp(3rem, 5.5vw, 5rem); }
.route-planner {
  display: grid;
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  align-items: stretch;
  gap: 1.25rem;
  scroll-margin-top: 6rem;
}
.route-planner > * { min-width: 0; }
.route-controls {
  padding: clamp(1.4rem, 2.2vw, 2rem);
  background: #fff;
  border: 1px solid var(--line, #dce2e9);
  border-top: 3px solid var(--blue, #235ef2);
  border-radius: 10px;
}
.route-controls > .eyebrow { margin-bottom: .55rem; font-size: .67rem; }
.route-controls h2 { margin-bottom: .5rem; font-size: clamp(1.65rem, 2.3vw, 2rem); line-height: 1.15; letter-spacing: -.045em; }
.route-origin { margin-bottom: 1.6rem; color: #586677; font-size: .85rem; line-height: 1.65; }
.route-controls .field { margin-bottom: 1.35rem; }
.route-controls .field > label, .mode-switch legend {
  margin-bottom: .55rem;
  color: #293c54;
  font-size: .82rem;
  font-weight: 650;
}
.route-controls select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: .8rem 2rem .8rem .85rem;
  color: #111d2b;
  background: #fcfdff;
  border: 1px solid #b9c5d4;
  border-radius: 6px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  cursor: pointer;
}
.route-controls select:hover { border-color: #7a8da6; }
.route-controls select:focus-visible { outline: 3px solid #235ef2; outline-offset: 3px; }
.route-controls optgroup { color: #111d2b; font-weight: 650; }
.route-controls option { font-weight: 400; }
.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  min-inline-size: 0;
  margin: 0 0 1.35rem;
  padding: 0;
  border: 0;
}
.mode-switch legend { width: 100%; padding: 0; line-height: 1.6; }
.mode-switch label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: .7rem .45rem;
  color: #46576c;
  background: #f5f7fa;
  border: 1px solid #dce2e9;
  border-radius: 6px;
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.mode-switch label:hover { background: #edf2fb; border-color: #a6b9e2; }
.mode-switch label:has(input:checked) { color: #1744be; background: #eaf0ff; border-color: #235ef2; }
.mode-switch label:focus-within { outline: 3px solid #235ef2; outline-offset: 3px; }
.mode-switch input { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: #235ef2; cursor: pointer; }
.route-controls .selected-institution { margin: 1.1rem 0 .4rem; font-size: 1.03rem; line-height: 1.45; letter-spacing: -.02em; overflow-wrap: anywhere; }
#selected-address { margin-bottom: 1.1rem; color: #586677; font-size: .82rem; line-height: 1.7; overflow-wrap: anywhere; }
#route-summary {
  margin-block: .25rem 1.25rem;
  padding: .9rem 1rem;
  color: #425776;
  background: #f0f4fc;
  border: 1px solid #dce6fb;
  border-radius: 7px;
  font-size: .84rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.route-buttons { display: grid; gap: .65rem; }
.route-buttons .button { width: 100%; min-width: 0; min-height: 49px; padding: .8rem 1rem; font-size: .87rem; }
.map-note { margin: 1.05rem 0 0; color: #586677; font-size: .78rem; line-height: 1.75; overflow-wrap: anywhere; }
.map-note a { color: #1744be; }
.map-canvas-wrap {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  margin: 0;
  background: #e7edf3;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}
.map-canvas-wrap iframe {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 520px;
  border: 0;
  background: #e7edf3;
}
.map-canvas-wrap iframe:focus-visible { outline: 3px solid #235ef2; outline-offset: -4px; }
.map-canvas-wrap figcaption { padding: 1.05rem 1.25rem; color: #586677; background: #fff; border-top: 1px solid #dce2e9; font-size: .8rem; line-height: 1.7; }
.map-canvas-wrap figcaption strong { display: block; margin-bottom: .15rem; color: #111d2b; font-size: .94rem; font-weight: 650; }
.map-canvas-wrap figcaption a { color: #1744be; }
.map-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.institution-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 1.65rem;
  background: #fff;
  border: 1px solid #dce2e9;
  border-radius: 9px;
}
.institution-card h3 { margin-bottom: .8rem; font-size: 1.12rem; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
.institution-card p { margin-bottom: 1rem; color: #586677; font-size: .88rem; line-height: 1.7; }
.institution-card .eyebrow { margin-bottom: .7rem; color: #1744be; font-size: .65rem; }
.institution-card button[data-place] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  padding: .45rem 0;
  color: #1744be;
  background: transparent;
  border: 0;
  border-radius: 2px;
  font: inherit;
  font-size: .85rem;
  font-weight: 650;
  line-height: 1.5;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .23em;
  cursor: pointer;
}
.institution-card button[data-place][hidden] { display: none; }
.institution-card button[data-place]:focus-visible { outline: 3px solid #235ef2; outline-offset: 3px; }
.institution-card:has(button[aria-pressed="true"]) { border-color: #235ef2; background: #f9fbff; box-shadow: inset 0 3px 0 #235ef2; }
.institution-source { margin-block: .65rem .8rem; color: #586677; font-size: .76rem; line-height: 1.6; }
.institution-source:hover { color: #1744be; }
.map-direct-links { display: flex; flex-direction: column; gap: .35rem; width: 100%; margin-top: .3rem; padding-top: .8rem; border-top: 1px solid #e4e9f0; }
.map-direct-links a { display: inline-flex; align-items: center; min-height: 38px; color: #1744be; font-size: .8rem; line-height: 1.5; }

@media (min-width: 1450px) {
  .route-planner { grid-template-columns: 360px minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 1000px) {
  .route-planner { grid-template-columns: minmax(270px, 310px) minmax(0, 1fr); gap: 1rem; }
  .route-controls { padding: 1.35rem; }
  .map-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .route-planner { grid-template-columns: minmax(0, 1fr); }
  .route-controls { padding: 1.5rem; }
  .route-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-switch { max-width: 400px; }
  .map-canvas-wrap iframe { height: 440px; min-height: 440px; }
}
@media (max-width: 540px) {
  .map-section { padding-top: 1.5rem; }
  .route-controls { padding: 1.25rem; }
  .route-controls h2 { font-size: 1.75rem; }
  .route-buttons { gap: .5rem; }
  .route-buttons .button { min-height: 50px; padding: .75rem .5rem; font-size: .8rem; }
  .map-canvas-wrap { border-radius: 8px; }
  .map-canvas-wrap iframe { height: 380px; min-height: 380px; }
  .map-canvas-wrap figcaption { padding: .95rem 1rem; }
  .map-directory { grid-template-columns: minmax(0, 1fr); gap: .8rem; margin-top: 1.5rem; }
  .institution-card { padding: 1.35rem; }
  .institution-card h3 { font-size: 1.15rem; }
  .map-direct-links a { min-height: 44px; }
}
@media (max-width: 360px) {
  .route-controls { padding: 1rem; }
  .route-buttons { grid-template-columns: minmax(0, 1fr); }
  .mode-switch label { font-size: .77rem; gap: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .route-planner *, .map-directory * { scroll-behavior: auto; transition: none; }
}
@media print {
  .map-section { padding-block: 1rem; }
  .route-planner { display: block; }
  .route-controls { border: 1px solid #aaa; break-inside: avoid; }
  .map-canvas-wrap, .mode-switch, .route-controls .field, .route-buttons, .institution-card button[data-place] { display: none; }
  .map-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .institution-card { break-inside: avoid; }
}
