/* OrcaScale.co — Shared System Shell */
:root {
  --navy:        #050D1A;
  --navy-2:      #081428;
  --navy-3:      #0D1A2E;
  --cyan:        #00C5C8;
  --cyan-2:      #6EE7FF;
  --cyan-glow:   rgba(0,197,200,.45);
  --pink:        #FF6B6B;
  --orange:      #FF8C42;
  --green:       #2BE6A0;
  --line:        rgba(0,197,200,.18);
  --line-2:      rgba(0,197,200,.10);
  --line-soft:   rgba(255,255,255,.06);
  --text:        #EAF2FB;
  --text-dim:    #8AA0BD;
  --text-faint:  #4D6079;
  --bg-card:     rgba(8,16,32,0.62);
  --bg-card-2:   rgba(8,16,32,0.6);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--navy); color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* `hidden` attribute must always win over later `display` rules — see
   docs/hidden-overlay-audit.md. */
[hidden] { display: none !important; }

/* ── Background video (optional, only on landing) ─────────────── */
.bg-video {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.bg-video.mobile { display: none; }
@media (max-width: 767.98px) {
  .bg-video.desktop { display: none; }
  .bg-video.mobile  { display: block; }
}
.bg-scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at center, rgba(5,13,26,0.55) 0%, rgba(5,13,26,0.82) 55%, rgba(5,13,26,0.97) 100%),
    linear-gradient(180deg, rgba(5,13,26,0.55) 0%, rgba(5,13,26,0.25) 30%, rgba(5,13,26,0.7) 100%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(rgba(0,197,200,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,197,200,.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
/* Solid-bg variant for inner pages without video */
body.solid-bg::before {
  content: ''; position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,197,200,.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(31,143,255,.06) 0%, transparent 60%),
    var(--navy);
}
body.solid-bg .bg-grid { display: block; opacity: .25; }

/* ── Top status bar ─────────────────────────────────────────── */
.top-bar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 22px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--text-dim); letter-spacing: .08em; text-transform: uppercase;
}
.top-bar .left, .top-bar .right { display: flex; align-items: center; gap: 14px; }
.top-bar .brand-mini {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 700; text-decoration: none;
  transition: color .15s;
}
.top-bar .brand-mini:hover { color: var(--cyan); }
.top-bar .brand-mini img { width: 22px; height: 22px; }
.top-bar .crumb { color: var(--text-faint); }
.top-bar .crumb .sep { margin: 0 8px; color: var(--text-faint); }
.top-bar .crumb .here { color: var(--cyan); }
.status-dot,
.top-bar .status-dot,
.console-head .status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: pulse 1.8s ease-in-out infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:.45 } }
.top-bar a { color: var(--text-dim); text-decoration: none; transition: color .15s; }
.top-bar a:hover { color: var(--cyan); }
@media (max-width: 600px) {
  .top-bar { padding: 12px 14px; font-size: 10px; gap: 8px; }
  .top-bar .meta { display: none; }
}

/* ── Page container ─────────────────────────────────────────── */
.page {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 18px 40px;
  min-height: calc(100vh - 56px);
}

/* ── Console card ───────────────────────────────────────────── */
.console {
  width: 100%; max-width: 1080px;
  background: var(--bg-card);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow:
    0 30px 80px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.02) inset,
    0 0 60px rgba(0,197,200,.08);
  overflow: hidden;
  margin-top: 24px;
}
.console.narrow { max-width: 920px; }

