/* === GLOBAL BASE STYLES (FORCED) === */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

main {
  max-width: 1600px;
  margin-inline: auto;
  width: 100%;
}

.container {
  margin-inline: auto;
}

body {
  overflow-x: hidden;
}

section {
  width: 100%;
}

.utility-shell {
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.utility-page--with-header .utility-shell {
  padding-top: calc(
    28px +
    var(
      --utility-chrome-offset,
      calc(var(--spacing-6, 48px) + var(--spacing-4, 32px))
    )
  );
}

@media (max-width: 720px) {
  .utility-shell {
    width: min(100% - 16px, 980px);
    padding-top: 16px;
    padding-bottom: 36px;
  }

  .utility-page--with-header .utility-shell {
    padding-top: calc(
      16px +
      var(
        --utility-chrome-offset-mobile,
        calc(var(--spacing-4, 32px) + var(--spacing-3, 24px))
      )
    );
  }
}

/* --- SVG icons (local sprite) --- */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
}

/* Generated typography guard: keeps long localized words inside responsive layouts. */
html { overflow-wrap: break-word; }
body { overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, p, li, blockquote, figcaption, label, legend, summary, dd, dt, th, td { overflow-wrap: anywhere; word-break: normal; hyphens: auto; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; max-width: 100%; }
p, li, blockquote, figcaption { text-wrap: pretty; }
/* Keep narrow localized action labels readable; do not allow letter-by-letter CTA pills. */
a, button, [role="button"] { min-width: 0; max-width: 100%; overflow-wrap: normal; word-break: normal; hyphens: auto; }
main :is(.flex, [class*="flex"], .grid, [class*="grid"]) > * { min-width: 0; }
main :is(p, li, blockquote, figcaption, dd, dt, small) a { overflow-wrap: anywhere; word-break: normal; }
main :is(a[href^="mailto:"], a[href*="@"], [class*="email"], [class*="mail"]) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
main :is([class*="email"], [class*="mail"]) :is(a, span, strong, b, p, div) { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
main :is(a, button, [role="button"]):is([class*="px-"], [class*="rounded-"], [class*="border"]) { white-space: normal; line-height: 1.15; text-align: center; }
main :is(a, button, [role="button"]):not([aria-label]):is([class*="rounded-full"], [class*="aspect-square"], [class*="w-12"], [class*="w-14"], [class*="w-16"], [class*="w-20"]) { width: auto; height: auto; aspect-ratio: auto; min-width: min(10rem, 100%); min-height: 2.75rem; padding-left: max(1rem, 1em); padding-right: max(1rem, 1em); }
main :is(a, button, [role="button"]):is([style*="writing-mode"], [class*="vertical"]) { writing-mode: horizontal-tb !important; text-orientation: mixed !important; }
@media (max-width: 640px) { main :is(a, button, [role="button"]):not([aria-label]):is([class*="rounded-full"], [class*="aspect-square"], [class*="w-12"], [class*="w-14"], [class*="w-16"], [class*="w-20"]) { width: 100%; min-width: 0; } }
h1[class*="whitespace-nowrap"], h2[class*="whitespace-nowrap"], h3[class*="whitespace-nowrap"], p[class*="whitespace-nowrap"], a[class*="whitespace-nowrap"], button[class*="whitespace-nowrap"] { white-space: normal; }
.site-brand span, .site-nav__link, .site-mobileNav__link, .site-footer__link, .site-footer__contactLink { overflow-wrap: anywhere; word-break: normal; hyphens: auto; }

.sonar-demo {
  width: min(100%, 420px);
  max-width: 420px;
  max-height: 800px;
  margin-inline: auto;
  color: #e2faff;
}

.sonar-shell {
  position: relative;
  display: flex;
  aspect-ratio: 9 / 16;
  width: 100%;
  max-height: 800px;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.6);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(6, 12, 28, 0.18), rgba(6, 12, 28, 0.52)),
    url("../img/sonar_mission_background.webp") center / cover;
  box-shadow: 0 24px 60px rgba(8, 47, 73, 0.28);
  padding: 14px;
}

.sonar-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 52% 18%, rgba(34, 211, 238, 0.18), transparent 28%), linear-gradient(90deg, rgba(2, 8, 23, 0.45), transparent 30%, transparent 70%, rgba(2, 8, 23, 0.45));
  pointer-events: none;
}

.sonar-mission-bar,
.sonar-status,
.sonar-playfield,
.sonar-readout,
.sonar-brake {
  position: relative;
  z-index: 1;
}

.sonar-mission-bar {
  display: grid;
  grid-template-columns: 34px 1fr 62px;
  align-items: center;
  color: #f8feff;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 0 14px rgba(8, 47, 73, 0.9);
}

