/* Contact: two matching cards with aligned headings and content. */
.contact-page .page-hero { padding:22px 0 32px; }
.contact-page .breadcrumbs-new { margin-bottom:24px; }
.contact-page .page-hero .eyebrow { margin-bottom:14px; }
.contact-page .page-hero h1 { max-width:none; font-size:clamp(34px,3.4vw,48px); }
.contact-page .page-intro { max-width:none; margin-top:16px; }
.contact-section { background:var(--cream); padding:48px 0 64px; }
.contact-layout { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; align-items:stretch; }
.contact-map-column { min-width:0; display:flex; }
.contact-map-block, .contact-panel {
  min-width:0; width:100%; border:1px solid var(--line); background:white;
  border-radius:8px; padding:0; display:flex; flex-direction:column;
}
.contact-map-block { scroll-margin-top:120px; }
.contact-card-header { padding:28px; min-height:204px; border-bottom:1px solid var(--line); }
.contact-card-header .eyebrow { display:block; margin:0 0 14px; font-size:13px; line-height:1.5; }
.contact-card-header h2 { font-size:30px; line-height:1.2; letter-spacing:-1px; margin:0 0 14px; }
.contact-card-intro { font-size:16px; line-height:1.6; margin:0; color:var(--muted); }
.contact-map-layout { display:flex; flex-direction:column; flex:1; min-width:0; }
.map-canvas-panel { min-width:0; position:relative; margin:24px 28px 0; border:1px solid var(--line); }
#contact-map { height:300px; min-height:0; z-index:0; background:#e8edef; }
.map-controls { padding:24px 28px 28px; min-width:0; display:flex; flex-direction:column; flex:1; }
.map-fields { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:18px; }
.map-fields > div { min-width:0; }
.map-controls label { display:block; font-weight:600; font-size:15px; margin-bottom:9px; }
.map-controls select { width:100%; min-height:50px; font:inherit; color:var(--ink); padding:10px 12px; border:1px solid #cdd2d8; background:white; margin-bottom:18px; }
.map-actions { margin-top:auto; display:grid; gap:10px; }
.map-actions .map-privacy { margin-bottom:4px; }
.map-controls .button { width:100%; margin:0; justify-content:center; }
.map-controls [hidden] { display:none; }
.contact-form-content { padding:24px 28px 28px; display:flex; flex-direction:column; flex:1; }
.contact-form { display:flex; flex-direction:column; flex:1; }
.contact-fields { flex:1; grid-template-rows:auto auto auto minmax(180px,1fr); }
.contact-field:has(textarea) { display:flex; flex-direction:column; }
.contact-field textarea { flex:1; min-height:180px; }
.contact-form .button { width:100%; justify-content:center; }
.contact-addresses { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,480px),1fr)); gap:28px; margin-top:28px; }
.contact-addresses .contact-address { margin:0; padding:28px; border:1px solid var(--line); border-radius:8px; background:white; }
.contact-addresses .contact-address dl { display:grid; grid-template-columns:140px minmax(0,1fr) 140px minmax(0,1fr); gap:16px 20px; }
.contact-addresses .contact-address dd { margin:0; overflow-wrap:anywhere; }
.map-secondary { border-color:var(--line); background:white; color:var(--ink); }
.map-privacy, .map-note, .map-attribution, #map-accuracy { font-size:14px; color:var(--muted); line-height:1.6; margin-bottom:18px; }
#map-status { margin:12px 0 20px; font-size:16px; }
#map-progress-panel { padding:16px; border-left:3px solid var(--red); background:var(--cream); margin-bottom:20px; }
#map-remaining { font-size:22px; }
#map-duration, #map-instruction { margin:8px 0; }
#map-progress { width:100%; accent-color:var(--red); }
#map-steps { margin:20px 0; }
#map-steps summary { cursor:pointer; font-weight:700; }
#map-steps ol { padding-left:22px; max-height:260px; overflow:auto; }
#map-steps li { margin:12px 0; font-size:15px; }
#map-tile-status { position:absolute; bottom:35px; left:12px; right:12px; z-index:1; background:white; font-size:14px; padding:0 10px; }
#map-tile-status:empty { display:none; }
.map-attribution a { text-decoration:underline; }

