@font-face {
  font-family: "Courier Prime";
  src: url("/media/fonts/courier-prime-regular.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("/media/fonts/courier-prime-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --qx-ink: #091012;
  --qx-surface: #11191b;
  --qx-raised: #182326;
  --qx-paper: #f4f3ef;
  --qx-muted: #aebcbd;
  --qx-reef: #71e4cf;
  --qx-reef-soft: rgba(113, 228, 207, 0.14);
  --qx-line: rgba(113, 228, 207, 0.22);
  --qx-page: 1200px;
  --qx-radius: 18px;
  --qx-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  --qx-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body.qx-public {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--qx-paper);
  background:
    radial-gradient(circle at 82% -8%, rgba(113, 228, 207, 0.14), transparent 34rem),
    linear-gradient(145deg, #080d0f, #11191b 58%, #091012);
  font-family: "Courier Prime", "Courier New", monospace;
}

body.qx-drawer-open { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; }

.qx-skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.8rem 1rem;
  color: var(--qx-ink);
  background: var(--qx-reef);
  border-radius: 999px;
  transform: translateY(-160%);
}
.qx-skip-link:focus { transform: translateY(0); }

.qx-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--qx-line);
  background: rgba(9, 16, 18, 0.88);
  backdrop-filter: blur(20px);
}

.qx-header-inner,
.qx-main,
.qx-footer-inner {
  width: min(var(--qx-page), calc(100% - 2.5rem));
  margin-inline: auto;
}

.qx-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.qx-brand { display: inline-flex; flex: 0 0 auto; }
.qx-brand img { display: block; width: 108px; height: auto; }

.qx-nav { display: flex; align-items: center; gap: clamp(0.75rem, 1.5vw, 1.35rem); margin-left: auto; }
.qx-nav a {
  position: relative;
  padding: 0.7rem 0;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  white-space: nowrap;
}
.qx-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.35rem;
  left: 0;
  height: 1px;
  background: var(--qx-reef);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms var(--qx-ease);
}
.qx-nav a:hover::after,
.qx-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.qx-nav a[aria-current="page"] { color: var(--qx-reef); }
.qx-nav .qx-search-link {
  padding: 0.72rem 1rem;
  color: var(--qx-ink);
  background: var(--qx-reef);
  border-radius: 999px;
}
.qx-nav .qx-search-link::after { display: none; }

.qx-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  margin-left: auto;
  border: 1px solid var(--qx-line);
  border-radius: 50%;
  color: var(--qx-paper);
  background: var(--qx-surface);
}
.qx-menu-toggle span { display: block; width: 18px; height: 1px; margin: 5px auto; background: currentColor; }

.qx-main { min-height: 70vh; }
.qx-hero { max-width: 900px; padding: clamp(5rem, 10vw, 8.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.qx-eyebrow,
.qx-card-kicker {
  color: var(--qx-reef);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.qx-hero h1,
.qx-display {
  margin: 1rem 0 1.5rem;
  font-family: Haettenschweiler, "Franklin Gothic Condensed", sans-serif;
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.qx-hero > p:last-child,
.qx-lead { max-width: 760px; color: var(--qx-muted); font-size: clamp(1rem, 2vw, 1.28rem); line-height: 1.7; }

.qx-panel,
.qx-article,
.qx-handoff,
.qx-related,
.qx-map-panel,
.qx-bodhi-panel {
  margin-bottom: 1.5rem;
  padding: clamp(1.4rem, 4vw, 2.75rem);
  border: 1px solid var(--qx-line);
  border-radius: var(--qx-radius);
  background: rgba(17, 25, 27, 0.9);
  box-shadow: var(--qx-shadow);
}

.qx-card-grid,
.qx-manufacturer-grid,
.qx-model-grid,
.qx-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.75rem 0 4rem;
}
.qx-manufacturer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qx-card,
.qx-manufacturer-card,
.qx-model-card {
  position: relative;
  min-width: 0;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--qx-raised);
  transition: transform 180ms var(--qx-ease), border-color 180ms var(--qx-ease), box-shadow 180ms var(--qx-ease);
}
.qx-card:hover,
.qx-manufacturer-card:hover,
.qx-model-card:hover { transform: translateY(-4px); border-color: var(--qx-reef); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2); }
.qx-card h2,
.qx-card h3,
.qx-model-card h2,
.qx-model-card h3,
.qx-article h2,
.qx-handoff h2,
.qx-bodhi-panel h2 {
  font-family: Haettenschweiler, "Franklin Gothic Condensed", sans-serif;
  letter-spacing: -0.015em;
}
.qx-card p,
.qx-model-card p,
.qx-article p,
.qx-article li,
.qx-handoff p { color: var(--qx-muted); line-height: 1.65; }
.qx-card a,
.qx-manufacturer-card a,
.qx-model-card a { text-decoration: none; }
.qx-card-action { display: inline-block; margin-top: 1rem; color: var(--qx-reef); font-weight: 700; }

.qx-manufacturer-card { min-height: 180px; text-align: center; }
.qx-manufacturer-card img { width: 150px; height: 64px; object-fit: contain; margin-bottom: 1rem; }
.qx-manufacturer-card strong { display: block; }
.qx-manufacturer-card span { display: block; margin-top: 0.4rem; color: var(--qx-muted); font-size: 0.82rem; }

.qx-model-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1.2rem; min-height: 210px; }
.qx-model-card img { width: 100%; height: 170px; object-fit: contain; }
.qx-model-card[hidden] { display: none; }

