/* TerritoryHub flagship product treatment.
   Keeps the shared Raysor shell while giving the product its navy / ice / electric-blue
   command-center language and adaptive dense-data behavior. */

body.territoryhub-product {
  --th-ice: #d9efff;
  --th-blue: #6db9ff;
  --th-blue-strong: #2d8fff;
  --th-navy: #07111e;
  --th-panel: rgba(7, 19, 34, .72);
  --th-panel-strong: rgba(8, 22, 39, .88);
  --th-line: rgba(183, 222, 255, .18);
  --th-line-strong: rgba(191, 226, 255, .34);
  --th-radius-xl: 32px;
  --th-radius-lg: 24px;
}

body.territoryhub-product .v1-product-hero {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

body.territoryhub-product .v1-product-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2rem 0 auto 0;
  height: min(70vh, 46rem);
  pointer-events: none;
  background:
    radial-gradient(circle at 74% 24%, rgba(59, 151, 255, .18), transparent 31%),
    radial-gradient(circle at 22% 14%, rgba(171, 222, 255, .09), transparent 27%);
  filter: saturate(1.08);
}

body.territoryhub-product .v1-product-hero-grid {
  align-items: center;
  gap: clamp(30px, 5vw, 76px);
}

body.territoryhub-product .v1-product-identity {
  gap: 12px;
  margin-bottom: 18px;
}

body.territoryhub-product .v1-product-glyph {
  border: 1px solid var(--th-line-strong);
  background:
    radial-gradient(circle at 32% 12%, rgba(255,255,255,.2), transparent 42%),
    linear-gradient(145deg, rgba(91, 172, 255, .22), rgba(10, 34, 60, .78));
  box-shadow:
    inset 0 1px rgba(255,255,255,.18),
    0 16px 38px rgba(0,0,0,.27),
    0 0 34px rgba(72, 162, 255, .14);
  color: var(--th-ice);
}

body.territoryhub-product .th-product-promise {
  max-width: 18ch;
  margin: .18em 0 .55em;
  color: var(--th-ice);
  font-size: clamp(1.28rem, 2.5vw, 2rem);
  font-weight: 720;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}

body.territoryhub-product .v1-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

body.territoryhub-product .v1-product-meta > span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  border: 1px solid var(--th-line);
  border-radius: 14px;
  background: rgba(10, 27, 47, .62);
  box-shadow: inset 0 1px rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  backdrop-filter: blur(16px) saturate(145%);
}

body.territoryhub-product .v1-product-hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

body.territoryhub-product .v1-product-hero .button,
body.territoryhub-product .v1-download-actions .button {
  transform: translateZ(0);
  transition: transform 180ms cubic-bezier(.2,.86,.22,1), border-color 180ms ease, box-shadow 220ms ease, background-color 180ms ease;
}

body.territoryhub-product .v1-product-hero .button {
  min-height: 52px;
  padding-inline: 20px;
}

body.territoryhub-product .v1-product-hero .button:focus-visible,
body.territoryhub-product .v1-download-actions .button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--th-ice) 78%, transparent);
  outline-offset: 4px;
}

body.territoryhub-product .v1-product-hero .button:active,
body.territoryhub-product .v1-download-actions .button:active {
  transform: translateY(1px) scale(.975);
  box-shadow: inset 0 2px 8px rgba(1, 9, 18, .28), 0 5px 16px rgba(26, 111, 209, .12);
}

body.territoryhub-product .v1-interface-preview,
body.territoryhub-product .th-app-shell,
body.territoryhub-product .v1-download-panel,
body.territoryhub-product .v1-spec-card,
body.territoryhub-product .v1-roadmap-item {
  border-color: var(--th-line);
  background:
    radial-gradient(circle at 72% 0%, rgba(94, 175, 255, .11), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.055), transparent 30%),
    var(--th-panel);
  box-shadow:
    inset 0 1px rgba(255,255,255,.11),
    inset 0 -1px rgba(255,255,255,.025),
    0 24px 70px rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
}

body.territoryhub-product .v1-interface-preview {
  border-radius: var(--th-radius-xl);
  transform: translateZ(0);
  transition: transform 360ms cubic-bezier(.2,.86,.22,1), border-color 220ms ease, box-shadow 320ms ease;
}

body.territoryhub-product .v1-interface-preview:hover,
body.territoryhub-product .v1-interface-preview:focus-within {
  transform: translateY(-4px);
  border-color: var(--th-line-strong);
  box-shadow:
    inset 0 1px rgba(255,255,255,.15),
    0 30px 82px rgba(0,0,0,.34),
    0 0 42px rgba(59, 151, 255, .1);
}

body.territoryhub-product .th-app-shell {
  container-type: inline-size;
  container-name: th-command-shell;
  position: relative;
  overflow: visible;
  border-radius: var(--th-radius-xl);
}