.console-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; gap: 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0,197,200,.04), transparent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
}
.console-head .h-left { display: flex; align-items: center; gap: 10px; }
.console-head .lights { display: flex; gap: 5px; }
.console-head .lights span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.14); }
.console-head .lights span:nth-child(1) { background: var(--pink); }
.console-head .lights span:nth-child(2) { background: #FFD060; }
.console-head .lights span:nth-child(3) { background: var(--green); }
.console-head .h-id { color: var(--cyan); }
.console-head .h-right { display: flex; align-items: center; gap: 10px; }

/* ── Page header inside console ─────────────────────────────── */
.page-header {
  padding: 36px 32px 24px;
  text-align: center;
  border-bottom: 1px solid var(--line-2);
}
.page-header .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 14px;
}
.page-header .eyebrow::before, .page-header .eyebrow::after {
  content: ''; width: 22px; height: 1px; background: var(--line);
}
.page-header h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; line-height: 1.05; letter-spacing: -.02em;
  color: #fff;
}
.page-header h1 .accent {
  background: linear-gradient(90deg, var(--cyan), var(--cyan-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-header p.lede {
  margin: 14px auto 0; max-width: 620px;
  font-size: clamp(14px, 1.8vw, 16px); line-height: 1.55;
  color: var(--text-dim);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 100px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #1F8FFF);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,197,200,.32), 0 2px 6px rgba(0,0,0,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(0,197,200,.45); }
.btn-secondary {
  background: rgba(255,255,255,.04); color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: rgba(0,197,200,.08); border-color: var(--cyan); color: var(--cyan); }
.btn-ghost {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { color: var(--cyan); border-color: var(--cyan); }
.btn-sm { padding: 9px 16px; font-size: 12.5px; }
/* Accent CTA — the warm "Website like ours" offer.
   Gradient kept in deep orange → red so white text always meets WCAG AA contrast.
   A scrim (::before) sits under the label; the spark and arrow ride above it. */
.btn-accent {
  background: linear-gradient(135deg, #C9461A 0%, #B22424 50%, #931345 100%);
  background-size: 180% 100%; background-position: 0% 0%;
  color: #fff; border: 0;
  font-weight: 800; letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0,0,0,.6), 0 2px 10px rgba(0,0,0,.4);
  box-shadow:
    0 14px 34px rgba(178,36,36,.45),
    0 2px 8px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.32),
    inset 0 -2px 0 rgba(0,0,0,.22),
    inset 0 0 0 1px rgba(255,255,255,.18);
  position: relative; overflow: hidden;
  animation: btnAccentShift 7s ease-in-out infinite;
}
.btn-accent::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.18) 55%, rgba(0,0,0,.3) 100%);
  border-radius: inherit;
}
.btn-accent > * { position: relative; z-index: 1; }
.btn-accent .btn-accent-spark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 13px; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
@keyframes btnAccentShift {
  0%,100% { background-position: 0% 0%; }
  50%     { background-position: 100% 0%; }
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 44px rgba(224,57,46,.55),
    0 3px 10px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.36),
    inset 0 -2px 0 rgba(0,0,0,.26),
    inset 0 0 0 1px rgba(255,255,255,.22);
}
.btn-accent:active { transform: translateY(0); }
.btn-accent:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(242,105,26,.55),
    0 14px 34px rgba(224,57,46,.42);
}
@media (prefers-reduced-motion: reduce) { .btn-accent { animation: none; } }
@media (max-width: 800px) { .top-bar .btn-accent { display: none; } }

/* ── CTA strip (bottom of every page) ───────────────────────── */
.cta-strip {
  padding: 26px 28px;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: center;
  border-top: 1px solid var(--line-2);
  background: linear-gradient(180deg, transparent, rgba(0,197,200,.04));
}
.cta-strip .cta-text {
  font-size: 13.5px; color: var(--text-dim); margin-right: 8px;
}
.cta-strip .cta-text strong { color: var(--text); }

