/* ============================================================
   AEROTWIN — APP SHELL, NAVIGATION & LAYOUT
   ============================================================ */

/* ============================================================
   APPLICATION VIEW SWITCHING
   ============================================================ */
.view {
  display: none !important;
}

.view.is-active {
  display: block !important;
}

#view-landing.is-active {
  display: flex !important;
  flex-direction: column;
}

#view-access.is-active {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

#view-workspace.is-active {
  display: block !important;
}

html.app-shell-active .view,
body.app-shell-active .view {
  display: none !important;
}

/* ---------- ROUTE VIEWPORT — TRUE MOUNT/UNMOUNT ----------
     This is NOT CSS-only display toggling of siblings inside one long
     document. #routeView (the ".app-main-inner" element, id set both in
     markup and defensively in JS) is the ONLY place a route <section> may
     live while it is the active route — see initRouteViewport()/
     mountRoute() in the script below. All nine screens start out, and
     return to, #routeStore: a container that is a SIBLING of #app-shell
     (not a descendant of .app-main), so a parked screen contributes zero
     layout/scroll height to the main viewport, not merely a hidden one.
     Switching routes physically MOVES the real <section> DOM node between
     #routeStore and #routeView (appendChild on an already-attached node
     detaches it from its previous parent first, per the DOM spec), so
     every event listener bound inside that section survives untouched —
     nothing is cloned, nothing is rebuilt, no ID is ever duplicated. At
     any instant #routeView contains at most one .route-panel. */
#routeStore {
  display: none !important;
}

.route-panel {
  display: none;
  min-height: 0;
}

.route-panel.is-active {
  display: block;
}

#routeView>.route-panel {
  display: block;
}

/* ---------- BRAND LOGO ---------- */
.brand-logo-img {
  height: 36px;
  width: auto;
  max-height: 36px;
  object-fit: contain;
  border-radius: var(--radius-tag);
  filter: none;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ---------- FULLSCALE 1080P LANDING EXPERIENCE ---------- */
#view-landing {
  min-height: 100vh;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: #06090e;
  color: #f8fafc;
  --ink: #f8fafc;
  --ink-soft: #cbd5e1;
  --ink-faint: #94a3b8;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.25);
  --panel: #0d131f;
  --panel-raise: #131c2e;
  --paper: #06090e;
  --color-landing-cta-fill: #38BDF8;
}

/* ── Top Hover-Reveal Ribbon Navigation ── */
.landing-top-trigger {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 1000;
  pointer-events: auto;
}

    /* Hint pill hidden — hover reveal still works, just no label shown */
    .landing-ribbon-hint,
    .landing-ribbon-hint::before {
      display: none !important;
    }


.landing-top-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  box-sizing: border-box;
  pointer-events: none;
}

.landing-top-trigger:hover .landing-top-ribbon,
.landing-top-ribbon:hover,
.landing-top-ribbon:focus-within {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.landing-top-trigger:hover .landing-top-ribbon *,
.landing-top-ribbon:hover *,
.landing-top-ribbon:focus-within * {
  pointer-events: auto;
}

.landing-top-trigger:hover .landing-ribbon-hint,
.landing-top-ribbon:hover~.landing-ribbon-hint {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
}

.landing-ribbon-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  cursor: pointer;
  pointer-events: auto;
}

.landing-ribbon-title {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: calc(16px * var(--text-scale));
  letter-spacing: normal;
  color: #ffffff;
}

.landing-ribbon-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

@media (max-width: 960px) {
  .landing-ribbon-nav {
    display: none;
  }
}

.landing-ribbon-link {
  font-family: var(--sans-cond);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-tag);
  transition: color 0.18s ease, background 0.18s ease;
  border: 1px solid transparent;
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
}

