/* AstroFace: keep the profiles still; animate only their reveal and ambient light. */
.brand-artwork { isolation: isolate; }
.brand-artwork::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -8px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(155, 120, 255, .42), rgba(155, 120, 255, .14) 42%, transparent 72%);
  opacity: .35;
}
.brand-logo-symbol {
  opacity: 1;
  transform: none;
  filter: drop-shadow(0 0 4px rgba(155, 120, 255, .12));
  transition: filter 320ms ease;
}
.brand:hover .brand-logo-symbol,
.brand:focus-visible .brand-logo-symbol {
  filter: brightness(1.08) drop-shadow(0 0 7px rgba(155, 120, 255, .32));
}
.brand:focus-visible { border-radius: 12px; }

@keyframes astroface-profile-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes astroface-aura-glow {
  0%, 100% { opacity: .3; }
  50% { opacity: .8; }
}
@media (prefers-reduced-motion: no-preference) {
  .brand-logo-symbol { animation: astroface-profile-reveal 800ms ease-out both; }
  .brand-artwork::before { animation: astroface-aura-glow 6.4s ease-in-out infinite; }
}

/* Production UX fixes: safe content area for the global AI launcher. */
.app-main { padding-bottom: max(112px, calc(84px + env(safe-area-inset-bottom))); }
.soulgraph-agent-launcher,
.agent-popup-launcher,
[class~="agent-chat-launcher"],
[data-agent-launcher] {
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 56px !important;
  height: 56px !important;
}
@media (max-width: 760px) {
  .app-main { padding-bottom: calc(148px + env(safe-area-inset-bottom)); }
  .soulgraph-agent-launcher,
  .agent-popup-launcher,
  [class~="agent-chat-launcher"],
  [data-agent-launcher] {
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: 52px !important;
    height: 52px !important;
  }
}

/* Audited text and controls: the original dark UI shipped secondary copy at
   8–11px and #637087–#77849d on #071327. Keep graph geometry unchanged. */