body.territoryhub-product .th-app-shell::after {
  content: "MAP → ASSIGN → TRACK → HISTORY";
  position: absolute;
  z-index: 5;
  left: clamp(16px, 3cqi, 30px);
  bottom: clamp(14px, 2.4cqi, 24px);
  max-width: calc(100% - clamp(32px, 6cqi, 60px));
  padding: 8px 12px;
  border: 1px solid rgba(191,226,255,.2);
  border-radius: 999px;
  color: rgba(217,239,255,.9);
  background: rgba(5,18,32,.78);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.2);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  backdrop-filter: blur(16px) saturate(145%);
  font-size: clamp(.66rem, 1.5cqi, .76rem);
  font-weight: 760;
  letter-spacing: .08em;
  line-height: 1.25;
  white-space: normal;
  pointer-events: none;
}

body.territoryhub-product .th-app-rail,
body.territoryhub-product .th-app-topbar,
body.territoryhub-product .th-territory-card,
body.territoryhub-product .th-map-status {
  border-color: var(--th-line);
}

body.territoryhub-product .th-app-nav .is-selected,
body.territoryhub-product .th-app-toolbar .is-primary {
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 9px 26px rgba(28, 112, 205, .16);
}

body.territoryhub-product .v1-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(12px, 1.6vw, 18px);
}

body.territoryhub-product .v1-spec-card,
body.territoryhub-product .v1-roadmap-item,
body.territoryhub-product .v1-download-panel {
  border-radius: var(--th-radius-lg);
}

body.territoryhub-product .v1-spec-card {
  min-height: 140px;
  padding: clamp(20px, 2vw, 28px);
}

body.territoryhub-product .v1-spec-card dt {
  color: #98b8d2;
  letter-spacing: .075em;
  text-transform: uppercase;
}

body.territoryhub-product .v1-spec-card dd {
  color: #f6fbff;
  font-weight: 720;
}

body.territoryhub-product .v1-roadmap-item,
body.territoryhub-product .v1-download-panel {
  transform: translateZ(0);
  transition: transform 300ms cubic-bezier(.2,.86,.22,1), border-color 220ms ease, background 240ms ease, box-shadow 240ms ease;
}

body.territoryhub-product .v1-roadmap-item:hover,
body.territoryhub-product .v1-roadmap-item:focus-within,
body.territoryhub-product .v1-download-panel:hover,
body.territoryhub-product .v1-download-panel:focus-within {
  transform: translateY(-3px);
  border-color: var(--th-line-strong);
  background:
    radial-gradient(circle at 76% 0%, rgba(94, 175, 255, .15), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.07), transparent 32%),
    var(--th-panel-strong);
}

body.territoryhub-product .v1-roadmap-item:active,
body.territoryhub-product .v1-download-panel:active {
  transform: translateY(-1px) scale(.992);
}

body.territoryhub-product .v1-download-actions .button {
  min-height: 50px;
  min-width: 150px;
}

@container th-command-shell (max-width: 56rem) {
  body.territoryhub-product .th-app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body.territoryhub-product .th-app-rail {
    display: none;
  }
}

@container th-command-shell (max-width: 34rem) {
  body.territoryhub-product .th-app-shell::after {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    text-align: center;
    letter-spacing: .055em;
  }
}

@media (max-width: 46rem) {
  body.territoryhub-product .v1-product-meta > span,
  body.territoryhub-product .v1-product-hero .button,
  body.territoryhub-product .v1-download-actions .button {
    width: 100%;
  }

  body.territoryhub-product .v1-product-hero .actions,
  body.territoryhub-product .v1-download-actions {
    width: 100%;
  }
}

@media (hover: none), (pointer: coarse) {
  body.territoryhub-product .v1-product-hero .button,
  body.territoryhub-product .v1-download-actions .button {
    min-height: 56px;
  }

  body.territoryhub-product .v1-interface-preview,
  body.territoryhub-product .v1-roadmap-item,
  body.territoryhub-product .v1-download-panel {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-reduced-data: reduce) {
  body.territoryhub-product .v1-product-meta > span,
  body.territoryhub-product .v1-interface-preview,
  body.territoryhub-product .th-app-shell,
  body.territoryhub-product .v1-download-panel,
  body.territoryhub-product .v1-spec-card,
  body.territoryhub-product .v1-roadmap-item,
  body.territoryhub-product .th-app-shell::after {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #0b1827;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.territoryhub-product .v1-product-hero .button,
  body.territoryhub-product .v1-download-actions .button,
  body.territoryhub-product .v1-interface-preview,
  body.territoryhub-product .v1-roadmap-item,
  body.territoryhub-product .v1-download-panel {
    transform: none !important;
    transition: none !important;
  }
}

@media (prefers-contrast: more) {
  body.territoryhub-product .th-app-shell::after {
    border-color: currentColor;
  }
}

@media (forced-colors: active) {
  body.territoryhub-product .v1-product-meta > span,
  body.territoryhub-product .v1-interface-preview,
  body.territoryhub-product .th-app-shell,
  body.territoryhub-product .v1-download-panel,
  body.territoryhub-product .v1-spec-card,
  body.territoryhub-product .v1-roadmap-item,
  body.territoryhub-product .th-app-shell::after {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  body.territoryhub-product .v1-product-hero .button:focus-visible,
  body.territoryhub-product .v1-download-actions .button:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 3px;
  }
}
