/* Location Template D-CA (California city pages, max 7): loads AFTER p-loc-d.css. Prefix pldc-. Spec: tools/LOCATIONS-BATCH4-SPEC.md.
   Pages: Orange County (reference), San Diego, Bay Area. Sections 2, 3, 5-11 use Template D (pld-) markup unchanged.
   Own pieces: hero "Commute map card" (schematic SVG route from Glendale, pins over it, fixes listed under the map) and the
   planner "Phase timeline slider" (sample stack chips with phase badges, range slider + phase buttons, one phase panel at a time).
   Behaviour: p-loc-dca.js. Pin positions are inline --x/--y in percent of the 400 x 280 map viewBox. */
.pldc-map-wrap, .pldc-plan { --pldc-land: #F7F2E6; --pldc-sea: #D5ECF7; --pldc-route: #E39B00; --pldc-ink: #082238; }
.pldc-stop:focus-visible, .pldc-send:focus-visible, .pldc-go button:focus-visible, .pldc-range:focus-visible { outline: 3px solid #FFB81C; outline-offset: 3px; }

/* ---------- 1. Hero: commute map card ---------- */
.pldc-map-wrap { position: relative; }
.pldc-map { position: relative; margin: 0; padding: 18px 18px 18px; border-radius: 26px; background: #fff; border: 1px solid #DCE6EC; color: var(--pld-body);
  box-shadow: 0 2px 0 #E8EEF2, 0 40px 70px -40px rgba(8,34,56,.55); }
.pldc-map::before { content: ""; position: absolute; left: 28px; right: 28px; top: -7px; height: 14px; border-radius: 8px;   /* folded map edge */
  background: repeating-linear-gradient(90deg, #E9EFF3 0 46px, #F6F9FB 46px 92px); z-index: -1; }
.pldc-map__h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.pldc-map__h b { font: 800 clamp(18px, 1rem + .45vw, 22px)/1.25 var(--f-display); letter-spacing: -.02em; color: var(--pld-ink); }
.pldc-map__h em { font: 800 11px/1 var(--f-body); font-style: normal; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: #FFF4D6; color: #7A4F00; white-space: nowrap; }
.pldc-map__hint { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--pld-muted); }
.pldc-canvas { position: relative; aspect-ratio: 400 / 280; border-radius: 18px; overflow: hidden; background: var(--pldc-land); border: 1px solid #E5DCC6; }
.pldc-canvas > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pldc-sea { fill: var(--pldc-sea); }
.pldc-grid { fill: none; stroke: #ECE3CF; stroke-width: 1; }
.pldc-line { fill: none; stroke: #8FA3B1; stroke-width: 1.5; stroke-dasharray: 5 5; }
.pldc-route { fill: none; stroke: var(--pldc-route); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.pldc-route--case { stroke: #fff; stroke-width: 11; }
.pldc-route--spur { stroke-width: 4; stroke-dasharray: 2 8; }
.pldc-shield path { fill: #1D3F8F; stroke: #fff; stroke-width: 1.5; }
.pldc-shield text { font: 800 11px/1 var(--f-body); fill: #fff; }
.pldc-js .pldc-map.is-live .pldc-route--draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pldcDraw 1.6s .3s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes pldcDraw { to { stroke-dashoffset: 0; } }
.pldc-place { position: absolute; left: var(--x); top: var(--y); transform: translate(-8px, -50%); display: flex; align-items: center; gap: 6px; pointer-events: none;
  font: 700 12.5px/1.2 var(--f-body); color: var(--pld-ink); white-space: nowrap; }
.pldc-place i { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #fff; border: 3px solid #5B6B78; }
.pldc-place--home i { width: 18px; height: 18px; border: 0; background: #082238; box-shadow: 0 0 0 4px rgba(8,34,56,.15); }
.pldc-place--home { transform: translate(-12px, -50%); }
.pldc-place small { display: block; font: 600 11.5px/1.2 var(--f-body); color: var(--pld-muted); }
.pldc-area { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); pointer-events: none; font: 800 11px/1.2 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #6B5A33; white-space: nowrap; }
.pldc-area--sea { color: #1E5A7A; }
.pldc-stop { position: absolute; left: var(--x); top: var(--y); transform: translate(-14px, -50%); display: flex; align-items: center; gap: 6px; min-height: 36px; margin: 0; padding: 4px 10px 4px 4px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 6px 16px -10px rgba(8,34,56,.6); color: var(--pld-ink); font: 700 13px/1.15 var(--f-body); text-align: left; cursor: pointer; transition: background-color .2s, box-shadow .2s, transform .2s; }
.pldc-stop--l { flex-direction: row-reverse; padding: 4px 4px 4px 10px; transform: translate(calc(-100% + 14px), -50%); text-align: right; }
.pldc-stop__dot { position: relative; width: 20px; height: 20px; flex: none; border-radius: 50%; background: #fff; border: 4px solid var(--pldc-route); transition: background-color .2s, border-color .2s; }
.pldc-stop__t { white-space: nowrap; }
.pldc-stop__t small { display: block; font: 600 11.5px/1.2 var(--f-body); color: var(--pld-muted); }
.pldc-stop:hover { box-shadow: 0 0 0 2px #FFB81C, 0 6px 16px -10px rgba(8,34,56,.6); }
.pldc-stop[aria-expanded="true"] { background: #082238; color: #fff; }
.pldc-stop[aria-expanded="true"] small { color: #CFE3EE; }
.pldc-stop[aria-expanded="true"] .pldc-stop__dot { background: #FFB81C; border-color: #fff; }
.pldc-js .pldc-map.is-live .pldc-stop[aria-expanded="true"] .pldc-stop__dot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid #FFB81C; animation: pldcPing 1.8s ease-out infinite; }
@keyframes pldcPing { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.5); } }
.pldc-map__note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--pld-muted); }
.pldc-fixes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.pldc-fix { padding: 12px 14px; border-radius: 16px; background: #F5FAFC; border: 1px solid #DCEAF2; border-left: 4px solid var(--pldc-route); }
.pldc-map.is-live .pldc-fix:not(.is-on) { display: none; }
.pldc-map.is-live .pldc-fix.is-on { animation: pldPop .4s cubic-bezier(.3,1.3,.5,1) both; }
.pldc-fix__h { margin: 0 0 6px; font: 800 12px/1.35 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--pld-deep); }
.pldc-fix .pld-chips { margin-bottom: 6px; }
.pldc-fix__how { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--pld-body); }
.pldc-map__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; padding-top: 12px; border-top: 2px dashed #E3E9EE; }
.pldc-map__count { font: 700 13.5px/1.3 var(--f-body); color: var(--pld-deep); }
.pldc-send { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px; background: #FFB81C; color: #082238; font: 700 15px/1.2 var(--f-body); cursor: pointer; transition: background-color .2s, transform .2s; }
.pldc-send:hover { background: #F0A400; transform: translateY(-1px); }
.pldc-map__status { flex-basis: 100%; margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--pld-muted); min-height: 1em; }
.pldc-map__status.is-done { color: #166534; font-weight: 600; }

/* ---------- 4. Planner: phase timeline slider ---------- */
.pldc-stack { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; }
.pldc-stack li { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 6px; border-radius: 999px; background: #F3F7F9; border: 1.5px solid var(--pld-line); font: 600 13.5px/1.2 var(--f-body); color: var(--pld-ink); transition: background-color .25s, border-color .25s; }
.pldc-stack img { width: 20px; height: 20px; flex: none; }
.pldc-stack b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; background: #E2E8F0; color: #334155; font: 800 11.5px/1 var(--f-body); }
.pldc-stack li.is-cur { background: #FFF6DD; border-color: #FFB81C; }
.pldc-stack li.is-cur b { background: #082238; color: #fff; }
.pldc-stack li.is-moved { animation: pldcNudge .5s cubic-bezier(.3,1.4,.5,1); }
@keyframes pldcNudge { 40% { transform: translateY(-5px) scale(1.04); } }
.pldc-stack__h { margin: 0 0 8px; font: 800 11.5px/1.3 var(--f-body); letter-spacing: .09em; text-transform: uppercase; color: var(--pld-deep); }

.pldc-slider { position: relative; margin: 0 0 12px; padding: 14px 14px 10px; border-radius: 18px; background: #082238; }
.pldc-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; }
.pldc-range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, #FFB81C var(--pldc-p, 0%), rgba(255,255,255,.22) var(--pldc-p, 0%)); }
.pldc-range::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,.22); }
.pldc-range::-moz-range-progress { height: 8px; border-radius: 99px; background: #FFB81C; }
.pldc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 5px solid #FFB81C; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.pldc-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 5px solid #FFB81C; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.pldc-go { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 8px 0 0; padding: 0; }
.pldc-go li:nth-child(2) { text-align: center; } .pldc-go li:nth-child(3) { text-align: right; }
.pldc-go button { min-height: 44px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: #D7E6EF; font: 700 13.5px/1.25 var(--f-body); cursor: pointer; text-align: inherit; }
.pldc-go button small { display: block; font: 600 12px/1.25 var(--f-body); color: #A9C3D3; }
.pldc-go button[aria-pressed="true"] { color: #FFB81C; background: rgba(255,255,255,.07); }
.pldc-go button[aria-pressed="true"] small { color: #fff; }
.pldc-slider { display: none; } .pldc-js .pldc-slider { display: block; }   /* the slider needs JS; without it all three phases show */

.pldc-phases { display: grid; gap: 10px; }
.pldc-phase { padding: 14px; border-radius: 16px; background: var(--pld-paper); border: 1.5px solid var(--pld-line); }
.pldc-plan.is-live .pldc-phase:not(.is-on) { display: none; }
.pldc-plan.is-live .pldc-phase.is-in { animation: pldcSlide .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pldcSlide { from { opacity: 0; transform: translateX(18px); } }
.pldc-phase__n { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pldc-phase__n b { font: 800 12px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: #fff; padding: 5px 10px; border-radius: 8px; background: var(--pld-ink); }
.pldc-phase:nth-child(2) .pldc-phase__n b { background: #0A5D86; } .pldc-phase:nth-child(3) .pldc-phase__n b { background: var(--pld-teal); }
.pldc-phase__n span { font: 700 15px/1.3 var(--f-display); color: var(--pld-ink); }
.pldc-phase__apps { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; margin: 0 0 8px; }
.pldc-phase__apps span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; border-radius: 10px; background: #fff; border: 1px solid var(--pld-line); font: 600 13.5px/1.2 var(--f-body); color: var(--pld-ink); }
.pldc-phase__apps img { width: 20px; height: 20px; flex: none; }
.pldc-phase__apps:empty::before { content: attr(data-empty); padding: 6px 0; font-size: 13.5px; color: var(--pld-muted); }
.pldc-phase__note { margin: 0; font-size: 14px; line-height: 1.55; color: var(--pld-body); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .pldc-map-wrap { max-width: 600px; }
}
@media (max-width: 560px) {
  .pldc-map { padding: 14px 12px; border-radius: 22px; }
  .pldc-map__h { flex-wrap: wrap; }
  .pldc-stop { min-height: 32px; font-size: 12px; padding: 3px 8px 3px 3px; }
  .pldc-stop--l { padding: 3px 3px 3px 8px; }
  .pldc-stop__t small, .pldc-place small { font-size: 10.5px; }
  .pldc-stop__dot { width: 18px; height: 18px; }
  .pldc-place { font-size: 11.5px; }
  .pldc-area { font-size: 10px; letter-spacing: .08em; }
  .pldc-go button { font-size: 12.5px; padding: 6px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .pldc-js .pldc-map.is-live .pldc-route--draw { animation: none !important; stroke-dashoffset: 0 !important; }
  .pldc-stop__dot::after, .pldc-map.is-live .pldc-fix.is-on, .pldc-stack li.is-moved, .pldc-plan.is-live .pldc-phase.is-in { animation: none !important; }
  .pldc-stop, .pldc-send, .pldc-stack li { transition: none !important; }
}

/* batch 4 QA fixes (2026-11-13) */
.pldc-area { font-size: 11.5px; }
@media (min-width: 981px) {
  [data-pldc-plan] .pld-build__form { position: sticky; top: 104px; align-self: start; }
}
@media (max-width: 560px) {
  .pldc-stop__t small, .pldc-place small { font-size: 12px; }
  .pldc-area { font-size: 11.5px; letter-spacing: .06em; }
}