.landing-ribbon-link:hover,
.landing-nav-dropdown:hover .landing-ribbon-link,
.landing-nav-dropdown:focus-within .landing-ribbon-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.landing-ribbon-link .nav-caret {
  font-size: var(--text-micro);
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.landing-nav-dropdown:hover .landing-ribbon-link .nav-caret,
.landing-nav-dropdown:focus-within .landing-ribbon-link .nav-caret {
  transform: rotate(180deg);
}

/* Landing Top Bar Dropdown Menus */
.landing-nav-dropdown {
  position: relative;
}

.landing-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  margin-top: 4px;
  background: rgba(8, 14, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-tag);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  z-index: 100;
}

.landing-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.landing-nav-dropdown:hover .landing-dropdown-menu,
.landing-nav-dropdown:focus-within .landing-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.landing-dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.landing-dropdown-item:hover {
  background: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.3);
}

.landing-dropdown-item .ldi-title {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-transform: uppercase;
}

.landing-dropdown-item:hover .ldi-title {
  color: var(--ink);
}

.landing-dropdown-item .ldi-desc {
  font-family: var(--sans);
  font-size: var(--text-micro);
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
  line-height: 1.3;
}

.landing-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-tag);
  cursor: pointer;
  transition: all 0.2s ease;
}

.landing-settings-btn:hover {
  color: #ffffff;
  border-color: rgba(0, 210, 255, 0.4);
  background: rgba(0, 210, 255, 0.12);
  box-shadow: var(--shadow-sm);
}

/* ── Fullscreen 1080p Hero Viewport ── */
.landing-hero {
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  gap: 10px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
}

.hero-media-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  opacity: 0;
  transition: opacity 1000ms cubic-bezier(0.16, 1, 0.3, 1), transform 1800ms cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.92) contrast(1.08);
  will-change: transform, opacity;
}

.landing-hero.is-visible .hero-media,
#view-landing.is-visible .hero-media {
  transform: scale(1);
  opacity: 1;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: rgba(5, 5, 5, 0.82);
}

.landing-hero>*:not(.hero-media-wrap) {
  position: relative;
  z-index: 2;
}