/* ── Module dock (system tabs) ──────────────────────────────── */
.module-dock {
  width: 100%; max-width: 1080px;
  margin-top: 18px;
  background: rgba(8,16,32,.7);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px;
  overflow: hidden;
  background: var(--line);
}
.module-dock .dock-mod {
  background: rgba(8,16,32,.7);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; text-decoration: none; color: var(--text-dim);
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  transition: background .2s, color .2s;
  text-align: center; position: relative;
}
.module-dock .dock-mod svg { width: 18px; height: 18px; }
.module-dock .dock-mod:hover { background: rgba(0,197,200,.06); color: #fff; }
.module-dock .dock-mod:hover svg { color: var(--cyan); }
.module-dock .dock-mod.active {
  color: var(--cyan); background: rgba(0,197,200,.10);
}
.module-dock .dock-mod.active::before {
  content: ''; position: absolute; top: 0; left: 14%; right: 14%;
  height: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}
.module-dock .dock-mod.active svg { color: var(--cyan); }
@media (max-width: 768px) {
  .module-dock { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 420px) {
  .module-dock { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════════════
   APP SHELL — left sidebar + slim top bar (SaaS UI feel)
   ══════════════════════════════════════════════════════════════ */
.app-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 232px;
  background:
    linear-gradient(180deg, rgba(8,16,32,.92), rgba(5,13,26,.96)),
    radial-gradient(ellipse 200% 60% at 0% 0%, rgba(0,197,200,.06), transparent 60%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  z-index: 60;
  padding: 18px 0 14px;
  transform: translateX(0);
  animation: slideInLeft .45s cubic-bezier(.2,.8,.25,1) both;
}
@keyframes slideInLeft {
  from { transform: translateX(-12px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.app-sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 18px 18px; color: var(--text);
  text-decoration: none; font-weight: 800; letter-spacing: .01em;
  font-size: 16px;
  border-bottom: 1px solid var(--line-2);
}
.app-sidebar .brand img { width: 26px; height: 26px; }
.app-sidebar .brand .badge {
  margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px; letter-spacing: .12em; color: var(--cyan);
  padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px;
  text-transform: uppercase;
}
.app-sidebar .nav { flex: 1; padding: 14px 12px 10px; overflow-y: auto; }
.app-sidebar .nav-section {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint);
  padding: 12px 10px 8px;
}
.app-sidebar .nav-mod {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text-dim); text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  position: relative;
  transition: background .15s, color .15s, transform .15s;
}
.app-sidebar .nav-mod svg { width: 17px; height: 17px; flex-shrink: 0; }
.app-sidebar .nav-mod:hover {
  background: rgba(0,197,200,.06); color: var(--text);
}
.app-sidebar .nav-mod.active {
  background: rgba(0,197,200,.10); color: var(--cyan);
}
.app-sidebar .nav-mod.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; background: var(--cyan); border-radius: 2px;
  box-shadow: 0 0 10px var(--cyan-glow);
}
.app-sidebar .nav-mod .meta {
  margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px; color: var(--text-faint); letter-spacing: .08em;
}
.app-sidebar .nav-mod.active .meta { color: var(--cyan); }
.app-sidebar .side-cta {
  padding: 12px 14px 8px; border-top: 1px solid var(--line-2);
}
.app-sidebar .side-cta .btn { width: 100%; }
.app-sidebar .side-foot {
  padding: 10px 18px 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px; color: var(--text-faint);
  letter-spacing: .12em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}

body.has-shell { padding-left: 232px; }
body.has-shell .module-dock { display: none !important; }
body.has-shell .top-bar .brand-mini { display: none; }
body.has-shell .top-bar { padding-left: 26px; padding-right: 26px; }

@media (max-width: 980px) {
  body.has-shell { padding-left: 64px; }
  .app-sidebar { width: 64px; padding: 14px 0 10px; }
  .app-sidebar .brand { padding: 4px 0 14px; justify-content: center; gap: 0; }
  .app-sidebar .brand span:not(.badge), .app-sidebar .brand .badge { display: none; }
  .app-sidebar .nav { padding: 8px 8px; }
  .app-sidebar .nav-mod { justify-content: center; padding: 11px 0; gap: 0; }
  .app-sidebar .nav-mod span:not(.meta), .app-sidebar .nav-mod .meta { display: none; }
  .app-sidebar .nav-section { display: none; }
  .app-sidebar .side-cta { display: none; }
  .app-sidebar .side-foot { display: none; }
  .app-sidebar .nav-mod.active::before { left: -8px; height: 18px; }
}
@media (max-width: 700px) {
  body.has-shell { padding-left: 0; padding-top: 56px; }
  .app-sidebar { display: none; }

  /* Fixed mobile trigger button (top-right) */
  .app-mobile-trigger {
    position: fixed; top: 10px; right: 12px; z-index: 1200;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px 9px 12px; border: 1px solid rgba(124,233,235,.4);
    border-radius: 99px; background: rgba(5,13,26,.92); backdrop-filter: blur(12px);
    color: #EAF2FB; font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.4);
    transition: transform .15s ease, border-color .15s ease;
  }
  .app-mobile-trigger:active { transform: scale(.96); }
  .app-mobile-trigger.open { border-color: #00C5C8; background: linear-gradient(135deg, rgba(0,197,200,.18), rgba(31,143,255,.12)); }
  .app-mobile-trigger .bars { width: 16px; height: 12px; position: relative; display: inline-block; }
  .app-mobile-trigger .bars span {
    position: absolute; left: 0; right: 0; height: 2px; background: #7CE9EB; border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease, top .2s ease;
  }
  .app-mobile-trigger .bars span:nth-child(1) { top: 0; }
  .app-mobile-trigger .bars span:nth-child(2) { top: 5px; }
  .app-mobile-trigger .bars span:nth-child(3) { top: 10px; }
  .app-mobile-trigger.open .bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
  .app-mobile-trigger.open .bars span:nth-child(2) { opacity: 0; }
  .app-mobile-trigger.open .bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

  /* Full-screen on-brand mobile drawer.
     Native <dialog>: [open] is the toggle, ::backdrop is the scrim,
     @starting-style drives the slide-in entry. No body classes. */
  .app-mobile-menu {
    position: fixed; inset: 0;
    margin: 0; border: 0; padding: 0;
    width: 100vw; max-width: none;
    height: 100vh; max-height: 100vh;
    height: 100dvh; max-height: 100dvh;
    z-index: 1190;
    background:
      radial-gradient(120% 80% at 100% 0%, rgba(0,197,200,.18) 0%, rgba(0,197,200,0) 55%),
      radial-gradient(90% 70% at 0% 100%, rgba(31,143,255,.14) 0%, rgba(31,143,255,0) 60%),
      linear-gradient(180deg, #050D1A 0%, #081626 60%, #050D1A 100%);
    color: #EAF2FB;
    overflow: hidden;
    /* Closed state — drawer slides up slightly and fades. The browser
       transitions back to this on close because of
       transition-behavior: allow-discrete on display + overlay. */
    transform: translateY(-12px); opacity: 0;
    transition:
      transform .32s cubic-bezier(.2,.8,.2,1),
      opacity .2s ease,
      overlay .32s cubic-bezier(.2,.8,.2,1) allow-discrete,
      display .32s cubic-bezier(.2,.8,.2,1) allow-discrete;
  }
  /* Subtle grid texture on top of the gradient */
  .app-mobile-menu::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(rgba(124,233,235,.05) 1px, transparent 1px) 0 0 / 100% 56px,
      linear-gradient(90deg, rgba(124,233,235,.05) 1px, transparent 1px) 0 0 / 56px 100%;
    mask: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 75%);
    opacity: .55;
  }
  .app-mobile-menu[open] { transform: translateY(0); opacity: 1; }
  .app-mobile-menu::backdrop {
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0);
    transition:
      background .32s ease,
      backdrop-filter .32s ease,
      overlay .32s ease allow-discrete,
      display .32s ease allow-discrete;
  }
  .app-mobile-menu[open]::backdrop {
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
  }

  /* Inner scroll container so the close button stays pinned */
  .app-mobile-menu .amm-inner {
    position: relative; z-index: 1;
    height: 100%; overflow-y: auto;
    padding: 18px 18px calc(env(safe-area-inset-bottom, 0px) + 18px);
    display: flex; flex-direction: column; gap: 18px;
    -webkit-overflow-scrolling: touch;
  }

  .app-mobile-menu .amm-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px; border-bottom: 1px solid rgba(124,233,235,.14);
  }
  .app-mobile-menu .brand-mini {
    display: inline-flex; align-items: center; gap: 10px;
    color: #EAF2FB; text-decoration: none; font-weight: 700;
    font-size: 16px; letter-spacing: .01em;
  }
  .app-mobile-menu .brand-mini img {
    width: 28px; height: 28px;
    filter: drop-shadow(0 0 8px rgba(0,197,200,.4));
  }
  .app-mobile-menu .amm-close {
    width: 40px; height: 40px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(124,233,235,.22);
    color: #EAF2FB; font-size: 16px; line-height: 1; cursor: pointer;
    transition: background .15s, border-color .15s, transform .15s;
  }
  .app-mobile-menu .amm-close:hover,
  .app-mobile-menu .amm-close:focus-visible {
    background: rgba(0,197,200,.12); border-color: #00C5C8; outline: none;
  }
  .app-mobile-menu .amm-close:active { transform: scale(.94); }

  .app-mobile-menu .amm-eyebrow {
    display: flex; align-items: center; gap: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px; font-weight: 700; letter-spacing: .22em;
    color: #7CE9EB; text-transform: uppercase;
    margin: 4px 2px -4px;
  }
  .app-mobile-menu .amm-eyebrow::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: #7CE9EB; box-shadow: 0 0 10px rgba(124,233,235,.7);
  }
  .app-mobile-menu .amm-eyebrow::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, rgba(124,233,235,.25), transparent);
  }

  .app-mobile-menu .amm-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  }
  @media (min-width: 520px) {
    .app-mobile-menu .amm-grid { grid-template-columns: repeat(3, 1fr); }
  }
  .app-mobile-menu .amm-tile {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 14px 14px 12px; border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
    color: #EAF2FB; text-decoration: none;
    transition: border-color .18s, background .18s, transform .15s, box-shadow .18s;
    min-height: 92px; position: relative; overflow: hidden;
  }
  .app-mobile-menu .amm-tile::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(120% 80% at 100% 0%, rgba(0,197,200,.12), transparent 60%);
    opacity: 0; transition: opacity .2s ease;
    pointer-events: none;
  }
  .app-mobile-menu .amm-tile:active { transform: scale(.97); }
  .app-mobile-menu .amm-tile:hover::before,
  .app-mobile-menu .amm-tile:focus-visible::before { opacity: 1; }
  .app-mobile-menu .amm-tile:focus-visible {
    outline: none; border-color: rgba(124,233,235,.5);
  }
  .app-mobile-menu .amm-tile.active {
    border-color: #00C5C8;
    background: linear-gradient(180deg, rgba(0,197,200,.16), rgba(0,197,200,.06));
    box-shadow: 0 0 0 1px rgba(0,197,200,.4), 0 8px 24px rgba(0,197,200,.18);
  }
  .app-mobile-menu .amm-tile.active::before { opacity: 1; }
  .app-mobile-menu .amm-tile svg {
    width: 22px; height: 22px; color: #7CE9EB; margin-bottom: 10px;
    filter: drop-shadow(0 0 6px rgba(0,197,200,.35));
  }
  .app-mobile-menu .amm-tile .amm-label {
    font-weight: 600; font-size: 14px; line-height: 1.2;
  }
  .app-mobile-menu .amm-tile .amm-meta {
    position: absolute; top: 12px; right: 12px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9.5px; letter-spacing: .16em;
    color: rgba(234,242,251,.45); font-weight: 700;
  }

  .app-mobile-menu .amm-cta {
    display: flex; flex-direction: column; gap: 10px;
    margin-top: auto; padding-top: 6px;
  }
  .app-mobile-menu .amm-cta .btn {
    width: 100%; padding: 14px 22px; font-size: 14px;
    white-space: normal; line-height: 1.25;
  }

  .app-mobile-menu .amm-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(124,233,235,.12);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
    color: rgba(234,242,251,.55);
  }
  .app-mobile-menu .amm-foot .amm-status {
    display: inline-flex; align-items: center; gap: 8px; color: #7CE9EB;
  }
  .app-mobile-menu .amm-foot .amm-status::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    background: #2BE38E; box-shadow: 0 0 8px rgba(43,227,142,.7);
    animation: ammPulse 2.4s ease-in-out infinite;
  }
  @keyframes ammPulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%     { opacity: .55; transform: scale(.85); }
  }
  @media (prefers-reduced-motion: reduce) {
    .app-mobile-menu, .app-mobile-menu .amm-foot .amm-status::before { animation: none; transition: none; }
  }

  /* Lock body scroll while the dialog is open */
  html:has(.app-mobile-menu[open]) { overflow: hidden; }
}

