/* =========================================================
   RESOURCE LAB PAGE: DECISION DRIVE
   Learning Rewired Lab
   Spy Hunter-inspired arcade-road judgment pattern
   ========================================================= */

.ac-rl-drive-page {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 104px) 24px clamp(88px, 10vw, 140px);
  background: #ffffff !important;
  color: #080b12;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ac-rl-drive-page *,
.ac-rl-drive-page *::before,
.ac-rl-drive-page *::after {
  box-sizing: border-box;
}

.ac-rl-drive-page a {
  color: inherit;
}

.ac-rl-drive-page h1,
.ac-rl-drive-page h2,
.ac-rl-drive-page h3,
.ac-rl-drive-page p {
  margin: 0;
}

.ac-rl-drive-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

/* =========================================================
   HERO
   ========================================================= */

.ac-rl-drive-hero {
  max-width: 1180px;
  margin: 0 auto clamp(74px, 9vw, 132px);
  padding: clamp(34px, 5vw, 76px) 0 clamp(40px, 6vw, 84px);
  text-align: center;
}

.ac-rl-drive-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0 0 28px;
  padding: 0 24px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.07));
  color: #123f9c;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 850;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.ac-rl-drive-hero h1 {
  max-width: 1040px;
  margin: 0 auto;
  color: #080b12;
  font-size: clamp(4rem, 9vw, 8.6rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
  font-weight: 620;
  text-wrap: balance;
  padding-bottom: 0.08em;
}

.ac-rl-drive-hero h1 span {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb 0%, #5b4df5 46%, #7c3aed 72%, #14b8a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ac-rl-drive-intro {
  max-width: 850px;
  margin: 34px auto 0;
  color: #5f6472;
  font-size: clamp(1.12rem, 1.9vw, 1.42rem);
  line-height: 1.72;
}

.ac-rl-drive-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.ac-rl-drive-actions.closing {
  justify-content: center;
}

.ac-rl-drive-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none !important;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    background 0.22s ease;
}

.ac-rl-drive-btn:hover {
  transform: translateY(-2px);
}

.ac-rl-drive-btn.primary,
.ac-rl-drive-btn.primary:visited {
  border: 0;
  background: linear-gradient(135deg, #07111f 0%, #123f9c 54%, #2563eb 100%);
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(36, 87, 214, 0.24);
}

.ac-rl-drive-btn.secondary,
.ac-rl-drive-btn.secondary:visited {
  border: 1px solid #d8dee9;
  background: #ffffff;
  color: #111827 !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.045);
}

/* =========================================================
   SHARED SECTIONS
   ========================================================= */

.ac-rl-drive-section {
  max-width: 880px;
  margin: 0 auto clamp(74px, 9vw, 132px);
}

.ac-rl-drive-kicker {
  margin: 0 0 18px;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #14b8a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ac-rl-drive-section h2,
.ac-rl-drive-demo-header h2,
.ac-rl-drive-code-header h2,
.ac-rl-drive-comparison-copy h2,
.ac-rl-drive-adapt-copy h2,
.ac-rl-drive-showcase h2,
.ac-rl-drive-closing h2 {
  margin: 0 0 24px;
  color: #111827;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
  font-weight: 560;
  text-wrap: balance;
  padding-bottom: 0.04em;
}

.ac-rl-drive-section p,
.ac-rl-drive-demo-header p,
.ac-rl-drive-code-header p,
.ac-rl-drive-showcase p,
.ac-rl-drive-closing p {
  margin: 0 0 24px;
  color: #5f6472;
  font-size: clamp(1.06rem, 1.75vw, 1.3rem);
  line-height: 1.72;
}

.ac-rl-drive-section p:last-child,
.ac-rl-drive-demo-header p:last-child,
.ac-rl-drive-code-header p:last-child,
.ac-rl-drive-showcase p:last-child,
.ac-rl-drive-closing p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   INFO CARDS
   ========================================================= */

.ac-rl-drive-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 auto clamp(74px, 9vw, 132px);
}

.ac-rl-drive-info-card {
  padding: 26px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.055);
}

