/* Shared branding and landing-only themes for the recovered CueStudio build. */
html[data-landing-theme] {
  --cue-landing-canvas: #f3f3ef;
  background: var(--cue-landing-canvas);
  color-scheme: light;
}
html[data-landing-theme="dark"] {
  --cue-landing-canvas: var(--aktive-surface-900, #181818);
  color-scheme: dark;
}
html[data-landing-theme] body { background: var(--cue-landing-canvas); }

.lp-page {
  --lp-ink: #20201e;
  --lp-muted: #62625c;
  --lp-faint: #66675d;
  --lp-heading-muted: #77776e;
  --lp-border: #d9d9d3;
  --lp-grid-border: #d2d2cb;
  --lp-focus: #657600;
  --lp-status: #647524;
  --lp-status-halo: #677c2410;
  --lp-final-surface: #e6edc7;
  --lp-final-border: #d0d5a7;
  --lp-final-kicker: #62684a;
  --lp-final-decoration: #8c9d6040;
  --cue-logo: url('/images/cue-logo-light.svg');
  color: var(--lp-ink);
  background: var(--cue-landing-canvas, #f3f3ef);
}
html[data-landing-theme="dark"] .lp-page {
  --lp-ink: var(--aktive-text-primary);
  --lp-muted: var(--aktive-text-secondary);
  --lp-faint: #a3a39b;
  --lp-heading-muted: #b6b6ad;
  --lp-border: var(--aktive-border-muted);
  --lp-grid-border: var(--aktive-border-muted);
  --lp-focus: var(--aktive-accent);
  --lp-status: var(--aktive-accent);
  --lp-status-halo: #dfff2f12;
  --lp-final-surface: linear-gradient(135deg, #303426, #22251d 75%);
  --lp-final-border: #4c5436;
  --lp-final-kicker: #bec99c;
  --lp-final-decoration: #97aa5d26;
  --cue-logo: url('/images/cue-logo-dark.svg');
  color-scheme: dark;
}

/* Use the supplied artwork while retaining the original accessible link text. */
.lp-header .lp-brand,
.lp-footer .lp-brand,
.lp-mini-brand,
.studio-header .wordmark,
html[data-mobile-studio] .studio-header .wordmark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0;
  font-size: 0;
  letter-spacing: 0;
}
.lp-brand .lp-brand-mark, .lp-mini-brand .lp-brand-mark { display: none; }
.lp-header .lp-brand::before,
.lp-footer .lp-brand::before,
.lp-mini-brand::before,
.studio-header .wordmark::before {
  content: '';
  display: block;
  width: var(--cue-logo-width, 154px);
  aspect-ratio: 1000 / 216.22;
  background: var(--cue-logo, url('/images/cue-logo-dark.svg')) center / contain no-repeat;
}
.lp-footer .lp-brand { --cue-logo-width: 126px; }
.lp-mini-brand { --cue-logo-width: 108px; --cue-logo: url('/images/cue-logo-dark.svg'); }
.studio-header .wordmark { --cue-logo-width: 138px; }

/* Center the label and shortcut as one stack in studio and tour controls. */
.transport-controls button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  line-height: 1.2;
}
.transport-controls kbd { margin: 0; }

.cue-card-brand { display: block; width: 140px; margin-bottom: 24px; }
.cue-card-brand img { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 216.22; }
.mobile-card .cue-card-brand { margin-inline: auto; }

.lp-header, .lp-use-cases, .lp-how, .lp-steps li, .lp-footer { border-color: var(--lp-border); }
.lp-feature-grid, .lp-feature, .lp-faq-list details, .lp-faq-list details:first-child { border-color: var(--lp-grid-border); }
.lp-header nav a, .lp-hero-copy, .lp-tour-caption p, .lp-section-heading > p,
.lp-feature > p, .lp-steps p { color: var(--lp-muted); }
.lp-eyebrow, .lp-hero-note, .lp-use-cases > p, .lp-feature-top > span,
.lp-feature-note, .lp-how-heading > p:not(.lp-eyebrow), .lp-steps li > span,
.lp-faq > div > p:not(.lp-eyebrow), .lp-faq-list details > p,
.lp-footer p, .lp-footer > a[href="#landing-title"] { color: var(--lp-faint); }
.lp-privacy .lp-eyebrow { color: var(--aktive-accent); }
.lp-hero h1 > span { color: var(--lp-heading-muted); }
.lp-hero h1 > .cue-hero-line { display: block; }
.lp-hero h1 > .cue-hero-line--camera { color: var(--lp-ink); }
.lp-hero-copy { max-width: 740px; text-wrap: balance; }
.lp-use-cases ul, .lp-text-link { color: var(--lp-ink); }
.lp-faq-list summary .lp-icon { color: var(--lp-faint); }
.lp-status-dot { background: var(--lp-status); box-shadow: 0 0 0 4px var(--lp-status-halo); }
.lp-page button:focus-visible, .lp-page a:focus-visible, .lp-page summary:focus-visible {
  outline-color: var(--lp-focus);
}
.lp-final-card { background: var(--lp-final-surface); border-color: var(--lp-final-border); }
.lp-final-kicker { color: var(--lp-final-kicker); }
.lp-final p { color: var(--lp-faint); }
.lp-final-decoration i { border-color: var(--lp-final-decoration); }
html[data-landing-theme="dark"] .lp-button--dark {
  color: var(--aktive-accent-text);
  border-color: #a7bc24;
  background: linear-gradient(145deg, #eeff94, var(--aktive-accent) 80%);
  box-shadow: inset 0 1px #ffffff80, 0 2px 3px #00000010;
}

/* A tactile sun/moon switch, using the same control depth and easing as Studio. */
.cue-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--lp-ink);
  cursor: pointer;
  touch-action: manipulation;
}
.cue-theme-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 84px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #d0d0c6;
  border-radius: 999px;
  background: linear-gradient(180deg, #e6e6de, #eeeee7);
  box-shadow: inset 0 1px 3px #0000000a, 0 1px 0 #ffffffb3;
  transition: background var(--aktive-transition-base), border-color var(--aktive-transition-base), box-shadow var(--aktive-transition-base);
}
.cue-theme-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 32px;
  height: 32px;
  border: 1px solid #a7bc24;
  border-radius: 50%;
  background: linear-gradient(145deg, #eeff94, var(--aktive-accent) 80%);
  box-shadow: inset 0 1px #ffffff80, 0 2px 5px #0000001a;
  transition: transform var(--aktive-transition-base), box-shadow var(--aktive-transition-base);
}
.cue-theme-track svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color var(--aktive-transition-base), transform var(--aktive-transition-base);
}
.cue-theme-sun { color: #303918; }
.cue-theme-moon { color: #737369; }
.cue-theme-state { min-width: 32px; font: 500 10px/1.4 var(--font-mono, monospace); }
.cue-theme-toggle[aria-checked="true"] .cue-theme-track {
  border-color: #454545;
  background: linear-gradient(180deg, #202020, #2a2a2a);
  box-shadow: inset 0 1px 3px #00000040, 0 1px 0 #ffffff09;
}
.cue-theme-toggle[aria-checked="true"] .cue-theme-thumb {
  transform: translateX(44px);
  box-shadow: inset 0 1px #ffffff80, 0 0 12px #dfff2f18;
}
.cue-theme-toggle[aria-checked="true"] .cue-theme-sun { color: #a3a39b; transform: rotate(45deg); }
.cue-theme-toggle[aria-checked="true"] .cue-theme-moon { color: #303918; transform: rotate(-12deg); }
.cue-theme-toggle:active .cue-theme-thumb { scale: .94; }

@media (hover: hover) and (pointer: fine) {
  .lp-header nav a:hover, .lp-text-link:hover, .lp-footer > a[href="#landing-title"]:hover,
  .lp-faq-list summary:hover { color: var(--lp-ink); }
  .cue-theme-toggle:hover .cue-theme-track { border-color: #849044; box-shadow: 0 0 0 3px #dfff2f12; }
}
@media (max-width: 980px) { .studio-header .wordmark { --cue-logo-width: 122px; } }
@media (max-width: 760px) {
  .lp-header .lp-brand { --cue-logo-width: 132px; }
  .lp-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 16px; }
  .lp-footer .lp-brand { grid-column: 1; grid-row: 1; --cue-logo-width: 120px; }
  .cue-theme-toggle { grid-column: 2; grid-row: 1; justify-self: end; }
  .lp-footer p { order: 0; width: auto; grid-column: 1; grid-row: 2; line-height: 1.7; }
  .lp-footer > a[href="#landing-title"] { grid-column: 2; grid-row: 2; justify-self: end; padding-block: 10px; }
}
@media (max-width: 480px) { .lp-header .lp-brand { --cue-logo-width: 124px; } }
@media (prefers-reduced-motion: reduce) {
  .cue-theme-track, .cue-theme-thumb, .cue-theme-track svg { transition: none !important; }
  .cue-theme-toggle:active .cue-theme-thumb { scale: 1; }
}

/* Shared language controls. The panel uses Studio's established dark surfaces. */
.lp-hero-actions { flex-wrap: wrap; }
.cue-footer-preferences { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.lp-footer p { flex: 1; min-width: 100px; text-align: center; }
.cue-language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--aktive-border-muted);
  border-radius: var(--aktive-radius-sm);
  color: var(--aktive-text-primary);
  background: linear-gradient(180deg, #303030, #242424);
  box-shadow: inset 0 1px #ffffff0b;
  font: 500 11px/1.4 var(--font-sans);
  cursor: pointer;
  touch-action: manipulation;
}
.cue-language-trigger svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cue-language-trigger:focus-visible, .cue-language-panel button:focus-visible, .cue-language-panel select:focus-visible {
  outline: 2px solid var(--aktive-accent);
  outline-offset: 3px;
}
.lp-page .cue-language-trigger { color: var(--lp-ink); border-color: var(--lp-border); background: transparent; box-shadow: none; }
.cue-language--compact { width: 44px; padding: 8px; }
.cue-language--compact .cue-language-name { display: none; }
.studio-header { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 16px; }
.status-panel, .mobile-card { position: relative; }
.status-panel > .cue-language-trigger, .mobile-card > .cue-language-trigger { position: absolute; top: 24px; right: 24px; }
.mobile-card .cue-card-brand { margin-left: 0; margin-right: auto; }
.cue-language-panel {
  position: fixed;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--aktive-border-muted);
  border-radius: var(--aktive-radius-lg);
  color: var(--aktive-text-primary);
  background: linear-gradient(180deg, #303030, #202020);
  box-shadow: var(--aktive-shadow-menu);
  font-family: var(--font-sans);
}
.cue-language-panel[hidden] { display: none; }
.cue-language-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cue-language-heading h2 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.cue-language-panel p { margin: 0; }
.cue-language-close { width: 36px; height: 36px; border: 0; border-radius: 7px; color: var(--aktive-text-secondary); background: #ffffff08; font-size: 22px; cursor: pointer; }
.cue-language-suggestion { font-size: 12px; line-height: 1.6; color: var(--aktive-text-secondary); }
.cue-language-suggestion b { color: var(--aktive-accent); font-weight: 500; }
.cue-language-reason, .cue-language-note, .cue-language-status { color: var(--aktive-text-secondary); font-size: 11px; line-height: 1.7; }
.cue-language-reason { margin-top: -7px !important; color: #a3a39b; }
.cue-language-panel label { margin-top: 8px; font-size: 12px; }
.cue-language-panel select { width: 100%; min-height: 44px; font: 14px/1.4 var(--font-sans); }
.cue-language-actions { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.cue-language-actions button {
  min-height: 44px;
  padding: 10px;
  border: 1px solid #111;
  border-radius: 7px;
  color: var(--aktive-text-primary);
  background: linear-gradient(180deg, #393939, #292929);
  font: 500 12px/1.4 var(--font-sans);
  cursor: pointer;
}
.cue-language-actions .cue-language-auto { color: var(--aktive-accent-text); background: linear-gradient(145deg, #eeff94, var(--aktive-accent) 80%); }
.cue-language-actions button:disabled { opacity: .5; cursor: wait; }
.cue-language-english { justify-self: start; min-height: 36px; padding: 5px 0; border: 0; color: var(--aktive-text-secondary); background: none; font: 12px/1.4 var(--font-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cue-language-status:empty { display: none; }
@media (max-width: 980px) {
  html[data-mobile-studio] .studio-header { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
  html[data-mobile-studio] .connection-badge { max-width: min(30vw, 96px); }
}
@media (max-width: 760px) {
  .lp-footer .cue-footer-preferences { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .lp-footer > a[href="#landing-title"] { grid-row: 1; }
  .lp-footer p { grid-column: 1 / -1; grid-row: 3; text-align: start; }
}
/* Arabic interface typography and direction; media, timelines and user scripts
   retain their own reading direction and recording geometry. */
html[lang="ar"] .lp-page { letter-spacing: 0; }
html[lang="ar"] :is(h1, h2, h3, .lp-script-preview, .lp-brand, .lp-mini-brand) { letter-spacing: 0; }
html[lang="ar"] :is(.lp-eyebrow, .lp-feature-note, .lp-final-kicker, .rail-label, .cue-theme-state, .lp-demo-label, .lp-camera-top, .lp-demo-workspace-header, .mobile-controls-menu__eyebrow) { font-family: var(--font-sans); letter-spacing: 0; }
html[dir="rtl"] .studio-shell, html[dir="rtl"] .lp-tour-frame { direction: ltr; }
html[dir="rtl"] .studio-shell .pane, html[dir="rtl"] .lp-demo-workspace { direction: rtl; }
html[dir="rtl"] .lp-script-caret { left: auto; right: 18px; }
html[dir="rtl"] .lp-script-preview { padding-inline: 42px 35px; }
html[dir="rtl"] .cue-language-panel { direction: rtl; }
html[dir="rtl"] .cue-theme-track { direction: ltr; }
html[dir="rtl"] .cue-language--compact { direction: ltr; }
html[dir="rtl"] select { background-position: left var(--select-inset, 12px) center; }
