/* Toll Gate — track-support (Cautionfield Market / Ovasta Seeds)
   Asphalt TOLL GATE mast · booth slip lookup · lift-arm boom progress ·
   reflective pass plate · single FIND LOAD boom · curb links.
   Replaces Survey Stake. Avoids Abacus / Tide / Pegboard / Marble / Seismo /
   Windsock / Firefly / Docket / Thermocouple / Wind Vane / Telemetry. */

.page-a99-tollgate {
  --tg-ease: cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(180deg, #cfd8e0 0%, var(--cf-field) 40%, #dce4ea 100%);
}

.page-a99-tollgate .tg-main { padding-bottom: var(--cf-space-6); }

/* —— Mast —— */
.page-a99-tollgate .tg-mast {
  position: relative;
  background:
    linear-gradient(180deg, #1a1f24 0%, var(--cf-asphalt) 55%, #0c0f12 100%);
  color: #fff;
  overflow: hidden;
  padding-bottom: 28px;
}
.page-a99-tollgate .tg-mast-hazard {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--cf-signal) 0 12px,
    var(--cf-asphalt) 12px 24px
  );
  border-bottom: 3px solid #000;
}
.page-a99-tollgate .tg-mast-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(28px, 5vw, 48px) 0 14px;
}
.page-a99-tollgate .tg-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cf-tape);
}
.page-a99-tollgate .tg-stencil {
  margin: 0 0 8px;
  font-family: var(--cf-font-display);
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--cf-signal);
  text-shadow: 2px 2px 0 #000;
  opacity: 0;
  transform: translateY(8px) skewX(-4deg);
  animation: tgStencilIn 520ms var(--tg-ease) 60ms forwards;
}
.page-a99-tollgate .tg-mast h1 {
  margin: 0 0 10px;
  font-family: var(--cf-font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff;
}
.page-a99-tollgate .tg-lede {
  margin: 0;
  max-width: 40rem;
  color: var(--cf-soft-on-dark);
  font-size: 1.02rem;
  font-weight: 500;
}
.page-a99-tollgate .tg-meter {
  min-width: 110px;
  padding: 12px 14px;
  text-align: center;
  background: #3A4550;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #3A4550, 4px 4px 0 #000;
  transform: rotate(1.5deg);
}
.page-a99-tollgate .tg-meter.is-found {
  background: #0B5C3A;
  box-shadow: 0 0 0 3px #0B5C3A, 4px 4px 0 #000;
}
.page-a99-tollgate .tg-meter.is-miss {
  background: var(--cf-cone-deep);
  box-shadow: 0 0 0 3px var(--cf-cone-deep), 4px 4px 0 #000;
}
.page-a99-tollgate .tg-meter em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.7);
}
.page-a99-tollgate .tg-meter strong {
  display: block;
  margin: 2px 0;
  font-family: var(--cf-font-display);
  font-size: 1.8rem;
  line-height: 1;
  color: #fff;
}
.page-a99-tollgate .tg-meter span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cf-signal);
}
.page-a99-tollgate .tg-mast-dash {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--cf-signal) 0 22px,
    transparent 22px 40px
  );
  opacity: 0.85;
}

