/* Location hub template F "Rail switchyard" (state hubs, batch 5), prefix phf-. Reference page: /locations/louisiana/.
   Loaded after mid.css and p-loc-hubx.css (front matter: extra: mid, p-loc-hubx, p-loc-hub6). Shared sections (answer, services,
   products shelf, industries, why, ways, migrations, cost) use phx- from p-loc-hubx; this file styles only the Hub F designs:
   hero switchyard, workflow lines (mid kit F road), train-consist architecture, boxcar row + split (mid kit C), rail tickets,
   rules waybill, signal lamps + seven-station delivery line. Behaviour: p-loc-hub6.js.
   Mid kit on Hub F pages: C split reveal (#landscape), F scroll road (#workflows), M priority sliders (#why-etg), shared I shelf
   (#products), + data-mk-group on the delivery line. */
.phf-hero, .phf-flows, .phf-arch, .phf-land, .phf-cities, .phf-rules, .phf-how {
  --phf-ink: #082238; --phf-body: #334155; --phf-muted: #475569; --phf-line: #E2E8F0; --phf-link: #0A5C8C; --phf-amber: #FFB81C;
  --phf-steel: #94A3B8; --phf-tie: #CBD5E1; --phf-plate: #F6F8FA; --phf-rust: #8A3B12;
}
.phf-hero a:focus-visible, .phf-hero button:focus-visible, .phf-arch button:focus-visible, .phf-cities a:focus-visible,
.phf-rules button:focus-visible, .phf-how a:focus-visible { outline: 3px solid #FFB81C; outline-offset: 2px; }

/* ---------- 1. Hero: switchyard ---------- */
.phf-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 60px); align-items: center; }
.phf-hero .pg-h1 { max-width: 15ch; font-size: clamp(34px, 1.1rem + 2.4vw, 54px); padding-bottom: .08em; }
.phf-hero .pg-lead { font-size: 17px; }
.phf-yard { position: relative; padding: clamp(16px, 2vw, 22px); border-radius: 22px; background: #fff; border: 1px solid var(--phf-line);
  box-shadow: 0 40px 80px -56px rgba(8,34,56,.6); }