.ac-rl-drive-info-card span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.09), rgba(124, 58, 237, 0.09), rgba(20, 184, 166, 0.09));
  color: #6d28d9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ac-rl-drive-info-card h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.ac-rl-drive-info-card p {
  margin: 0;
  color: #5f6472;
  font-size: 16px;
  line-height: 1.65;
}

/* =========================================================
   LIVE PREVIEW SECTION
   ========================================================= */

.ac-rl-drive-demo-section {
  margin: 0 auto clamp(74px, 9vw, 132px);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid transparent;
  border-radius: 42px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, rgba(36, 87, 214, 0.25), rgba(124, 58, 237, 0.18), rgba(20, 184, 166, 0.18)) border-box;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.075);
}

.ac-rl-drive-demo-header {
  max-width: 860px;
  margin: 0 auto 36px;
  text-align: center;
}

.ac-drive-shell {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.ac-drive-demo-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.ac-drive-mini-kicker {
  margin: 0 0 8px;
  color: #1dadab;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 900;
}

.ac-drive-demo-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.ac-drive-stats {
  display: grid;
  grid-template-columns: repeat(4, 145px);
  gap: 10px;
}

.ac-drive-stat {
  min-height: 76px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.ac-drive-stat span {
  display: block;
  color: #475569;
  font-size: 0.78rem;
  margin-bottom: 5px;
}

.ac-drive-stat strong {
  display: block;
  color: #1dadab;
  font-size: 1.55rem;
  line-height: 1;
}

.ac-drive-stat.red strong {
  color: #ef4444;
}

.ac-drive-stat.purple strong {
  color: #5d48ec;
}

.ac-drive-game-layout {
  display: grid;
  grid-template-columns: 170px 1fr 150px;
  gap: 14px;
  align-items: stretch;
}

.ac-drive-lane-list,
.ac-drive-side {
  display: grid;
  gap: 0;
}

.ac-drive-lane-key {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.ac-drive-lane-key:last-child {
  border-bottom: none;
}

.ac-drive-lane-key b {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ac-drive-lane-key small {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  margin-top: 3px;
}

.ac-drive-lane-key.teal b {
  color: #1dadab;
}

.ac-drive-lane-key.blue b {
  color: #2563eb;
}

.ac-drive-lane-key.red b {
  color: #ef4444;
}

.ac-drive-lane-key.purple b {
  color: #5d48ec;
}

.ac-drive-lane-key.orange b {
  color: #f59e0b;
}

/* =========================================================
   ARCADE GAME STAGE
   ========================================================= */

.ac-drive-stage {
  --road-left: 28%;
  --road-right: 72%;

  position: relative;
  height: 520px;
  overflow: hidden;
  border: 8px solid #101827;
  border-radius: 18px;
  background:
    radial-gradient(circle, rgba(4, 74, 18, 0.7) 0 2px, transparent 2px) 0 0 / 28px 28px,
    radial-gradient(circle, rgba(16, 191, 42, 0.7) 0 2px, transparent 2px) 12px 14px / 34px 34px,
    linear-gradient(
      90deg,
      #058b13 0%,
      #10b323 20%,
      #7d3f16 20%,
      #b96a22 24%,
      #3b2618 26%,
      #202020 28%,
      #202020 72%,
      #3b2618 74%,
      #b96a22 76%,
      #7d3f16 80%,
      #10b323 80%,
      #058b13 100%
    );
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.05),
    inset 0 0 50px rgba(0, 0, 0, 0.45),
    0 22px 60px rgba(15, 23, 42, 0.22);
  image-rendering: pixelated;
}

.ac-drive-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: soft-light;
}

.ac-drive-stage::after {
  content: "";
  position: absolute;
  inset: -160px 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 34px,
      #f6e85d 34px 54px,
      transparent 54px 88px
    ) 50% 0 / 8px 100% no-repeat,
    repeating-linear-gradient(
      to bottom,
      #2b1b12 0 8px,
      transparent 8px 22px,
      #e28b2d 22px 30px,
      transparent 30px 46px
    ) 25.5% 0 / 10px 100% no-repeat,
    repeating-linear-gradient(
      to bottom,
      #2b1b12 0 8px,
      transparent 8px 22px,
      #e28b2d 22px 30px,
      transparent 30px 46px
    ) 74.5% 0 / 10px 100% no-repeat;
  animation: ddRoadArcade 0.72s linear infinite;
}

@keyframes ddRoadArcade {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(88px);
  }
}