:root { --muted: #a1afc7; }
.page-heading p,
.report-heading p,
.transit-control-copy p,
.transit-advice-panel > header p,
.transit-advice-copy p,
.transit-disclaimer p,
.phase-analysis-card > p,
.narrative-card p,
.selection-prompt p,
.inspector-disclaimer,
.comparison-chart-head p,
.comparison-insight-list p,
.comparison-formula-notes p,
.report-profile-copy > p,
.report-section-header p {
  color: #abb8cf;
  font-size: 13px !important;
  line-height: 1.55;
}
.panel-header h2,
.compact-panel-header small,
.form-field small,
.switch-row small,
.sheet-note p,
.metric-card > small,
.timeline-copy,
.timeline-label-row small,
.transition-scale-card .timeline-copy strong,
.transition-scale-card .timeline-label-row small,
.dynamics-card-heading small,
.dynamics-legend,
.window-control span,
.formula-legend,
.graph-legend,
.inspector-stats span,
.inspector-stats small,
.route-note,
.selection-method span,
.transit-metrics small,
.transit-fields label,
.transit-hero-copy p,
.comparison-view small,
.combobox-option-copy small,
.table-result-meta,
.full-planet-table th,
.full-planet-table td > small {
  color: #a4b2ca;
  font-size: 12px !important;
  line-height: 1.45;
}
.form-field > label,
.quick-field input,
.quick-field select,
.table-search input,
.full-planet-table td,
.table-planet strong,
.table-planet small,
.transition-change-list li,
.transition-change-list strong,
.comparison-tabs button,
.table-filter-bar button,
.transit-presets button,
.transit-aspect-filters button,
.transit-section-nav a {
  font-size: 13px !important;
}
.quick-field input::placeholder,
.form-field input::placeholder,
.table-search input::placeholder { color: #a0aec5; opacity: 1; }
.app-rail :is(a, button) { color: #abb8cf; font-size: 12px; }
.app-rail :is(a, button).active { color: #f2edff; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #c7baff !important;
  outline-offset: 3px;
}
.page-heading h1:focus:not(:focus-visible) { outline: none; }
.house-system-control select { min-height: 40px; font-size: 13px; }
.cosmogram-header-tools { flex-wrap: wrap; }
.cosmogram-house-notice { overflow-wrap: anywhere; line-height: 1.5; }
.table-empty-state, .transit-error { overflow-wrap: anywhere; }
@media (max-width: 980px) {
  /* At 16px Safari keeps the form at the user's chosen viewport scale. */
  .app-header input,
  .app-header select,
  .parameters-form input:not([type="checkbox"]):not([type="radio"]),
  .parameters-form select,
  #view-root input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  #view-root select,
  #view-root textarea { font-size: 16px !important; }
  .panel-actions button,
  .compact-panel-header :is(a, button),
  .sheet-close,
  .inspector-close,
  .metric-help-toggle { min-width: 44px; min-height: 44px; }
  .cosmogram-label-control button { min-height: 44px; height: 44px; }
  .mobile-more nav a { min-height: 52px; }
  .mobile-bottom-nav :is(a, button) { color: #a6b3ca; }
  .mobile-bottom-nav :is(a, button).active { color: #f4efff; }
}
@media (prefers-reduced-motion: reduce) {
  .route-enter, .nav-switching, .nav-activating { animation: none !important; }
}

.cosmogram-house-notice .ghost-button { display: inline-flex; min-height: 44px; margin: 8px 0 0 12px; padding: 8px 12px; }

/* The embedded conversation uses the same stylesheet as the full agent page.
   Keep its actual text readable at narrow iframe and phone widths. */
.agent-context-copy > p,
.agent-context-copy > span,
.agent-header-new,
.agent-header-new span,
.agent-starters button,
.agent-starters button span,
.agent-jump-bottom {
  font-size: 12px !important;
  line-height: 1.45;
  color: #b7c4da;
}
.agent-context-copy h2 { font-size: 14px !important; }
.agent-chat-empty > p { font-size: 13px !important; line-height: 1.55; color: #aebdd5; }
.agent-starters button { min-height: 56px; padding: 10px 12px; }
.agent-context-copy p { white-space: normal; overflow-wrap: anywhere; }
.agent-conversation-header { min-height: 62px; }

/* The composer can grow past 132px. Keep the jump action inside the message
   grid row instead of at a fixed bottom offset that overlaps multiline input. */
.agent-conversation > .agent-messages { grid-column: 1; }
.agent-conversation > .agent-jump-bottom {
  position: relative;
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  justify-self: center;
  inset: auto;
  transform: none;
  margin: 0 12px 10px;
  max-width: calc(100% - 24px);
  min-height: 44px;
  white-space: normal;
}

/* Orbit lanes are part of the SVG geometry, so the same structure is retained
   in full screen and downloaded images. Color supplements explicit labels. */
.has-orbit-lanes .formula-orbit-lane { pointer-events: none; }
.has-orbit-lanes .orbit-lane-panel {
  fill: #142036;
  stroke: #526279;
  stroke-width: 1;
  stroke-opacity: .64;
  vector-effect: non-scaling-stroke;
}
.has-orbit-lanes .orbit-lane-title {
  fill: #aebdd2;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .055em;
  text-anchor: middle;
}
.has-orbit-lanes .lane-orbit-one .orbit-lane-panel {
  fill: #092b36;
  stroke: #21c5bc;
}
.has-orbit-lanes .lane-orbit-one .orbit-lane-title { fill: #3ce4d1; }
.has-orbit-lanes .lane-orbit-two .orbit-lane-panel {
  fill: #28281f;
  stroke: #d9ac4f;
}
.has-orbit-lanes .lane-orbit-two .orbit-lane-title { fill: #ffd276; }
.has-orbit-lanes .lane-orbit-deep .orbit-lane-panel {
  fill: #10273f;
  stroke: #639fea;
}
.has-orbit-lanes .lane-orbit-deep .orbit-lane-title { fill: #9bc9ff; }
.has-orbit-lanes .lane-orbit-deep[data-orbit="4"] .orbit-lane-panel {
  fill: #242039; stroke: #a983ff;
}
.has-orbit-lanes .lane-orbit-deep[data-orbit="4"] .orbit-lane-title { fill: #c5afff; }
.has-orbit-lanes .lane-orbit-deep[data-orbit="5"] .orbit-lane-panel {
  fill: #30213d; stroke: #d581e8;
}
.has-orbit-lanes .lane-orbit-deep[data-orbit="5"] .orbit-lane-title { fill: #ebb1f8; }
.has-orbit-lanes .lane-orbit-deep[data-orbit="6"] .orbit-lane-panel {
  fill: #322432; stroke: #ed889b;
}
.has-orbit-lanes .lane-orbit-deep[data-orbit="6"] .orbit-lane-title { fill: #ffb0c0; }
.has-orbit-lanes .lane-orbit-deep[data-orbit="7"] .orbit-lane-panel {
  fill: #212f28; stroke: #a2c46e;
}
.has-orbit-lanes .lane-orbit-deep[data-orbit="7"] .orbit-lane-title { fill: #c7e896; }
.has-orbit-lanes .lane-orbit-deep[data-orbit="8"] .orbit-lane-panel,
.has-orbit-lanes .lane-orbit-deep[data-orbit="9"] .orbit-lane-panel {
  fill: #112e3b; stroke: #5ac7e3;
}
.has-orbit-lanes .lane-orbit-deep[data-orbit="8"] .orbit-lane-title,
.has-orbit-lanes .lane-orbit-deep[data-orbit="9"] .orbit-lane-title { fill: #8ce5f7; }
.has-orbit-lanes .lane-center .orbit-lane-panel,
.has-orbit-lanes .lane-own-orbit .orbit-lane-panel {
  fill: #201c40;
  stroke: #a077f3;
}
.has-orbit-lanes .lane-center .orbit-lane-title,
.has-orbit-lanes .lane-own-orbit .orbit-lane-title { fill: #c3a4ff; }
.has-orbit-lanes .lane-rest .orbit-lane-panel { fill: #112e32; stroke: #47c4ae; }
.has-orbit-lanes .lane-rest .orbit-lane-title { fill: #81e3cf; }
.has-orbit-lanes .lane-alienation .orbit-lane-panel { fill: #302335; stroke: #e888a4; }
.has-orbit-lanes .lane-alienation .orbit-lane-title { fill: #ffb3c5; }
.has-orbit-lanes .formula-node .node-surface {
  stroke-opacity: .9;
  vector-effect: non-scaling-stroke;
}
.has-orbit-lanes .formula-node:focus-visible .node-surface {
  stroke: #eee5ff;
  stroke-width: 2.5;
}
.has-orbit-lanes.is-mini .orbit-lane-title {
  font-size: 8px;
  letter-spacing: .025em;
}
.formula-mobile-scroll > .has-orbit-lanes.is-mobile-clarity {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible;
  touch-action: pan-y;
}
.formula-mobile-scroll > .has-orbit-lanes.is-mobile-clarity .component-name { display: none; }
.formula-mobile-scroll > .has-orbit-lanes.is-mobile-clarity .component-kicker {
  font-size: 13px !important;
  letter-spacing: .07em;
}
.formula-mobile-scroll > .has-orbit-lanes.is-mobile-clarity .orbit-lane-title {
  font-size: 12px;
  letter-spacing: .04em;
}
.formula-mobile-scroll > .has-orbit-lanes.is-mobile-clarity .formula-node .node-name {
  font-size: 16px !important;
}
.formula-mobile-scroll > .has-orbit-lanes.is-mobile-clarity .formula-node :is(.node-meta, .node-score, .node-retro) {
  font-size: 12px !important;
}
.formula-mobile-scroll > .has-orbit-lanes.is-mobile-clarity .formula-node .node-glyph {
  font-size: 30px !important;
}
.formula-mobile-scroll > .has-orbit-lanes.is-mobile-clarity .formula-node > :is(text, .node-glyph-disc) {
  transform: translateY(4px);
}
/* A long formula should remain readable in full screen and scroll vertically,
   instead of shrinking every centre into one viewport-height canvas. */
.formula-dashboard-card:fullscreen .dashboard-formula-stage,
.formula-dashboard-card.is-fullscreen-fallback .dashboard-formula-stage {
  height: auto !important;
  min-height: calc(100dvh - 92px) !important;
  align-content: start;
}
.formula-dashboard-card:fullscreen .formula-visual,
.formula-dashboard-card.is-fullscreen-fallback .formula-visual {
  height: auto !important;
}
.formula-dashboard-card:fullscreen .has-orbit-lanes,
.formula-dashboard-card.is-fullscreen-fallback .has-orbit-lanes {
  height: auto !important;
  max-height: none !important;
  aspect-ratio: var(--graph-aspect) !important;
}
.formula-dashboard-card:fullscreen > :is(.compact-panel-header, .panel-header),
.formula-dashboard-card.is-fullscreen-fallback > :is(.compact-panel-header, .panel-header) {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #091529;
}

/* Quiet, flowing connections. The transparent 18px hit path remains generous;
   visible line weight and small markers no longer compete with planet cards. */
.has-orbit-lanes {
  --formula-edge-neutral: #9bafc9;
  --formula-edge-auxiliary: #c58b9f;
  --formula-edge-mutual: #ad8fe5;
}
.has-orbit-lanes .formula-edge {
  stroke-width: 1.45;
  opacity: .78;
  stroke-dasharray: none !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
  animation: none !important;
  transition: stroke 180ms ease, opacity 180ms ease, stroke-width 180ms ease !important;
}
.has-orbit-lanes .formula-edge.edge-mutual,
.has-orbit-lanes .formula-edge.is-mutual {
  stroke-width: 1.65;
  opacity: .86;
}
.has-orbit-lanes .formula-edge.is-auxiliary-pointer {
  stroke-width: 1.35;
  stroke-dasharray: 2 5.5 !important;
  opacity: .76;
}
.has-orbit-lanes .formula-edge.route-active,
.has-orbit-lanes .formula-edge.is-preview,
.has-orbit-lanes .formula-edge.is-hovered,
.has-orbit-lanes .formula-edge-group:hover .formula-edge {
  stroke-width: 2.05;
  opacity: 1;
}
.has-orbit-lanes .formula-edge.route-active {
  filter: drop-shadow(0 0 2px #bca3ef33);
}
.has-orbit-lanes .formula-edge-origin {
  fill: var(--edge-tone);
  stroke: none;
  opacity: .72;
  transition: fill 180ms ease, opacity 180ms ease !important;
}
.has-orbit-lanes .formula-crossing-halo {
  stroke-width: 3.6;
  opacity: .8;
}
.has-orbit-lanes marker path {
  stroke-width: .35;
  stroke-linejoin: round;
}
.has-orbit-lanes.is-mini .formula-edge { stroke-width: 1.25; }
.has-orbit-lanes.is-mini .formula-edge.is-mutual { stroke-width: 1.4; }
.has-orbit-lanes.is-mini .formula-edge.is-auxiliary-pointer {
  stroke-width: 1.15;
  stroke-dasharray: 1.5 4 !important;
}
.has-orbit-lanes.is-mini .formula-edge.route-active,
.has-orbit-lanes.is-mini .formula-edge.is-hovered { stroke-width: 1.8; }
@media (prefers-reduced-motion: reduce) {
  .has-orbit-lanes .formula-edge,
  .has-orbit-lanes .formula-edge-origin { transition: none !important; }
}

/* Cache one star texture instead of repainting twelve radial-gradient fields
   underneath the animated canvas on every frame. Keep the glass surfaces. */
.space-scene { contain: strict; isolation: isolate; }
.space-scene .starfield { inset: 0; transform: translateZ(0); }
.space-scene .starfield::before, .space-scene .starfield::after { content: none; }
.space-scene .starfield-a { background: url('/assets/brand/star-dust.svg') repeat; background-size: 512px 512px; opacity: .6 !important; }
.space-scene .starfield-b { display: none; }
.ambient-effects { mix-blend-mode: normal; transform: translateZ(0); }