/* Polycracker ECU — 4-page depth showcase */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --carbon: #07090e;
  --midnight: #050814;
  --obsidian: #0a1020;
  --surface: #0f1729;
  --cyan: #22d3ee;
  --emerald: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --border: rgba(255, 255, 255, 0.1);
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--carbon);
  color: #f1f5f9;
  overflow-x: clip;
}

/* Centered product screenshots — never full-bleed stretch */
.showcase-frame,
.hero-cinematic {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  max-width: 900px;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  background: rgba(7, 9, 14, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(34, 211, 238, 0.08);
}

.showcase-frame img,
.hero-cinematic img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
  object-position: center center;
}

.glass-morphism {
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header {
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__shell {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

header a,
nav a {
  text-decoration: none !important;
}

.site-footer,
footer.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

.site-footer__left {
  justify-self: start;
  width: 100%;
  padding-left: 0;
  padding-right: 0.5rem;
}

.site-footer__center {
  justify-self: center;
  text-align: center;
}

.site-footer__left p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
}

.site-footer .built-badge {
  display: inline-block;
  margin-top: 0;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

.site-footer__links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  width: 100%;
  padding-right: 0;
  padding-left: 0.5rem;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .site-footer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .site-footer__inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: unset !important;
    justify-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }

  .site-footer__left,
  .site-footer__center,
  .site-footer__links {
    justify-self: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .site-footer__links {
    flex-wrap: wrap !important;
    gap: 0.75rem 1.25rem !important;
  }
}

.site-footer__links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer__links a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.input-enterprise,
#lead-form input[type="text"],
#lead-form input[type="email"],
#lead-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  color: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.input-enterprise::placeholder,
#lead-form input::placeholder,
#lead-form textarea::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

.input-enterprise:focus,
#lead-form input:focus,
#lead-form textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
  background-color: rgba(255, 255, 255, 0.07);
}

.legal-prose {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.65;
}

.legal-prose h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.legal-prose h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-prose p {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.55);
}

#drag-strip.drag-strip-flash {
  animation: dyno-flash 0.45s ease-out;
}

@keyframes dyno-flash {
  0% {
    box-shadow: 0 0 0 rgba(34, 211, 238, 0);
  }
  40% {
    box-shadow: 0 0 48px rgba(34, 211, 238, 0.35);
  }
  100% {
    box-shadow: 0 0 0 rgba(34, 211, 238, 0);
  }
}

.drag-pull-master {
  margin-top: 1.25rem;
  height: 14px;
}

/* Layered mesh + beams */
.mesh-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 15% 0%, rgba(34, 211, 238, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 15%, rgba(16, 185, 129, 0.16), transparent 50%),
    radial-gradient(ellipse 80% 45% at 50% 95%, rgba(245, 158, 11, 0.14), transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 50%, #0b1428 0%, var(--midnight) 70%);
}

.light-beam {
  position: fixed;
  width: 60vw;
  height: 120vh;
  top: -20vh;
  left: -10vw;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(34, 211, 238, 0.07) 48%,
    rgba(16, 185, 129, 0.05) 52%,
    transparent 65%
  );
  animation: beam-drift 18s ease-in-out infinite alternate;
}

.light-beam--2 {
  left: auto;
  right: -15vw;
  animation-duration: 22s;
  background: linear-gradient(
    -115deg,
    transparent 35%,
    rgba(245, 158, 11, 0.06) 50%,
    transparent 65%
  );
}

@keyframes beam-drift {
  0% {
    transform: translateX(-4%) rotate(-2deg);
    opacity: 0.75;
  }
  100% {
    transform: translateX(6%) rotate(2deg);
    opacity: 1;
  }
}

/* 3D perspective cards */
.card-3d-wrap {
  perspective: 1100px;
}

.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  background: linear-gradient(155deg, rgba(22, 33, 58, 0.88) 0%, rgba(10, 16, 32, 0.94) 100%);
  border: 1px solid var(--border);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(34, 211, 238, 0.06) inset;
}

.card-3d:hover {
  transform: rotateX(4deg) rotateY(-4deg) translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(34, 211, 238, 0.15);
}

