/* Shared visual language for the AstroFace workspace. Geometry and data stay native. */
body.af-refresh {
  --af-bg: #0b0f19;
  --af-surface: #111827;
  --af-surface-raised: #172132;
  --af-line: rgba(172, 184, 207, .14);
  --af-text: #f0f2f8;
  --af-muted: #a1aec3;
  --af-accent: #ae94ed;
  --af-accent-strong: #8063bc;
  --af-accent-soft: rgba(174, 148, 237, .12);
  --bg-0: var(--af-bg);
  --bg-1: #101625;
  --bg-2: var(--af-surface-raised);
  --panel: var(--af-surface);
  --panel-strong: var(--af-surface-raised);
  --panel-soft: #151d2c;
  --line: var(--af-line);
  --line-strong: rgba(174, 148, 237, .3);
  --text: var(--af-text);
  --text-soft: #c1c9d8;
  --muted: var(--af-muted);
  --violet: #9e80d9;
  --violet-2: #c2a8ee;
  --blue: #83a7d1;
  --cyan: #77bacb;
  --gold: #dcb877;
  --radius-lg: 16px;
  --radius-md: 10px;
  background: var(--af-bg);
  color: var(--af-text);
  font-size: 15px;
  line-height: 1.55;
}
.af-refresh .space-scene { background: radial-gradient(ellipse at 82% 0, #8f68c00b, transparent 52%); }
.af-refresh .space-scene > *, .af-refresh #cursor-aura { display: none !important; }
.af-refresh .app-header { background: #0b0f19f5; box-shadow: none; backdrop-filter: none; border-color: var(--af-line); }
.af-refresh .app-rail { background: transparent; border: 0; box-shadow: none; }
.af-refresh .app-main { padding-bottom: 88px; }
.af-refresh :is(.glass-card, .relation-person, .relation-block) {
  background: var(--af-surface);
  border-color: var(--af-line);
  box-shadow: none;
  backdrop-filter: none;
}
.af-refresh :is(.glass-card, .spotlight-card)::before,
.af-refresh :is(.glass-card, .spotlight-card)::after { display: none; }
.af-refresh .brand-artwork::before { display: none; }
.af-refresh .brand-logo-symbol { filter: none; animation: none; }
.af-refresh .page-heading { margin: 8px 0 24px; min-height: 64px; gap: 16px; }
.af-refresh :is(.page-heading h1, .advanced-page-heading h1, .relation-intro h1, .agent-page-heading h1) {
  font-size: clamp(25px, 2vw, 30px) !important; font-weight: 600; line-height: 1.25; letter-spacing: -.035em;
}
.af-refresh .page-heading > div:first-child > span:not(.route-motion-badge),
.af-refresh :is(.relation-eyebrow, .transit-control-kicker),
.af-refresh .agent-page-heading > div:first-child > span,
.af-refresh .agent-history-title > span { display: none; }
.af-refresh .advanced-page-heading > div > span,
.af-refresh .advanced-method-chip,
.af-refresh .advanced-section-title > div > span { display: none; }
.af-refresh .advanced-page-heading { margin: 8px 0 24px; }
.af-refresh .advanced-heading-mark { width: 42px; height: 42px; min-width: 42px; background: var(--af-accent-soft); border: 0; border-radius: 12px; box-shadow: none; color: var(--af-accent); }
.af-refresh .advanced-heading-mark::before,
.af-refresh .advanced-heading-mark::after { display: none; }
.af-refresh .advanced-heading-mark svg { width: 24px; height: 24px; filter: none; }
.af-refresh .advanced-field > span { font-size: 14px; }
.af-refresh .section-mini-title { font-size: 13px; text-transform: none; letter-spacing: 0; }
.af-refresh :is(.page-heading p, .advanced-page-heading p, .relation-intro p, .report-heading p, .transit-control-copy p, .agent-page-heading p) {
  font-size: 14px !important; color: var(--af-muted); line-height: 1.6; margin-top: 6px;
}
.af-refresh :is(.panel-header, .compact-panel-header) { border-bottom-color: var(--af-line); padding: 18px 20px; }
.af-refresh :is(.panel-header h2, .compact-panel-header strong, .compact-panel-header h2) {
  font-size: 15px !important; text-transform: none; letter-spacing: 0; font-weight: 600;
}
.af-refresh :is(.panel-header > div > span, .compact-panel-header small) { font-size: 12px !important; color: var(--af-muted); }
.af-refresh :is(button, input, select, textarea) { font-family: inherit; }
.af-refresh :is(.calculate-button, .relation-submit, .agent-send, .transit-advice-button) {
  background: #8f70c7; color: #fff; border: 1px solid #ad8ce2; box-shadow: none;
  text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; border-radius: 10px;
}
.af-refresh :is(.calculate-button, .relation-submit, .transit-advice-button)::before,
.af-refresh :is(.calculate-button, .relation-submit, .transit-advice-button)::after { display: none; }
.af-refresh :is(.calculate-button, .relation-submit, .transit-advice-button):hover { background: #9b7dd3; box-shadow: none; transform: none; }
.af-refresh :is(.ghost-button, .header-icon, .panel-actions button, .table-actions button, .table-filter-bar button, .transit-presets button, .transit-aspect-filters button) {
  background: transparent; border-color: var(--af-line); box-shadow: none; color: #bdc7d7;
  font-size: 13px !important; border-radius: 9px;
}
.af-refresh :is(.table-filter-bar button, .transit-aspect-filters button).active,
.af-refresh .segmented-control button.active { background: var(--af-accent-soft); color: #d8c9f7; border-color: #ae94ed55; box-shadow: none; }
.af-refresh :is(.segmented-control, .cosmogram-label-control) { box-shadow: none; background: #0b111d; border-color: var(--af-line); }
.af-refresh :is(.segmented-control button, .transit-section-nav a) { font-size: 13px !important; }
.af-refresh :is(.form-field, .relation-field) > :is(span, label), .af-refresh .transit-fields label {
  font-size: 14px !important; font-weight: 500; color: #bdc7d7;
}
.af-refresh :is(.parameters-form, .relation-fields, .comparison-form) :is(input, select, textarea),
.af-refresh .transit-fields :is(input, select) {
  font-size: 15px !important; background: #0e1421; border-color: #a6b5d02b; border-radius: 9px;
  min-height: 46px; color: var(--af-text); box-shadow: none;
}
.af-refresh :is(.form-field small, .relation-place > small, .sheet-note p, .location-attribution) {
  font-size: 12px !important; line-height: 1.6; color: var(--af-muted);
}
.af-refresh .parameters-sheet { background: var(--af-surface); border-color: var(--af-line); box-shadow: none; border-radius: 18px; }
.af-refresh .sheet-header { border-color: var(--af-line); }
.af-refresh .sheet-header h1 { font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.af-refresh .sheet-header > div > span { display: none; }
.af-refresh .sheet-note { background: transparent; border: 0; border-top: 1px solid var(--af-line); border-radius: 0; padding: 18px 0 0; }
.af-refresh .sheet-note > span { display: none; }
.af-refresh .sheet-actions { border-top: 1px solid var(--af-line); padding-top: 20px; }
.af-refresh .sheet-close { background: transparent; border-color: var(--af-line); }
.af-refresh .metric-card { background: transparent; box-shadow: none; border-color: var(--af-line); }
.af-refresh .metric-card::before, .af-refresh .metric-card::after { display: none; }
.af-refresh .metric-card > strong { font-size: 29px; font-weight: 550; }
.af-refresh :is(.metric-card > small, .metric-card-head > span) { font-size: 12px !important; color: var(--af-muted); }
.af-refresh .metric-help-toggle { background: transparent; border: 0; box-shadow: none; }
.af-refresh .full-planet-table { font-size: 14px; }
.af-refresh .full-planet-table th { text-transform: none; letter-spacing: 0; font-size: 12px !important; color: var(--af-muted); font-weight: 500; }
.af-refresh .full-planet-table td { font-size: 14px !important; border-color: var(--af-line); }
.af-refresh .table-planet strong { font-size: 14px; }
.af-refresh .table-planet small { font-size: 12px; color: var(--af-muted); }
.af-refresh .table-metric-ribbon { gap: 0; border-bottom: 1px solid var(--af-line); margin-bottom: 20px; }
.af-refresh .table-metric-ribbon > * { background: transparent; border: 0; border-right: 1px solid var(--af-line); border-radius: 0; box-shadow: none; }
.af-refresh .table-metric-ribbon > :last-child { border-right: 0; }
.af-refresh .table-metric-ribbon > *::after { display: none; }
.af-refresh .table-page-toolbar { padding: 20px; }
.af-refresh .table-search { background: #0e1421; border-color: var(--af-line); }
.af-refresh .table-search input { font-size: 14px !important; }
.af-refresh .table-result-meta { font-size: 12px !important; color: var(--af-muted); }
.af-refresh .inspector-stats { gap: 0; }
.af-refresh .inspector-stats > div { background: transparent; border: 0; border-bottom: 1px solid var(--af-line); border-radius: 0; padding: 14px 8px 14px 0; }
.af-refresh .inspector-section { background: transparent; border: 0; border-top: 1px solid var(--af-line); border-radius: 0; padding: 18px 0; }
.af-refresh .inspector-section :is(p, li), .af-refresh .route-note { font-size: 13px !important; line-height: 1.7; color: #bcc6d6; }
.af-refresh .inspector-section h4, .af-refresh .inspector-section > header { font-size: 13px; text-transform: none; letter-spacing: 0; }
.af-refresh .inspector-stats :is(span, small) { font-size: 12px !important; }
.af-refresh .inspector-stats strong { font-size: 14px; }
.af-refresh :is(.inspector-reference, .inspector-ai-meaning) { box-shadow: none; }
.af-refresh .agent-shell { gap: 20px; }
.af-refresh .agent-history { background: transparent; border: 0; border-right: 1px solid var(--af-line); border-radius: 0; }
.af-refresh .agent-page-heading { margin-bottom: 20px; }
.af-refresh .agent-history-search input,
.af-refresh .agent-history-empty strong { font-size: 13px; }
.af-refresh .agent-history-empty p { font-size: 12px; }
.af-refresh .agent-conversation { background: var(--af-surface); }
.af-refresh .agent-conversation-header { border-color: var(--af-line); }
.af-refresh .agent-chat-empty h2 { font-size: clamp(24px, 3vw, 38px); font-weight: 500; letter-spacing: -.03em; }
.af-refresh .agent-chat-empty p { font-size: 14px; line-height: 1.7; color: var(--af-muted); }
.af-refresh .agent-starters button { background: transparent; border-color: var(--af-line); box-shadow: none; font-size: 13px; }
.af-refresh .agent-starters button:hover { background: var(--af-accent-soft); border-color: #ae94ed55; }
.af-refresh .agent-message-text { font-size: 15px; line-height: 1.8; }
.af-refresh .agent-composer { border-color: var(--af-line); }
.af-refresh .agent-composer textarea { font-size: 15px; background: #0e1421; border-color: var(--af-line); }
.af-refresh .report-start { min-height: 300px; background: linear-gradient(120deg, #1a1c30, var(--af-surface) 70%); }
.af-refresh .report-start-copy h2 { font-size: clamp(30px, 3.8vw, 48px); font-weight: 400; }
.af-refresh :is(.report-start-copy p, .report-paragraph p, .report-section-header p) { font-size: 15px !important; line-height: 1.8; }
.af-refresh :is(.transit-hero, .transit-advice-panel, .transit-control-card, .transit-empty) { box-shadow: none; background: var(--af-surface); }
.af-refresh :is(.transit-advice-grid > *, .transit-advice-preview > *) { box-shadow: none; border-color: var(--af-line); background: transparent; }
.af-refresh :is(.transit-advice-panel > header p, .transit-advice-copy p) { font-size: 14px !important; }
.af-refresh :is(.transit-section-nav, .dynamics-top-controls) { background: transparent; box-shadow: none; border-color: var(--af-line); }
.af-refresh :is(.dynamics-card, .transition-scale-card, .comparison-chart-card) { box-shadow: none; background: var(--af-surface); border-color: var(--af-line); }
.af-refresh :is(.dynamics-card-heading h2, .dynamics-card-heading h3) { font-size: 16px; text-transform: none; letter-spacing: 0; }
.af-refresh .relation-person { border-radius: 16px; }
.af-refresh .relation-person h2 { font-size: 20px; font-weight: 600; }
.af-refresh .relation-letter { background: var(--af-accent-soft); border: 0; border-radius: 10px; color: var(--af-accent); }
.af-refresh .relation-use-current { font-size: 13px; color: #cab4f3; }
.af-refresh .relation-types label > span { background: var(--af-surface); border-color: var(--af-line); box-shadow: none; }
.af-refresh .relation-types label strong { font-size: 14px; }
.af-refresh .relation-types label small { font-size: 12px; color: var(--af-muted); }
.af-refresh .relation-types input:checked + span { background: var(--af-accent-soft); border-color: var(--af-accent); box-shadow: none; }
.af-refresh .relation-submit { min-height: 50px; border-radius: 10px; font-size: 15px; }
.af-refresh .relation-result-heading h2 { font-weight: 500; }
.af-refresh .empty-state h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 500; letter-spacing: -.045em; }
.af-refresh .empty-state p { color: var(--af-muted); font-size: 15px; line-height: 1.7; }
.af-refresh .route-motion-badge.af-line-icon {
  width: 42px; height: 42px; min-width: 42px; margin-right: 14px; border-radius: 12px;
  background: var(--af-accent-soft); color: var(--af-accent); border: 0; box-shadow: none; filter: none;
  display: inline-grid; place-items: center; animation: none !important; transform: none !important;
}
.af-refresh .route-motion-badge.af-line-icon :is(img, .motion-ring),
.af-refresh .route-motion-badge.af-line-icon::before, .af-refresh .route-motion-badge.af-line-icon::after { display: none; }
.af-refresh .route-motion-badge.af-line-icon > svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.af-refresh .af-motion-control { font: inherit; font-size: 13px; color: var(--af-muted); border: 0; background: transparent; padding: 12px; text-align: left; cursor: pointer; border-radius: 9px; display: flex; align-items: center; gap: 10px; }
.af-refresh .af-motion-control:hover { color: var(--af-text); background: #ffffff05; }
.af-refresh .af-motion-control svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; flex-shrink: 0; }
.af-refresh .af-motion-control[aria-pressed="true"] { color: var(--af-accent); }
/* Quiet graph surfaces; retain semantic hues, arrow markers and native geometry. */
.af-refresh .formula-svg .component-panel { fill: transparent; stroke: #a8b6cd25; }
.af-refresh .formula-svg .component-header-band { opacity: .35; }
.af-refresh .formula-svg :is(.component-glow, .node-sheen, .node-shadow) { display: none; }
.af-refresh .formula-svg :is(.lane-panel, .orbit-lane-bg, .zone-panel) { fill-opacity: .3; stroke-opacity: .3; }
.af-refresh .formula-svg .orbit-lane-panel { fill-opacity: .24; stroke-opacity: .3; }
.af-refresh .formula-dashboard-card .panel-header > div > span { display: none; }
.af-refresh .formula-node .node-surface { fill: #151e2e; stroke-opacity: .65; }
.af-refresh .formula-node.selected .node-surface,
.af-refresh .formula-node:focus-visible .node-surface { stroke: #d0b8ff; stroke-width: 2; fill: #27213b; stroke-opacity: 1; }
.af-refresh .formula-node .node-name { fill: #f0f2f8; font-weight: 550; }
.af-refresh .formula-node .node-meta { fill: #a7b4c9; }
.af-refresh .cosmogram-svg .cosmo-planet-disc { filter: none; }
.af-refresh .cosmogram-svg .cosmo-planet.selected .cosmo-planet-disc { stroke: #d0b8ff; }
/* Stop decorative loops, then opt into short, meaningful entrances. */
.af-refresh :is(.space-scene, .brand-artwork, .route-motion-badge, .formula-svg, .cosmogram-svg, .empty-orbit, .agent-empty-orbit, .report-start-visual, .report-profile-visual, .transit-hero-orbit) *,
.af-refresh :is(.space-scene, .brand-artwork, .route-motion-badge)::before,
.af-refresh :is(.space-scene, .brand-artwork, .route-motion-badge)::after { animation: none !important; }
.af-refresh .app-rail .active .rail-icon :is(svg, svg > *) { animation: none !important; }
.af-refresh .app-rail .active .rail-icon svg > * { stroke-dasharray: none; stroke-dashoffset: 0; }
.af-refresh .app-rail :is(a, button).active { background: var(--af-accent-soft); border-color: transparent; box-shadow: none; color: #dbcaf7; }
.af-refresh .app-rail :is(a, button).active::before { display: none; }
.af-refresh .app-rail :is(a, button).active .rail-icon { background: none; border-color: transparent; box-shadow: none; }
@media (min-width: 981px) {
  body.af-refresh.af-workspace-shell .app-header > .brand { width: 160px !important; min-width: 160px !important; flex: 0 0 160px !important; justify-content: flex-start; gap: 10px; }
  body.af-refresh.af-workspace-shell .app-header .brand-artwork { width: 40px; height: 40px; flex: 0 0 40px; }
  .af-refresh .app-header .brand::after { content: 'AstroFace'; font-size: 17px; letter-spacing: -.035em; color: #ede8f7; font-weight: 650; }
  body.af-refresh.af-workspace-panel-open .cosmogram-page-grid { grid-template-columns: minmax(0, 1fr); }
}
.af-refresh .formula-svg .formula-edge.route-active { stroke: #c8b0f0; filter: none; transition: stroke 180ms ease, opacity 180ms ease; }
@keyframes af-link-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion-paused="true"]) .af-refresh .motion-enter .formula-svg .formula-edge-group,
  html:not([data-motion-paused="true"]) .af-refresh .motion-enter .cosmogram-svg .cosmo-aspect {
    animation: af-link-reveal 420ms ease-out both !important;
    animation-delay: calc(min(var(--motion-index, 0), 8) * 22ms) !important;
  }
}
html[data-motion-paused="true"] .af-refresh *,
html[data-motion-paused="true"] .af-refresh *::before,
html[data-motion-paused="true"] .af-refresh *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .af-refresh *, .af-refresh *::before, .af-refresh *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (max-width: 980px) {
  .af-refresh :is(.parameters-form, .relation-fields, .comparison-form, .transit-fields) :is(input, select, textarea) { font-size: 16px !important; }
  .af-refresh .page-heading { margin-bottom: 18px; }}
@media (max-width: 760px) {
  .af-refresh .app-main { padding-bottom: 150px; }
  .af-refresh .page-heading h1 { font-size: 24px !important; }
  .af-refresh .page-heading p { font-size: 13px !important; }
  .af-refresh .page-heading { gap: 10px; }
  .af-refresh .route-motion-badge.af-line-icon { width: 34px; height: 34px; min-width: 34px; margin-right: 10px; }
  .af-refresh .table-metric-ribbon { gap: 8px; }
  .af-refresh .table-metric-ribbon > * { border-right: 0; }
  .af-refresh .agent-shell { gap: 0; }
  .af-refresh .parameters-sheet { border-radius: 16px 16px 0 0; }
  .af-refresh .sheet-header h1 { font-size: 24px; }
}
@media print {
  .af-refresh { background: white; color: black; }
  .af-refresh .af-motion-control { display: none; }
}