@property --qeyet-shimmer {
  syntax: "<angle>";
  inherits: true;
  initial-value: 112deg;
}

@property --qeyet-lift {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  --qeyet-ink: #08161a;
  --qeyet-ink-soft: #193037;
  --qeyet-canvas: #eef4f2;
  --qeyet-paper: #fbfdfc;
  --qeyet-line: #d5e1dd;
  --qeyet-muted: #61716f;
  --qeyet-jade: #087a55;
  --qeyet-jade-bright: #18a978;
  --qeyet-mint: #66e7c0;
  --qeyet-cyan: #55d8f3;
  --qeyet-lime: #9cff67;
  --qeyet-blue: #4f82ef;
  --qeyet-coral: #d96952;
  --qeyet-focus: #2579f4;
  --qeyet-shadow-sm: 0 1px 2px rgba(5, 24, 22, 0.06), 0 7px 24px rgba(5, 24, 22, 0.06);
  --qeyet-shadow-lg: 0 26px 72px rgba(4, 21, 20, 0.16), 0 4px 14px rgba(4, 21, 20, 0.08);
  --qeyet-spring: linear(0, 0.002, 0.01 1.2%, 0.039 2.5%, 0.15 5.2%, 0.59 12%, 0.82 17%, 0.94 22%, 1.01 31%, 1.018 41%, 1.006 58%, 1);
  --qeyet-wordmark: url("/brand/qeyet-wordmark-mask.svg");
}

.qeyet-next {
  color: var(--qeyet-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.qeyet-next,
.qeyet-next button,
.qeyet-next input,
.qeyet-next textarea,
.qeyet-next select {
  letter-spacing: 0;
}

.qeyet-next * {
  scrollbar-color: color-mix(in oklch, var(--qeyet-jade) 42%, transparent) transparent;
  scrollbar-width: thin;
}

.qeyet-next ::selection {
  color: var(--qeyet-ink);
  background: color-mix(in oklch, var(--qeyet-mint) 58%, white);
}

.qeyet-next :focus-visible {
  outline: 2px solid var(--qeyet-focus) !important;
  outline-offset: 3px;
}

.qeyet-next :is(button, a, input, textarea, select) {
  -webkit-tap-highlight-color: transparent;
}

.qeyet-next :is(button, .button, .primary, .secondary, .danger, .nav-launch) {
  transition:
    translate 180ms var(--qeyet-spring),
    scale 180ms var(--qeyet-spring),
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 180ms ease;
}

@media (hover: hover) {
  .qeyet-next :is(button, .button, .primary, .secondary, .nav-launch):not(:disabled):hover {
    translate: 0 -1px;
  }
}

.qeyet-next :is(button, .button, .primary, .secondary, .nav-launch):not(:disabled):active {
  scale: 0.985;
  translate: 0 0;
}

.qeyet-next :is(.wordmark, .mini-wordmark, .hero-wordmark, .qeyet-wordmark, .brand, .pair-brand) {
  --qeyet-logo-height: 27px;
  display: inline-block;
  width: calc(var(--qeyet-logo-height) * 3.25);
  height: var(--qeyet-logo-height);
  flex: 0 0 auto;
  color: currentColor;
  background: currentColor;
  font-size: 0 !important;
  line-height: 0 !important;
  -webkit-mask: var(--qeyet-wordmark) center / contain no-repeat;
  mask: var(--qeyet-wordmark) center / contain no-repeat;
}

.qeyet-next :is(.wordmark, .mini-wordmark, .hero-wordmark, .qeyet-wordmark, .brand, .pair-brand) > span {
  font-size: 0 !important;
}

.qeyet-next :is(.qeyet-wordmark.hero, .hero-wordmark) {
  --qeyet-logo-height: clamp(58px, 8vw, 94px);
}

.qeyet-next :is(.qeyet-wordmark.compact, .mini-wordmark) {
  --qeyet-logo-height: 20px;
}

.qeyet-next :is(.brand-mark, .empty-list-icon, .empty-conversation > span:first-child),
.qeyet-next .mail-boot::before,
.qeyet-next .boot::before {
  background-color: var(--qeyet-ink);
  background-image: url("/brand/qeyet-symbol.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 76%;
}

.qeyet-next :is(input, textarea, select, .editor) {
  border-color: color-mix(in oklch, var(--qeyet-line) 82%, var(--qeyet-ink));
  background-color: color-mix(in oklch, white 94%, var(--qeyet-canvas));
  box-shadow: inset 0 1px 1px rgba(5, 24, 22, 0.025);
}

.qeyet-next :is(input, textarea, select, .editor):focus {
  border-color: var(--qeyet-jade) !important;
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--qeyet-jade) 14%, transparent) !important;
}

.qeyet-next :is(.modal-backdrop, .modal-layer, #modalRoot, #mailModal, #agentModal) {
  backdrop-filter: blur(18px) saturate(0.8);
}

.qeyet-next :is(.modal, .dialog, .context-menu, .sheet, .call-dialog, .incoming-call-card) {
  border-color: color-mix(in oklch, var(--qeyet-line) 84%, var(--qeyet-ink));
  box-shadow: var(--qeyet-shadow-lg);
}

@supports (transition-behavior: allow-discrete) {
  .qeyet-next :is(.modal-backdrop, .modal-layer) {
    transition: opacity 180ms ease, display 180ms allow-discrete, overlay 180ms allow-discrete;
  }

  @starting-style {
    .qeyet-next :is(.modal-backdrop.open, .modal-layer.visible, .modal-layer.open) {
      opacity: 0;
    }
  }
}

/* Public home */
.qeyet-home {
  background: var(--qeyet-paper);
}

.qeyet-home .site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  border-color: rgba(209, 240, 231, 0.14);
  color: #f5fbf9;
  background: rgba(4, 17, 21, 0.74);
  backdrop-filter: blur(22px) saturate(1.2);
}