.page-a99-tollgate .tg-stage {
  padding-top: var(--cf-space-4);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* —— Booth slip —— */
.page-a99-tollgate .tg-booth {
  background:
    linear-gradient(180deg, #2e363e 0%, #1c2228 100%);
  border: 4px solid #000;
  box-shadow: 6px 6px 0 var(--cf-signal);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  animation: tgBoothIn 520ms var(--tg-ease) 120ms forwards;
}
.page-a99-tollgate .tg-booth-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 2px dashed rgba(255, 230, 0, 0.35);
  color: #fff;
}
.page-a99-tollgate .tg-booth-light {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 6px;
  border-radius: 50%;
  background: #6a7078;
  border: 2px solid #000;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
.page-a99-tollgate .tg-booth-light.is-found {
  background: var(--cf-ok);
  box-shadow: 0 0 10px rgba(0, 122, 77, 0.7);
}
.page-a99-tollgate .tg-booth-light.is-miss {
  background: var(--cf-err);
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.55);
}
.page-a99-tollgate .tg-booth-light.is-idle {
  background: var(--cf-signal);
}
.page-a99-tollgate .tg-booth-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cf-tape);
}
.page-a99-tollgate .tg-booth-head h2 {
  margin: 0 0 4px;
  font-family: var(--cf-font-display);
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  font-weight: 400;
  color: #fff;
}
.page-a99-tollgate .tg-booth-head p {
  margin: 0;
  color: var(--cf-soft-on-dark);
  font-size: 0.92rem;
}
.page-a99-tollgate .tg-booth-code {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--cf-soft-on-dark);
  padding: 6px 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.page-a99-tollgate .tg-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 18px 18px;
}
.page-a99-tollgate .tg-slot {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #12151a;
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px rgba(255, 230, 0, 0.12);
  transition: box-shadow 160ms ease, border-color 160ms ease;
}
.page-a99-tollgate .tg-slot:focus-within {
  box-shadow: inset 0 0 0 2px var(--cf-signal);
  border-color: var(--cf-cone);
}
.page-a99-tollgate .tg-slot.is-lit {
  box-shadow: inset 0 0 0 2px var(--cf-tape);
}
.page-a99-tollgate .tg-slot-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cf-signal);
}
.page-a99-tollgate .tg-slot input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 4px 0;
  outline: none;
}
.page-a99-tollgate .tg-slot input::placeholder {
  color: var(--cf-placeholder);
  opacity: 1;
}
.page-a99-tollgate .tg-boom {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 16px;
  border: 3px solid #000;
  background: var(--cf-cone);
  color: var(--cf-on-cone);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 4px 4px 0 var(--cf-signal);
  font: inherit;
  text-align: left;
  transition: transform 180ms var(--tg-ease), box-shadow 180ms ease;
}
.page-a99-tollgate .tg-boom:hover,
.page-a99-tollgate .tg-boom:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--cf-signal);
  outline: none;
}
.page-a99-tollgate .tg-boom-arm {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 230, 0, 0.5) 50%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
  z-index: 0;
}
.page-a99-tollgate .tg-boom:hover .tg-boom-arm { transform: translateX(120%); }
.page-a99-tollgate .tg-boom-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.page-a99-tollgate .tg-boom-copy em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
.page-a99-tollgate .tg-boom-copy strong {
  font-family: var(--cf-font-display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.1;
}
.page-a99-tollgate .tg-boom-chev {
  position: relative;
  z-index: 1;
  font-size: 1.3rem;
  font-weight: 800;
}
.page-a99-tollgate .tg-exit {
  grid-column: 1 / -1;
  display: inline-block;
  width: fit-content;
  color: var(--cf-tape);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.page-a99-tollgate .tg-pass .tg-exit,
.page-a99-tollgate .tg-alert .tg-exit {
  color: var(--cf-text-tape);
}
.page-a99-tollgate .tg-exit:hover {
  color: var(--cf-signal);
  border-bottom-color: var(--cf-cone);
}
.page-a99-tollgate .tg-pass .tg-exit:hover,
.page-a99-tollgate .tg-alert .tg-exit:hover {
  color: var(--cf-text-cone);
}

/* —— Lift-arm gates —— */
.page-a99-tollgate .tg-lane {
  padding: 4px 0 0;
}
.page-a99-tollgate .tg-lane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.page-a99-tollgate .tg-lane-head h3 {
  margin: 0;
  font-family: var(--cf-font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--cf-ink);
}
.page-a99-tollgate .tg-lane-state {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cf-mute);
}
.page-a99-tollgate .tg-lane-state.is-found { color: var(--cf-ok); }
.page-a99-tollgate .tg-lane-state.is-miss { color: var(--cf-err); }

.page-a99-tollgate .tg-gates {
  list-style: none;
  margin: 0 0 20px;
  padding: 18px 12px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  position: relative;
  background: var(--cf-asphalt);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 var(--cf-signal);
}
.page-a99-tollgate .tg-gates::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 42px;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--cf-signal) 0 16px,
    transparent 16px 28px
  );
  opacity: 0.55;
  z-index: 0;
}
.page-a99-tollgate .tg-gate {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  animation: tgGateIn 440ms var(--tg-ease) forwards;
  animation-delay: calc(180ms + var(--tg-i, 0) * 70ms);
}
.page-a99-tollgate .tg-gate-post {
  width: 10px;
  height: 28px;
  background: #6a7078;
  border: 2px solid #000;
  border-radius: 2px;
}
.page-a99-tollgate .tg-gate-arm {
  display: flex;
  width: 72px;
  height: 14px;
  overflow: hidden;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  transform-origin: left center;
  transition: transform 420ms var(--tg-ease), opacity 220ms ease;
  background: repeating-linear-gradient(
    90deg,
    var(--cf-signal) 0 12px,
    var(--cf-asphalt) 12px 24px
  );
}
.page-a99-tollgate .tg-gate-arm i { display: none; }
.page-a99-tollgate .tg-gate.is-up .tg-gate-arm {
  transform: rotate(-72deg);
  background: repeating-linear-gradient(
    90deg,
    var(--cf-tape) 0 12px,
    var(--cf-asphalt) 12px 24px
  );
}
.page-a99-tollgate .tg-gate.is-live .tg-gate-arm {
  transform: rotate(-36deg);
  background: repeating-linear-gradient(
    90deg,
    var(--cf-cone) 0 12px,
    var(--cf-asphalt) 12px 24px
  );
  box-shadow: 2px 2px 0 var(--cf-signal);
}
.page-a99-tollgate .tg-gate.is-down .tg-gate-arm,
.page-a99-tollgate .tg-gate.is-idle .tg-gate-arm {
  transform: rotate(0deg);
}
.page-a99-tollgate .tg-gate.is-muted {
  opacity: 0.45 !important;
}
.page-a99-tollgate .tg-gate-copy em {
  display: block;
  margin-bottom: 2px;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--cf-signal);
}
.page-a99-tollgate .tg-gate-copy strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.page-a99-tollgate .tg-gate-copy small {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--cf-soft-on-dark);
  font-weight: 500;
}
.page-a99-tollgate .tg-gate.is-live .tg-gate-copy strong {
  color: var(--cf-signal);
}

