@import url("/assets/theme.css");
@import url("/assets/content.css");
@import url("/assets/forms.css");
@import url("/assets/admin.css");
@import url("/assets/responsive.css");
@import url("/assets/rail.css");
@import url("/assets/mobile-system.css");
@import url("/assets/ecosystem-home.css");
@import url("/assets/ecosystem-nav.css");
@import url("/assets/cinematic-system.css");
@import url("/assets/glass-system.css");
@import url("/assets/concept-home.css");
@import url("/assets/sharp-depth.css");
@import url("/assets/raysor-v1-design-system.css");
@import url("/assets/website-v1-pages.css");
@import url("/assets/device-readiness.css");
@import url("/assets/raysor-v1-polish.css");
@import url("/assets/product-personalization.css");
@import url("/assets/liquid-glass-marketing.css");
@import url("/assets/liquid-glass-product-detail.css");
@import url("/assets/admin-liquid-glass.css");

/* Keep the accessibility shortcut hidden unless it receives visible keyboard focus. */
.skip-link {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-160%);
}

.skip-link:focus,
.skip-link:focus-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Real owner-supplied Raysor artwork. The Worker serves /raysor-icon.jpg as an
   actual JPEG response, avoiding iOS Safari's broken nested-raster-in-SVG icon. */
.brand-mark {
  background-image: url("/raysor-icon.jpg");
}

/* These selectors intentionally match or exceed the imported homepage rule's
   specificity so the real JPEG wins even where an older SVG rule is !important. */
.site-header .brand-mark,
.public-drawer .brand-mark,
.site-footer .brand-mark,
.platform-lockup .brand-mark,
.home-core-mark .brand-mark {
  background: #080809 url("/raysor-icon.jpg") center / cover no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
}

/* Give Space Grotesk descenders enough room while preserving the centered title. */
.site-header .brand > span:last-child {
  line-height: 1.25;
  padding-block: .1em;
}

/* The sticky header must stay above translucent page content while scrolling. */
.site-header {
  position: sticky;
  z-index: 120;
}

/* The Liquid Glass ambient scene belongs behind the interface, not behind the
   body's painted background where some engines would make it disappear. */
.liquid-scene {
  z-index: 0;
}

body.liquid-marketing > main,
body.liquid-marketing > .site-header,
body.liquid-marketing > .site-footer {
  position: relative;
  z-index: 1;
}

body.liquid-enhanced [data-liquid-reveal] {
  transition-delay: var(--liquid-delay, 0ms);
}

/* Older public pages use generic surface names. Keep those routes inside the
   same navy/ice material family without altering administrator pages. */
body.liquid-marketing .card,
body.liquid-marketing .panel,
body.liquid-marketing .form-panel,
body.liquid-marketing .info-panel,
body.liquid-marketing .support-card,
body.liquid-marketing .legal-copy,
body.liquid-marketing .signin-card,
body.liquid-marketing .empty-state,
body.liquid-marketing .disclosure,
body.liquid-marketing .notice,
body.liquid-marketing .command-panel,
body.liquid-marketing .command-rail,
body.liquid-marketing .operational-status {
  border-color: rgba(145, 177, 204, .16);
  background:
    linear-gradient(145deg, rgba(255,255,255,.05), transparent 36%),
    linear-gradient(130deg, rgba(81,115,149,.065), transparent 56%),
    rgba(6, 14, 24, .76);
  box-shadow:
    inset 0 1px rgba(255,255,255,.09),
    0 24px 72px rgba(0,0,0,.27);
}