@media(max-width:1100px) {
  .contact-card-header { min-height:240px; }
  .map-fields { grid-template-columns:minmax(0,1fr); gap:0; }
  .contact-addresses .contact-address dl { grid-template-columns:140px minmax(0,1fr); }
}
@media(max-width:1000px) {
  .contact-layout { grid-template-columns:minmax(0,1fr); gap:24px; }
  .contact-card-header { min-height:0; }
  .map-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
  #contact-map { height:340px; }
}
@media(max-width:600px) {
  .contact-section { padding:28px 0 40px; }
  .contact-card-header, .contact-form-content, .map-controls { padding:22px; }
  .contact-card-header h2 { font-size:28px; }
  .map-canvas-panel { margin:22px 22px 0; }
  .map-fields { grid-template-columns:minmax(0,1fr); gap:0; }
  .contact-fields { grid-template-rows:none; }
  .contact-addresses .contact-address dl { grid-template-columns:1fr; gap:6px; }
  .contact-addresses .contact-address dd { margin-bottom:14px; }
  #contact-map { height:280px; }
}

/* Compact controls sit outside the map: gestures never rotate the toolbar. */
.map-toolbar {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;background:#fff;border-bottom:1px solid var(--line);position:relative;z-index:2}
.map-basemaps,.map-tools {display:flex;align-items:center;gap:4px}
.map-basemaps {padding:3px;background:#f0f2f5;border-radius:6px}
.map-toolbar button,.map-toolbar summary {font:inherit;cursor:pointer;color:var(--ink);border:0;background:transparent}
.map-basemaps button {padding:8px 10px;border-radius:4px;font-size:13px;font-weight:600;min-height:36px}
.map-basemaps button[aria-pressed="true"] {background:var(--ink);color:white}
.map-tool {width:36px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:5px;list-style:none}
.map-tool::-webkit-details-marker {display:none}
.map-tool svg {width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.map-tool svg circle {fill:white}
.map-tool:hover,.map-options[open]>summary {background:#edf0f4}
.map-toolbar :is(button,summary):focus-visible {outline:3px solid #247cff;outline-offset:2px}
.map-toolbar button:disabled {opacity:.4;cursor:not-allowed}
.map-options-panel {position:absolute;right:8px;top:calc(100% + 6px);width:232px;max-width:calc(100% - 16px);padding:14px;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 24px #111e3226}
.map-options-panel p {display:flex;justify-content:space-between;gap:10px;margin:0 0 10px;font-size:13px;font-weight:600}
#map-bearing {font-weight:400;color:var(--muted)}
.map-rotation {display:flex;gap:6px;padding-bottom:10px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.map-rotation button {flex:1;border:1px solid var(--line);border-radius:4px;min-height:40px;font-size:23px}
.map-rotation #map-north {flex:2;font-size:13px}
.map-options-panel>button {display:block;width:100%;min-height:42px;text-align:left;padding:8px 6px;font-size:13px;border-radius:4px}
.map-options-panel button:hover:not(:disabled) {background:#edf0f4}
.map-canvas-panel .leaflet-control-zoom a {width:36px;height:36px;line-height:36px}
.map-canvas-panel .leaflet-control-attribution {max-width:80%;font-size:10px;line-height:1.35}
.map-fullscreen-dialog {width:100vw;width:100dvw;max-width:none;height:100vh;height:100dvh;max-height:none;inset:0;margin:0;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));border:0;border-radius:0;background:#f3f5f7;overflow:hidden}
.map-fullscreen-dialog[open] {display:flex}
.map-fullscreen-dialog .map-canvas-panel {margin:0;width:100%;height:100%;display:flex;flex-direction:column}
.map-fullscreen-dialog #contact-map {height:auto;min-height:0;flex:1}
.map-fullscreen-dialog .map-toolbar {flex:none}
.map-fullscreen-dialog #map-tile-status {bottom:42px}
@media(max-width:400px) {
  .map-toolbar {gap:3px;padding:6px}
  .map-basemaps button {padding-inline:8px}
  .map-tools {gap:0}
  .map-tool {width:34px}
}

/* Clear boundaries and consistent states across the contact cards. */
.contact-map-block, .contact-panel, .contact-addresses .contact-address {
  border-color:#c4cdd8; border-radius:14px; box-shadow:0 8px 24px #1423380a;
}
.contact-card-header {background:#f8fafc;border-color:#d2dae4;border-radius:14px 14px 0 0}
.map-canvas-panel {border-color:#a9b7c8;border-radius:10px;box-shadow:0 3px 10px #1423380c}
#contact-map {border-radius:0 0 9px 9px}
.map-toolbar {background:#eaf0f6;border-color:#a9b7c8;border-radius:9px 9px 0 0}
.map-basemaps {background:white;border:1px solid #acb9ca;border-radius:8px}
.map-basemaps button {border:1px solid transparent}
.map-basemaps button[aria-pressed="true"] {border-color:var(--ink);box-shadow:0 2px 4px #14233826}
.map-basemaps button:hover:not([aria-pressed="true"]) {background:#edf2f8;border-color:#acb9ca}
.map-toolbar .map-tool {border:1px solid #98a9bd;background:white;border-radius:7px;box-shadow:0 1px 2px #1423380d}
.map-toolbar .map-tool:hover,.map-options[open]>summary.map-tool {background:#dce7f3;border-color:#526c8d;color:#142e50}
.map-toolbar #map-expand[aria-expanded="true"] {background:var(--ink);border-color:var(--ink);color:white}
.map-options-panel {border-color:#98a9bd;border-radius:10px;box-shadow:0 10px 30px #111e3233}
.map-rotation button {border-color:#98a9bd;background:#f7f9fc;border-radius:6px;min-height:44px}
.map-options-panel>button {min-height:44px;padding:10px;border:1px solid #afbdce;border-radius:6px;background:#f7f9fc;margin-top:8px}
.contact-page .contact-field :is(input,textarea), .map-controls select {
  border:1px solid #8d9eb3;border-radius:8px;background:#fbfcfe;
  box-shadow:inset 0 1px 2px #14233805;transition:border-color .15s,box-shadow .15s,background-color .15s;
}
.contact-page .contact-field :is(input,textarea):hover, .map-controls select:hover {border-color:#566f8f;background:white}
.contact-page .contact-field :is(input,textarea):focus, .map-controls select:focus {
  outline:2px solid #315f99;outline-offset:2px;border-color:#315f99;background:white;
}
.contact-page .has-error :is(input,textarea) {border-color:#c5222b;background:#fff8f8}
.contact-page .button {border-radius:8px}
.map-controls .map-secondary {border:1px solid #8d9eb3;background:#f4f7fb;color:var(--ink)}
.map-controls .map-secondary:hover {border-color:#526c8d;background:#e7eef7}
#map-status {padding:12px 14px;border:1px solid #c1cfdf;border-radius:8px;background:#f0f5fb;color:#233e60;line-height:1.6}
#map-progress-panel {border:1px solid #c1cfdf;border-left:3px solid var(--red);border-radius:8px;background:#f5f8fc}
#map-steps {border:1px solid #aebed0;border-radius:8px;background:#f8fafc;padding:12px 14px}
#map-steps summary:focus-visible {outline:2px solid #315f99;outline-offset:4px}
.map-canvas-panel .leaflet-control-zoom {border:1px solid #8d9eb3;border-radius:8px;box-shadow:0 3px 10px #14233826;overflow:hidden}
.map-canvas-panel .leaflet-control-zoom a:hover {background:#e7eef7}
#map-tile-status:not(:empty) {padding:10px;border:1px solid #c3a767;border-radius:6px;background:#fff9eb;color:#604c24;box-shadow:0 2px 8px #1423380d}
@media(max-width:400px) {
  .map-tools {gap:4px}
  .map-tool {width:32px}
}
@media(prefers-reduced-motion:reduce) {
  .contact-page .contact-field :is(input,textarea), .map-controls select {transition:none}
}
