/* Shared visual layer: React app, standalone pricing/sign-in and owner area.
   The approved rose-gold artwork stays unchanged; colour never carries status alone. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --wine: #b7cdff; --rose: #a9c4ff; --coral: #efb6a2;
  --blush: #182a4b; --cream: #070c19; --paper: #101c30;
  --ink: #f0f4ff; --muted: #bac8df; --line: rgba(153, 181, 230, .23);
  --shadow: 0 18px 56px rgba(0, 0, 0, .23);
  --royal: #315bd2; --royal-hover: #3c68e1; --royal-soft: #192f57;
  --raised: #16253e; --recessed: #0b1527; --brand-warm: #efbba8;
  --header: rgba(5, 10, 21, .94); --footer: #050a14;
  --page-glow: rgba(32, 66, 158, .57); --edge-glow: rgba(27, 54, 120, .2);
  --bg: var(--cream); --surface: var(--paper); --accent: var(--rose);
  --tint: var(--blush); --check: #9bddbd;
}
:root[data-theme="light"] {
  color-scheme: light;
  --wine: #24438a; --rose: #3055a1; --coral: #8a4937;
  --blush: #e6edf9; --cream: #f2f5fb; --paper: #fcfdff;
  --ink: #17233b; --muted: #52627c; --line: rgba(45, 76, 126, .2);
  --shadow: 0 18px 56px rgba(24, 48, 91, .08);
  --raised: #eaf0fa; --recessed: #f3f6fc; --royal-soft: #e1eafc;
  --brand-warm: #844530; --header: rgba(248, 250, 255, .96); --footer: #080f20;
  --page-glow: rgba(132, 165, 234, .19); --edge-glow: rgba(178, 197, 235, .12);
  --check: #286447;
}
html { background: var(--cream); scroll-padding-top: 112px; }
body {
  min-height: 100vh; color: var(--ink);
  background: radial-gradient(ellipse at 100% 0, var(--page-glow), transparent 46rem),
    radial-gradient(ellipse at 0 65%, var(--edge-glow), transparent 42rem), var(--cream);
}
::selection { color: #fff; background: #315bd2; }
:root[data-theme] :is(a,button,input,select,textarea,summary):focus-visible {
  outline: 3px solid var(--rose); outline-offset: 4px;
}
input,select,textarea { accent-color: var(--royal); }

/* Frame only the heart/DNA part of the approved 512px artwork (x110–402, y8–308). */
.brand-lockup { display: inline-flex; max-width: 100%; vertical-align: middle; }
.cinematic-signature {
  --mark-width: 58px; --name-width: 126px; display: inline-flex; align-items: center;
  gap: 8px; max-width: 100%; vertical-align: middle; text-align: left;
}
.cinematic-mark {
  display: block; position: relative; overflow: hidden; flex: none;
  width: var(--mark-width); aspect-ratio: 292 / 300;
  mask-image: linear-gradient(to right,transparent,#000 10% 90%,transparent),
    linear-gradient(to bottom,transparent,#000 8% 96%,transparent);
  mask-composite: intersect;
}
.cinematic-signature .cinematic-mark > .cinematic-logo {
  display: block; position: absolute; width: 175.343%; height: auto; max-width: none;
  left: -37.671%; top: -2.667%; margin: 0; padding: 0; border: 0; border-radius: 0;
  opacity: 1; filter: none;
}
/* Use the lower, unlettered face of the original plinth beneath the horizontal mark. */
.cinematic-horizontal .cinematic-mark { aspect-ratio: 292 / 328; }
.cinematic-horizontal .cinematic-mark::before {
  content: ""; position: absolute; inset: auto 1% 1%; height: 12%;
  border-radius: 50% / 30%;
  background: #512426 url('/identity/cinematic-512.webp') center 92.5% / 127% 2000% no-repeat;
  box-shadow: inset 0 1px 0 rgba(255,190,143,.6);
}
.cinematic-horizontal .cinematic-mark > .cinematic-logo {
  clip-path: inset(0 0 40.4%);
  mask-image: linear-gradient(to bottom,#000 57.5%,transparent 60%);
}
.cinematic-brand-copy { display: grid; justify-items: start; gap: 3px; min-width: 0; }
/* The original 540 × 150 signature holds the lettering in its rightmost 394px. */
.cinematic-signature .cinematic-wordmark {
  display: block; width: var(--name-width); max-width: 100%; aspect-ratio: 394 / 108;
  background-color: var(--brand-warm,#efbba8);
  mask: url('/identity/copper-name.webp') right center / 137.056% auto no-repeat;
}
.cinematic-motto { color: var(--muted); font: 400 11px/1.4 system-ui,sans-serif; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.cinematic-stacked,.cinematic-emblem { flex-direction: column; gap: 3px; text-align: center; }
:is(.cinematic-stacked,.cinematic-emblem) .cinematic-brand-copy { justify-items: center; }
.cinematic-stacked { --mark-width: 118px; --name-width: 180px; }
.cinematic-stacked .cinematic-motto { font-size: 14px; }
.cinematic-dating { font: 600 9px/1.2 system-ui,sans-serif; color: var(--muted); letter-spacing: .22em; }
.cinematic-emblem { --mark-width: 40px; --name-width: 78px; }
.cinematic-emblem .cinematic-brand-copy { gap: 1px; }
.profile-empty .cinematic-emblem { --mark-width: 70px; --name-width: 110px; }
.brand-lockup:has(> .cinematic-emblem) { flex-shrink: 0; }
:root[data-theme] :is(.topbar,.english-topbar,.public-header,.md-page-header),
:root[data-theme] header.pricing-header {
  color: var(--ink); background: var(--header); border-color: var(--line);
  backdrop-filter: blur(18px); box-shadow: 0 1px 0 rgba(90, 126, 194, .06);
}
:root[data-theme] .topbar { gap: 16px; padding-block: 7px; }
:root[data-theme] [data-public-landing] .session-public-nav {
  position: sticky; top: 0; z-index: 30; max-width: none;
  padding: 7px max(18px,calc((100vw - 1180px)/2));
  background: var(--header); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px);
}
:root[data-theme] .brand-button { background: transparent; }
:root[data-theme] :is(.desktop-nav :is(button,a),.header-action,.header-button) { color: var(--muted); }
:root[data-theme] :is(.desktop-nav :is(button,a).active,.desktop-nav :is(button,a):hover,.header-action:hover) { color: var(--ink); background: var(--royal-soft); }
:root[data-theme] :is(.theme-button,.notification-button,.language-switcher,.button-secondary) { color: var(--rose); background: var(--recessed); border-color: var(--line); }
:root[data-theme] :is(.mobile-nav,.test-user-tabs) { background: var(--header); border-color: var(--line); }
:root[data-theme] .mobile-nav :is(button,a) { color: var(--muted); }
:root[data-theme] .mobile-nav :is(button,a).active { color: var(--ink); background: var(--royal-soft); }
:root[data-theme] .md-page-navigation a:hover,
:root[data-theme] .md-page-navigation a[aria-current="page"] { color: var(--ink); background: var(--royal-soft); }
:root[data-theme] .md-page-navigation :is(summary,details .md-nav-links) { border-color: var(--line); background: var(--paper); }
:root[data-theme] :is(.mobile-header-menu,.mobile-header-links,.mobile-header-pricing) { border-color: var(--line); color: var(--ink); background: var(--paper); }

/* Typography and primary actions. */
:root[data-theme] :is(.hero h1,.pavilion-hero h1,.public-hero h1,.screen-heading h1) { color: var(--ink); }
:root[data-theme] .hero-motto { color: var(--brand-warm); }
:root[data-theme] :is(.pavilion-hero .eyebrow,.pavilion-hero .text-button,.text-button,.eyebrow) { color: var(--rose); }
:root[data-theme] :is(.hero-lead,.card-footnote,.chemistry-row,.trust-strip) { color: var(--muted); }
:root[data-theme] :is(.button-primary,.pavilion-hero .button-primary,.join,#login-submit,.english-header-action) {
  color: #fff; background: var(--royal); border: 1px solid #597bdd;
  box-shadow: 0 8px 25px rgba(16, 38, 102, .22);
}
:root[data-theme] :is(.button-primary,.pavilion-hero .button-primary,.join,#login-submit):hover { background: var(--royal-hover); box-shadow: 0 10px 30px rgba(16, 38, 102, .3); }
:root[data-theme] :is(.status-card,.step-card.featured,.science-card.featured,.lens-grid article.featured,.detail-grid article.featured-detail,.public-callout,.application-callout,.analytic-insight) {
  color: #f0f4ff; background: #152a50; border-color: #486da8;
}
:root[data-theme] :is(.status-card,.public-callout) .button { color: #172b52; background: #f0f4ff; }
:root[data-theme] :is(.avatar-button,.notification-button>span,.offline-banner,.chemistry-core,.step-index,.group-process li>span,.test-user-tabs button.active .test-user-letter,.public-header-action,.dimension-list details[open] summary::after) { color: #fff; background: var(--royal); }
:root[data-theme] .relationship-evaluation-tabs button[aria-selected="true"] { color: #fff; background: var(--royal); }
:root[data-theme] .pavilion-scene { border: 1px solid var(--line); box-shadow: 0 24px 64px rgba(0,0,0,.26); }
:root[data-theme] :is(.launch-countdown,.chemistry-card) { border-color: var(--line); background: var(--paper); box-shadow: var(--shadow); }
:root[data-theme] .launch-countdown-units > * { border: 1px solid var(--line); background: var(--raised); }
:root[data-theme] .launch-countdown-unit { background: var(--raised); }
:root[data-theme] :is(.how,.media-section) { background: var(--recessed); border-color: var(--line); }
:root[data-theme] :is(.step-card,.radio-card,.press-card,.dashboard-card,.test-module,.profile-summary,.account-status-card,.subscription-card,.install-card,.settings-list,.profile-empty,.photo-completion-notice,.demo-match-card,.match-evaluation,.bottom-sheet,.auth-card) {
  background: var(--paper); color: var(--ink); border-color: var(--line);
}
:root[data-theme] :is(.test-module.locked,.match-map,.privacy-summary-list>span,.notification-settings,.notification-item,.notification-empty,.paired-account-status,.pairing-action-card,.pairing-guide-steps section,.payment-confirm-card,.payment-result-card,.ring-factor-label) { background: var(--recessed); }
:root[data-theme] :is(.notice-card,.integration-checks,.registration-consents,.registration-consents .check-row,.legal-facts,.demo-match-notice,.demo-disclaimer,.match-tags span,.chat-demo-note,.message-bubble,.typing-indicator,.sheet-close) { background: var(--raised); }
:root[data-theme] :is(.profile-form label,.profile-form legend,.integration-checks span) { color: var(--ink); }
:root[data-theme] :is(.profile-form input:not([type="radio"]):not([type="checkbox"]),.profile-form select,.research-form input:not([type="checkbox"]),.research-form select,.choice-row label,.pairing-action-card input,.chat-composer input,.auth-card input) { color: var(--ink); background: var(--recessed); border-color: var(--line); }
:root[data-theme] :is(.choice-row label.selected,.test-user-tabs button.active) { color: var(--ink); border-color: var(--rose); background: var(--royal-soft); }
:root[data-theme] :is(.demo-score,.payment-plan-card,.premium-locked-card,.premium-contact-card) { background: var(--raised); border-color: var(--line); }
:root[data-theme] .ring-track { stroke: var(--blush); }
:root[data-theme] .ring-factor-label.active { background: color-mix(in srgb,var(--factor-color) 17%,var(--paper)); }
:root[data-theme] :is(.runner-header,.runner-actions,.analytics-consent,.analytics-settings,.assistant-panel) { color: var(--ink); background: var(--paper); border-color: var(--line); }
:root[data-theme] .assistant-context { background: var(--raised); }
:root[data-theme] :is(.assistant-welcome,.assistant-guide-topic>button[aria-expanded=true]) { color: var(--rose); }
:root[data-theme] .dating-safety-notice { color: var(--ink); background: var(--paper); border-color: var(--line); }
:root[data-theme] :is(.site-footer,.public-footer) { color: #f0f4ff; background: var(--footer); border-top: 1px solid rgba(153,181,230,.2); }
:root[data-theme] :is(.site-footer,.public-footer) .cinematic-wordmark { background-color: #efbba8; }
:root[data-theme] :is(.site-footer,.public-footer) .cinematic-motto { color: #bac8df; margin-top: 0; }

/* Standalone pricing and sign-in share the same public stylesheet. */
:root[data-theme] .pricing-header .cinematic-signature { text-decoration: none; }
:root[data-theme] .pricing-header-inner { min-height: 94px; gap: 16px; }
:root[data-theme] .pricing-page h1 { color: var(--ink); }
:root[data-theme] .pricing-page :is(.free,.term,.premium-features,.verification) { border-color: var(--line); background: var(--paper); box-shadow: var(--shadow); }
:root[data-theme] .pricing-page .best { border-color: #6287ec; background: linear-gradient(150deg,var(--royal-soft),var(--paper)); }
:root[data-theme] .pricing-page .launch { border-color: var(--rose); }
:root[data-theme] .sign-in-page main { background: transparent; }
:root[data-theme] .sign-in-page .brand { width: auto; }
:root[data-theme] .sign-in-page .cinematic-signature { margin: 0 auto; }
:root[data-theme] .policy-page main { color: var(--ink); background: var(--paper); border-color: var(--line); }
:root[data-theme] .policy-page :is(a,.meta) { color: var(--rose); }

@media(min-width:980px) and (max-width:1239px) {
  :root[data-theme] .topbar { gap: 10px; padding-inline: 18px; }
  .topbar .cinematic-motto { display: none; }
  .topbar .cinematic-signature { gap: 3px; }

  .topbar .cinematic-horizontal { --mark-width: 42px; --name-width: 106px; }
}
@media(max-width:749px) {
  html { scroll-padding-top: 150px; }
  .cinematic-signature { gap: 3px; }
  .cinematic-horizontal { --mark-width: 42px; --name-width: 102px; }
  .cinematic-motto { font-size: 9px; }
  .cinematic-stacked { --mark-width: 94px; --name-width: 154px; }
  :root[data-theme] .pricing-header-inner { gap: 10px; }
}
@media(max-width:380px) {
  .topbar .cinematic-horizontal { --mark-width: 36px; --name-width: 89px; }
  .topbar .cinematic-motto { display: none; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
@media print {
  :root, :root[data-theme] { --cream:#fff;--paper:#fff;--ink:#111;--muted:#333;--line:#aaa;--rose:#24438a; }
  body { background:#fff; }
}