.glass-panel {
  background: linear-gradient(150deg, rgba(18, 28, 48, 0.85) 0%, rgba(8, 13, 26, 0.92) 100%);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* Pill product switcher */
.nav-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 9999px;
  background: rgba(5, 8, 20, 0.75);
  border: 1px solid var(--border);
}

.nav-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav-pill:hover {
  color: #fff;
}

.nav-pill.is-active {
  color: #041018;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.55);
}

.header-cta-glass {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e2e8f0;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, background 0.2s;
}

.header-cta-glass:hover {
  border-color: rgba(34, 211, 238, 0.45);
  color: #a5f3fc;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

#mode-widget {
  position: fixed;
  top: 84px;
  left: 8px;
  transform: none !important;
  bottom: auto !important;
  right: auto !important;
  z-index: 9999;
  touch-action: none;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(16, 185, 129, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
}

#mode-widget.is-dragging,
#mode-widget.is-dragging * {
  cursor: grabbing !important;
}

.mode-widget__top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mode-widget__grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(148, 163, 184, 0.72);
  cursor: grab;
  padding: 4px 4px 4px 0;
  transition: color 0.15s ease;
}

#mode-widget:hover .mode-widget__grip {
  color: #cbd5e1;
}

.mode-widget__buttons {
  display: inline-flex;
  align-items: stretch;
  gap: 6px;
  flex: 1;
}

.mode-widget__btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
  padding: 5px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  outline: none !important;
  box-shadow: none;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mode-widget__btn:focus,
.mode-widget__btn:focus-visible,
.mode-widget__btn:active {
  outline: none !important;
}

.mode-widget__btn:not(.is-active),
.mode-widget__btn:not(.is-active):focus,
.mode-widget__btn:not(.is-active):focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.mode-widget__btn:hover {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.14);
}

.mode-widget__title {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: inherit;
}

.mode-widget__sub {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: rgba(148, 163, 184, 0.78);
}

.mode-widget__btn.is-active {
  color: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.34), rgba(34, 211, 238, 0.22));
  box-shadow:
    0 0 16px rgba(16, 185, 129, 0.42),
    0 0 6px rgba(34, 211, 238, 0.22);
}

.mode-widget__btn.is-active .mode-widget__sub {
  color: rgba(209, 250, 229, 0.88);
}

.mode-widget__caption {
  font-size: 11px;
  line-height: 1.3;
  color: #94a3b8;
  text-align: center;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  white-space: nowrap;
  cursor: grab;
}

@media (max-width: 420px) {
  .mode-widget__caption {
    white-space: normal;
  }
}

.showcase-frame--polydyno {
  max-width: 540px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.showcase-frame--polydyno img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.ecosystem-grid .weapon-card,
.ecosystem-grid .weapon-card a,
.weapon-card,
.weapon-card a {
  text-decoration: none !important;
  color: inherit !important;
}

#lead-form fieldset.lead-track-fieldset {
  margin: 0;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
}

#lead-form fieldset.lead-track-fieldset legend {
  padding: 0 0.25rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Drag strip */
.drag-lane {
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.drag-lane--stock {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.28) 0%, rgba(15, 23, 42, 0.92) 65%);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.drag-lane--tuned {
  background: linear-gradient(160deg, rgba(6, 78, 59, 0.32) 0%, rgba(8, 47, 73, 0.35) 50%, rgba(15, 23, 42, 0.92) 90%);
  border: 1px solid rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.12);
}

.race-bar-track {
  height: 12px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.race-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  transition: width 0.08s linear;
}

.race-bar-fill--stock {
  background: linear-gradient(90deg, #dc2626, #f97316);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.race-bar-fill--tuned {
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
}

.btn-dyno-pull {
  background: linear-gradient(90deg, #0891b2, #059669);
  box-shadow:
    0 0 32px rgba(34, 211, 238, 0.45),
    0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-dyno-pull:hover {
  transform: scale(1.02);
  box-shadow: 0 0 44px rgba(34, 211, 238, 0.65);
}

/* Sliders & tuning */
.tray-ring {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.65);
}

.tray-ring--live {
  border-color: var(--emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.55);
}

.tray-ring--race {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);
}

input[type="range"].ecu-master {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.4), rgba(16, 185, 129, 0.4));
}

