/* OBEINSON FREQUENCY X — polish layer.
 *
 * Loaded last so it refines the vendor app without editing it. That is the whole
 * point of the file: index.html already carries ~1,883 lines of hand-applied
 * customization that must be re-applied on every vendor drop, and this adds one
 * <link> rather than another block to re-apply.
 *
 * Sets no width, height, margin, padding, grid or flex, so a vendor update cannot
 * collide with it on box geometry. Two rules do affect rendered size and are the
 * exceptions to "nothing moves": `text-wrap: balance` changes where headings break,
 * and so their height; font smoothing changes glyph weight. Both are deliberate.
 */

/* ---------------------------------------------------------------- legibility
 * The brand's light blue carries white label text, which measures 2.36:1 against
 * #5fb0ea. WCAG AA wants 4.5:1 for text this size, so the app's most-pressed
 * buttons — Search, Listen live, Start scan, and the Agree button everyone must
 * press to get in — were the hardest things on screen to read.
 *
 * The blue is untouched. Only the ink darkens, which measures ~7.5:1 and is also
 * how bright accent buttons are drawn now. The vendor sets these with
 * !important, so matching it here is the only way to land.
 */
button.primary,
.eulaBtns .agree,
#qsGo, #aioGo, #bcPickGo,
.devRow .go, .localBar .go,
.sdrTuner #sdrTuneBtn,
.sdrTuner .modes button.on {
  color: #0b1220 !important;
  text-shadow: none !important;
}

/* The same ink on the disabled state, so it dims rather than changing hue. */
.eulaBtns .agree:disabled { color: #0b1220 !important; }

/* ------------------------------------------------------------------- shape
 * .pinPad keys are 50% rounded on a box about 85x68, so they render as ellipses
 * rather than circles. A fixed radius makes them read as deliberate without
 * changing a single dimension.
 */
.pinPad button { border-radius: 20px; }

/* --------------------------------------------------------------- keyboard
 * A visible, consistent focus ring for keyboard users only; pointer users see
 * no change. Uses the app's own cyan so it reads as part of the design.
 */
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan, #4fd1e8);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ surface */
::selection { background: rgba(79, 209, 232, .3); color: var(--text, #e4edf5); }

:root {
  scrollbar-width: thin;
  scrollbar-color: #35495f transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #35495f;
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: #46607c; background-clip: content-box; }

/* Dark backgrounds render text heavier than intended; this is the usual correction. */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Avoids a heading breaking with one orphaned word. Ignored where unsupported. */
h1, h2, h3, h4, .pinTitle, .eulaHead h3 { text-wrap: balance; }

/* ------------------------------------------------------------------- motion
 * Short, uniform easing on the things people press. Transitions only, so no
 * layout is implied.
 */
button, a.btn, .qsBtn, .chip, .tvCard, .secRow {
  transition: background-color .15s ease, border-color .15s ease,
              color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

/* Honour the OS setting. Note the scope: this is the conventional blanket rule, so it
 * stills every animation and transition in the app — the PIN logo ring, but also VU
 * meters, scan indicators and the ON AIR pulse — for anyone with Reduce Motion on, which
 * is common on iOS. That is the right default, but anything later driven by `animationend`
 * has to tolerate firing almost immediately for those users.
 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