body.liquid-marketing input,
body.liquid-marketing select,
body.liquid-marketing textarea {
  border-color: rgba(145, 177, 204, .17);
  background: rgba(3, 10, 18, .62);
  box-shadow: inset 0 1px rgba(255,255,255,.035);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

body.liquid-marketing input:focus,
body.liquid-marketing select:focus,
body.liquid-marketing textarea:focus {
  border-color: rgba(145, 177, 204, .48);
  background: rgba(5, 14, 24, .78);
  box-shadow: 0 0 0 4px rgba(81, 115, 149, .12), inset 0 1px rgba(255,255,255,.05);
}

body.liquid-marketing .site-footer.command-footer {
  border-color: rgba(145, 177, 204, .13);
  background:
    linear-gradient(145deg, rgba(255,255,255,.04), transparent 40%),
    rgba(4, 11, 19, .74);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 28px 80px rgba(0,0,0,.28);
}

/* TerritoryHub product page mirrors the current native app's dark navy/ice
   identity instead of the older green web approximation. */
html:has(link[rel="canonical"][href$="/products/territoryhub"]) body.liquid-marketing {
  background:
    radial-gradient(circle at 78% 7%, rgba(81,115,149,.22), transparent 34rem),
    radial-gradient(circle at 12% 34%, rgba(145,177,204,.08), transparent 30rem),
    linear-gradient(150deg, #03070f, #040d18 38%, #091423 74%, #03070f);
}

html:has(link[rel="canonical"][href$="/products/territoryhub"]) body.liquid-marketing .v1-interface-block {
  background:
    linear-gradient(rgba(145,177,204,.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145,177,204,.065) 1px, transparent 1px),
    radial-gradient(circle at 70% 42%, rgba(81,115,149,.28), transparent 5rem),
    linear-gradient(135deg, rgba(25,51,80,.42), rgba(4,13,24,.82));
  background-size: 28px 28px, 28px 28px, auto, auto;
}

html:has(link[rel="canonical"][href$="/products/territoryhub"]) body.liquid-marketing .v1-interface-block::before {
  border-color: rgba(207,232,251,.78);
  box-shadow: 62px 24px 0 -1px rgba(81,115,149,.28), 0 0 26px rgba(145,177,204,.12);
}

html:has(link[rel="canonical"][href$="/products/territoryhub"]) body.liquid-marketing .v1-interface-block::after {
  border-color: #d9efff;
  background: #193350;
  box-shadow: 0 0 26px rgba(145,177,204,.34);
}

.th-product-promise {
  max-width: 720px;
  margin: -8px 0 18px;
  color: #cfe8fb;
  font-size: clamp(1.28rem, 2.2vw, 1.75rem);
  font-weight: 720;
  letter-spacing: -.025em;
}

.th-experience {
  position: relative;
}

.th-app-shell {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(145,177,204,.24);
  border-radius: 34px;
  background: #03070f;
  box-shadow:
    inset 0 1px rgba(255,255,255,.11),
    0 48px 130px rgba(0,0,0,.48),
    0 0 0 1px rgba(81,115,149,.035);
  transform: perspective(1400px) rotateX(.5deg);
}

.th-app-rail {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  border-right: 1px solid rgba(145,177,204,.12);
  background:
    radial-gradient(circle at 0 0, rgba(145,177,204,.10), transparent 18rem),
    rgba(4,13,24,.94);
}

.th-app-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  color: #f4f9fd;
  font-size: .88rem;
}

.th-app-brand .v1-product-glyph {
  width: 40px !important;
  height: 40px !important;
  border-radius: 11px !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.28), 0 0 22px rgba(81,115,149,.2) !important;
}

.th-app-nav {
  display: grid;
  gap: 7px;
}

.th-app-nav > span {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #8fa0b2;
  font-size: .72rem;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.th-app-nav > span > i {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 3px;
}

.th-app-nav > span.is-selected {
  color: #d9efff;
  border-color: rgba(145,177,204,.22);
  background:
    linear-gradient(110deg, rgba(145,177,204,.16), transparent),
    rgba(25,51,80,.22);
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}

.th-app-nav > span.is-selected::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #91b1cc;
  box-shadow: 0 0 16px rgba(145,177,204,.38);
}

.th-app-rail-status {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border-top: 1px solid rgba(145,177,204,.08);
  color: #91b1cc;
  font-size: .68rem;
  font-weight: 700;
}

.th-app-rail-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #91b1cc;
  box-shadow: 0 0 14px rgba(145,177,204,.62);
  animation: liquidNodePulse 2.8s ease-in-out infinite;
}

.th-app-workspace {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    radial-gradient(circle at 78% 16%, rgba(81,115,149,.18), transparent 18rem),
    linear-gradient(145deg, #07111d, #040d18 60%, #03070f);
}

.th-app-topbar {
  position: relative;
  z-index: 5;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(145,177,204,.08);
  background: rgba(5,14,24,.46);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
}

.th-app-topbar > div:first-child {
  display: grid;
}

.th-app-topbar small {
  color: #71869b;
  font-size: .61rem;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.th-app-topbar strong {
  color: #edf7ff;
  font-size: 1rem;
}

.th-app-toolbar {
  display: flex;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(145,177,204,.13);
  border-radius: 16px;
  background: rgba(145,177,204,.065);
  box-shadow: inset 0 1px rgba(255,255,255,.09), 0 12px 30px rgba(0,0,0,.2);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}

.th-app-toolbar span {
  padding: 8px 10px;
  border-radius: 11px;
  color: #9fb2c4;
  font-size: .65rem;
  font-weight: 720;
}

.th-app-toolbar .is-primary {
  color: #07111c;
  background: linear-gradient(180deg, #cfe8fb, #91b1cc);
  box-shadow: 0 8px 22px rgba(81,115,149,.22);
}

.th-map-stage {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background:
    linear-gradient(rgba(145,177,204,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145,177,204,.045) 1px, transparent 1px),
    radial-gradient(circle at 64% 42%, rgba(25,51,80,.26), transparent 20rem),
    #06101b;
  background-size: 38px 38px, 38px 38px, auto, auto;
}

.th-map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(3,7,15,.38));
}

.th-map-road,
.th-route-segment {
  position: absolute;
  z-index: 1;
  height: 2px;
  border-radius: 999px;
  transform-origin: left center;
}

.th-map-road {
  background: rgba(145,177,204,.11);
  box-shadow: 0 0 0 5px rgba(145,177,204,.012);
}

.th-road-a { left: 3%; top: 28%; width: 64%; transform: rotate(12deg); }
.th-road-b { left: 23%; top: 12%; width: 58%; transform: rotate(72deg); }
.th-road-c { left: 6%; top: 69%; width: 74%; transform: rotate(-9deg); }
.th-road-d { left: 48%; top: 4%; width: 58%; transform: rotate(104deg); }
.th-road-e { left: 4%; top: 48%; width: 44%; transform: rotate(38deg); }

.th-route-segment {
  z-index: 2;
  height: 4px;
  background: linear-gradient(90deg, #517395, #91b1cc, #cfe8fb);
  box-shadow: 0 0 18px rgba(145,177,204,.26);
}

.th-route-a { left: 18%; top: 63%; width: 25%; transform: rotate(-18deg); }
.th-route-b { left: 40%; top: 55%; width: 24%; transform: rotate(15deg); }
.th-route-c { left: 61%; top: 61%; width: 19%; transform: rotate(-27deg); }

.th-route-node {
  position: absolute;
  z-index: 4;
  width: 10px;
  height: 10px;
  border: 2px solid #d9efff;
  border-radius: 50%;
  background: #193350;
  box-shadow: 0 0 20px rgba(145,177,204,.48);
}

.th-node-a { left: 17.5%; top: 62%; }
.th-node-b { left: 39%; top: 54%; }
.th-node-c { left: 62%; top: 60%; }
.th-node-d { left: 79%; top: 51%; }

.th-territory-card {
  position: absolute;
  z-index: 6;
  top: 11%;
  right: 6%;
  width: min(270px, 34%);
  padding: 18px;
  border: 1px solid rgba(145,177,204,.22);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.08), transparent 42%),
    rgba(6,17,29,.72);
  box-shadow: inset 0 1px rgba(255,255,255,.12), 0 24px 64px rgba(0,0,0,.34);
  -webkit-backdrop-filter: blur(26px) saturate(155%);
  backdrop-filter: blur(26px) saturate(155%);
}