input[type="range"].ecu-master::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--cyan);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
  cursor: pointer;
}

.stage-preset.is-active {
  border-color: rgba(34, 211, 238, 0.65) !important;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
}

.accordion details {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: rgba(10, 16, 32, 0.75);
}

.accordion summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion .dial-row {
  padding: 0.4rem 1rem 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  border-top: 1px solid var(--border);
}

.dial-row code {
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.telemetry-knock--optimal {
  color: var(--emerald);
}
.telemetry-knock--limp {
  color: var(--amber);
}
.telemetry-knock--risk {
  color: var(--red);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(5, 8, 20, 0.85);
  backdrop-filter: blur(6px);
}

@media (prefers-reduced-motion: reduce) {
  .light-beam {
    animation: none;
  }
  .card-3d:hover {
    transform: none;
  }
}

/* Technical guides — long-form prose */
.guide-article {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  color: #cbd5e1;
  line-height: 1.75;
  font-size: 1.05rem;
}

.guide-article h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.guide-article .guide-dek {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.guide-article h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #e2e8f0;
}

.guide-article p {
  margin-bottom: 1rem;
}

.guide-article ul,
.guide-article ol {
  margin: 0.75rem 0 1.25rem 1.25rem;
}

.guide-article li {
  margin-bottom: 0.4rem;
}

.guide-article pre {
  background: rgba(10, 16, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: #a5f3fc;
  margin: 1rem 0 1.25rem;
}

.guide-article code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88em;
  color: #67e8f9;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.9rem;
}

.guide-table th,
.guide-table td {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.guide-table th {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  font-weight: 600;
}

.guide-table td {
  color: #cbd5e1;
}

.guide-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-cta-row a {
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.guide-cta-row a.primary {
  background: #22d3ee;
  color: #0f172a;
}

.guide-cta-row a.secondary {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

.guide-related {
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(10, 16, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-related h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #22d3ee;
  margin-bottom: 0.75rem;
}

.guide-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-related li {
  margin-bottom: 0.35rem;
}

.guide-related a {
  color: #94a3b8;
  text-decoration: none;
}

.guide-related a:hover {
  color: #22d3ee;
}

.guide-hub-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 1.5rem;
}

.guide-hub-card {
  display: block;
  padding: 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 16, 32, 0.65);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.guide-hub-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
}

.guide-hub-card h2 {
  font-size: 1rem;
  color: #fff;
  margin: 0 0 0.5rem;
}

.guide-hub-card p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.seo-hero-bridge {
  margin-top: 1rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #64748b;
  text-align: center;
}

.faq-accordion details p {
  padding: 0 1rem 0.85rem;
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
}

.faq-accordion details a {
  color: #22d3ee;
}

/* ========== Responsive: mobile / tablet (desktop >=1024px unchanged) ========== */

body.has-mode-widget main {
  padding-top: 6.5rem;
}

body:not(.has-mode-widget) .site-main-guides,
body:not(.has-mode-widget) main.guide-main {
  padding-top: 0;
}

.guide-article code,
.accordion .dial-row code {
  overflow-wrap: anywhere;
}

#sha256-display {
  word-break: break-all;
  overflow-wrap: anywhere;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 32, 0.35);
}

.table-scroll .guide-table {
  margin: 0;
  min-width: 32rem;
}

.drag-lane__metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* —— 2-tier HUD header (portrait) / inline bar (tablet+) —— */
.site-header__shell {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.site-header__row--top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 52px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
  min-width: 0;
}

.site-header__logo {
  height: 2rem;
  width: auto;
  flex-shrink: 0;
}

.site-header__wordmark {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #94a3b8;
  white-space: nowrap;
}

.site-header__download-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #0f172a;
  background: #22d3ee;
  text-decoration: none !important;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
  white-space: nowrap;
}