.phf-yard__head { display: grid; gap: 4px; margin-bottom: 10px; }
.phf-yard__t { margin: 0; font: 800 18px/1.3 var(--f-display); color: var(--phf-ink); letter-spacing: -.01em; }
.phf-yard__hint { margin: 0; font: 500 14px/1.45 var(--f-body); color: var(--phf-muted); }
.phf-yard__map { border-radius: 14px; background: linear-gradient(180deg, #F3F7F9, #EAF1F5); padding: 6px 4px; }
.phf-yard__map svg { display: block; width: 100%; height: auto; }
.phf-yard__rails path { fill: none; stroke: var(--phf-steel); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s, stroke-width .35s; }
.phf-yard__rails path.is-lit { stroke: var(--phf-amber); stroke-width: 6; stroke-dasharray: 14 8; animation: phf-run 1.1s linear infinite; }
@keyframes phf-run { to { stroke-dashoffset: -44; } }
.phf-yard__sw circle { fill: #fff; stroke: var(--phf-ink); stroke-width: 2.5; }
.phf-yard__ends rect { fill: #fff; stroke: var(--phf-steel); stroke-width: 2.5; transition: fill .35s, stroke .35s; }
.phf-yard__ends rect.is-lit { fill: var(--phf-amber); stroke: var(--phf-ink); }
.phf-yard__lab text { font: 700 15px var(--f-body, Inter, sans-serif); fill: var(--phf-ink); }
.phf-yard__levers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.phf-lever { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-height: 74px; padding: 10px 6px 9px;
  border-radius: 14px; border: 1px solid var(--phf-line); background: var(--phf-plate); color: var(--phf-ink); font: 700 13px/1.25 var(--f-body);
  text-align: center; cursor: pointer; transition: background-color .25s, border-color .25s, color .25s; }
.phf-lever i { position: relative; display: block; width: 30px; height: 22px; }
.phf-lever i::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 3px; background: #475569; }
.phf-lever i::after { content: ""; position: absolute; left: 13px; bottom: 3px; width: 4px; height: 20px; border-radius: 2px; background: var(--c, #0A6FA8);
  transform-origin: 50% 100%; transform: rotate(-32deg); transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.phf-lever:hover { border-color: #B7C6D4; background: #fff; }
.phf-lever[aria-pressed="true"] { background: var(--phf-ink); border-color: var(--phf-ink); color: #fff; }
.phf-lever[aria-pressed="true"] i::before { background: #CBD5E1; }
.phf-lever[aria-pressed="true"] i::after { transform: rotate(32deg); background: var(--phf-amber); }
.phf-yard__cards { display: grid; gap: 10px; margin-top: 12px; }
.phf-card { padding: 14px 16px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--phf-line); border-left: 5px solid var(--c, #0A6FA8); }
.phf-card__line { margin: 0; font: 700 11.5px/1.4 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--phf-muted); }
.phf-card h3 { margin: 4px 0 8px; font: 800 19px/1.3 var(--f-display); color: var(--phf-ink); letter-spacing: -.01em; }
.phf-card__dl { margin: 0; display: grid; gap: 6px; }
.phf-card__dl > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 10px; }
.phf-card__dl dt { font: 700 12px/1.5 var(--f-body); color: var(--phf-muted); }
.phf-card__dl dd { margin: 0; font: 500 14.5px/1.45 var(--f-body); color: var(--phf-ink); }
.phf-card__dl dd a { display: inline-flex; align-items: center; min-height: 24px; font-weight: 700; color: var(--phf-link); }
.phf-yard.is-js .phf-card { display: none; }
.phf-yard.is-js .phf-card.is-on { display: block; animation: phf-in .4s cubic-bezier(.2,.8,.2,1); }
@keyframes phf-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.phf-yard__act { display: none; }
.phf-yard.is-js .phf-yard__act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.phf-yard__send { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 99px;
  background: var(--phf-ink); color: #fff; font: 700 15px/1.2 var(--f-body); cursor: pointer; transition: background-color .25s, transform .25s; }
.phf-yard__send:hover { background: #0A3A63; transform: translateY(-1px); }
.phf-yard__status { flex: 1 1 220px; margin: 0; font: 500 13.5px/1.45 var(--f-body); color: var(--phf-muted); }
.phf-yard__status.is-done { color: #1F7A4D; font-weight: 600; }

/* ---------- 6. Workflows: two lines on the mid kit F road ---------- */
.phf-flows__grid { display: grid; gap: clamp(36px, 5vw, 60px); }
.phf-flow__t { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; font: 800 clamp(19px, 1rem + .5vw, 23px)/1.3 var(--f-display); color: var(--phf-ink); }
.phf-flow__t span { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 6px; background: var(--c, #0A6FA8); color: #fff;
  font: 800 12px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.phf-flow .mk-road__stops > li { border-top: 4px solid var(--c, #0A6FA8); }
.phf-chip { display: inline-flex !important; align-items: center; gap: 6px; margin-top: 10px !important; padding: 4px 10px 4px 5px; border-radius: 99px;
  background: var(--phf-plate); border: 1px solid var(--phf-line); font: 700 13px/1.2 var(--f-body) !important; color: var(--phf-ink) !important; }
.phf-chip img { width: 20px; height: 20px; }

/* ---------- 7. Architecture: train consist ---------- */
.phf-consist { padding: clamp(18px, 2.4vw, 28px); border-radius: 22px; background: linear-gradient(135deg, #061A2E, #0A3A63 55%, #07605E); color: #fff; }
.phf-consist__cars { position: relative; display: flex; gap: 14px; margin: 0; padding: 4px 4px 24px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; }
.phf-consist__cars::after { content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 4px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 16px, transparent 16px 24px); pointer-events: none; }
.phf-consist__cars > li { position: relative; flex: 1 0 128px; scroll-snap-align: start; }
.phf-consist__cars > li + li::before { content: ""; position: absolute; left: -14px; top: 50%; width: 14px; height: 4px; margin-top: -10px; background: #FFB81C; }
.phf-car { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 118px; padding: 14px 8px 18px;
  border-radius: 10px 10px 6px 6px; border: 2px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  font: 700 14px/1.25 var(--f-body); text-align: center; transition: background-color .25s, border-color .25s, transform .3s cubic-bezier(.3,1.4,.5,1); }
.phf-car::before, .phf-car::after { content: ""; position: absolute; bottom: -9px; width: 16px; height: 16px; border-radius: 50%; background: #0B2A44; border: 3px solid #CBD5E1; }
.phf-car::before { left: 18px; } .phf-car::after { right: 18px; }
.phf-car img { width: 32px; height: 32px; padding: 3px; border-radius: 8px; background: #fff; }
.phf-car small { font: 600 11.5px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: #CFE3EE; }
.phf-car--engine { border-radius: 26px 10px 6px 6px; }
.phf-car--link { border-style: dashed; }
.phf-car:hover { background: rgba(255,255,255,.16); }
.phf-car[aria-pressed="true"] { background: #fff; border-color: #FFB81C; color: var(--phf-ink); transform: translateY(-4px); }
.phf-car[aria-pressed="true"] small { color: var(--phf-muted); }
.phf-consist__say { margin: 8px 0 0; min-height: 3em; font: 600 16px/1.55 var(--f-body); color: #fff; max-width: 70ch; }
.phf-consist__note { margin: 12px 0 0; font: 500 14px/1.5 var(--f-body); color: #D7E6EF; }
.phf-consist__note a { color: #FFD780; font-weight: 700; }

/* ---------- 8. Landscape: boxcar row + split ---------- */
.phf-boxcars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0 0 18px; list-style: none; }
.phf-boxcar { position: relative; display: flex; flex-direction: column; padding: 16px 16px 20px; border-radius: 8px; background: #fff; border: 2px solid var(--c, #0A6FA8);
  background-image: repeating-linear-gradient(90deg, transparent 0 22px, rgba(8,34,56,.05) 22px 24px); }
.phf-boxcar::before, .phf-boxcar::after { content: ""; position: absolute; bottom: -11px; width: 18px; height: 18px; border-radius: 50%; background: #334155; border: 3px solid #fff; box-shadow: 0 0 0 2px #334155; }
.phf-boxcar::before { left: 22px; } .phf-boxcar::after { right: 22px; }
.phf-boxcar__no { margin: 0; align-self: flex-start; padding: 3px 8px; border-radius: 4px; background: var(--c, #0A6FA8); color: #fff; font: 800 11px/1.3 var(--f-body); letter-spacing: .12em; }
.phf-boxcar h3 { margin: 10px 0 8px; font: 800 18px/1.3 var(--f-display); color: var(--phf-ink); }
.phf-boxcar__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.phf-boxcar__chips span { padding: 3px 9px; border-radius: 99px; background: var(--phf-plate); border: 1px solid var(--phf-line); font: 600 12.5px/1.4 var(--f-body); color: var(--phf-body); }
.phf-boxcar__zoho { margin: auto 0 0; font: 500 14.5px/1.5 var(--f-body); color: var(--phf-body); }
.phf-boxcar__zoho b { color: var(--phf-ink); }
.phf-split-t { margin: 44px 0 6px; font: 800 clamp(20px, 1rem + .6vw, 25px)/1.3 var(--f-display); color: var(--phf-ink); padding-bottom: .1em; }
.phf-split-sub { margin: 0 0 20px; font: 500 15.5px/1.5 var(--f-body); color: var(--phf-muted); }

/* ---------- 9. Cities: rail tickets ---------- */
.phf-tickets { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.phf-ticket { display: grid; grid-template-columns: minmax(0, 1fr) 170px; border-radius: 16px; background: #FFFBEF; border: 1px solid #E7DCC2; color: inherit; text-decoration: none;
  box-shadow: 0 30px 60px -46px rgba(8,34,56,.6); transition: transform .3s cubic-bezier(.3,1.4,.5,1), box-shadow .3s; }
.phf-ticket:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 40px 70px -46px rgba(8,34,56,.7); }
.phf-ticket__main { display: grid; gap: 6px; padding: 20px 22px; }
.phf-ticket__tag { font: 700 11.5px/1.4 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--phf-rust); }
.phf-ticket__city { font: 800 clamp(26px, 1.2rem + 1vw, 34px)/1.15 var(--f-display); color: var(--phf-ink); letter-spacing: -.02em; padding-bottom: .06em; }
.phf-ticket__txt { font: 500 15px/1.5 var(--f-body); color: var(--phf-body); }
.phf-ticket__go { margin-top: 4px; font: 700 15px/1.4 var(--f-body); color: var(--phf-link); }
.phf-ticket__stub { position: relative; display: grid; align-content: center; gap: 10px; padding: 18px 16px; border-left: 2px dashed #D9C9A3; }
.phf-ticket__stub::before, .phf-ticket__stub::after { content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid #E7DCC2; }
.phf-ticket__stub::before { top: -11px; } .phf-ticket__stub::after { bottom: -11px; }
.phf-ticket__stub > span { display: grid; font: 600 14px/1.35 var(--f-body); color: var(--phf-ink); }
.phf-ticket__stub small { font: 700 11px/1.4 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--phf-muted); }
.phf-standby { padding: 18px 20px; border-radius: 16px; background: var(--phf-plate); border: 1px dashed #B7C6D4; }
.phf-standby h3 { margin: 0 0 10px; font: 800 17px/1.35 var(--f-display); color: var(--phf-ink); }
.phf-standby ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.phf-standby li { font: 500 14.5px/1.5 var(--f-body); color: var(--phf-body); padding-left: 16px; position: relative; }
.phf-standby li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--phf-steel); }

/* ---------- 10. Rules waybill ---------- */
.phf-wb { border-radius: 18px; background: #fff; border: 1px solid var(--phf-line); overflow: hidden; }
.phf-wb__ui { padding: 16px 18px; background: var(--phf-plate); border-bottom: 1px solid var(--phf-line); }
.phf-wb__q { margin: 0 0 8px; font: 700 12px/1.4 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--phf-muted); }
.phf-wb__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.phf-wb__chip { min-height: 40px; padding: 8px 16px; border-radius: 6px; border: 1px solid #B7C6D4; background: #fff; color: var(--phf-ink); font: 700 14px/1.2 var(--f-body); cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s; }
.phf-wb__chip:hover { border-color: var(--phf-ink); }
.phf-wb__chip[aria-pressed="true"] { background: var(--phf-ink); border-color: var(--phf-ink); color: #fff; }
.phf-wb__act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.phf-wb__say { flex: 1 1 260px; margin: 0; font: 500 14px/1.45 var(--f-body); color: var(--phf-muted); }
.phf-wb__send { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 99px; background: var(--phf-ink); color: #fff;
  font: 700 15px/1.2 var(--f-body); cursor: pointer; }
.phf-wb__send:hover { background: #0A3A63; }
.phf-wb__head { display: grid; grid-template-columns: 48px minmax(0, 1.05fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; margin: 0; padding: 10px 18px;
  background: #F8FAFC; border-bottom: 2px solid var(--phf-ink); font: 800 11.5px/1.4 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--phf-muted); }
.phf-wb__rows { margin: 0; padding: 0; list-style: none; }
.phf-wb__row { display: grid; grid-template-columns: 48px minmax(0, 1.05fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; padding: 14px 18px; border-bottom: 1px dashed var(--phf-line);
  transition: background-color .3s, color .3s; }
.phf-wb__row:last-child { border-bottom: 0; }
.phf-wb__no { font: 800 15px/1.4 var(--f-display); color: var(--phf-steel); font-variant-numeric: tabular-nums; }
.phf-wb__rule b { display: block; font: 700 15.5px/1.4 var(--f-body); color: var(--phf-ink); }
.phf-wb__rule small { display: block; margin-top: 3px; font: 500 13px/1.4 var(--f-body); color: var(--phf-muted); }
.phf-wb__cell { margin: 0; font: 500 14.5px/1.5 var(--f-body); color: var(--phf-body); }
.phf-wb__cell--z { color: var(--phf-ink); }
.phf-wb__row.is-hit { background: #FFF8E6; }
.phf-wb__row.is-hit .phf-wb__no { color: #B45309; }
.phf-wb__row.is-off .phf-wb__rule b, .phf-wb__row.is-off .phf-wb__cell { color: #64748B; }

/* ---------- 14. How: signal lamps + delivery line ---------- */
.phf-sig { padding: clamp(16px, 2vw, 24px); border-radius: 20px; background: #fff; border: 1px solid var(--phf-line); }
.phf-sig__lamps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.phf-lamp { display: grid; justify-items: start; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--phf-plate); border: 1px solid var(--phf-line); }
.phf-lamp__head { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 50%; background: #0B2A44; box-shadow: inset 0 0 0 4px #1E3A52; }
.phf-lamp__head i { width: 22px; height: 22px; border-radius: 50%; background: #7F1D1D; box-shadow: 0 0 0 2px #0B2A44; transition: background-color .4s, box-shadow .4s; }
.phf-lamp.is-on .phf-lamp__head i { background: #22C55E; box-shadow: 0 0 14px 3px rgba(34,197,94,.65); }
.phf-lamp b { font: 800 17px/1.3 var(--f-display); color: var(--phf-ink); }
.phf-lamp > span:not(.phf-lamp__head) { font: 500 14px/1.45 var(--f-body); color: var(--phf-body); }
.phf-lamp .phf-lamp__now { margin-top: 4px; font: 700 14px/1.3 var(--f-body); color: var(--phf-ink); font-variant-numeric: tabular-nums; }
.phf-sig__say { margin: 14px 0 6px; font: 600 15.5px/1.5 var(--f-body); color: var(--phf-ink); }
.phf-line { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 26px 0 0; list-style: none; }
.phf-line::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--phf-ink) 0 14px, transparent 14px 20px); }
.phf-line > li { position: relative; padding: 14px 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--phf-line); }
.phf-line > li > span { position: absolute; top: -26px; left: 12px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--phf-amber);
  color: var(--phf-ink); font: 800 13px/1 var(--f-display); box-shadow: 0 0 0 3px #fff; }
.phf-line h3 { margin: 4px 0 4px; font: 800 15.5px/1.3 var(--f-display); color: var(--phf-ink); }
.phf-line p { margin: 0; font: 500 13.5px/1.45 var(--f-body); color: var(--phf-body); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .phf-line { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 34px; }
  .phf-line::before { display: none; }
  .phf-boxcars { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
}
@media (max-width: 900px) {
  .phf-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .phf-tickets { grid-template-columns: minmax(0, 1fr); }
  .phf-wb__head { display: none; }
  .phf-wb__row { grid-template-columns: 36px minmax(0, 1fr); }
  .phf-wb__cell { grid-column: 2; }
  .phf-wb__cell::before { content: attr(data-l); display: block; font: 700 11px/1.4 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--phf-muted); }
  .phf-sig__lamps { grid-template-columns: minmax(0, 1fr); }
  .phf-lamp { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .phf-lamp__head { grid-row: span 3; margin: 0; }
}
@media (max-width: 600px) {
  .phf-yard__levers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phf-yard__lab text { font-size: 19px; }
  .phf-card__dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .phf-boxcars { grid-template-columns: minmax(0, 1fr); }
  .phf-ticket { grid-template-columns: minmax(0, 1fr); }
  .phf-ticket__stub { border-left: 0; border-top: 2px dashed #D9C9A3; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phf-ticket__stub::before { top: -11px; left: -11px; } .phf-ticket__stub::after { top: -11px; bottom: auto; left: auto; right: -11px; }
  .phf-line { grid-template-columns: minmax(0, 1fr); padding-top: 0; row-gap: 12px; }
  .phf-line > li { padding-left: 52px; }
  .phf-line > li > span { top: 14px; left: 12px; }
  .phf-consist__cars > li { flex-basis: 118px; }
}
@media (prefers-reduced-motion: reduce) {
  .phf-yard__rails path.is-lit { animation: none; stroke-dasharray: none; }
  .phf-yard.is-js .phf-card.is-on { animation: none; }
  .phf-lever i::after, .phf-car, .phf-ticket { transition: none; }
}