.ac-drive-road-line {
  display: none;
}

.ac-drive-tree {
  position: absolute;
  z-index: 3;
  width: 42px;
  height: 42px;
  background:
    radial-gradient(circle at 50% 20%, #2dff42 0 9px, transparent 10px),
    radial-gradient(circle at 30% 44%, #11c72c 0 12px, transparent 13px),
    radial-gradient(circle at 68% 48%, #0b9f20 0 13px, transparent 14px),
    linear-gradient(#633214, #633214) 50% 78% / 8px 18px no-repeat;
  filter: contrast(1.25) saturate(1.2);
  image-rendering: pixelated;
  animation: ddSceneryMove 3.4s linear forwards;
}

.ac-drive-tree.small {
  transform: scale(0.72);
}

@keyframes ddSceneryMove {
  from {
    top: -70px;
  }

  to {
    top: calc(100% + 80px);
  }
}

/* =========================================================
   PLAYER CAR — top-down retro arcade car
   ========================================================= */

.ac-drive-car {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 72px;
  height: 112px;
  z-index: 24;
  transition: left 0.16s ease;
  filter: drop-shadow(0 14px 0 rgba(0, 0, 0, 0.24));
}

.ac-drive-car-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.car-shadow {
  fill: rgba(0, 0, 0, 0.34);
  transform: translate(3px, 5px);
}

.car-wheel {
  fill: #0b1020;
}

.car-body-outline {
  fill: #0b1020;
}

.car-body {
  fill: #f8fafc;
}

.car-hood,
.car-trunk {
  fill: #ffffff;
}

.car-windshield {
  fill: #9fb2c8;
}

.car-roof {
  fill: #dbeafe;
  stroke: #64748b;
  stroke-width: 2;
}

.car-left-stripe {
  fill: #2563eb;
}

.car-right-stripe {
  fill: #e11d48;
}

.car-light-red {
  fill: #e11d48;
}

.car-light-blue {
  fill: #0ea5e9;
}

.car-grille,
.car-bumper {
  fill: #111827;
}

.car-flame {
  fill: #f97316;
  opacity: 0.85;
  transform-origin: 36px 98px;
}

.ac-drive-car.boosting .car-flame {
  fill: #facc15;
  opacity: 1;
  transform: scaleY(1.35);
}

/* =========================================================
   GAME OBJECTS
   ========================================================= */

.ac-drive-object {
  position: absolute;
  width: 56px;
  min-height: 72px;
  display: grid;
  place-items: center;
  z-index: 18;
  border: 3px solid #111827;
  border-radius: 6px;
  padding: 0;
  color: #111827;
  font-size: 0;
  font-weight: 900;
  text-align: center;
  image-rendering: pixelated;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.85),
    0 10px 0 rgba(0, 0, 0, 0.18);
}

.ac-drive-object.support {
  background:
    linear-gradient(#111827, #111827) 5px 18px / 7px 40px no-repeat,
    linear-gradient(#111827, #111827) 44px 18px / 7px 40px no-repeat,
    linear-gradient(#14b8a6, #14b8a6) 8px 8px / 40px 54px no-repeat,
    linear-gradient(#ccfbf1, #ccfbf1) 14px 14px / 28px 14px no-repeat,
    linear-gradient(#0f766e, #0f766e) 18px 42px / 20px 10px no-repeat;
}

.ac-drive-object.hazard {
  background:
    linear-gradient(#111827, #111827) 5px 18px / 7px 40px no-repeat,
    linear-gradient(#111827, #111827) 44px 18px / 7px 40px no-repeat,
    linear-gradient(#111827, #111827) 8px 8px / 40px 54px no-repeat,
    linear-gradient(#e11d48, #e11d48) 15px 7px / 26px 14px no-repeat,
    linear-gradient(#38bdf8, #38bdf8) 14px 28px / 28px 12px no-repeat,
    linear-gradient(#e11d48, #e11d48) 18px 50px / 20px 8px no-repeat;
}

.ac-drive-object.boost {
  width: 42px;
  min-height: 42px;
  border: 3px solid #111827;
  border-radius: 999px;
  background:
    radial-gradient(circle, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle, #facc15 0 13px, #f97316 14px 19px, transparent 20px);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 22px rgba(250, 204, 21, 0.85);
}

.ac-drive-object::before {
  content: "";
  margin: 0;
}

.ac-drive-object::after {
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 20px;
  padding: 0 7px;
  border: 2px solid #111827;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ac-drive-object.support::after {
  content: "Support";
}

.ac-drive-object.hazard::after {
  content: "Hazard";
}

.ac-drive-object.boost::after {
  content: "Boost";
}

/* =========================================================
   OVERLAY / CONTROLS / BADGES
   ========================================================= */

.ac-drive-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.ac-drive-start {
  max-width: 520px;
  padding: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.ac-drive-start h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.ac-drive-start p {
  margin: 0 0 20px;
  color: #475569;
  line-height: 1.6;
}

.ac-drive-control-card,
.ac-drive-tip-card {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.ac-drive-control-card {
  text-align: center;
}

.ac-drive-side-title {
  margin-bottom: 12px;
  color: #1dadab;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
}

.ac-drive-controls {
  display: grid;
  grid-template-columns: repeat(2, 44px);
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ac-drive-control {
  min-height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.ac-drive-control:hover {
  background: #f8fafc;
}

.ac-drive-control-card p,
.ac-drive-tip-card p {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ac-drive-tip-card {
  margin-top: 10px;
}

.ac-drive-badges {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.ac-drive-badge {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  opacity: 0.58;
  filter: grayscale(1);
  transition: 0.2s ease;
}

.ac-drive-badge.unlocked {
  opacity: 1;
  filter: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ac-drive-badge-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 14px;
  font-size: 1.2rem;
}

.ac-drive-badge.teal {
  color: #1dadab;
}

.ac-drive-badge.blue {
  color: #2563eb;
}

.ac-drive-badge.red {
  color: #ef4444;
}

.ac-drive-badge.purple {
  color: #5d48ec;
}

.ac-drive-badge.orange {
  color: #f59e0b;
}

.ac-drive-badge strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 0.86rem;
}

.ac-drive-badge span {
  display: block;
  color: #475569;
  font-size: 0.76rem;
  line-height: 1.35;
}

/* =========================================================
   COMPARISON / ADAPTATION / CODE / CLOSING
   ========================================================= */

.ac-rl-drive-comparison,
.ac-rl-drive-adapt-section {
  margin: 0 auto clamp(74px, 9vw, 132px);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid transparent;
  border-radius: 42px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, rgba(36, 87, 214, 0.25), rgba(124, 58, 237, 0.18), rgba(20, 184, 166, 0.18)) border-box;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.075);
}

.ac-rl-drive-comparison-copy,
.ac-rl-drive-adapt-copy {
  max-width: 840px;
  margin-bottom: 30px;
}

.ac-rl-drive-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.ac-rl-drive-column {
  padding: 28px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.05);
}

.ac-rl-drive-column.strong {
  background:
    radial-gradient(circle at 92% 12%, rgba(124, 58, 237, 0.1), transparent 30%),
    radial-gradient(circle at 8% 88%, rgba(20, 184, 166, 0.1), transparent 30%),
    #ffffff;
}

.ac-rl-drive-column span,
.ac-rl-drive-adapt-grid span {
  display: inline-flex;
  margin-bottom: 18px;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ac-rl-drive-column h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.ac-rl-drive-column p {
  margin: 0;
  color: #5f6472;
  font-size: 17px;
  line-height: 1.65;
}

.ac-rl-drive-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.ac-rl-drive-mini-grid div {
  padding: 24px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.055);
}

.ac-rl-drive-mini-grid span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 52%, #14b8a6 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.ac-rl-drive-mini-grid h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.ac-rl-drive-mini-grid p {
  margin: 0;
  color: #5f6472;
  font-size: 15px;
  line-height: 1.62;
}

.ac-rl-drive-code-section {
  margin: 0 auto clamp(74px, 9vw, 132px);
}

.ac-rl-drive-code-header {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
}

.ac-rl-drive-code-box {
  overflow: hidden;
  border-radius: 30px;
  background: #080b12;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.14);
}

.ac-rl-drive-code-box pre {
  margin: 0;
  padding: 28px;
  overflow-x: auto;
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.7;
}

.ac-rl-drive-code-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.ac-rl-drive-adapt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.ac-rl-drive-adapt-grid article {
  padding: 26px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.05);
}

.ac-rl-drive-adapt-grid h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.ac-rl-drive-adapt-grid p {
  margin: 0;
  color: #5f6472;
  font-size: 16px;
  line-height: 1.64;
}

.ac-rl-drive-showcase {
  max-width: 920px;
  margin: 0 auto clamp(74px, 9vw, 132px);
  padding: clamp(30px, 5vw, 54px);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 38px;
  background:
    radial-gradient(circle at 92% 12%, rgba(37, 99, 235, 0.11), transparent 30%),
    radial-gradient(circle at 8% 88%, rgba(20, 184, 166, 0.11), transparent 32%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.045), rgba(124, 58, 237, 0.045), rgba(20, 184, 166, 0.045)),
    #ffffff;
  box-shadow: 0 22px 64px rgba(17, 24, 39, 0.07);
}

.ac-rl-drive-closing {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 54px);
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 38px;
  background:
    radial-gradient(circle at 88% 14%, rgba(37, 99, 235, 0.1), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(20, 184, 166, 0.1), transparent 32%),
    #ffffff;
  box-shadow: 0 22px 64px rgba(17, 24, 39, 0.07);
  text-align: center;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {
  .ac-drive-demo-head,
  .ac-drive-game-layout {
    grid-template-columns: 1fr;
  }

  .ac-drive-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .ac-drive-lane-list {
    display: none;
  }

  .ac-drive-badges,
  .ac-rl-drive-adapt-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ac-rl-drive-card-grid,
  .ac-rl-drive-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ac-rl-drive-page {
    padding: 52px 18px 72px;
  }

  .ac-rl-drive-hero {
    text-align: left;
  }

  .ac-rl-drive-hero h1 {
    font-size: clamp(50px, 16vw, 80px);
    line-height: 0.95;
    letter-spacing: -0.065em;
  }

  .ac-rl-drive-intro {
    font-size: 18px;
  }

  .ac-rl-drive-actions {
    justify-content: flex-start;
  }

  .ac-rl-drive-btn {
    width: 100%;
  }

  .ac-drive-stats,
  .ac-drive-badges,
  .ac-rl-drive-mini-grid,
  .ac-rl-drive-adapt-grid {
    grid-template-columns: 1fr;
  }

  .ac-drive-stage {
    height: 440px;
    border-width: 6px;
  }

  .ac-drive-side {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-drive-stage::after,
  .ac-drive-tree {
    animation: none;
  }

  .ac-rl-drive-btn,
  .ac-drive-car,
  .ac-drive-badge,
  .ac-rl-drive-btn:hover {
    transition: none;
    transform: none;
  }
}
/* =========================================================
   Decision Drive Lab Detail Alignment + Theme Bridge
   Lets lab-detail.css own the page shell while this file
   keeps the game/demo styling.
   ========================================================= */

.ac-rl-drive-page.dld-page {
  width: 100%;
  padding: 0 !important;
  background: transparent !important;
  color: var(--dld-ink) !important;
  overflow: visible;
}

.ac-rl-drive-page .ac-rl-drive-inner,
.ac-rl-drive-page .dld-shell {
  width: min(1120px, calc(100% - 40px));
  max-width: 1120px;
  margin-inline: auto;
}

.ac-rl-drive-page .resource-detail-breadcrumb,
.ac-rl-drive-page .resource-detail-hero,
.ac-rl-drive-page .ac-rl-drive-section,
.ac-rl-drive-page .ac-rl-drive-card-grid,
.ac-rl-drive-page .ac-rl-drive-demo-section,
.ac-rl-drive-page .ac-rl-drive-comparison,
.ac-rl-drive-page .ac-rl-drive-code-section,
.ac-rl-drive-page .ac-rl-drive-adapt-section,
.ac-rl-drive-page .ac-rl-drive-showcase,
.ac-rl-drive-page .ac-rl-drive-closing {
  margin-left: auto;
  margin-right: auto;
}

.ac-rl-drive-page .resource-detail-hero {
  width: 100%;
  max-width: 960px;
}

/* Convert old white content blocks to the shared dark Lab detail feel */

.ac-rl-drive-section,
.ac-rl-drive-demo-section,
.ac-rl-drive-comparison,
.ac-rl-drive-code-section,
.ac-rl-drive-adapt-section,
.ac-rl-drive-showcase,
.ac-rl-drive-closing {
  width: 100%;
  border: 1px solid var(--dld-line) !important;
  border-radius: var(--dld-radius-lg) !important;
  background: var(--dld-panel) !important;
  box-shadow: var(--dld-shadow-soft) !important;
  backdrop-filter: blur(16px);
}

.ac-rl-drive-section,
.ac-rl-drive-demo-section,
.ac-rl-drive-comparison,
.ac-rl-drive-adapt-section,
.ac-rl-drive-showcase,
.ac-rl-drive-closing {
  padding: clamp(1.35rem, 4vw, 2.35rem) !important;
}

.ac-rl-drive-section h2,
.ac-rl-drive-demo-header h2,
.ac-rl-drive-code-header h2,
.ac-rl-drive-comparison-copy h2,
.ac-rl-drive-adapt-copy h2,
.ac-rl-drive-showcase h2,
.ac-rl-drive-closing h2,
.ac-rl-drive-info-card h3,
.ac-rl-drive-column h3,
.ac-rl-drive-mini-grid h3,
.ac-rl-drive-adapt-grid h3 {
  color: var(--dld-ink) !important;
}

.ac-rl-drive-section p,
.ac-rl-drive-demo-header p,
.ac-rl-drive-code-header p,
.ac-rl-drive-showcase p,
.ac-rl-drive-closing p,
.ac-rl-drive-info-card p,
.ac-rl-drive-column p,
.ac-rl-drive-mini-grid p,
.ac-rl-drive-adapt-grid p {
  color: var(--dld-muted) !important;
}

.ac-rl-drive-kicker,
.ac-drive-mini-kicker,
.ac-drive-side-title,
.ac-rl-drive-info-card span,
.ac-rl-drive-column span,
.ac-rl-drive-adapt-grid span {
  color: var(--dld-cyan) !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}

/* Darken supporting cards while keeping the game stage itself intact */

.ac-rl-drive-info-card,
.ac-rl-drive-column,
.ac-rl-drive-mini-grid div,
.ac-rl-drive-adapt-grid article,
.ac-drive-shell,
.ac-drive-stat,
.ac-drive-control-card,
.ac-drive-tip-card,
.ac-drive-badge {
  border-color: rgba(148, 163, 184, 0.2) !important;
  background:
    radial-gradient(circle at top right, rgba(102, 227, 255, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18) !important;
}

.ac-drive-demo-head h3,
.ac-drive-badge strong,
.ac-drive-lane-key b,
.ac-drive-stat strong {
  color: var(--dld-ink);
}

.ac-drive-stat span,
.ac-drive-lane-key small,
.ac-drive-control-card p,
.ac-drive-tip-card p,
.ac-drive-badge span {
  color: var(--dld-muted);
}

/* Preserve the actual arcade canvas colors */
.ac-drive-stage {
  background:
    radial-gradient(circle, rgba(4, 74, 18, 0.7) 0 2px, transparent 2px) 0 0 / 28px 28px,
    radial-gradient(circle, rgba(16, 191, 42, 0.7) 0 2px, transparent 2px) 12px 14px / 34px 34px,
    linear-gradient(
      90deg,
      #058b13 0%,
      #10b323 20%,
      #7d3f16 20%,
      #b96a22 24%,
      #3b2618 26%,
      #202020 28%,
      #202020 72%,
      #3b2618 74%,
      #b96a22 76%,
      #7d3f16 80%,
      #10b323 80%,
      #058b13 100%
    ) !important;
}

/* Keep code block readable */

.ac-rl-drive-code-box {
  background: rgba(3, 8, 18, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--dld-shadow) !important;
}

.ac-rl-drive-code-box pre {
  color: rgba(226, 232, 240, 0.92) !important;
}

/* Mobile */

@media (max-width: 760px) {
  .ac-rl-drive-page .ac-rl-drive-inner,
  .ac-rl-drive-page .dld-shell {
    width: min(100% - 32px, 1120px);
  }
}
/* =========================================================
   Decision Drive Enhanced Graphics
   Works with enhanced decision-drive.js
   ========================================================= */

.ac-drive-stage {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.2), transparent 16%),
    linear-gradient(
      90deg,
      #083f1e 0%,
      #11682f 18%,
      #5a361f 18%,
      #9a6538 22%,
      #22272f 26%,
      #15191f 50%,
      #22272f 74%,
      #9a6538 78%,
      #5a361f 82%,
      #11682f 82%,
      #083f1e 100%
    ) !important;
}

.dd-enhanced-car {
  width: 92px !important;
  height: 142px !important;
  z-index: 26 !important;
}

.dd-player-car-svg,
.dd-road-object-svg,
.dd-tree-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dd-road-object {
  width: 84px !important;
  min-height: 104px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: inherit !important;
  filter:
    drop-shadow(0 14px 10px rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 8px rgba(102, 227, 255, 0.16));
}

.dd-road-object::before,
.dd-road-object::after {
  display: none !important;
}

.dd-tree {
  width: 72px !important;
  height: 88px !important;
  background: transparent !important;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.26));
}

.dd-tree.small {
  width: 54px !important;
  height: 66px !important;
}

.dd-car-flame {
  transform-origin: 46px 118px;
  animation: ddFlameIdle 0.22s ease-in-out infinite alternate;
}

.dd-enhanced-car.boosting .dd-car-flame {
  animation: ddBoostFlame 0.12s ease-in-out infinite alternate;
}

.dd-enhanced-car.hit {
  animation: ddCarHit 0.12s linear 3;
}

@keyframes ddFlameIdle {
  from {
    transform: scaleY(0.85);
    opacity: 0.72;
  }

  to {
    transform: scaleY(1.08);
    opacity: 1;
  }
}

@keyframes ddBoostFlame {
  from {
    transform: scaleY(1.2);
    opacity: 0.85;
  }

  to {
    transform: scaleY(1.7);
    opacity: 1;
  }
}

@keyframes ddCarHit {
  0% {
    transform: translateX(-50%) translateX(0);
  }

  33% {
    transform: translateX(-50%) translateX(-6px);
  }

  66% {
    transform: translateX(-50%) translateX(6px);
  }

  100% {
    transform: translateX(-50%) translateX(0);
  }
}

@media (max-width: 760px) {
  .dd-enhanced-car {
    width: 76px !important;
    height: 118px !important;
  }

  .dd-road-object {
    width: 68px !important;
    min-height: 88px !important;
  }
}
/* =========================================================
   Decision Drive Bottom Spacing Fix
   Adds breathing room before the global footer.
   ========================================================= */

.ac-rl-drive-page.dld-page {
  padding-bottom: clamp(72px, 8vw, 120px) !important;
}

.ac-rl-drive-closing {
  margin-bottom: 0;
}