.site-header__row--nav {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0;
  padding: 0 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(5, 8, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-pills--strip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
  padding: 0.25rem 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.nav-pills--strip::-webkit-scrollbar {
  display: none;
}

.nav-pills--strip .nav-pill {
  flex-shrink: 0;
  font-size: 0.65rem;
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
}

/* Portrait phone: 2-row HUD */
@media (max-width: 767px) {
  .site-header__ctas--inline,
  .site-header__ctas.site-header__ctas--inline {
    display: none !important;
  }
  .site-header__shell {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .site-header__row--top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 0.5rem;
  }

  .site-header__brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .site-header__download-bar {
    flex-shrink: 0;
  }

  .site-header__row--nav {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  .nav-pills--strip {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 4px 6px;
    border-radius: 0;
    border: none;
    border-left: none;
    border-right: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: transparent;
  }

  .nav-pills--strip a,
  .nav-pills--strip .nav-pill {
    font-size: clamp(11px, 3vw, 12.5px);
    padding: 6px 8px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  body.has-mode-widget main {
    padding-top: 6rem;
  }

  .hero-overview {
    padding-top: 0.5rem;
  }

  .showcase-frame,
  .hero-cinematic,
  .showcase-frame.showcase-frame--polydyno,
  .showcase-frame.tuning-hero-shot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
  }

  .showcase-frame img,
  .hero-cinematic img,
  .showcase-frame--polydyno img,
  .tuning-hero-shot img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center center;
  }
}

@media (max-width: 375px) {
  .nav-pills--strip a,
  .nav-pills--strip .nav-pill {
    font-size: 11px;
    padding: 6px 6px;
  }
}

/* Tablet + landscape: single inline bar */
@media (min-width: 768px) {
  .site-header__shell {
    display: grid;
    grid-template-columns: auto minmax(0, max-content) auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.5rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    width: 100%;
    box-sizing: border-box;
  }

  .site-header__row--top {
    display: contents;
  }

  .site-header__row--nav {
    display: contents;
  }

  .site-header__brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    flex-shrink: 0;
    min-width: 0;
  }

  .site-header__wordmark {
    display: inline;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  .site-header__logo {
    height: 1.75rem;
  }

  .site-header__download-bar {
    display: none;
  }

  .nav-pills--strip {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    flex: 0 1 auto;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    justify-content: center;
    overflow-x: visible;
    flex-wrap: nowrap;
    padding: 0.2rem;
    border-radius: 9999px;
    background: rgba(5, 8, 20, 0.75);
    border: 1px solid var(--border);
  }

  .nav-pills--strip .nav-pill {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .site-header__ctas--inline {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    display: flex !important;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .site-header__shell {
    column-gap: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .site-header__wordmark {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  .nav-pills--strip .nav-pill {
    font-size: 0.68rem;
    padding: 0.32rem 0.5rem;
  }

  .site-header__ctas--inline {
    gap: 0.35rem;
  }

  .site-header__ctas--inline a {
    font-size: 0.65rem;
    padding: 0.35rem 0.55rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .nav-pills--strip .nav-pill {
    font-size: 0.66rem;
    padding: 0.3rem 0.45rem;
  }

  .site-header__ctas--inline a {
    font-size: 0.62rem;
    padding: 0.32rem 0.5rem;
  }
}

/* Desktop >=1024 */
@media (min-width: 1024px) {
  .site-header__shell {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .nav-pills--strip .nav-pill {
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
  }

  .site-header__ctas--inline a {
    font-size: 0.75rem;
  }
}

@media (max-width: 767px) {
  body.has-mode-widget .site-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
}

/* Mode widget — scaled full pill on narrow / short viewports */
@media (max-width: 767px), (max-height: 519px) {
  #mode-widget {
    max-width: calc(100vw - 24px);
    padding: 6px 8px;
    border-radius: 14px;
  }

  #mode-widget .mode-widget__top {
    gap: 6px;
  }

  #mode-widget .mode-widget__buttons {
    gap: 5px;
  }

  #mode-widget .mode-widget__btn {
    min-height: unset;
    min-width: unset;
    padding: 4px 8px;
    border-radius: 8px;
  }

  #mode-widget .mode-widget__title {
    font-size: 11px;
    line-height: 1.15;
  }

  #mode-widget .mode-widget__sub {
    display: block;
    font-size: 9.5px;
    line-height: 1.2;
  }

  #mode-widget .mode-widget__caption {
    display: block;
    font-size: 9.5px;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
    margin-top: 4px;
    padding-top: 4px;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .drag-lane__metrics {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .input-enterprise,
  #lead-form input[type="text"],
  #lead-form input[type="email"],
  #lead-form textarea,
  #readout-json {
    font-size: 16px !important;
  }

  [data-drag-spend],
  [data-spend] {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 0.75rem;
  }
}

@media (pointer: coarse) {
  input[type="range"].ecu-master {
    height: 8px;
    padding: 18px 0;
  }

  input[type="range"].ecu-master::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }

  input[type="range"].ecu-master::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }
}