.qeyet-home .site-header :is(.wordmark, .desktop-nav a) {
  color: #f5fbf9;
}

.qeyet-home .site-header .button-primary {
  border-color: rgba(111, 242, 201, 0.28);
  color: #071712;
  background: var(--qeyet-mint);
  box-shadow: 0 8px 28px rgba(50, 225, 171, 0.15);
}

.qeyet-home .hero {
  isolation: isolate;
  min-height: 720px;
  color: #f7fbfa;
  background: #07181c;
}

.qeyet-home .hero::before,
.qeyet-home .hero::after {
  display: none;
}

.qeyet-field-canvas {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 650ms ease;
}

.qeyet-field-ready .qeyet-field-canvas {
  opacity: 1;
}

.qeyet-home .hero-field-fallback {
  position: absolute;
  z-index: -3;
  inset: 0;
  background: #061419 url("/media/qeyet-field-fallback.png") center / cover no-repeat;
}

.qeyet-home .hero-content {
  z-index: 3;
  width: min(860px, calc(100% - 40px));
  padding-top: 48px;
}

.qeyet-home .hero-wordmark {
  color: #f7fbfa;
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, 0.26));
}

.qeyet-home .hero-promise {
  color: #f7fbfa;
  font-size: 39px;
  text-wrap: balance;
}

.qeyet-home .hero-copy {
  color: #bdd0cc;
  font-size: 18px;
  text-wrap: pretty;
}

.qeyet-home .hero .button-primary {
  color: #071712;
  background: var(--qeyet-mint);
  box-shadow: 0 14px 38px rgba(46, 220, 168, 0.18);
}

.qeyet-home .hero .button-secondary {
  border-color: rgba(216, 239, 233, 0.34);
  color: #edf8f5;
  background: rgba(7, 24, 28, 0.42);
  backdrop-filter: blur(12px);
}

.qeyet-home .hero-facts {
  color: #b9ceca;
}

.qeyet-home .hero-facts svg {
  color: var(--qeyet-mint);
}

.qeyet-home .demo-stage {
  margin-top: clamp(22px, 4vh, 38px);
}

.qeyet-home .demo-mode-switch {
  border-color: rgba(202, 229, 222, 0.22);
  background: rgba(6, 22, 26, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px) saturate(1.25);
}

.qeyet-home .demo-mode-switch button {
  color: #9eb6b2;
}

.qeyet-home .demo-mode-switch button[aria-pressed="true"] {
  color: #071712;
  background: var(--qeyet-mint);
}

