/* App identity, version navigation and Tubolito-specific presentation. */
.ble-edition {
  --ble-orange: #ff983f;
}

.ant-version {
  --ble-orange: var(--accent);
}

@media (min-width: 1025px) {
  .site-header .nav-links,
  .site-header .nav-links-track {
    gap: 0.2rem;
  }

  .site-header .nav-links a {
    padding-inline: 0.4rem;
    white-space: nowrap;
  }
}

@media (min-width: 701px) and (max-width: 1199px) {
  .ant-navigation .nav-row,
  .ble-edition .nav-row {
    flex-wrap: wrap;
    padding-block: 0.5rem;
    gap: 0.5rem;
  }

  .ant-navigation .nav-links,
  .ant-navigation .nav-links-track,
  .ble-edition .nav-links,
  .ble-edition .nav-links-track {
    width: 100%;
    flex-wrap: wrap;
  }
}

.ant-version .ble-version-identity img {
  background: transparent;
  transform: scale(1.4);
}

.ant-version .ble-version-controls select {
  border-color: var(--line);
}

.version-note {
  margin-block: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.version-note a {
  color: var(--accent);
}

.app-choice-card > img {
  display: block;
  width: 100%;
  max-width: 312px;
  height: 170px;
  object-fit: contain;
  margin: 0 auto 0.8rem;
}

.app-choice-ble {
  border-color: #795136;
}

.app-choice-product-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 170px;
  max-width: 360px;
  margin: 0 auto 0.8rem;
}

.app-choice-product-pair img {
  width: calc((100% - 1rem) / 2);
  min-width: 0;
  height: 100%;
  object-fit: contain;
}

.app-choice-product-pair img:only-child {
  width: 170px;
  max-width: 100%;
}

.app-choice-ble .eyebrow {
  color: #ff983f;
}

.app-choice-card a,
.tubolito-sensor-card a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 0.15em;
}

.tubolito-sensor-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.ble-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

/* Sensors stays a shared catalog, with the selected app always accessible. */
html[data-page="compatible-tire-sensors"] .ble-version {
  position: sticky;
  top: var(--site-header-height, 64px);
  z-index: 19;
  background: var(--bg);
  box-shadow: 0 0 0 100vmax var(--bg);
  clip-path: inset(0 -100vmax);
}

html[data-page="compatible-tire-sensors"] main section[id] {
  scroll-margin-top: calc(var(--site-header-height, 64px) + var(--sensor-version-height, 90px) + 1rem);
}

html[data-page="compatible-tire-sensors"] .page-hero .sensor-app-name-link {
  text-decoration: none;
}

.sensor-app-name {
  font-weight: 700;
}

.sensor-app-name-ant {
  color: var(--accent);
}

.sensor-app-name-tubolito {
  color: #ff983f;
}

.sensor-app-name-airspy {
  color: #ff795a;
}

.ble-version-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.ble-version-identity img {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 9px;
  background: radial-gradient(ellipse, #6f4828 0, #152335 65%);
  transform: none;
}

.ble-version-identity small,
.ble-version-identity strong {
  display: block;
}

.ble-version-identity small {
  color: var(--ble-orange);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ble-version-identity strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.ble-version-controls {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.ble-version-controls label {
  font-size: 0.76rem;
  color: var(--muted);
}

.ble-version-controls select {
  font: inherit;
  font-size: 0.8rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #755038;
  border-radius: 6px;
  padding: 0.5rem 1.4rem 0.5rem 0.6rem;
  max-width: 100%;
  cursor: pointer;
  color-scheme: dark;
}

.ble-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 1.5rem;
  align-items: center;
}

.ble-intro .kicker {
  color: var(--ble-orange);
}

.ble-intro h1 {
  font-size: clamp(2.15rem, 4.7vw, 3.7rem);
}

.ble-product-sticker {
  margin: 0;
  padding: 0.7rem;
  border: 1px solid #6c4d38;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 20%, #543722 0, #101c2c 75%);
  box-shadow: 0 14px 28px #0005;
  transform: none;
}

.ble-product-sticker img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 8px;
}

.ble-product-sticker figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 700;
}

.ble-product-sticker figcaption span {
  display: block;
  color: var(--ble-orange);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-page="ble-home"] .ble-intro {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.ble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.3rem;
}

.ble-edition .ble-actions .btn {
  color: #05221f;
  text-decoration: none;
}

.ble-edition .ble-actions .btn-ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