/* Hide mobile trigger on tablet/desktop */
@media (min-width: 701px) {
  .app-mobile-trigger, .app-mobile-menu { display: none; }
}

@media (max-width: 600px) {
  /* legacy block left empty intentionally — handled above */
  .app-sidebar { width: 56px; }
}

/* ── Page enter animation (between-page transitions) ───────── */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
body.has-shell main,
body.has-shell .page,
body.has-shell > main.page {
  animation: pageEnter .42s cubic-bezier(.2,.8,.25,1) both;
}
@keyframes consoleEnter {
  from { opacity: 0; transform: translateY(14px) scale(.992); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
body.has-shell .console { animation: consoleEnter .55s cubic-bezier(.2,.8,.25,1) .05s both; }
body.has-shell .top-bar { animation: pageEnter .35s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  body.has-shell main, body.has-shell .page, body.has-shell .console, body.has-shell .top-bar,
  .app-sidebar { animation: none !important; }
}

/* ── Focus-visible rings (must remain visible with cursor:none) ── */
.app-sidebar .nav-mod:focus-visible,
.app-sidebar .brand:focus-visible,
.top-bar a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 12px;
}
.app-sidebar .nav-mod:focus-visible { outline-offset: 1px; }

/* ══════════════════════════════════════════════════════════════
   CUSTOM CURSOR — cyan dot + lagging ring (desktop only)
   ══════════════════════════════════════════════════════════════ */
@media (hover: hover) and (pointer: fine) {
  body.has-shell, body.has-shell * { cursor: none !important; }
  body.has-shell input, body.has-shell textarea, body.has-shell select { cursor: text !important; }
  .cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
    border-radius: 50%; transform: translate3d(-100px, -100px, 0);
    will-change: transform;
    mix-blend-mode: screen;
  }
  .cursor-dot {
    width: 6px; height: 6px; margin: -3px 0 0 -3px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan-glow), 0 0 22px rgba(0,197,200,.3);
  }
  .cursor-ring {
    width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 1.5px solid rgba(0,197,200,.55);
    transition: width .2s ease, height .2s ease, margin .2s ease,
                background .2s ease, border-color .2s ease, opacity .2s;
    transform: translate3d(-100px, -100px, 0);
  }
  .cursor-ring.hover {
    width: 56px; height: 56px; margin: -28px 0 0 -28px;
    background: rgba(0,197,200,.10);
    border-color: var(--cyan);
  }
  .cursor-ring.click {
    width: 24px; height: 24px; margin: -12px 0 0 -12px;
    background: rgba(0,197,200,.20);
  }
  .cursor-ring.hidden, .cursor-dot.hidden { opacity: 0; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ── Mini footer ────────────────────────────────────────────── */
.footer-mini {
  position: relative; z-index: 5;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--text-faint); letter-spacing: .14em; text-transform: uppercase;
  text-align: center; padding: 24px 18px 22px;
}
.footer-mini a { color: var(--text-dim); text-decoration: none; }
.footer-mini a:hover { color: var(--cyan); }

/* ── Section tags inside console body ──────────────────────── */
.body-section { padding: 28px 32px; }
.body-section + .body-section { border-top: 1px solid var(--line-2); }
@media (max-width: 600px) { .body-section { padding: 22px 18px; } }