.landing-hero .lh-eyebrow {
  font-family: var(--mono);
  font-size: var(--text-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FAF9F6;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.28);
  padding: 6px 18px;
  border-radius: var(--radius-tag);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.landing-hero h1 {
  font-family: var(--sans-cond);
  font-size: clamp(48px, 8.5vw, 92px);
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.05;
  text-shadow: none;
}

.landing-hero .lh-tag {
  font-size: clamp(15px, 2vw, 19px);
  color: rgba(246, 243, 241, 0.88);
  max-width: 66ch;
  margin-bottom: 34px;
  font-family: var(--sans-cond);
  font-weight: 400;
  line-height: 1.55;
  text-shadow: none;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.btn-cta-main {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: calc(16px * var(--text-scale));
  padding: 15px 36px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  background: var(--teal);
  color: #090D16;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}

.btn-cta-main:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-cta-ghost {
  font-family: var(--mono);
  font-weight: 600;
  font-size: max(12px, calc(12px * var(--text-scale)));
  padding: 15px 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-cta-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(0, 210, 255, 0.5);
  transform: translateY(-2px);
  color: var(--teal);
}

/* Landing hero staged entrance (§4A.3) */
.landing-hero .lh-eyebrow,
.landing-hero>h1,
.landing-hero .lh-tag,
.landing-hero .landing-cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-hero .lh-eyebrow {
  transition-delay: 120ms;
}

.landing-hero>h1 {
  transition-delay: 240ms;
}

.landing-hero .lh-tag {
  transition-delay: 360ms;
}

.landing-hero .landing-cta {
  transition-delay: 500ms;
}

.landing-hero.is-visible .lh-eyebrow,
.landing-hero.is-visible>h1,
.landing-hero.is-visible .lh-tag,
.landing-hero.is-visible .landing-cta {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

  .landing-hero .lh-eyebrow,
  .landing-hero>h1,
  .landing-hero .lh-tag,
  .landing-hero .landing-cta,
  .hero-media {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- HOW AEROTWIN WORKS (scroll-reveal editorial section) ---------- */
.how-section {
  position: relative;
  z-index: 2;
  padding: 80px 24px 64px;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}

.how-section .how-eyebrow {
  font-family: var(--mono);
  font-size: var(--text-micro);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.how-section .how-headline {
  font-family: var(--sans-cond);
  font-size: clamp(26px, 4.2vw, 40px);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -.01em;
}

.how-section .how-desc {
  font-size: calc(14.5px * var(--text-scale));
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ── Blended Click-to-Play Video Card ── */
.how-media-card {
  background: rgba(9, 14, 23, 0.88);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  margin-bottom: 36px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.how-media-player {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16/9;
  max-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.how-media-player::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 12px rgba(6, 10, 18, 0.7);
  z-index: 1;
  transition: opacity 0.4s ease;
}

.how-media-player.is-playing::after {
  opacity: 0.2;
}

.how-media-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.how-media-player .media-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 18, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.how-media-player .media-play-btn .play-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.how-media-player .media-play-btn:hover .play-icon {
  transform: scale(1.12);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.how-media-player .media-play-btn .play-icon::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #06090e;
  margin-left: 5px;
  transition: border-color 0.2s ease;
}

.how-media-player .media-play-btn:hover .play-icon::after {
  border-color: transparent transparent transparent var(--teal);
}

.how-media-player.is-playing .media-play-btn {
  opacity: 0;
  pointer-events: none;
}

.how-media-caption {
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.how-media-caption .hmc-title {
  font-family: var(--sans-cond);
  font-size: calc(16px * var(--text-scale));
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.how-media-caption .hmc-desc {
  font-size: max(12px, calc(12.5px * var(--text-scale)));
  color: var(--ink-soft);
  line-height: 1.55;
}

.how-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: left;
}

.how-pillar {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  background: rgba(255, 255, 255, 0.025);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.how-pillar:hover {
  background: rgba(0, 210, 255, 0.04);
  border-color: rgba(0, 210, 255, 0.3);
  transform: translateY(-2px);
}

.how-pillar .hp-label {
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.how-pillar .hp-text {
  font-size: max(12px, calc(12.5px * var(--text-scale)));
  color: var(--ink-soft);
  line-height: 1.5;
}

@media (max-width:720px) {
  .how-pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:440px) {
  .how-pillars {
    grid-template-columns: 1fr;
  }
}

/* ---------- GE AEROSPACE ANIMATED FOOTER ---------- */
.ge-aerospace-footer {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #070b12 0%, #030508 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 56px 28px 36px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 2;
}

.ge-laser-beam {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 35%;
  background: var(--teal);
  box-shadow: none;
  animation: geLaserScan 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes geLaserScan {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(380%);
  }
}

.ge-footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.ge-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ge-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: calc(18px * var(--text-scale));
  letter-spacing: normal;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}

.ge-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .ge-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .ge-footer-grid {
    grid-template-columns: 1fr;
  }
}

.ge-footer-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ge-footer-card:hover {
  background: var(--panel-raise);
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.ge-card-eyebrow {
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.ge-card-title {
  font-family: var(--sans-cond);
  font-size: calc(15px * var(--text-scale));
  font-weight: 700;
  color: #ffffff;
}

.ge-card-desc {
  font-size: max(12px, calc(12px * var(--text-scale)));
  color: var(--ink-soft);
  line-height: 1.45;
}

.ge-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: var(--text-micro);
  color: var(--ink-faint);
}

.ge-footer-bottom a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.ge-footer-bottom a:hover {
  color: #ffffff;
}

.how-pillar .hp-text {
  font-size: max(12px, calc(12.5px * var(--text-scale)));
  color: var(--ink-soft);
  line-height: 1.5;
}

@media (max-width:720px) {
  .how-pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:440px) {
  .how-pillars {
    grid-template-columns: 1fr;
  }
}

/* Scroll-reveal (§4A.4): staggered children */
.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 550ms cubic-bezier(0, 0, .2, 1), transform 550ms cubic-bezier(0, 0, .2, 1);
}

.reveal-up.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion:reduce) {
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- ACCESS PORTAL (SECURE AUTHENTICATION) ---------- */
#view-access {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background-color: var(--paper);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 34px 30px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  text-decoration: none;
  cursor: pointer;
}

.auth-brand .brand-mark {
  width: 26px;
  height: 26px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: var(--text-micro);
  border-radius: var(--radius-sm);
}

.auth-brand-text {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: calc(15px * var(--text-scale));
  letter-spacing: normal;
  color: var(--ink);
}

.auth-card h1 {
  font-size: calc(22px * var(--text-scale));
  text-align: center;
  margin: 0 0 6px 0;
  color: var(--ink);
  letter-spacing: 0.04em;
  font-family: var(--sans-cond);
  font-weight: 700;
  text-transform: uppercase;
}

.auth-sub {
  text-align: center;
  font-size: max(12px, calc(12.5px * var(--text-scale)));
  color: var(--ink-soft);
  margin-bottom: 18px;
  line-height: 1.45;
}

.auth-alert {
  display: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: max(12px, calc(12px * var(--text-scale)));
  line-height: 1.4;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.auth-alert.is-visible {
  display: block;
}

.auth-alert.alert-error {
  background: var(--status-crit-bg);
  color: var(--status-crit);
  border-color: var(--status-crit);
}

.auth-alert.alert-warning {
  background: var(--status-warn-bg);
  color: var(--status-warn);
  border-color: var(--status-warn);
}

.auth-alert.alert-success {
  background: var(--status-normal-bg);
  color: var(--status-normal);
  border-color: var(--status-normal);
}

.auth-alert.alert-info {
  background: var(--teal-soft);
  color: var(--teal-strong);
  border-color: var(--teal);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.auth-field label {
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.auth-field input,
.auth-field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: calc(13px * var(--text-scale));
  transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
  box-sizing: border-box;
}

.auth-field input:focus,
.auth-field-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal-soft);
}

.captcha-wrap {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.captcha-label {
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.captcha-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.captcha-code {
  flex: 1;
  padding: 10px 14px;
  background: var(--panel-raise);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-weight: 700;
  font-size: calc(19px * var(--text-scale));
  letter-spacing: 0.35em;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  text-shadow: none;
}

html[data-theme="dark"] .captcha-code {
  color: var(--ink);
  border-color: var(--line-strong);
}

.captcha-refresh {
  padding: 6px 12px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
  white-space: nowrap;
}

.captcha-refresh:hover {
  background: var(--panel-raise);
  color: var(--ink);
  border-color: var(--teal);
}

.captcha-input {
  margin-top: 2px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-attempts {
  font-family: var(--mono);
  font-size: var(--text-micro);
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 14px;
  min-height: 16px;
}

.auth-attempts.is-locked {
  color: var(--status-crit);
  font-weight: 700;
}

.auth-demo-hint {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.adh-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.adh-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

@media (max-width:440px) {
  .adh-grid {
    grid-template-columns: 1fr;
  }
}

.adh-item {
  background: var(--panel-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: var(--text-micro);
  color: var(--ink-soft);
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: all .15s ease;
  width: 100%;
}

.adh-item:hover {
  border-color: var(--teal);
  color: var(--ink);
  background: var(--teal-soft);
}

.adh-item strong {
  font-family: var(--mono);
  color: var(--ink);
  font-size: var(--text-micro);
}

.access-disclaimer {
  font-size: var(--text-micro);
  color: var(--ink-faint);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

/* ---------- WORKSPACE ---------- */
#view-workspace {
  min-height: 100vh;
  padding: 48px 24px;
  background-color: var(--paper);
}

.ws-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px;
}

.ws-head h1 {
  font-size: calc(28px * var(--text-scale));
}

.ws-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto 30px;
}

@media (max-width:900px) {
  .ws-grid {
    grid-template-columns: 1fr;
  }
}

.ws-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--motion-fast) var(--ease-standard);
}

.ws-card:hover {
  border-color: var(--teal-soft);
}

.ws-card .wc-tag {
  font-family: var(--mono);
  font-size: var(--text-micro);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
}

.ws-card .wc-tag-operator {
  background: var(--panel-raise);
  color: var(--ink);
  border: 1px solid var(--teal);
}
html[data-theme="dark"] .ws-card .wc-tag-operator {
  background: rgba(15, 23, 42, 0.6);
  color: #FFFFFF;
  border-color: #38BDF8;
}

.ws-card .wc-tag-maintenance {
  background: var(--panel-raise);
  color: var(--ink);
  border: 1px solid #D97706;
}
html[data-theme="dark"] .ws-card .wc-tag-maintenance {
  background: rgba(15, 23, 42, 0.6);
  color: #FFFFFF;
  border-color: #FBBF24;
}

.ws-card .wc-tag-engineer {
  background: var(--panel-raise);
  color: var(--ink);
  border: 1px solid var(--teal);
}
html[data-theme="dark"] .ws-card .wc-tag-engineer {
  background: rgba(15, 23, 42, 0.6);
  color: #FFFFFF;
  border-color: var(--teal);
}

.ws-card h3 {
  font-size: calc(18px * var(--text-scale));
  margin-bottom: 10px;
}

.ws-card ul {
  margin: 0 0 18px;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: max(12px, calc(12.5px * var(--text-scale)));
  flex: 1;
}

.ws-card li {
  margin-bottom: 5px;
}

.ws-foot {
  text-align: center;
}

/* ---------- APP SHELL & TOP NAVIGATION ----------
     Full-width cockpit layout with GE Aerospace 3-pillar category top ribbon,
     integrated telemetry HUD, and off-canvas transparent slideout drawer. */
html.app-shell-active,
body.app-shell-active {
  height: 100%;
  overflow: hidden;
}

#app-shell {
  display: none;
  height: 100vh;
  height: 100dvh;
}

#app-shell.is-active {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--paper);
}

/* ── Telemetry HUD Bar Group Responsiveness ── */
.tb-group-telemetry {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s ease;
}

body:not(.mission-running) .tb-group-telemetry {
  display: none !important;
}

body.mission-running .tb-group-telemetry {
  display: flex;
}


.app-header {
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* ── Tier 1: Global Navigation Bar ── */
.app-topbar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h, 50px);
  padding: 0 18px;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.top-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.top-nav-brand .brand-mark {
  width: 28px;
  height: 28px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: max(12px, calc(12px * var(--text-scale)));
  border-radius: var(--radius-sm);
  letter-spacing: 0;
}

.top-nav-brand-text {
  line-height: 1.15;
}

.top-nav-brand-name {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: calc(15px * var(--text-scale));
  letter-spacing: normal;
  color: var(--ink);
}

.top-nav-brand-sub {
  font-family: var(--mono);
  font-size: var(--text-micro);
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Category trigger buttons & Dropdowns */
.top-nav-categories {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  position: relative;
  z-index: 1010;
}

.nav-cat-dropdown-wrap {
  position: relative;
}

.top-cat-btn {
  font-family: var(--sans-cond);
  font-size: calc(13px * var(--text-scale));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: var(--radius-tag);
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
}

.top-cat-btn:hover,
.nav-cat-dropdown-wrap.is-open .top-cat-btn {
  color: var(--ink);
  background: var(--panel-raise);
}

.top-cat-btn.is-active-category {
  background: var(--teal-soft);
  color: var(--ink);
  border-color: var(--teal);
}

html[data-theme="dark"] .top-cat-btn.is-active-category {
  color: var(--ink);
}

.top-cat-btn .cat-caret {
  font-size: var(--text-micro);
  opacity: 0.65;
  transition: transform .2s ease;
}

.nav-cat-dropdown-wrap.is-open .top-cat-btn .cat-caret {
  transform: rotate(180deg);
}

.nav-cat-dropdown-wrap.is-open .top-cat-btn {
  background: var(--panel-raise);
  border-color: var(--teal);
  color: var(--ink);
}

/* Ribbon Dropdown Menus */
.top-cat-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 275px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  z-index: 1020;
  padding: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.top-cat-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-cat-dropdown-wrap.is-open .top-cat-dropdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cat-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink-soft);
  transition: all .12s ease;
  border: 1px solid transparent;
}

.cat-dropdown-item:hover {
  background: var(--panel-raise);
  color: var(--ink);
  border-color: var(--line);
}

.cat-dropdown-item.active {
  background: var(--teal-soft);
  color: var(--ink);
  border-color: var(--teal);
}

html[data-theme="dark"] .cat-dropdown-item.active {
  color: var(--ink);
}

.cat-dropdown-item .cd-key {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-dropdown-item .cd-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.cat-dropdown-item .cd-title {
  font-family: var(--sans-cond);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.cat-dropdown-item .cd-desc {
  font-family: var(--sans);
  font-size: var(--text-micro);
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.top-mode-row {
  display: flex;
  gap: 2px;
  background: var(--panel-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.as-mode-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 9px;
  font-size: var(--text-micro);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink-faint);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: background .12s, color .12s, border-color .12s;
  text-align: center;
}

.as-mode-btn:hover {
  color: var(--ink);
}

.as-mode-btn.active {
  background: var(--teal-soft);
  color: var(--ink);
  font-weight: 700;
  border-color: var(--teal);
}

html[data-theme="dark"] .as-mode-btn.active {
  background: var(--teal-soft);
  color: var(--ink);
  border-color: var(--teal);
}

.top-nav-controls {
  display: flex;
  gap: 4px;
}

.top-nav-exit {
  font-family: var(--mono);
  font-size: var(--text-micro);
  color: var(--ink-faint);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  transition: .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.top-nav-exit:hover {
  color: var(--ink);
  border-color: var(--teal);
  background: var(--teal-soft);
}

/* ── Tier 2: Telemetry HUD Bar ── */
.app-hud-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  height: var(--hud-h, 38px);
  background: var(--panel-raise);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: var(--text-micro);
}

.tb-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tb-group-identity {
  opacity: 0.9;
}

.tb-chip {
  font-family: var(--mono);
  font-size: var(--text-micro);
  color: var(--ink-faint);
  white-space: nowrap;
  display: flex;
  gap: 5px;
  align-items: center;
}

.tb-chip b {
  color: var(--ink);
  font-weight: 700;
}

.tb-chip-id {
  color: var(--ink-faint);
  font-weight: 400;
}

.tb-chip-id b {
  color: var(--ink-soft);
  font-weight: 600;
}

.tb-cluster-sep {
  width: 1px;
  height: 16px;
  background: var(--line-strong);
  flex-shrink: 0;
  margin: 0 4px;
}

.tb-chip .tb-mode {
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: normal;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--teal);
  background: var(--teal-soft);
  color: var(--ink);
  line-height: 1.4;
}

.tb-chip-risk {
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.4;
}

.tb-chip .tb-risk {
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-weight: 700;
  letter-spacing: .05em;
  font-size: var(--text-micro);
  border: 1px solid transparent;
  font-family: var(--mono);
  text-transform: uppercase;
  line-height: 1.4;
  transition: background-color var(--motion-base) var(--ease-standard),
    border-color var(--motion-base) var(--ease-standard),
    color var(--motion-base) var(--ease-standard);
}

.tb-chip .tb-risk[data-risk="low"] {
  background: var(--status-normal-bg);
  color: var(--status-normal);
  border-color: var(--status-normal);
}

.tb-chip .tb-risk[data-risk="moderate"] {
  background: var(--status-warn-bg);
  color: var(--status-warn);
  border-color: var(--status-warn);
}

.tb-chip .tb-risk[data-risk="high"] {
  background: var(--status-crit-bg);
  color: var(--status-crit);
  border-color: var(--status-crit);
}

.tb-chip .tb-risk[data-risk="critical"] {
  background: var(--maroon-soft);
  color: var(--maroon);
  border-color: var(--maroon);
}

.tb-chip .tb-risk[data-risk="idle"] {
  background: var(--panel-raise);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] .tb-chip .tb-risk[data-risk="idle"] {
  background: rgba(255, 255, 255, 0.06);
  color: #FAF9F6;
  border-color: var(--line);
}

.tb-chip.has-alerts b {
  color: var(--status-crit);
}

.tb-sep {
  width: 1px;
  height: 14px;
  background: var(--line);
  flex-shrink: 0;
}

.tb-spacer {
  flex: 1;
}

#systemStatusPill {
  font-family: var(--mono);
  font-weight: 700;
  font-size: var(--text-micro);
  letter-spacing: .05em;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  flex-shrink: 0;
  line-height: 1.4;
}

#systemStatusPill[data-state="idle"] {
  background: var(--panel-raise);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] #systemStatusPill[data-state="idle"] {
  background: rgba(255, 255, 255, 0.06);
  color: #FAF9F6;
  border-color: var(--line);
}

#systemStatusPill[data-state="running"] {
  background: var(--teal-soft);
  color: var(--teal-strong);
  border-color: var(--teal);
}

#systemStatusPill[data-state="paused"] {
  background: var(--status-warn-bg);
  color: var(--status-warn);
  border-color: var(--status-warn);
}

#systemStatusPill[data-state="complete"] {
  background: var(--status-normal-bg);
  color: var(--status-normal);
  border-color: var(--status-normal);
}

html[data-theme="dark"] #systemStatusPill[data-state="running"] {
  color: var(--ink);
}

/* ── Main Viewport ── */
.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 28px 48px;
  -webkit-overflow-scrolling: touch;
  background-color: var(--paper);
}