.ble-guide-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.ble-guide-links a {
  display: block;
  padding-block: 0.65rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.ble-guide-links strong,
.ble-guide-links span {
  display: block;
}

.ble-guide-links strong {
  color: var(--text);
}

.ble-guide-links span {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.ble-edition code {
  color: #ffd2aa;
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

.ble-edition .ble-target-emphasis {
  color: var(--ble-orange);
}

.ble-edition code.sensor-id-example {
  font-size: 1.125rem;
  font-weight: 700;
  white-space: nowrap;
}

.ble-target-note h3 {
  margin-top: 0;
}

.ble-edition .support-inline-layout .contact-developer-figure {
  align-self: start;
}

@media (max-width: 760px) {
  .tubolito-sensor-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .ble-version {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
    padding-block: 0.7rem;
  }

  .ble-version-controls {
    width: 100%;
    gap: 0.4rem;
  }

  .ble-version-controls label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .ble-version-controls select {
    flex: 1;
    min-width: 0;
  }

  .ble-intro,
  html[data-page="ble-home"] .ble-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }

  .ble-intro h1 {
    font-size: clamp(2rem, 8vw, 2.7rem);
  }

  .ble-product-sticker {
    width: 125px;
    justify-self: end;
    margin: 0.2rem 0.5rem 0.5rem;
    transform: none;
  }

  .ble-edition:not([data-page="ble-home"]) .ble-product-sticker {
    display: none;
  }

  .ble-guide-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tubolito-sensor-card .compat-card-media {
  position: relative;
}

.tubolito-sensor-card .compat-new-burst {
  top: -0.12rem;
  left: -0.12rem;
}

.airspy-edition {
  --ble-orange: #ff795a;
}

.airspy-edition .ble-product-sticker {
  background: radial-gradient(ellipse at 50% 20%, #4b2d27 0, #101c2c 75%);
}

.app-choice-airspy {
  border-color: #825047;
}

.app-choice-airspy .eyebrow {
  color: #ff795a;
}

.app-choice-airspy .app-choice-product-pair {
  gap: 0.42rem;
  max-width: 300px;
}

.app-choice-airspy .app-choice-product-pair img {
  flex: 0 1 141.12px;
  width: 141.12px;
  height: 151.2px;
}

.app-choice-airspy .app-choice-product-pair img[src$="sks-airspy-tl-cutout.png"] {
  transform: rotate(18deg) scale(0.95);
}

.app-choice-airspy .app-choice-product-pair img[src$="sks-airspy-presta-cutout-117.png"] {
  transform: scale(1.05);
}

.airspy-models {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.airspy-models figure {
  margin: 0;
  text-align: center;
}

.airspy-models img {
  width: 100%;
  height: 170px;
  object-fit: contain;
}

.airspy-models figcaption {
  color: var(--muted);
  font-size: 0.88rem;
}

html[data-page="airspy-home"] .ble-intro {
  grid-template-columns: minmax(0, 1fr) 220px;
}

@media (max-width: 760px) {
  html[data-page="airspy-home"] .ble-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-page="airspy-home"] .ble-product-sticker {
    display: block;
  }

  .airspy-models {
    gap: 0.5rem;
  }

  .airspy-models img {
    height: 110px;
  }
}

/* All three app homepages share the product-first, photographic home treatment. */
.app-choice-card {
  position: relative;
}

.app-choice-home-link {
  color: var(--text) !important;
  text-decoration: none;
}

.app-choice-home-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.app-choice-home-link:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.app-choice-card p a {
  position: relative;
  z-index: 1;
}

/* Match the original hero; product photos occupy only its lower-right corner. */
.sensor-home .hero-sensor-products {
  position: absolute;
  right: 0.9rem;
  bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 184px;
  height: 140px;
  margin: 0;
}

.sensor-home .hero-sensor-products img {
  width: calc((100% - 0.3rem) / 2);
  height: 125px;
  object-fit: contain;
}

.sensor-home .hero-sensor-products img:only-child {
  width: 100%;
}

.sensor-home .hero-points,
.sensor-home .hero-overlay .cta-row {
  padding-right: 190px;
}

.app-sensor-id-card .fullshot,
.sensor-id-app-example img {
  display: block;
  width: min(200px, 100%);
  height: auto;
  margin-inline: auto;
}

.sensor-id-app-example {
  width: fit-content;
  max-width: 100%;
  margin: 1rem 0;
}

.ble-edition main a:not(.btn):not(.hero-link):not(.app-choice-home-link):not(.compat-status):not(.hero-app-support-badge),
.ble-edition main a:not(.btn):not(.hero-link):not(.app-choice-home-link):not(.compat-status):not(.hero-app-support-badge):visited {
  color: var(--accent);
}

@media (max-width: 600px) {
  .sensor-home .hero-sensor-products {
    position: static;
    width: 160px;
    height: 110px;
    margin: 0.5rem 0 0 auto;
  }

  .sensor-home .hero-sensor-products img {
    height: 105px;
  }

  .sensor-home .hero-points,
  .sensor-home .hero-overlay .cta-row {
    padding-right: 0;
  }
}

.airspy-edition .ble-version-identity img {
  background: transparent;
}

.sensor-home .hero-sensor-products.hero-sensor-medley img {
  width: 100%;
}

.help-article .sensor-set-option-label {
  color: #68b8ff;
  font-weight: 700;
}

/* Deeper solid fills balance the perceived saturation of the smaller title text. */
.ble-edition .hero-app-support-badge {
  background: #ff7600;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.3));
}

.airspy-edition .hero-app-support-badge {
  background: #ff4920;
}