.qeyet-home .demo-app {
  border-color: rgba(198, 222, 216, 0.25);
  color: var(--qeyet-ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.qeyet-home .demo-thread {
  view-transition-name: qeyet-demo-thread;
}

::view-transition-old(qeyet-demo-thread) {
  animation: 150ms ease both qeyet-scene-out;
}

::view-transition-new(qeyet-demo-thread) {
  animation: 280ms var(--qeyet-spring) both qeyet-scene-in;
}

@keyframes qeyet-scene-out {
  to { opacity: 0; translate: 0 -5px; }
}

@keyframes qeyet-scene-in {
  from { opacity: 0; translate: 0 8px; }
}

.qeyet-home :is(.relationship-grid, .card-showcase) article {
  transition: translate 220ms var(--qeyet-spring), border-color 180ms ease, box-shadow 220ms ease;
}

@media (hover: hover) {
  .qeyet-home :is(.relationship-grid, .card-showcase) article:hover {
    translate: 0 -4px;
    border-color: color-mix(in oklch, var(--qeyet-jade) 34%, var(--qeyet-line));
    box-shadow: var(--qeyet-shadow-sm);
  }
}

.qeyet-home .security-section {
  background: var(--qeyet-ink);
}

.qeyet-home .final-cta {
  color: #effbf7;
  background: #0d2429;
}

/* Public information pages */
.qeyet-public {
  background: var(--qeyet-paper);
}

.qeyet-public .site-header,
.qeyet-hermes .setup-header {
  border-color: color-mix(in oklch, var(--qeyet-line) 82%, transparent);
  background: rgba(251, 253, 252, 0.88);
  backdrop-filter: blur(20px) saturate(1.2);
}

.qeyet-public .page-hero {
  position: relative;
  overflow: hidden;
  border-color: rgba(99, 172, 151, 0.18);
  color: #f5fbf9;
  background: #0a1d22;
}

.qeyet-public .page-hero::before {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: color-mix(in oklch, var(--qeyet-mint) 55%, transparent);
  content: "";
}

.qeyet-public .page-hero-inner {
  position: relative;
}

.qeyet-public .page-hero :is(.page-lead, p) {
  color: #b9ccc8;
}

.qeyet-public .page-hero .breadcrumb {
  color: var(--qeyet-mint);
}

.qeyet-public .content-main h1 {
  text-wrap: balance;
}

.qeyet-public :is(.content-grid article, .access-grid article) {
  background: transparent;
  transition: background-color 180ms ease, border-color 180ms ease;
}

@media (hover: hover) {
  .qeyet-public :is(.content-grid article, .access-grid article):hover {
    background: color-mix(in oklch, var(--qeyet-canvas) 62%, transparent);
  }
}

/* Messaging */
.qeyet-messaging {
  --paper: var(--qeyet-canvas);
  --panel: #fbfdfc;
  --panel-soft: #f1f6f4;
  --line: var(--qeyet-line);
  --line-strong: #bccdc7;
  --accent: var(--qeyet-jade);
  --accent-strong: #056341;
  --accent-soft: #dff3eb;
  --blue: var(--qeyet-blue);
  --shadow: var(--qeyet-shadow-lg);
}

.qeyet-messaging .app-shell {
  background: var(--qeyet-paper);
}

.qeyet-messaging .rail {
  background: #f7faf9;
}

.qeyet-messaging :is(.rail-header, .chat-header, .composer, .details-header) {
  background: rgba(251, 253, 252, 0.88);
  backdrop-filter: blur(18px) saturate(1.15);
}

.qeyet-messaging :is(.search-box, .composer-row) {
  border-color: color-mix(in oklch, var(--qeyet-line) 82%, var(--qeyet-ink));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82), 0 6px 22px rgba(5, 24, 22, 0.04);
}

.qeyet-messaging .chat-row.active,
.qeyet-messaging .inbox-filter.active,
.qeyet-messaging .folder-tray-item.active {
  color: #064c36;
  background: color-mix(in oklch, var(--qeyet-mint) 24%, white);
  box-shadow: inset 3px 0 0 var(--qeyet-jade);
}

.qeyet-messaging .messages {
  background-color: #edf3f2;
}

.qeyet-messaging .message:not(.mine) {
  border-color: #d4dfdc;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px rgba(6, 29, 25, 0.055);
}

.qeyet-messaging .message.mine {
  border-color: #2e70de;
  background: #3478e7;
  box-shadow: 0 9px 30px rgba(34, 95, 207, 0.16);
}

.qeyet-messaging .send-button {
  color: #061712;
  background: var(--qeyet-mint);
  border-color: var(--qeyet-mint);
  box-shadow: 0 6px 20px rgba(50, 211, 161, 0.2);
}

.qeyet-messaging .empty-conversation > span:first-child,
.qeyet-messaging .empty-list-icon {
  color: transparent;
  border-radius: 8px;
  box-shadow: 0 16px 46px rgba(5, 27, 23, 0.12);
}

.qeyet-messaging .onboarding {
  background: var(--qeyet-paper);
}

.qeyet-messaging .onboarding-panel {
  border-color: rgba(103, 151, 139, 0.26);
  box-shadow: var(--qeyet-shadow-lg);
}

.qeyet-messaging .onboarding-security h2 span {
  color: var(--qeyet-jade);
}

/* Mail and Agent Mail */
.qeyet-mail,
.qeyet-agent {
  --canvas: var(--qeyet-canvas);
  --surface: #fbfdfc;
  --soft: #f1f6f4;
  --hover: #e8f1ed;
  --line: var(--qeyet-line);
  --line-strong: #bccdc7;
  --green: var(--qeyet-jade);
  --green-dark: #056341;
  --green-soft: #dff3eb;
  --blue: var(--qeyet-blue);
  --shadow: var(--qeyet-shadow-lg);
}

.qeyet-mail .auth-shell,
.qeyet-agent .auth-shell {
  background: var(--qeyet-paper);
}

.qeyet-mail .auth-aside,
.qeyet-mail .onboarding-aside,
.qeyet-agent .auth-aside {
  position: relative;
  overflow: hidden;
  color: #eaf8f4;
  background: #0a1d22;
}

.qeyet-mail .auth-aside::before,
.qeyet-mail .onboarding-aside::before,
.qeyet-agent .auth-aside::before {
  position: absolute;
  inset: 0;
  opacity: 0.52;
  background: url("/media/qeyet-field-fallback.png") center / cover no-repeat;
  content: "";
}

.qeyet-mail .auth-aside > *,
.qeyet-mail .onboarding-aside > *,
.qeyet-agent .auth-aside > * {
  position: relative;
}

.qeyet-mail .route-node,
.qeyet-mail .privacy-node,
.qeyet-agent .route-node {
  border-color: rgba(172, 216, 204, 0.22);
  color: #f5fbf9;
  background: rgba(5, 24, 28, 0.68);
  backdrop-filter: blur(14px);
}

.qeyet-mail .privacy-node strong,
.qeyet-agent .route-node strong {
  color: #f5fbf9;
}

.qeyet-mail .privacy-facts span,
.qeyet-agent :is(.route-node span, .route-facts span) {
  color: #9eb5b0;
}

.qeyet-mail :is(.sidebar, .list-pane, .content-pane),
.qeyet-agent :is(.sidebar, .list-pane, .content-pane) {
  background-color: #fbfdfc;
}

.qeyet-mail .sidebar,
.qeyet-agent .sidebar {
  background: #f5f9f7;
}

.qeyet-mail :is(.pane-header, .content-header, .composer-header),
.qeyet-agent :is(.pane-header, .content-header, .composer-header) {
  background: rgba(251, 253, 252, 0.9);
  backdrop-filter: blur(18px);
}

.qeyet-mail :is(.message-row, .thread-row):hover,
.qeyet-agent :is(.message-row, .thread-row):hover {
  background: #edf5f1;
}

.qeyet-mail .mail-boot::before,
.qeyet-agent .boot::before {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  box-shadow: var(--qeyet-shadow-sm);
  content: "";
}

/* Operator and enterprise controls */
.qeyet-operator,
.qeyet-enterprise,
.qeyet-join {
  --canvas: #edf3f1;
  --surface: #fbfdfc;
  --surface-soft: #f2f7f5;
  --line: var(--qeyet-line);
  --line-strong: #bccdc7;
  --accent: var(--qeyet-jade);
  --accent-strong: #056341;
  --accent-soft: #dff3eb;
  --shadow: var(--qeyet-shadow-lg);
}

.qeyet-operator .sidebar,
.qeyet-enterprise .sidebar {
  color: #d9e9e4;
  background: #0a1b20;
}

.qeyet-operator .sidebar .qeyet-wordmark,
.qeyet-enterprise .sidebar .qeyet-wordmark {
  color: #f5fbf9;
}

.qeyet-operator :is(.topbar, .surface-header),
.qeyet-enterprise :is(.topbar, .surface-header) {
  background: rgba(251, 253, 252, 0.88);
  backdrop-filter: blur(18px);
}

.qeyet-operator :is(.surface, .metric, .stat, .tenant-card),
.qeyet-enterprise :is(.surface, .metric, .stat, .tenant-card) {
  border-color: color-mix(in oklch, var(--qeyet-line) 82%, var(--qeyet-ink));
  box-shadow: var(--qeyet-shadow-sm);
}

.qeyet-operator .chart-shell,
.qeyet-enterprise .chart-shell {
  background: #f7faf9;
}

/* Hermes */
.qeyet-hermes {
  --paper: var(--qeyet-canvas);
  --panel: #fbfdfc;
  --line: var(--qeyet-line);
  --accent: var(--qeyet-jade);
  --accent-strong: #056341;
  --accent-soft: #dff3eb;
  --ink: var(--qeyet-ink);
  --muted: var(--qeyet-muted);
}

.qeyet-hermes .setup-intro {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 8px;
  color: #f3fbf8;
  background: #0a1d22;
  box-shadow: var(--qeyet-shadow-lg);
}

.qeyet-hermes .setup-intro p {
  color: #b8cbc6;
}

.qeyet-hermes .product-mark {
  color: #071712;
  background: var(--qeyet-mint);
}

.qeyet-hermes .setup-step,
.qeyet-hermes .pair-panel {
  border-color: rgba(105, 155, 142, 0.25);
  background: var(--qeyet-paper);
  box-shadow: var(--qeyet-shadow-sm);
}

.qeyet-hermes .command-panel {
  background: #0b1d22;
}

/* Modern component enhancements */
@supports (anchor-name: --qeyet-anchor) {
  .qeyet-next [data-anchor-source] { anchor-name: --qeyet-anchor; }
  .qeyet-next [data-anchor-popover] {
    position-anchor: --qeyet-anchor;
    position-area: block-end span-inline-end;
  }
}

@supports (interpolate-size: allow-keywords) {
  .qeyet-next { interpolate-size: allow-keywords; }
  .qeyet-next .folder-tray-content,
  .qeyet-next details::details-content {
    transition: block-size 220ms var(--qeyet-spring), opacity 160ms ease;
  }
}

@supports (field-sizing: content) {
  .qeyet-next :is(textarea, .composer textarea) {
    field-sizing: content;
  }
}

@media (max-width: 760px) {
  .qeyet-home .site-header {
    height: 58px;
  }

  .qeyet-home .hero {
    min-height: 650px;
  }

  .qeyet-home .hero-content {
    padding-top: 40px;
  }

  .qeyet-home .hero-wordmark {
    --qeyet-logo-height: 56px;
  }

  .qeyet-home .hero-promise {
    font-size: 28px;
  }

  .qeyet-home .hero-copy {
    font-size: 16px;
  }

  .qeyet-home .demo-stage {
    width: calc(100% - 20px);
  }

  .qeyet-home .demo-mode-switch {
    max-width: 100%;
    overflow-x: auto;
  }

  .qeyet-mail .auth-aside,
  .qeyet-mail .onboarding-aside,
  .qeyet-agent .auth-aside {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qeyet-next *,
  .qeyet-next *::before,
  .qeyet-next *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (forced-colors: active) {
  .qeyet-field-canvas,
  .hero-field-fallback {
    display: none;
  }

  .qeyet-next :is(.wordmark, .mini-wordmark, .hero-wordmark, .qeyet-wordmark, .brand, .pair-brand) {
    background: CanvasText;
  }
}