.sonar-back {
  color: rgba(248, 254, 255, 0.9);
  font-size: 1.6rem;
  line-height: 1;
}

.sonar-reset {
  border: 1px solid rgba(34, 211, 238, 0.52);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.64);
  color: #67e8f9;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  padding: 8px 7px;
  text-align: center;
}

.sonar-status {
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.5);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.83);
  box-shadow: 0 0 0 1px rgba(8, 145, 178, 0.35), 0 16px 30px rgba(2, 8, 23, 0.32);
}

.sonar-status__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 7px 9px;
  text-transform: uppercase;
}

.sonar-status__top strong {
  color: #22d3ee;
  white-space: nowrap;
}

.sonar-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(148, 163, 184, 0.12);
}

.sonar-metrics div {
  min-width: 0;
  background: rgba(15, 23, 42, 0.72);
  padding: 7px 5px 8px;
  text-align: center;
}

.sonar-metrics span {
  display: block;
  color: rgba(226, 232, 240, 0.58);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.sonar-metrics strong {
  display: block;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  margin-top: 5px;
}

.sonar-playfield {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgba(226, 232, 240, 0.84);
  border-radius: 7px;
  background: rgba(2, 8, 23, 0.58);
  box-shadow: inset 0 0 45px rgba(14, 165, 233, 0.18), 0 16px 36px rgba(2, 8, 23, 0.34);
}

.sonar-scanline {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  left: 10px;
  display: grid;
  grid-template-columns: 1fr 90px;
  align-items: center;
  min-height: 38px;
  overflow: hidden;
  border: 2px solid #ccfbf1;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.84), rgba(14, 165, 233, 0.58));
  color: #eaffff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.sonar-scanline span:first-child {
  display: block;
  overflow: hidden;
  padding: 0 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sonar-ping {
  position: relative;
  display: block;
  height: 100%;
  background: rgba(15, 23, 42, 0.72);
}

.sonar-ping::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 26px;
  width: 46px;
  height: 22px;
  border-top: 2px solid rgba(226, 232, 240, 0.74);
  border-left: 2px solid rgba(226, 232, 240, 0.74);
  transform: rotate(-24deg);
}

#sonarCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  touch-action: none;
}

.sonar-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #67e8f9;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: uppercase;
}

.sonar-readout span {
  min-width: 0;
}

.sonar-readout span:last-child {
  color: rgba(226, 232, 240, 0.84);
  text-align: right;
}

.sonar-brake {
  min-height: 42px;
  border: 2px solid rgba(34, 211, 238, 0.86);
  border-radius: 12px;
  background: rgba(8, 145, 178, 0.32);
  box-shadow: inset 0 0 22px rgba(34, 211, 238, 0.18), 0 0 24px rgba(34, 211, 238, 0.2);
  color: #67e8f9;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  padding: 9px;
  text-align: center;
  text-transform: uppercase;
  touch-action: none;
}

.sonar-brake.is-held {
  background: rgba(34, 211, 238, 0.54);
  color: #ecfeff;
  transform: translateY(1px);
}

@media (max-width: 640px) {
  .sonar-shell {
    gap: 8px;
    padding: 9px;
  }

  .sonar-mission-bar {
    grid-template-columns: 26px 1fr 54px;
    font-size: 0.76rem;
    letter-spacing: 0;
  }

  .sonar-back {
    font-size: 1.45rem;
  }

  .sonar-reset {
    padding: 9px 6px;
  }

  .sonar-status__top {
    gap: 7px;
    padding: 7px 8px;
  }

  .sonar-status__top strong {
    white-space: normal;
  }

  .sonar-metrics div {
    padding: 6px 4px 7px;
  }

  .sonar-playfield,
  #sonarCanvas {
    min-height: 0;
  }

  .sonar-scanline {
    grid-template-columns: 1fr 54px;
    min-height: 36px;
  }

  .sonar-scanline span:first-child {
    padding: 0 10px;
  }

  .sonar-ping::before {
    right: 14px;
    width: 26px;
  }

  .sonar-readout {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .sonar-readout span:last-child {
    text-align: left;
  }
}

/* g2 palette ssot start */
:root {
  --g2-palette-dark: #1e293b;
  --g2-palette-light: #f8fafc;
  --g2-palette-accent: #38bdf8;
  --g2-palette-text: #1e293b;
  --g2-color-primary: var(--g2-palette-accent);
  --g2-color-accent: var(--g2-palette-accent);
  --g2-color-text: var(--g2-palette-text);
  --g2-palette-text-on-dark: #ffffff;
}
/* g2 palette ssot end */
