/* =========================================================================
   KYTC Operational Plan — /operational-plan

   NOTE: rules below line ~430 are a later override layer that reuses some
   of the same selectors (.purpose-grid, .roadmap, .goal-card--n). Those win
   on source order, so change positioning THERE, not in the base rules.
   ========================================================================= */

/* Replaces the .container gutters we opted out of in the template. Drop this
   if the site's .content class already supplies horizontal padding. */
.plan-page {
  padding-inline: 1.5rem;
}

.operational-plan {
  --plan-green: #159447;
  --plan-green-dark: #087235;
  --plan-navy: var(--trak-navy, #003764);
  --plan-gold: var(--trak-gold, #ffc600);
  max-width: 1180px;
  margin: 0 auto 3rem;
  color: var(--plan-navy);
}

/* ========================================================================
   HEADER — title band and gold-rule subtitle
   ======================================================================== */
.operational-plan__header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.operational-plan__eyebrow {
  margin: 0 0 .45rem;
  color: var(--trak-blue, #1b75bc);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.operational-plan h1 {
  margin: 0;
  padding: 1.2rem 1.5rem;
  background: var(--plan-navy);
  color: #fff;
  font-size: clamp(1.55rem, 3.1vw, 2.65rem);
  font-weight: 800;
  line-height: 1.12;
  text-transform: uppercase;
}

.operational-plan__subtitle {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-style: italic;
  font-weight: 700;
}

.operational-plan__subtitle:before,
.operational-plan__subtitle:after {
  height: 4px;
  background: var(--plan-gold);
  content: "";
  flex: 1;
}

/* ========================================================================
   VISION / MISSION — the two green signs the road passes between
   ======================================================================== */
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.purpose-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 3px solid var(--plan-green);
  border-radius: .8rem;
  background: linear-gradient(135deg, var(--plan-green), var(--plan-green-dark));
  box-shadow: 0 4px 12px rgba(0, 55, 100, .12);
  color: #fff;
}

.purpose-card__icon {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: #fff;
  color: var(--plan-green);
  flex: 0 0 auto;
  place-items: center;
}

.purpose-card h2 {
  margin: 0 0 .35rem;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
}

.purpose-card p {
  margin: 0;
  line-height: 1.45;
}

/* ========================================================================
   ROADMAP — road SVG
   ======================================================================== */
/* The SVG uses viewBox "0 -150 1000 1000" with preserveAspectRatio="none",
   so 1 unit of y == 1px of the .roadmap box and the goal cards below can be
   positioned in px against the same scale. Horizontal road bands sit at
   y = 125, 300 (Goal 1), 67 (the Goal 2 hook), 510 and 700. */

.roadmap {
  position: relative;
  min-height: 730px;
  margin: 1.5rem 0;
}

.roadmap__road {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.roadmap__asphalt {
  fill: none;
  stroke: var(--plan-navy);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 88;
}

.roadmap__centerline {
  fill: none;
  stroke: #fff;
  stroke-dasharray: 20 22;
  stroke-width: 5;
}

/* ========================================================================
   GOAL CARDS — absolutely positioned onto the road bands
   ======================================================================== */
.goal-list {
  position: relative;
  min-height: 730px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.goal-card {
  position: absolute;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .85rem;
  align-items: center;
  width: min(390px, 38%);
  min-height: 112px;
  padding: .9rem 1rem;
  border: 1px solid #d9e2ea;
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 5px 16px rgba(0, 41, 75, .16);
}

.goal-card--1 {
  top: 18px;
  left: 10%;
}

.goal-card--2 {
  top: 120px;
  right: 2%;
}

.goal-card--3 {
  top: 280px;
  left: 38%;
}

.goal-card--4 {
  top: 400px;
  left: 3%;
}

.goal-card--5 {
  right: 10%;
  bottom: 10px;
}

.goal-card__number {
  position: relative;
  display: grid;
  width: 3.5rem;
  min-height: 4.6rem;
  border: 3px double #fff;
  border-radius: .3rem;
  background: var(--plan-green);
  color: #fff;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  place-content: center;
  text-align: center;
}

.goal-card__number small {
  display: block;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Sign posts. Each goal sign is mounted on a post running to the pavement, the
   way the handout draws them. Direction depends on which side the nearest road
   band is: --post-down grows from the bottom of the sign, --post-up from the
   top. Both default to 0, so a card with neither set gets no post. Same metal
   treatment as the bridge piers. */
.goal-card__number::before,
.goal-card__number::after {
  position: absolute;
  left: 50%;
  width: 11px;
  margin-left: -5.5px;
  border-inline: 1px solid #7d8991;
  background: linear-gradient(90deg, #8b969d, #f7f8f9 55%, #949fa6);
  content: "";
}

.goal-card__number::before {
  bottom: 100%;
  height: var(--post-up, 0);
}

.goal-card__number::after {
  top: 100%;
  height: var(--post-down, 0);
}

.goal-card__icon {
  color: var(--trak-sky, #5eb3e4);
  font-size: 1.8rem;
}

.goal-card h3 {
  margin: 0;
  color: var(--plan-navy);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 800;
  line-height: 1.25;
}

/* ========================================================================
   WE VALUE / IMPLEMENTING THE PLAN
   ======================================================================== */
.plan-details {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 1.5rem;
  align-items: stretch;
  margin: 1.5rem 0;
}

.values-card,
.implementation-card {
  border-radius: .9rem;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 41, 75, .13);
}

/* Both of these sit inside .roadmap now, positioned in road coordinates, so
   the road can run behind and around them the way the handout does. */
.values-card {
  position: absolute;
  top: 760px;
  left: 3%;
  z-index: 3;
  display: grid;
  width: 30%;
  place-items: center;
  border: 0;
  background: none;
  box-shadow: none;
}

/* "We Value" wheel, drawn inline so it has no background to knock out and
   the road can pass right up against it. Swap in the official PNG here if you
   'd rather — it needs a transparent background to sit on the road. */
.values-wheel {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
}

.values-wheel__ring {
  fill: var(--plan-gold);
}

.values-wheel__label {
  fill: var(--plan-navy);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .4px;
  text-anchor: middle;
}

.values-wheel__label--long {
  font-size: 11.5px;
}

.values-wheel__title {
  fill: var(--plan-navy);
  font-size: 46px;
  font-weight: 800;
  text-anchor: middle;
}

.values-wheel__mark {
  fill: var(--trak-blue, #1b75bc);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-anchor: middle;
}

.values-wheel__mark--sub {
  font-size: 9px;
  letter-spacing: 1px;
}

.values-card__heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.values-card__heading>span {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--plan-gold);
  color: var(--plan-navy);
  font-size: 1.4rem;
  place-items: center;
}

.values-card__heading p {
  margin: 0;
  color: #596773;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.values-card h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.value-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-list li {
  display: grid;
  min-height: 7rem;
  padding: .75rem;
  border-right: 1px solid rgba(0, 55, 100, .18);
  background: #fff8d7;
  font-size: .88rem;
  font-weight: 800;
  place-items: center;
  text-align: center;
}

.value-list li:first-child {
  border-radius: .6rem 0 0 .6rem;
}

.value-list li:last-child {
  border: 0;
  border-radius: 0 .6rem .6rem 0;
}

.implementation-card {
  position: absolute;
  top: 660px;
  right: 2%;
  z-index: 3;
  width: 29%;
  min-height: 355px;
  padding: 2.25rem 1rem 1rem;
  border: 10px solid var(--trak-sky, #5eb3e4);
  border-radius: .9rem;
  background: #fff;
  isolation: isolate;
}

.implementation-card h2 {
  position: absolute;
  top: -21px;
  left: 50%;
  z-index: 2;
  width: calc(100% - 22px);
  margin: 0;
  padding: .45rem .5rem;
  transform: translateX(-50%);
  border: 2px solid #fff;
  border-radius: .35rem;
  background: var(--plan-gold);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 41, 75, .18);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.implementation-card::before {
  position: absolute;
  top: -30px;
  left: 50%;
  z-index: 1;
  width: 40px;
  height: 40px;
  transform: translateX(-50%);
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--plan-gold);
  content: "";
}

.implementation-card dl {
  margin: 0;
  padding: .55rem .35rem 0;
}

.implementation-card dl div {
  margin-bottom: .75rem;
}

.implementation-card dl div:last-child {
  margin-bottom: 0;
}

.implementation-card dt {
  display: inline;
  font-weight: 800;
}

.implementation-card dt:after {
  content: ": ";
}

.implementation-card dd {
  display: inline;
  margin: 0;
}

/* Team Kentucky lockup, centred under the definitions like the handout.
   width/height are the asset's real pixel size, so the space is reserved
   before the image loads and the card doesn't jump. */
.implementation-card__mark {
  display: block;
  width: 100%;
  max-width: 135px;
  height: auto;
  margin: 1.25rem auto .25rem;
}

/* ========================================================================
   SUMMARY
   ======================================================================== */
.operational-plan__summary {
  padding: 1.5rem;
  border-left: 6px solid var(--plan-gold);
  background: #f4f8fb;
}

.operational-plan__summary h2 {
  margin: 0 0 .6rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.operational-plan__summary p {
  margin: 0 0 .65rem;
  line-height: 1.55;
}

.operational-plan__summary p:last-child {
  margin-bottom: 0;
}

/* ========================================================================
   RESPONSIVE — base layer
   ======================================================================== */
@media(max-width:991.98px) {

  .roadmap,
  .goal-list {
    min-height: 650px;
  }

  .roadmap__road {
    height: 650px;
  }

  .goal-card {
    width: 43%;
  }

  .goal-card--3 {
    left: 32%;
  }

  .plan-details {
    grid-template-columns: 1fr;
  }
}

@media(max-width:767.98px) {

  .operational-plan__subtitle:before,
  .operational-plan__subtitle:after {
    display: none;
  }

  .purpose-grid {
    grid-template-columns: 1fr;
  }

  .roadmap,
  .goal-list {
    min-height: auto;
  }

  .roadmap__road {
    display: none;
  }

  .goal-list {
    display: grid;
    gap: 1rem;
  }

  .goal-card {
    position: static;
    width: 100%;
    min-height: 0;
  }

  .goal-card {
    --post-up: 0;
    --post-down: 0;
  }

  .goal-card--5 {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto 1fr;
    justify-items: start;
    padding: .9rem 1rem;
    text-align: left;
  }

  /* the wheel and Implementing card drop back into normal flow */
  .values-card {
    position: static;
    width: 100%;
    margin-top: 1.25rem;
  }

  .implementation-card {
    position: relative;
    width: 100%;
    margin-top: 2rem;
  }

  .values-wheel {
    max-width: 320px;
  }

  .value-list {
    grid-template-columns: 1fr;
  }

  .value-list li {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 55, 100, .18);
  }

  .value-list li:first-child {
    border-radius: .6rem .6rem 0 0;
  }

  .value-list li:last-child {
    border-radius: 0 0 .6rem .6rem;
  }
}

/* ========================================================================
   OVERRIDE LAYER
   ======================================================================== */
/* Wider card separation, raised road entrance, and concrete overpass.
   These re-declare earlier selectors on purpose — source order is what
   makes them apply. */

/* Wider card separation, raised road entrance, and concrete overpass. */
.purpose-grid {
  position: relative;
  z-index: 3;
  column-gap: 8rem;
  margin-bottom: 0;
}

.purpose-card {
  position: relative;
  z-index: 4;
  min-height: 150px;
}

.purpose-card {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 1.5rem;
}

.purpose-card::after {
  position: absolute;
  inset: 5px;
  z-index: 0;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: .75rem;
  content: "";
  pointer-events: none;
}

.purpose-card>* {
  position: relative;
  z-index: 1;
}

.roadmap {
  z-index: 1;
  min-height: 1180px;
  margin-top: 0;
}

.roadmap__road {
  top: -150px;
  right: 0;
  bottom: auto;
  left: 0;
  z-index: 1;
  height: calc(100% + 150px);
}

.goal-list {
  z-index: 2;
  min-height: 1180px;
}

.goal-card--1 {
  top: 70px;
  left: 8%;
  --post-down: 130px;
}

.goal-card--2 {
  top: 135px;
  right: 3%;
  --post-up: 95px;
}

.goal-card--3 {
  top: 360px;
  left: 39%;
  --post-down: 65px;
}

.goal-card--4 {
  top: 580px;
  left: calc(4% + 50px);
  --post-down: 40px;
}

/* Goal 5 is portrait like the handout. Its wording sits above the sign, and
   the sign post extends downward to the bottom road. */
.goal-card--5 {
  top: 800px;
  right: auto;
  bottom: auto;
  left: 42%;
  width: 15%;
  min-width: 140px;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: .6rem;
  padding: 1.1rem .9rem;
  text-align: center;
  --post-up: 0;
  --post-down: 65px;
}

.goal-card--5 h3 {
  order: 1;
}

.goal-card--5 .goal-card__number {
  order: 2;
}

/* ========================================================================
   BRIDGE — the overpass straddling the road's entry ramp
   ======================================================================== */
.plan-bridge {
  position: absolute;
  left: 50%;
  bottom: 45px;
  z-index: 7;
  width: 160px;
  height: 92px;
  transform: translateX(-50%);
  pointer-events: none;
}

.plan-bridge__rail {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  width: calc(100% - 16px);
  height: 28px;
  border-top: 5px solid #d6dde1;
  border-bottom: 4px solid #7a8993;
}

.plan-bridge__rail i {
  display: block;
  width: 6px;
  height: 28px;
  margin-top: -4px;
  border-inline: 1px solid #737f87;
  background: linear-gradient(90deg, #76838c, #f7f9fa 52%, #76838c);
}

.plan-bridge__deck {
  position: absolute;
  top: 35px;
  left: 0;
  z-index: 5;
  width: 100%;
  height: 20px;
  border: 2px solid #566570;
  border-radius: 2px;
  background: linear-gradient(#b9c2c8, #6c7a84 48%, #50606b 52%, #89969f);
  box-shadow: 0 3px 5px rgba(0, 41, 75, .32), inset 0 3px rgba(255, 255, 255, .38);
}

.plan-bridge__beam {
  position: absolute;
  top: 55px;
  left: 10px;
  z-index: 3;
  width: calc(100% - 20px);
  height: 9px;
  border: 1px solid #65747e;
  background: repeating-linear-gradient(90deg, #d9dfe3 0 30px, #77858e 30px 42px);
}

.plan-bridge__pier {
  position: absolute;
  top: 62px;
  z-index: 2;
  width: 15px;
  height: 30px;
  border-inline: 2px solid #7d8991;
  background: linear-gradient(90deg, #8b969d, #f7f8f9 55%, #949fa6);
}

.plan-bridge__pier:after {
  position: absolute;
  bottom: 0;
  left: -6px;
  width: 23px;
  height: 6px;
  border: 1px solid #707d85;
  background: #aeb7bd;
  content: "";
}

.plan-bridge__pier--left {
  left: 47px;
}

.plan-bridge__pier--right {
  right: 47px;
}

/* ========================================================================
   VEHICLES — Font Awesome glyphs parked on the road bands
   ======================================================================== */
.road-vehicles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Each vehicle is centred on a point in road coordinates:
     left = vbx / 10  (as a %)   top = vby (as px)
   See the road bands listed at the top of the ROADMAP section. Side-view
   vehicles sit on horizontal bands; the two roof-view ones sit on vertical
   segments. --len is the vehicle's length along its direction of travel.

   Vehicles ride in a LANE, not on the centreline: the road is 88 units wide
   with the dashes down the middle, so a lane centre is 22 units off centre
   (22px on a horizontal band, 2.2% on a vertical one). Right-hand traffic —
   eastbound is +22, westbound -22, southbound -2.2%, northbound +2.2%. */
.road-vehicle {
  position: absolute;
  width: var(--len, 52px);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 2px rgba(0, 20, 40, .45));
}

.road-vehicle svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Mirrored for traffic running right-to-left. */
.road-vehicle--flip {
  transform: translate(-50%, -50%) scaleX(-1);
}

/* Roof view, nose pointing down the page. */
.road-vehicle--delivery {
  top: 15px;
  left: 47.8%;
  --len: 32px;
}

.road-vehicle--car-two {
  top: 370px;
  left: 91.8%;
  --len: 30px;
}

/* Side view, on the horizontal bands. */
.road-vehicle--bus {
  top: 89px;
  left: 78%;
  --len: 68px;
}

.road-vehicle--car-one {
  top: 322px;
  left: 30%;
  --len: 56px;
}

.road-vehicle--van {
  top: 488px;
  left: 81%;
  --len: 58px;
}

.road-vehicle--pickup {
  top: 722px;
  left: 34%;
  --len: 58px;
}

.road-vehicle--car-three {
  top: 1058px;
  left: 30%;
  --len: 56px;
}

/* ========================================================================
   RESPONSIVE — override layer
   ======================================================================== */
@media(max-width:1100px) {
  .purpose-grid {
    column-gap: 6rem;
  }

  .plan-bridge {
    width: 132px;
  }
}

@media(max-width:767.98px) {
  .purpose-grid {
    row-gap: 1rem;
    margin-bottom: 1.25rem;
  }

  .purpose-card {
    min-height: auto;
  }

  .plan-bridge,
  .road-vehicles {
    display: none;
  }

  /* On mobile, Goal 2 becomes a normal downward-facing sign post that
     terminates at the bottom edge of its own card. */
  .goal-card--1 {
    --post-up: 0;
    --post-down: 65px;
  }

  .goal-card--2 {
    --post-up: 0;
    --post-down: 65px;
  }

  .goal-card--4 {
    --post-up: 0;
    --post-down: 65px;
  }

  .goal-card--5 {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    gap: .85rem;
    padding: .9rem 1rem;
    text-align: left;
    --post-up: 0;
    --post-down: 65px;
  }

  .goal-card--5 .goal-card__number {
    order: 1;
  }

  .goal-card--5 h3 {
    order: 2;
  }

  /* Remove the desktop roadmap canvas height and absolute positioning so
     mobile content determines its own height without a large empty area. */
  .roadmap,
  .goal-list {
    min-height: 0;
  }

  .roadmap {
    margin-bottom: 1.5rem;
  }

  .values-card {
    position: static;
    width: 100%;
    margin-top: 1.25rem;
  }

  .implementation-card {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 2rem;
  }

  /* Mobile cards collapse to their content height. The sign sits roughly
     16px above the lower card edge, so posts must stop there. */
  .goal-card {
    --post-up: 0;
    --post-down: 16px;
  }
}

@media(max-width:420px) {
  .purpose-card {
    display: block;
  }

  .purpose-card__icon {
    margin-bottom: .75rem;
  }

  .goal-card {
    grid-template-columns: auto 1fr;
  }

  .goal-card__icon {
    display: none;
  }
}

/* ========================================================================
   LINKED GOAL CARDS — a goal whose card opens a report (currently Goal 3)
   ======================================================================== */
/* The link lives on the heading; its ::after stretches over the whole card so
   anywhere on the sign is clickable, while screen readers still hear a single
   link named after the goal. The card is the positioned ancestor on desktop
   (position: absolute) and is made relative on mobile below. */
.goal-card__link {
  color: inherit;
  text-decoration: none;
}

.goal-card__link::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  content: "";
}

.goal-card--link {
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}

.goal-card--link:hover,
.goal-card--link:focus-within {
  box-shadow: 0 8px 22px rgba(0, 41, 75, .26);
  transform: translateY(-2px);
}

.goal-card--link:hover .goal-card__link,
.goal-card__link:focus-visible {
  color: var(--trak-blue, #1b75bc);
  text-decoration: underline;
}

/* Keyboard focus ring on the whole card rather than just the heading text */
.goal-card__link:focus-visible {
  outline: none;
}

.goal-card--link:focus-within {
  outline: 3px solid var(--plan-gold);
  outline-offset: 3px;
}

@media(max-width:767.98px) {
  /* Relative (not static) so the link's ::after can cover the card. Clear the
     desktop top/left offsets from the override layer, or position: relative
     shifts each linked card by them and the cards overlap on phones. */
  .goal-card--link {
    position: relative;
    inset: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .goal-card--link {
    transition: none;
  }

  .goal-card--link:hover,
  .goal-card--link:focus-within {
    transform: none;
  }
}

@media print {
  .roadmap {
    break-inside: avoid;
  }

  .goal-card {
    box-shadow: none;
  }
}