.app-main-inner {
  max-width: 1380px;
  margin: 0 auto;
  width: 100%;
}

/* ── Off-Canvas Slideout Drawer ── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease-standard);
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.app-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--drawer-w, 360px);
  max-width: calc(100vw - 32px);
  background: var(--drawer-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--line);
  z-index: 2001;
  transform: translateX(-105%);
  transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
}

.app-drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-head-info .brand-mark {
  width: 28px;
  height: 28px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  border-radius: var(--radius-sm);
}
html[data-theme="dark"] .drawer-head-info .brand-mark,
html[data-theme="dark"] .auth-brand .brand-mark,
html[data-theme="dark"] .top-nav-brand .brand-mark {
  color: #0F172A;
}

.drawer-head-title {
  font-family: var(--sans-cond);
  font-size: calc(16px * var(--text-scale));
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
}

.drawer-head-sub {
  font-family: var(--mono);
  font-size: var(--text-micro);
  color: var(--ink-soft);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.drawer-close-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .15s;
}

.drawer-close-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* Drawer Category Switcher */
.drawer-cat-switch {
  display: flex;
  gap: 3px;
  padding: 10px 14px 6px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-raise);
}

.drawer-cat-tab {
  flex: 1;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-faint);
  cursor: pointer;
  text-align: center;
  transition: .15s;
}