.qx-button,
.qx-button-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--qx-reef);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}
.qx-button { color: var(--qx-ink); background: var(--qx-reef); }
.qx-button-secondary { color: var(--qx-reef); background: transparent; }
.qx-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.7rem; }

.qx-breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.65rem; padding-top: 2rem; color: var(--qx-muted); font-size: 0.86rem; }
.qx-breadcrumbs a { color: var(--qx-reef); }

.qx-search-tools { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.8rem; }
.qx-field { display: grid; gap: 0.4rem; }
.qx-field label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.qx-field input,
.qx-field select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem;
  border: 1px solid var(--qx-line);
  border-radius: 10px;
  color: var(--qx-paper);
  background: var(--qx-ink);
  font: inherit;
}
.qx-search-status { min-height: 1.4rem; margin-top: 1rem; color: var(--qx-muted); }
.qx-empty { padding: 2rem; border: 1px dashed var(--qx-line); border-radius: 14px; color: var(--qx-muted); text-align: center; }

.qx-review-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 380px); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding: clamp(2rem, 6vw, 5rem) 0; }
.qx-review-hero h1 { font-family: Haettenschweiler, "Franklin Gothic Condensed", sans-serif; font-size: clamp(3rem, 7vw, 6rem); line-height: 0.9; letter-spacing: -0.03em; }
.qx-review-hero img { width: 100%; max-height: 520px; object-fit: contain; filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.35)); }
.qx-manufacturer-lockup { display: flex; align-items: center; gap: 1rem; }
.qx-manufacturer-lockup img { width: 150px; height: 70px; object-fit: contain; }
.qx-review-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.5rem 0; }
.qx-review-fact { padding: 1rem; border: 1px solid var(--qx-line); border-radius: 12px; background: var(--qx-reef-soft); }
.qx-review-fact strong { display: block; margin-bottom: 0.35rem; color: var(--qx-reef); }
.qx-region-links { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.qx-region-links a { padding: 0.65rem 0.85rem; border: 1px solid var(--qx-line); border-radius: 999px; text-decoration: none; }

.qx-footer { margin-top: 6rem; border-top: 1px solid var(--qx-line); }
.qx-footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 3rem; padding: 3rem 0 4rem; color: var(--qx-muted); }
.qx-footer img { width: 112px; }
.qx-footer nav { display: flex; flex-wrap: wrap; align-content: start; justify-content: flex-end; gap: 1rem 1.5rem; }
.qx-footer a { text-decoration: none; }

.qx-loader {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--qx-paper);
  background: var(--qx-ink);
  transition: opacity 180ms ease, visibility 180ms ease;
}
.qx-loader[hidden],
.qx-loader.qx-loader-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.qx-loader-mark { color: var(--qx-reef); font-size: 1.2rem; font-weight: 700; letter-spacing: 0.2em; }
.qx-loader-bar { width: min(260px, 60vw); height: 2px; margin-top: 1rem; overflow: hidden; background: rgba(255,255,255,.12); }
.qx-loader-bar::after { content: ""; display: block; width: 45%; height: 100%; background: var(--qx-reef); animation: qx-load 1s ease-in-out infinite alternate; }

:focus-visible { outline: 3px solid var(--qx-reef); outline-offset: 4px; }
.qx-reveal { animation: qx-rise 520ms var(--qx-ease) both; }
@keyframes qx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes qx-load { from { transform: translateX(-110%); } to { transform: translateX(220%); } }

@media (max-width: 1040px) {
  .qx-menu-toggle { display: block; }
  .qx-nav {
    position: fixed;
    z-index: 101;
    top: 78px;
    right: 0;
    bottom: 0;
    width: min(390px, 92vw);
    padding: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    background: #0b1214;
    border-left: 1px solid var(--qx-line);
    transform: translateX(105%);
    transition: transform 220ms var(--qx-ease);
  }
  .qx-nav[data-open="true"] { transform: translateX(0); }
  .qx-nav a { padding: 0.9rem; font-size: 0.9rem; }
  .qx-nav .qx-search-link { margin-top: 0.8rem; text-align: center; }
  .qx-manufacturer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .qx-header-inner, .qx-main, .qx-footer-inner { width: min(var(--qx-page), calc(100% - 1.5rem)); }
  .qx-hero { padding-top: 4rem; }
  .qx-card-grid, .qx-model-grid, .qx-mini-grid { grid-template-columns: 1fr; }
  .qx-manufacturer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qx-search-tools { grid-template-columns: 1fr; }
  .qx-model-card { grid-template-columns: 90px minmax(0, 1fr); }
  .qx-model-card img { height: 130px; }
  .qx-review-hero { grid-template-columns: 1fr; }
  .qx-review-hero img { max-height: 360px; order: -1; }
  .qx-review-facts { grid-template-columns: 1fr; }
  .qx-footer-inner { grid-template-columns: 1fr; }
  .qx-footer nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .qx-card:hover, .qx-manufacturer-card:hover, .qx-model-card:hover { transform: none; }
}