.accordion summary,
.faq-accordion summary {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-right: 2.25rem;
  list-style: none;
}

.accordion summary::after,
.faq-accordion summary::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.2s ease;
}

.accordion details[open] > summary::after,
.faq-accordion details[open] > summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

/* —— Mobile Suite Handoff (no desktop layout changes without .is-mobile-os) —— */
.site-header__suite-pill {
  display: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 767px) {
  .site-header__download-bar--exe {
    display: none !important;
  }

  .site-header__suite-pill {
    display: inline-flex !important;
  }
}

@media (min-width: 768px) {
  html:not(.is-mobile-os) .site-header__suite-pill {
    display: none !important;
  }

  html.is-mobile-os .site-header__ctas--inline,
  html.is-mobile-os .site-header__ctas.site-header__ctas--inline {
    display: none !important;
  }

  html.is-mobile-os .site-header__download-bar--exe {
    display: none !important;
  }

  html.is-mobile-os .site-header__suite-pill {
    display: inline-flex !important;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    flex-shrink: 0;
  }
}

#suite-handoff-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
}

#suite-handoff-modal[hidden] {
  display: none !important;
}

#suite-handoff-modal .suite-handoff__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#suite-handoff-modal .suite-handoff__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-height: 88dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: linear-gradient(155deg, rgba(12, 20, 38, 0.96), rgba(7, 10, 18, 0.98));
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.65),
    0 0 32px rgba(16, 185, 129, 0.12);
  color: #e2e8f0;
  box-sizing: border-box;
}

#suite-handoff-modal .suite-handoff__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

#suite-handoff-modal .suite-handoff__title {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}

#suite-handoff-modal .suite-handoff__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94a3b8;
}

#suite-handoff-modal .suite-handoff__close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: -0.35rem -0.35rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

#suite-handoff-modal .suite-handoff__cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#suite-handoff-modal .suite-handoff__card {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 32, 0.55);
}

#suite-handoff-modal .suite-handoff__card-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #22d3ee;
}

#suite-handoff-modal .suite-handoff__card-sub {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #94a3b8;
}

#suite-handoff-modal .suite-handoff__card-url {
  margin: 0.45rem 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  line-height: 1.4;
  color: #64748b;
  word-break: break-all;
}

#suite-handoff-modal .suite-handoff__card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

#suite-handoff-modal .suite-handoff__btn {
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(34, 211, 238, 0.18));
  color: #ecfdf5;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

#suite-handoff-modal .suite-handoff__btn--ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

#suite-handoff-modal .suite-handoff__footer {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#suite-handoff-modal .suite-handoff__footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#suite-handoff-modal .suite-handoff__exe-fallback {
  margin: 0.75rem 0 0;
  font-size: 0.7rem;
  text-align: center;
  color: #64748b;
}

#suite-handoff-modal .suite-handoff__exe-fallback a {
  color: #94a3b8;
  text-decoration: underline;
}

@media (max-height: 520px) and (max-width: 767px) {
  #suite-handoff-modal .suite-handoff__panel {
    padding: 0.75rem 0.85rem;
  }

  #suite-handoff-modal .suite-handoff__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  #suite-handoff-modal .suite-handoff__card {
    padding: 0.55rem 0.5rem;
  }

  #suite-handoff-modal .suite-handoff__card-url {
    display: none;
  }

  #suite-handoff-modal .suite-handoff__card-actions {
    flex-direction: column;
    margin-top: 0.45rem;
  }

  #suite-handoff-modal .suite-handoff__btn {
    width: 100%;
    min-height: 36px;
    font-size: 0.65rem;
    padding: 0.35rem 0.4rem;
  }
}