/* Reflective pass plate */
.page-a99-tollgate .tg-pass {
  padding: 18px;
  background: #0B5C3A;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px #0B5C3A, 5px 5px 0 #000;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  animation: tgPassIn 480ms var(--tg-ease) 280ms forwards;
}
.page-a99-tollgate .tg-pass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.page-a99-tollgate .tg-pass-cap {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.7);
}
.page-a99-tollgate .tg-pass-status {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cf-signal);
}
.page-a99-tollgate .tg-pass-id {
  margin: 0 0 14px;
  font-family: var(--cf-font-display);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 400;
  line-height: 1.15;
  word-break: break-all;
}
.page-a99-tollgate .tg-pass-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 16px;
}
.page-a99-tollgate .tg-pass-meta > div {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.page-a99-tollgate .tg-pass-meta dt {
  margin: 0 0 2px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}
.page-a99-tollgate .tg-pass-meta dd {
  margin: 0;
  font-weight: 800;
  color: #fff;
}
.page-a99-tollgate .tg-boom--solo {
  width: 100%;
  margin-bottom: 10px;
}

.page-a99-tollgate .tg-alert {
  padding: 16px 18px;
  background: var(--cf-surface);
  border: 3px solid var(--cf-asphalt);
  box-shadow: 4px 4px 0 var(--cf-asphalt);
}
.page-a99-tollgate .tg-alert.is-miss {
  border-left: 6px solid var(--cf-err);
}
.page-a99-tollgate .tg-alert.is-idle {
  border-left: 6px solid var(--cf-signal);
}
.page-a99-tollgate .tg-alert strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--cf-font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--cf-ink);
}
.page-a99-tollgate .tg-alert p {
  margin: 0 0 10px;
  color: var(--cf-mute);
  font-weight: 500;
}

/* Curb links */
.page-a99-tollgate .tg-curb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 14px 16px;
  background: var(--cf-asphalt);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 var(--cf-signal);
}
.page-a99-tollgate .tg-curb-lane {
  font-family: var(--cf-font-display);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--cf-signal);
  margin-right: 6px;
}
.page-a99-tollgate .tg-curb a {
  color: #e8eef2;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.page-a99-tollgate .tg-curb a:hover {
  color: var(--cf-signal);
  border-bottom-color: var(--cf-cone);
}

@keyframes tgStencilIn {
  to { opacity: 1; transform: translateY(0) skewX(-4deg); }
}
@keyframes tgBoothIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes tgGateIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes tgPassIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
  .page-a99-tollgate .tg-gates {
    grid-template-columns: 1fr 1fr;
  }
  .page-a99-tollgate .tg-gates::before { display: none; }
  .page-a99-tollgate .tg-pass-meta {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .page-a99-tollgate .tg-form,
  .page-a99-tollgate .tg-gates {
    grid-template-columns: 1fr;
  }
  .page-a99-tollgate .tg-booth-head {
    flex-wrap: wrap;
  }
  .page-a99-tollgate .tg-booth-code {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-a99-tollgate .tg-stencil,
  .page-a99-tollgate .tg-booth,
  .page-a99-tollgate .tg-gate,
  .page-a99-tollgate .tg-pass,
  .page-a99-tollgate .tg-boom,
  .page-a99-tollgate .tg-gate-arm {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .page-a99-tollgate .tg-gate.is-up .tg-gate-arm { transform: rotate(-72deg) !important; }
  .page-a99-tollgate .tg-gate.is-live .tg-gate-arm { transform: rotate(-36deg) !important; }
}