.th-territory-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #91b1cc;
  font-size: .65rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.th-territory-card-head i {
  padding: 5px 7px;
  border: 1px solid rgba(145,177,204,.18);
  border-radius: 999px;
  color: #d9efff;
  background: rgba(81,115,149,.18);
  font-style: normal;
}

.th-territory-card h3 {
  margin: 16px 0 4px;
  color: #f5faff;
  font-size: 1.2rem;
}

.th-territory-card p {
  margin: 0;
  color: #7f94a8;
  font-size: .72rem;
}

.th-territory-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 15px;
}

.th-territory-card dl > div {
  min-width: 0;
}

.th-territory-card dt {
  color: #63788d;
  font-size: .55rem;
  text-transform: uppercase;
}

.th-territory-card dd {
  margin: 3px 0 0;
  color: #d8e7f3;
  font-size: .68rem;
  font-weight: 700;
}

.th-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(145,177,204,.09);
}

.th-progress i {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #517395, #cfe8fb);
  box-shadow: 0 0 16px rgba(145,177,204,.32);
}

.th-map-status {
  position: absolute;
  z-index: 6;
  left: 4%;
  bottom: 6%;
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(145,177,204,.15);
  border-radius: 16px;
  background: rgba(4,13,24,.62);
  box-shadow: inset 0 1px rgba(255,255,255,.09), 0 18px 46px rgba(0,0,0,.26);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
}

.th-map-status span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 11px;
  color: #7f94a8;
  font-size: .59rem;
}

.th-map-status span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #91b1cc;
  box-shadow: 0 0 10px rgba(145,177,204,.5);
}

.th-map-status strong {
  color: #d9efff;
  font-size: .67rem;
}

@media (max-width: 840px) {
  .th-app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .th-app-brand strong,
  .th-app-nav b,
  .th-app-rail-status span {
    display: none;
  }

  .th-app-brand,
  .th-app-nav > span,
  .th-app-rail-status {
    justify-content: center;
  }

  .th-territory-card {
    width: min(250px, 48%);
  }
}

@media (max-width: 620px) {
  .th-app-shell {
    min-height: 520px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    border-radius: 26px;
  }

  .th-app-rail {
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(145,177,204,.1);
  }

  .th-app-brand {
    flex: 0 0 auto;
  }

  .th-app-nav {
    display: flex;
    gap: 5px;
  }

  .th-app-nav > span {
    min-width: 42px;
    padding: 0 9px;
  }

  .th-app-rail-status {
    display: none;
  }

  .th-app-topbar {
    min-height: 70px;
    padding: 12px 14px;
  }

  .th-app-toolbar span:not(.is-primary) {
    display: none;
  }

  .th-map-stage {
    min-height: 430px;
  }

  .th-territory-card {
    top: 7%;
    right: 4%;
    width: 68%;
  }

  .th-map-status {
    right: 4%;
    left: 4%;
    overflow-x: auto;
  }

  .th-map-status span {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .th-app-topbar,
  .th-app-toolbar,
  .th-territory-card,
  .th-map-status {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background-color: #091423;
  }
}

@media (prefers-reduced-motion: reduce) {
  .th-app-rail-status i {
    animation: none;
  }
}