.drawer-cat-tab:hover {
  color: var(--ink);
}

.drawer-cat-tab.active {
  background: var(--teal-soft);
  color: var(--ink);
  border-color: var(--teal);
}

html[data-theme="dark"] .drawer-cat-tab.active {
  color: var(--ink);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-group.is-hidden {
  display: none;
}

.drawer-group-title {
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 4px 8px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--drawer-card-bg);
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nav-item:hover {
  background: var(--panel);
  border-color: var(--teal-soft);
  color: var(--ink);
  transform: translateX(3px);
}

.nav-item.active {
  background: var(--panel);
  border-color: var(--teal);
  color: var(--ink);
  box-shadow: 0 2px 8px var(--teal-soft);
}

.nav-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item-title {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: calc(13.5px * var(--text-scale));
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item.active .nav-item-title {
  color: var(--ink);
}

html[data-theme="dark"] .nav-item.active .nav-item-title {
  color: var(--ink);
}

.nav-item-desc {
  font-size: var(--text-micro);
  color: var(--ink-faint);
  line-height: 1.35;
}

.nav-shortcut-key {
  font-family: var(--mono);
  font-size: var(--text-micro);
  font-weight: 700;
  color: var(--ink-faint);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}

.nav-item:hover .nav-shortcut-key,
.nav-item.active .nav-shortcut-key {
  border-color: var(--teal);
  color: var(--ink-faint);
}

.drawer-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-raise);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-shortcut-hint {
  font-family: var(--mono);
  font-size: var(--text-micro);
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.4;
}

/* ============================================================
       MULTI-TIER RESPONSIVE ARCHITECTURE (PC / TABLET / MOBILE)
       ============================================================ */

/* ── TIER 1: LAPTOPS & COMPACT DESKTOPS (<= 1240px) ── */
@media (max-width: 1240px) {
  .app-topbar-nav {
    padding: 0 14px;
    gap: 8px;
  }

  .top-nav-brand-sub {
    display: none;
  }

  .top-cat-btn {
    padding: 4px 8px;
    font-size: var(--text-micro);
  }

  .as-mode-btn {
    padding: 3px 8px;
  }

  .mode-title {
    font-size: var(--text-micro);
  }

  .mode-sub {
    display: none;
  }

  .top-nav-controls {
    gap: 5px;
  }

  .ctrl-btn {
    padding: 4px 7px;
    font-size: var(--text-micro);
  }

  .btn-master-reset span:last-child {
    display: none;
  }

  .btn-master-reset {
    padding: 4px 8px !important;
  }

  .btn-master-reset span:first-child {
    font-size: 13px !important;
  }
}

/* ── TIER 2: TABLETS LANDSCAPE & PORTRAIT (<= 960px) ── */
@media (max-width: 960px) {
  .app-topbar-nav {
    padding: 0 10px;
    gap: 6px;
    height: 48px;
  }

  .top-nav-brand-title {
    font-size: 14px;
  }

  .top-nav-categories {
    display: none;
  }

  .as-mode-switch {
    display: none;
  }

  .top-drawer-toggle {
    display: inline-flex !important;
  }

  .top-nav-exit {
    display: none;
  }

  .tb-group-identity {
    display: none;
  }

  .tb-cluster-sep {
    display: none;
  }

  /* Elastic HUD telemetry bar with touch scrolling */
  .app-hud-bar {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: thin;
    padding: 4px 10px;
    gap: 8px;
  }

  .hud-metric {
    flex-shrink: 0;
  }

  .hud-right {
    flex-shrink: 0;
  }

  /* Elastic Escalation Banner */
  .case-escalation-banner {
    padding: 10px 12px;
  }

  .case-escalation-banner.is-collapsed {
    padding: 4px 12px;
  }

  .ce-pipeline {
    flex-wrap: wrap;
    gap: 6px;
  }

  .ce-step {
    padding: 4px 8px;
    font-size: var(--text-micro);
  }

  .app-main {
    padding: 12px 14px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── TIER 3: MOBILE PHONES & COMPACT SCREENS (<= 640px) ── */
@media (max-width: 640px) {
  .app-topbar-nav {
    padding: 0 8px;
    height: 44px;
    gap: 4px;
  }

  .top-nav-brand-title {
    font-size: 13px;
    letter-spacing: normal;
  }

  .brand-logo-img {
    width: auto !important;
    height: 26px !important;
    max-height: 26px !important;
  }

  #textDec,
  #textInc {
    display: none;
  }

  .app-hud-bar {
    padding: 4px 8px;
    font-size: var(--text-micro);
  }

  .hud-val {
    font-size: var(--text-micro) !important;
  }

  .case-escalation-banner {
    border-radius: var(--radius-sm);
    padding: 8px 10px;
  }

  .case-escalation-banner.is-collapsed {
    padding: 4px 8px;
  }

  .ce-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .ce-pipeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 100%;
  }

  .ce-step {
    text-align: center;
    justify-content: center;
  }

  .app-main {
    padding: 8px 10px;
  }

  .auth-card {
    padding: 20px 16px;
    max-width: 95vw;
  }

  .workspace-card {
    padding: 24px 16px;
    max-width: 95vw;
  }

  .ge-footer-container {
    padding: 24px 16px;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #printReportArea,
  #printReportArea * {
    visibility: visible;
  }

  #printReportArea {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 24px;
  }
}