:root {
  --cm-page: #f7f6f2;
  --cm-surface: #ffffff;
  --cm-surface-soft: #f0f1ee;
  --cm-surface-muted: #e7e9e7;
  --cm-ink: #172033;
  --cm-muted: #5f6878;
  --cm-subtle: #667180;
  --cm-line: #d8dcd9;
  --cm-line-strong: #bec6cb;
  --cm-blue: #2563eb;
  --cm-blue-hover: #1d4ed8;
  --cm-cyan: #087f9b;
  --cm-cyan-soft: #e5f7fa;
  --cm-shadow: 0 18px 55px rgba(51, 65, 85, 0.11), 0 2px 7px rgba(51, 65, 85, 0.06);
  --page-title-size: calc(3rem - 1pt);
  --page-title-mobile-size: 2.25rem;
  --page-title-line-height: 1.18;
}

html:not([data-theme="dark"]) {
  background: var(--cm-page);
}

html:not([data-theme="dark"]) body {
  background-color: var(--cm-page) !important;
  background-image: radial-gradient(circle at 78% 10%, rgba(96, 165, 250, 0.11), transparent 30rem);
  color: var(--cm-ink) !important;
}

html:not([data-theme="dark"]) header {
  border-color: rgba(216, 220, 217, 0.9) !important;
  background-color: rgba(247, 246, 242, 0.92) !important;
  backdrop-filter: blur(16px);
}

html:not([data-theme="dark"]) .theme-logo {
  display: block;
  width: auto;
  object-fit: contain;
}

html:not([data-theme="dark"]) .bg-transparent { background-color: transparent !important; }
html:not([data-theme="dark"]) .bg-black { background-color: #172033 !important; }

html:not([data-theme="dark"]) .bg-slate-950,
html:not([data-theme="dark"]) .bg-slate-950\/95 { background-color: rgba(247, 246, 242, 0.95) !important; }
html:not([data-theme="dark"]) .bg-slate-950\/85 { background-color: rgba(23, 32, 51, 0.42) !important; }
html:not([data-theme="dark"]) .bg-slate-950\/80,
html:not([data-theme="dark"]) .bg-slate-950\/35 { background-color: rgba(247, 246, 242, 0.78) !important; }
html:not([data-theme="dark"]) .bg-slate-900,
html:not([data-theme="dark"]) .bg-slate-900\/70,
html:not([data-theme="dark"]) .bg-slate-900\/60,
html:not([data-theme="dark"]) .bg-slate-900\/50 { background-color: rgba(255, 255, 255, 0.94) !important; }
html:not([data-theme="dark"]) .bg-slate-800 { background-color: #eef1f2 !important; }
html:not([data-theme="dark"]) .bg-slate-700 { background-color: #dce2e5 !important; }
html:not([data-theme="dark"]) .bg-slate-600 { background-color: #c9d1d5 !important; }

html:not([data-theme="dark"]) .bg-gray-900,
html:not([data-theme="dark"]) .bg-gray-900\/40 { background-color: rgba(241, 242, 239, 0.95) !important; }
html:not([data-theme="dark"]) .bg-gray-800 { background-color: #e7ebed !important; }
html:not([data-theme="dark"]) .bg-gray-700 { background-color: #edf0f1 !important; }
html:not([data-theme="dark"]) .bg-gray-600 { background-color: #dce2e5 !important; }

html:not([data-theme="dark"]) .bg-cyan-950\/30,
html:not([data-theme="dark"]) .bg-cyan-950\/20 { background-color: rgba(207, 244, 249, 0.55) !important; }
html:not([data-theme="dark"]) .bg-blue-950\/40,
html:not([data-theme="dark"]) .bg-blue-950\/30 { background-color: rgba(219, 234, 254, 0.62) !important; }
html:not([data-theme="dark"]) .bg-sky-950\/30 { background-color: rgba(224, 242, 254, 0.7) !important; }
html:not([data-theme="dark"]) .bg-violet-950\/30,
html:not([data-theme="dark"]) .bg-violet-950\/20 { background-color: rgba(237, 233, 254, 0.64) !important; }
html:not([data-theme="dark"]) .bg-emerald-950\/40,
html:not([data-theme="dark"]) .bg-emerald-950\/30,
html:not([data-theme="dark"]) .bg-emerald-950\/20 { background-color: rgba(209, 250, 229, 0.58) !important; }
html:not([data-theme="dark"]) .bg-amber-950\/30,
html:not([data-theme="dark"]) .bg-yellow-950\/20 { background-color: rgba(254, 243, 199, 0.55) !important; }
html:not([data-theme="dark"]) .bg-fuchsia-950\/30 { background-color: rgba(250, 232, 255, 0.58) !important; }
html:not([data-theme="dark"]) .bg-orange-950\/20 { background-color: rgba(255, 237, 213, 0.6) !important; }
html:not([data-theme="dark"]) .bg-red-950\/40 { background-color: rgba(254, 226, 226, 0.68) !important; }

html:not([data-theme="dark"]) .text-white,
html:not([data-theme="dark"]) .text-slate-100 { color: var(--cm-ink) !important; }
html:not([data-theme="dark"]) .text-slate-200,
html:not([data-theme="dark"]) .text-slate-300,
html:not([data-theme="dark"]) .text-gray-100,
html:not([data-theme="dark"]) .text-gray-200,
html:not([data-theme="dark"]) .text-gray-300 { color: #465164 !important; }
html:not([data-theme="dark"]) .text-slate-400,
html:not([data-theme="dark"]) .text-gray-400 { color: var(--cm-muted) !important; }
html:not([data-theme="dark"]) .text-slate-500,
html:not([data-theme="dark"]) .text-gray-500 { color: var(--cm-subtle) !important; }
html:not([data-theme="dark"]) .text-cyan-100,
html:not([data-theme="dark"]) .text-cyan-100\/70,
html:not([data-theme="dark"]) .text-cyan-100\/80,
html:not([data-theme="dark"]) .text-cyan-200,
html:not([data-theme="dark"]) .text-cyan-300 { color: #086b82 !important; }
html:not([data-theme="dark"]) .text-blue-100,
html:not([data-theme="dark"]) .text-blue-200,
html:not([data-theme="dark"]) .text-blue-300,
html:not([data-theme="dark"]) .text-blue-400 { color: #1d4ed8 !important; }
html:not([data-theme="dark"]) .text-violet-100,
html:not([data-theme="dark"]) .text-violet-200,
html:not([data-theme="dark"]) .text-violet-300 { color: #6d28d9 !important; }
html:not([data-theme="dark"]) .text-emerald-100,
html:not([data-theme="dark"]) .text-emerald-200,
html:not([data-theme="dark"]) .text-emerald-300,
html:not([data-theme="dark"]) .text-green-400 { color: #047857 !important; }
html:not([data-theme="dark"]) .text-amber-100,
html:not([data-theme="dark"]) .text-amber-200,
html:not([data-theme="dark"]) .text-yellow-100,
html:not([data-theme="dark"]) .text-yellow-200 { color: #92400e !important; }
html:not([data-theme="dark"]) .text-fuchsia-100,
html:not([data-theme="dark"]) .text-fuchsia-200 { color: #a21caf !important; }
html:not([data-theme="dark"]) .text-orange-100,
html:not([data-theme="dark"]) .text-orange-200 { color: #c2410c !important; }
html:not([data-theme="dark"]) .text-sky-100\/80,
html:not([data-theme="dark"]) .text-sky-200,
html:not([data-theme="dark"]) .text-sky-300 { color: #0369a1 !important; }
html:not([data-theme="dark"]) .text-red-200,
html:not([data-theme="dark"]) .text-red-300,
html:not([data-theme="dark"]) .text-red-400 { color: #b91c1c !important; }

html:not([data-theme="dark"]) .bg-blue-500.text-white,
html:not([data-theme="dark"]) .bg-blue-600.text-white,
html:not([data-theme="dark"]) .bg-blue-700.text-white,
html:not([data-theme="dark"]) .bg-cyan-500.text-white,
html:not([data-theme="dark"]) .bg-cyan-600.text-white,
html:not([data-theme="dark"]) .bg-cyan-700.text-white,
html:not([data-theme="dark"]) .bg-red-600.text-white,
html:not([data-theme="dark"]) .upload-button,
html:not([data-theme="dark"]) button.bg-blue-600,
html:not([data-theme="dark"]) button.bg-cyan-600,
html:not([data-theme="dark"]) button.bg-cyan-700,
html:not([data-theme="dark"]) button.bg-red-600,
html:not([data-theme="dark"]) a.bg-blue-600,
html:not([data-theme="dark"]) a.bg-cyan-600,
html:not([data-theme="dark"]) a.bg-red-600 { color: #fff !important; }

html:not([data-theme="dark"]) .border-slate-800,
html:not([data-theme="dark"]) .border-slate-700,
html:not([data-theme="dark"]) .border-slate-700\/80,
html:not([data-theme="dark"]) .border-slate-600,
html:not([data-theme="dark"]) .border-gray-700,
html:not([data-theme="dark"]) .border-gray-600 { border-color: var(--cm-line) !important; }
html:not([data-theme="dark"]) .border-slate-500 { border-color: var(--cm-line-strong) !important; }
html:not([data-theme="dark"]) .border-cyan-300\/60,
html:not([data-theme="dark"]) .border-cyan-400,
html:not([data-theme="dark"]) .border-cyan-400\/20,
html:not([data-theme="dark"]) .border-cyan-400\/30,
html:not([data-theme="dark"]) .border-cyan-400\/40,
html:not([data-theme="dark"]) .border-cyan-500\/20,
html:not([data-theme="dark"]) .border-cyan-500\/40 { border-color: rgba(8, 127, 155, 0.42) !important; }
html:not([data-theme="dark"]) .border-blue-400\/25,
html:not([data-theme="dark"]) .border-blue-500\/20,
html:not([data-theme="dark"]) .border-blue-500\/40 { border-color: rgba(37, 99, 235, 0.35) !important; }

html:not([data-theme="dark"]) .from-cyan-950\/80,
html:not([data-theme="dark"]) .from-cyan-950\/70 { --tw-gradient-from: rgba(207, 244, 249, 0.86) var(--tw-gradient-from-position) !important; --tw-gradient-to: rgba(207, 244, 249, 0) var(--tw-gradient-to-position) !important; }
html:not([data-theme="dark"]) .via-blue-950\/70 { --tw-gradient-to: rgba(219, 234, 254, 0) var(--tw-gradient-to-position) !important; --tw-gradient-stops: var(--tw-gradient-from), rgba(219, 234, 254, 0.78) var(--tw-gradient-via-position), var(--tw-gradient-to) !important; }
html:not([data-theme="dark"]) .to-blue-950\/50 { --tw-gradient-to: rgba(219, 234, 254, 0.72) var(--tw-gradient-to-position) !important; }
html:not([data-theme="dark"]) .from-amber-950\/50 { --tw-gradient-from: rgba(254, 243, 199, 0.82) var(--tw-gradient-from-position) !important; --tw-gradient-to: rgba(254, 243, 199, 0) var(--tw-gradient-to-position) !important; }
html:not([data-theme="dark"]) .to-violet-950\/40,
html:not([data-theme="dark"]) .to-violet-950\/60 { --tw-gradient-to: rgba(237, 233, 254, 0.72) var(--tw-gradient-to-position) !important; }

/* Dashboard account allowance: keep the dark treatment intact and use a
   restrained CatMind surface in the light theme. */
html:not([data-theme="dark"]) #accessCard {
  background: linear-gradient(120deg, #f2fafb 0%, #e8f4f7 48%, #e3edf9 100%) !important;
  border-color: rgba(8, 127, 155, 0.3) !important;
  box-shadow: 0 16px 38px rgba(51, 65, 85, 0.1), 0 2px 6px rgba(8, 127, 155, 0.08) !important;
}

html:not([data-theme="dark"]) #accessCard #accessLabel { color: #066b82 !important; }
html:not([data-theme="dark"]) #accessCard #accessSummary { color: var(--cm-ink) !important; }
html:not([data-theme="dark"]) #accessCard #accessDetails { color: #4d6071 !important; }
html:not([data-theme="dark"]) #accessCard #plansLink {
  color: #075f75 !important;
  border-color: rgba(8, 127, 155, 0.32) !important;
  background: rgba(255, 255, 255, 0.62) !important;
}
html:not([data-theme="dark"]) #accessCard #plansLink:hover { background: #fff !important; }

/* Plans account summary: align it with the light page surfaces instead of
   leaving the dark-theme cyan fill visible. */
html:not([data-theme="dark"]) #currentAccess {
  background: linear-gradient(120deg, #f7fbfb 0%, #eef7f8 52%, #edf3fa 100%) !important;
  border-color: rgba(8, 127, 155, 0.24) !important;
  box-shadow: 0 14px 34px rgba(51, 65, 85, 0.08), 0 2px 5px rgba(8, 127, 155, 0.06) !important;
}

html:not([data-theme="dark"]) input:not([type="checkbox"]):not([type="file"]),
html:not([data-theme="dark"]) select,
html:not([data-theme="dark"]) textarea {
  color: var(--cm-ink) !important;
  border-color: var(--cm-line-strong) !important;
  background-color: #fff !important;
}

html:not([data-theme="dark"]) input::placeholder,
html:not([data-theme="dark"]) textarea::placeholder { color: #818a98; }

html:not([data-theme="dark"]) .file\:text-white::file-selector-button { color: #fff !important; }
html:not([data-theme="dark"]) .file\:bg-blue-600::file-selector-button { background: var(--cm-blue) !important; }

html:not([data-theme="dark"]) .hover\:bg-slate-800:hover,
html:not([data-theme="dark"]) .hover\:bg-slate-600:hover { background-color: #e3e8ea !important; }
html:not([data-theme="dark"]) .hover\:text-white:hover { color: var(--cm-ink) !important; }
html:not([data-theme="dark"]) .hover\:text-gray-300:hover { color: #334155 !important; }
html:not([data-theme="dark"]) .hover\:border-slate-500:hover { border-color: #94a3b8 !important; }

/* Authenticated plan selection: keep the featured plan readable in both themes. */
.plans-featured-card {
  background: linear-gradient(145deg, #155e75 0%, #1e3a8a 54%, #1e293b 100%);
  color: #fff;
}

html:not([data-theme="dark"]) .plans-featured-card {
  border-color: rgba(8, 145, 178, 0.48) !important;
  background: linear-gradient(145deg, #dff7fb 0%, #e7efff 55%, #f8fafc 100%);
  color: var(--cm-ink);
}

html:not([data-theme="dark"]) .shadow-cyan-950\/40,
html:not([data-theme="dark"]) .shadow-cyan-950\/30,
html:not([data-theme="dark"]) .shadow-blue-950\/40,
html:not([data-theme="dark"]) .shadow-amber-950\/50,
html:not([data-theme="dark"]) .shadow-amber-950\/20 { --tw-shadow-color: rgba(51, 65, 85, 0.14) !important; }

html:not([data-theme="dark"]) .light-card,
html:not([data-theme="dark"]) .auth-card {
  border: 1px solid var(--cm-line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--cm-shadow);
}

html:not([data-theme="dark"]) .light-card { padding: 0.45rem; }

html:not([data-theme="dark"]) .auth-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  padding: 1.25rem;
}

html:not([data-theme="dark"]) .auth-page main {
  width: 100%;
  border-radius: 1.25rem;
}

html:not([data-theme="dark"]) .auth-page input:not([type="checkbox"]):not([type="file"]) {
  border: 1px solid #aeb8bd !important;
  background-color: #f0f3f2 !important;
  box-shadow: inset 0 1px 2px rgba(51, 65, 85, 0.08);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

html:not([data-theme="dark"]) .auth-page input:not([type="checkbox"]):not([type="file"]):hover {
  border-color: #87949c !important;
  background-color: #edf2f3 !important;
}

html:not([data-theme="dark"]) .auth-page input:not([type="checkbox"]):not([type="file"]):focus {
  border-color: #0ea5e9 !important;
  background-color: #f0f9ff !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18), inset 0 1px 2px rgba(51, 65, 85, 0.05);
  outline: none;
}

html:not([data-theme="dark"]) .auth-page input:-webkit-autofill {
  -webkit-text-fill-color: var(--cm-ink);
  box-shadow: 0 0 0 1000px #f0f9ff inset;
}

html:not([data-theme="dark"]) .science-stage {
  background-color: #e8eeee !important;
  background-image:
    linear-gradient(rgba(8, 127, 155, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 127, 155, 0.10) 1px, transparent 1px) !important;
  color: var(--cm-ink) !important;
}

html:not([data-theme="dark"]) .science-stage::after {
  background: linear-gradient(180deg, transparent 0%, rgba(8, 127, 155, 0.09) 48%, transparent 52%) !important;
}

html:not([data-theme="dark"]) .science-stage .bg-black,
html:not([data-theme="dark"]) .science-stage [data-frame-canvas] {
  background-color: #e8eeee !important;
}

html:not([data-theme="dark"]) .science-stage .text-white,
html:not([data-theme="dark"]) .science-stage .text-slate-200,
html:not([data-theme="dark"]) .science-stage .text-slate-300 { color: var(--cm-ink) !important; }

html:not([data-theme="dark"]) .insight-visualization {
  border-color: rgba(8, 127, 155, 0.32) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 14px 38px rgba(51, 65, 85, 0.10) !important;
}

html:not([data-theme="dark"]) .insight-visualization > :first-child,
html:not([data-theme="dark"]) .insight-visualization > :last-child {
  background-color: #f4f7f6;
}

html:not([data-theme="dark"]) .science-layer-toggle {
  border-color: #aab7bd;
  color: #475569;
  background: rgba(255, 255, 255, 0.82);
}

html:not([data-theme="dark"]) .science-layer-toggle[aria-pressed="true"] {
  border-color: #0891b2;
  color: #075d72;
  background: #e2f4f7;
}

html:not([data-theme="dark"]) .frame-fullscreen-dialog {
  background: #e8eeee;
  color: var(--cm-ink);
}

html:not([data-theme="dark"]) .release-state {
  border-color: rgba(8, 127, 155, 0.28);
  background: #f2f7f7;
}

html:not([data-theme="dark"]) .history-card {
  border-color: #cbd5d9;
  background: rgba(255, 255, 255, 0.94) !important;
}

html:not([data-theme="dark"]) .history-card.is-selected {
  border-color: #0891b2;
  background: #edf8fa !important;
}

/* Personal history remains prominent in light mode without becoming a dark
   island. Scope this override because its Tailwind gradient starts from the
   dark-theme slate colour. */
html:not([data-theme="dark"]) #behaviorOverview {
  border-color: rgba(112, 98, 184, 0.34) !important;
  background:
    linear-gradient(135deg, #fbfaff 0%, #f4f1fb 48%, #edf7f8 100%) !important;
  box-shadow:
    inset 4px 0 0 rgba(112, 98, 184, 0.48),
    0 16px 40px rgba(51, 65, 85, 0.09) !important;
}

html:not([data-theme="dark"]) #behaviorOverviewContent > .grid > div {
  border-color: rgba(112, 98, 184, 0.22) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: 0 2px 8px rgba(51, 65, 85, 0.04);
}

html:not([data-theme="dark"]) #behaviorOverviewContent {
  border-color: rgba(112, 98, 184, 0.22) !important;
}

html:not([data-theme="dark"]) #behaviorOverview #compareEpisodesBtn {
  border-color: rgba(8, 127, 155, 0.42) !important;
  background: rgba(255, 255, 255, 0.72);
  color: #086b82 !important;
}

html:not([data-theme="dark"]) #behaviorOverview #compareEpisodesBtn:hover {
  background: #e5f7fa !important;
}

html:not([data-theme="dark"]) #monthlyBehaviorSummary {
  border-color: rgba(8, 127, 155, 0.28) !important;
  background: rgba(229, 247, 250, 0.78) !important;
}

html:not([data-theme="dark"]) #privateReport {
  border-color: rgba(112, 98, 184, 0.3) !important;
  background: linear-gradient(145deg, #ffffff 0%, #fbfaff 58%, #f2f8f8 100%) !important;
  box-shadow: 0 20px 55px rgba(51, 65, 85, 0.1), 0 3px 10px rgba(112, 98, 184, 0.07) !important;
}

html:not([data-theme="dark"]) #privateReport .private-report-hero {
  border-color: rgba(112, 98, 184, 0.2) !important;
  background: linear-gradient(115deg, #eaf8fa 0%, #f1effb 55%, #faf9ff 100%) !important;
}

html:not([data-theme="dark"]) #privateReport .private-report-content {
  background: rgba(255, 255, 255, 0.52);
}

html:not([data-theme="dark"]) #privateReport #downloadPublicReportBtn {
  border-color: rgba(8, 127, 155, 0.38) !important;
  background: rgba(255, 255, 255, 0.76) !important;
  color: #086b82 !important;
}

html:not([data-theme="dark"]) #privateReport #downloadPublicReportBtn:hover {
  background: #ffffff !important;
}

html:not([data-theme="dark"]) .history-filter-control {
  border-color: #c5d0d4;
  background: #ffffff;
  color: var(--cm-ink);
}

html:not([data-theme="dark"]) #historyDetailPanel {
  border-color: #d8d0e4 !important;
  background: #faf8fc !important;
}

html:not([data-theme="dark"]) .history-comparison-grid {
  border-color: #cbd5d9;
  background: #cbd5d9;
}

html:not([data-theme="dark"]) .history-comparison-grid > * {
  background: #ffffff;
}

html:not([data-theme="dark"]) #historyComparison {
  border-color: #d5dde0 !important;
  background: #f7f9f8 !important;
}

/* Showcase evidence is a scientific image surface in both themes. Keep its
   layer legend and metrics readable instead of applying the light page-card
   colour remapping used by ordinary slate and black utilities. */
#showcaseDialog .showcase-evidence-shell,
#showcaseDialog .showcase-evidence-frame,
#showcaseDialog .showcase-evidence-frame .bg-black { background: #020617 !important; }
html:not([data-theme="dark"]) #showcaseDialog .showcase-evidence-shell .text-slate-400 { color: #94a3b8 !important; }
html:not([data-theme="dark"]) #showcaseDialog .showcase-evidence-shell .text-cyan-200 { color: #a5f3fc !important; }
html:not([data-theme="dark"]) #showcaseDialog .showcase-evidence-shell .text-fuchsia-200 { color: #f5d0fe !important; }
html:not([data-theme="dark"]) #showcaseDialog .showcase-evidence-shell .text-amber-200 { color: #fde68a !important; }

/* The Showcase preview is a public-facing card, not a dimmed analysis layer.
   Give light mode its own calm paper surfaces while preserving the dark
   scientific evidence frame and the existing dark-theme treatment. */
html:not([data-theme="dark"]) #showcaseDialog {
  border-color: rgba(8, 127, 155, 0.28) !important;
  background: #f8faf9 !important;
  color: var(--cm-ink) !important;
  box-shadow: 0 24px 70px rgba(51, 65, 85, 0.18), 0 3px 10px rgba(51, 65, 85, 0.08) !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-dialog-header {
  border-color: rgba(8, 127, 155, 0.18) !important;
}

html:not([data-theme="dark"]) #showcaseDialog #closeShowcaseBtn {
  border-color: #cbd5d9 !important;
  background: rgba(255, 255, 255, 0.86) !important;
  color: #3f4b5d !important;
}

html:not([data-theme="dark"]) #showcaseDialog #closeShowcaseBtn:hover {
  background: #eef3f3 !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-profile-preview {
  border-color: rgba(8, 127, 155, 0.2) !important;
  background: linear-gradient(120deg, #ffffff 0%, #f3faf9 100%) !important;
  box-shadow: 0 8px 24px rgba(51, 65, 85, 0.06) !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-credit-badge {
  border-color: rgba(5, 150, 105, 0.3) !important;
  background: #e5f8ee !important;
  color: #047857 !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-answer-preview {
  border-color: rgba(8, 127, 155, 0.3) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 28px rgba(51, 65, 85, 0.07) !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-answer-copy {
  background: linear-gradient(145deg, #ffffff 0%, #f3f9f9 100%) !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-why-preview {
  border-color: rgba(181, 145, 57, 0.3) !important;
  background: linear-gradient(135deg, #fffdf8 0%, #fbf8ee 52%, #f5faf7 100%) !important;
  box-shadow: 0 10px 28px rgba(51, 65, 85, 0.06) !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-why-hypothesis {
  color: var(--cm-ink) !important;
  box-shadow: 0 2px 8px rgba(51, 65, 85, 0.04) !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-why-hypothesis.is-primary {
  border-color: rgba(181, 145, 57, 0.34) !important;
  background: #fffbeb !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-why-hypothesis.is-alternative {
  border-color: #d8dcd9 !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-why-hypothesis.is-safety {
  border-color: rgba(220, 38, 38, 0.24) !important;
  background: #fff5f5 !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-why-question {
  border-color: rgba(8, 127, 155, 0.25) !important;
  background: #edf9fa !important;
}

html:not([data-theme="dark"]) #showcaseDialog #showcaseWhyQuestion {
  color: #36576a !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-why-action {
  border-color: rgba(5, 150, 105, 0.24) !important;
  background: #edf9f2 !important;
}

html:not([data-theme="dark"]) #showcaseDialog #showcaseWhyNextStep {
  color: #365b4b !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-preview-notice {
  border-color: #d8dcd9 !important;
  background: rgba(255, 255, 255, 0.72) !important;
}

html:not([data-theme="dark"]) #showcaseDialog .showcase-public-notice,
html:not([data-theme="dark"]) #showcaseDialog #showcaseConsentRow {
  border-color: rgba(8, 127, 155, 0.24) !important;
  background: #edf8f8 !important;
  color: #465164 !important;
}

html:not([data-theme="dark"]) .interpretation-card {
  border-color: #d8cfb4 !important;
  background: linear-gradient(135deg, #fbfaf6 0%, #f8f7f3 58%, #f2f6f7 100%) !important;
  box-shadow:
    inset 4px 0 0 rgba(181, 145, 57, 0.52),
    0 14px 38px rgba(51, 65, 85, 0.10) !important;
}

html:not([data-theme="dark"]) .interpretation-card .text-amber-200 {
  color: #806329 !important;
}

html:not([data-theme="dark"]) .interpretation-card .border-amber-300\/70 {
  border-color: rgba(181, 145, 57, 0.48) !important;
}

html:not([data-theme="dark"]) .interpretation-card .bg-slate-950 {
  background-color: #f3f1e9 !important;
}

html:not([data-theme="dark"]) .interpretation-card .interpretation-evidence-link {
  border-color: rgba(8, 127, 155, 0.28) !important;
  background: linear-gradient(135deg, #edf9fa 0%, #e6f4f6 100%) !important;
  color: #164e63 !important;
  box-shadow: inset 3px 0 0 rgba(8, 127, 155, 0.38);
}

html:not([data-theme="dark"]) .interpretation-card .interpretation-evidence-link strong {
  color: #075f73 !important;
}

html:not([data-theme="dark"]) .interpretation-card .interpretation-evidence-note {
  color: #526f7a !important;
}

/* The causal explanation panel uses a quiet, readable hierarchy in light mode.
   Its dark-theme Tailwind colours remain untouched. */
html:not([data-theme="dark"]) #whyAnalysisSection {
  border-color: rgba(181, 145, 57, 0.34) !important;
  background: linear-gradient(135deg, #fffdf8 0%, #fbf8ee 50%, #f1f8f5 100%) !important;
  box-shadow: 0 14px 36px rgba(51, 65, 85, 0.08), 0 2px 6px rgba(146, 109, 35, 0.05);
}

html:not([data-theme="dark"]) #whyAnalysisSection > summary {
  color: #765817 !important;
}

html:not([data-theme="dark"]) #whyAnalysisSection > summary:hover {
  background: rgba(254, 243, 199, 0.44) !important;
}

html:not([data-theme="dark"]) #whyAnalysisCard {
  border-color: rgba(181, 145, 57, 0.2) !important;
}

html:not([data-theme="dark"]) #whyAnalysisCard .why-cause-card {
  box-shadow: 0 2px 8px rgba(51, 65, 85, 0.045);
}

html:not([data-theme="dark"]) #whyAnalysisCard .why-cause-card-primary {
  border-color: rgba(181, 145, 57, 0.3) !important;
  background: #fff8e8 !important;
}

html:not([data-theme="dark"]) #whyAnalysisCard .why-cause-card-neutral {
  border-color: #d8dee1 !important;
  background: rgba(255, 255, 255, 0.82) !important;
}

html:not([data-theme="dark"]) #whyAnalysisCard .why-cause-card-safety,
html:not([data-theme="dark"]) #whyAnalysisCard .why-red-flags {
  border-color: rgba(190, 75, 90, 0.24) !important;
  background: #fff3f3 !important;
}

html:not([data-theme="dark"]) #whyAnalysisCard .why-question-card {
  border-color: rgba(8, 127, 155, 0.24) !important;
  background: #eef8fa !important;
}

html:not([data-theme="dark"]) #whyAnalysisCard .why-action-card {
  border-color: rgba(4, 120, 87, 0.22) !important;
  background: #eff9f3 !important;
}

html:not([data-theme="dark"]) #whyAnalysisCard .why-support-badge {
  border: 1px solid rgba(100, 116, 139, 0.16);
  background: rgba(255, 255, 255, 0.78) !important;
  color: #526071 !important;
}

html:not([data-theme="dark"]) #whyAnalysisCard .text-amber-100\/80 { color: #715c32 !important; }
html:not([data-theme="dark"]) #whyAnalysisCard .text-cyan-50 { color: #174e5b !important; }
html:not([data-theme="dark"]) #whyAnalysisCard .text-emerald-50 { color: #245b49 !important; }
html:not([data-theme="dark"]) #whyAnalysisCard .text-rose-100,
html:not([data-theme="dark"]) #whyAnalysisCard .text-rose-100\/90 { color: #8f3443 !important; }

/* Landing page */
:root {
  --landing-surface: rgba(255, 255, 255, 0.94);
  --landing-surface-soft: #f0f4f4;
  --landing-surface-cool: #e8f3f5;
  --landing-ink: #172033;
  --landing-muted: #5f6878;
  --landing-line: #d8dcd9;
  --landing-cyan: #087f9b;
  --landing-cyan-bright: #0ea5c1;
  --landing-blue: #2563eb;
  --landing-violet: #7062b8;
  --landing-warm: #fbfaf6;
  --landing-shadow: 0 18px 55px rgba(51, 65, 85, 0.10), 0 2px 7px rgba(51, 65, 85, 0.05);
}

html[data-theme="dark"] {
  --landing-surface: rgba(15, 27, 48, 0.96);
  --landing-surface-soft: #14223a;
  --landing-surface-cool: #102b3b;
  --landing-ink: #f8fafc;
  --landing-muted: #aeb8c8;
  --landing-line: #334155;
  --landing-cyan: #22d3ee;
  --landing-cyan-bright: #67e8f9;
  --landing-blue: #60a5fa;
  --landing-violet: #a78bfa;
  --landing-warm: #22251f;
  --landing-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
}

.landing-hero {
  min-height: calc(100vh - 5rem);
}

.landing-hero #hero-title {
  font-size: var(--page-title-size);
  line-height: var(--page-title-line-height);
}

.landing-section {
  padding: clamp(3.75rem, 7vw, 6.5rem) 0;
}

.landing-shell {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.section-kicker {
  margin: 0 0 0.8rem;
  color: var(--landing-cyan) !important;
  font-size: 0.76rem !important;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-panel,
.results-panel,
.cta-panel {
  border: 1px solid var(--landing-line);
  background: var(--landing-surface);
  box-shadow: var(--landing-shadow);
}

.story-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  overflow: hidden;
  border-radius: 1.75rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  position: relative;
}

.story-panel::before {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  top: -8rem;
  right: -7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 193, 0.16), transparent 68%);
  pointer-events: none;
}

.story-copy h2,
.section-heading h2,
.results-panel h2,
.cta-panel h2 {
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(1.65rem, 2.25vw, 2rem);
  font-weight: 820;
  letter-spacing: -0.042em;
  line-height: 1.05;
}

.story-copy > p:not(.section-kicker),
.section-heading > p:not(.section-kicker),
.results-panel > div > p:not(.section-kicker) {
  max-width: 48rem;
  margin: 1.25rem 0 0;
  color: var(--landing-muted) !important;
  font-size: 1rem;
  line-height: 1.75;
}

.evidence-list {
  display: grid;
  gap: 0.85rem;
  position: relative;
}

.evidence-list > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.12rem 0.85rem;
  align-items: center;
  border: 1px solid var(--landing-line);
  border-radius: 1rem;
  background: var(--landing-surface-soft);
  padding: 1rem;
}

.evidence-list strong { color: var(--landing-ink); }
.evidence-list small { grid-column: 2; color: var(--landing-muted); line-height: 1.45; }
.evidence-list .evidence-abstention {
  margin: 0.15rem 0 0;
  border-left: 3px solid var(--landing-cyan);
  padding: 0.75rem 0 0.75rem 1rem;
  color: var(--landing-muted);
  line-height: 1.6;
}
.evidence-list .evidence-abstention strong { color: var(--landing-ink); }

.evidence-icon {
  grid-row: 1 / span 2;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--landing-surface-cool);
  color: var(--landing-cyan);
  font-size: 0.7rem;
  font-weight: 850;
}

.how-section {
  border-block: 1px solid color-mix(in srgb, var(--landing-line) 76%, transparent);
  background: color-mix(in srgb, var(--landing-surface-soft) 62%, transparent);
}

.section-heading {
  max-width: 48rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.compact-heading { max-width: 54rem; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.step-card {
  position: relative;
  min-height: 22rem;
  overflow: hidden;
  border: 1px solid var(--landing-line);
  border-radius: 1.35rem;
  background: var(--landing-surface);
  padding: 1.6rem;
  box-shadow: 0 10px 30px rgba(51, 65, 85, 0.06);
}

.step-card-header {
  display: flex;
  min-height: 4.75rem;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.step-symbol {
  display: grid;
  flex: 0 0 auto;
  width: 4.75rem;
  height: 4.75rem;
  place-items: center;
  border-radius: 1.25rem;
  background: var(--landing-surface-cool);
  color: var(--landing-cyan);
}

.step-symbol svg {
  width: 2.75rem;
  height: 2.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  margin: 1.35rem 0 0;
  border: 1px solid color-mix(in srgb, var(--landing-cyan) 24%, var(--landing-line));
  border-radius: 1.05rem;
  background: var(--landing-surface-cool);
}

.step-card-media {
  display: flex;
  flex-direction: column;
}

.step-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.step-card h3 {
  margin: 0.2rem 0 0;
  color: var(--landing-ink);
  font-size: 1.25rem;
  font-weight: 780;
}

.step-card p {
  margin: 0.9rem 0 0;
  color: var(--landing-muted) !important;
  line-height: 1.7;
}

.pipeline {
  display: grid;
  grid-template-columns: 1.05fr auto 1fr auto 1.25fr auto 0.85fr;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid var(--landing-line);
  border-radius: 1.6rem;
  background: var(--landing-surface);
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: var(--landing-shadow);
}

.pipeline-column { min-width: 0; }

.pipeline-label {
  margin: 0 0 0.65rem;
  color: var(--landing-muted) !important;
  font-size: 0.67rem !important;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.pipeline-stack { display: grid; gap: 0.55rem; }

.pipeline-node {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-height: 4.25rem;
  border: 1px solid var(--landing-line);
  border-radius: 0.9rem;
  background: var(--landing-surface-soft);
  padding: 0.7rem;
}

.pipeline-node > span {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.6rem;
  background: var(--landing-surface-cool);
  color: var(--landing-cyan);
  font-weight: 850;
}

.pipeline-node strong,
.pipeline-core strong,
.pipeline-result strong { display: block; color: var(--landing-ink); font-size: 0.85rem; }
.pipeline-node small,
.pipeline-core small,
.pipeline-result small { display: block; margin-top: 0.15rem; color: var(--landing-muted); font-size: 0.7rem; line-height: 1.35; }
.accent-node { border-color: color-mix(in srgb, var(--landing-cyan) 32%, var(--landing-line)); }

.pipeline-arrow {
  color: var(--landing-cyan);
  font-size: 1.35rem;
  font-weight: 900;
}

.pipeline-core {
  min-height: 9rem;
  border: 1px solid color-mix(in srgb, var(--landing-cyan) 42%, var(--landing-line));
  border-radius: 1.1rem;
  background: linear-gradient(145deg, var(--landing-surface-cool), var(--landing-surface));
  padding: 1.2rem;
  position: relative;
}

.core-orbit {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1rem;
  border: 2px solid var(--landing-cyan);
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px transparent, inset 0 0 0 9px color-mix(in srgb, var(--landing-cyan) 28%, transparent);
}

.context-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; }
.context-tags span { border-radius: 999px; background: var(--landing-surface); padding: 0.3rem 0.5rem; color: var(--landing-muted); font-size: 0.62rem; font-weight: 700; }

.pipeline-result {
  display: grid;
  min-height: 9rem;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--landing-violet) 45%, var(--landing-line));
  border-radius: 1.1rem;
  background: linear-gradient(145deg, color-mix(in srgb, var(--landing-violet) 12%, var(--landing-surface)), var(--landing-surface));
  padding: 1.1rem;
}

.result-check {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.85rem;
  place-items: center;
  border-radius: 50%;
  background: var(--landing-violet);
  color: #fff;
  font-weight: 900;
}

.signal-band {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1rem;
  border: 1px solid var(--landing-line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--landing-surface-soft) 72%, transparent);
  padding: 1rem;
  color: var(--landing-muted);
  font-size: 0.74rem;
}

.signal-band span { border-radius: 999px; background: var(--landing-surface); padding: 0.35rem 0.6rem; }
.signal-band b { color: var(--landing-cyan); }
.signal-band strong { color: var(--landing-ink); }

.results-section { padding-top: 1.5rem; }

.results-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: 3rem;
  align-items: center;
  border-radius: 1.6rem;
  background: linear-gradient(135deg, var(--landing-warm), var(--landing-surface));
  padding: clamp(2rem, 5vw, 4rem);
}

.result-pills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.result-pills span { border: 1px solid var(--landing-line); border-radius: 0.9rem; background: var(--landing-surface-soft); padding: 0.95rem; color: var(--landing-ink); font-size: 0.83rem; font-weight: 750; }

.continuity-section {
  padding-top: 1.5rem;
}

.continuity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.continuity-card {
  display: flex;
  min-height: 29rem;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--landing-line);
  border-radius: 1.5rem;
  background: var(--landing-surface);
  padding: clamp(1.6rem, 4vw, 2.5rem);
  box-shadow: var(--landing-shadow);
  position: relative;
}

.continuity-card::after {
  content: "";
  position: absolute;
  width: 13rem;
  height: 13rem;
  top: -7rem;
  right: -6rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--card-accent) 20%, transparent), transparent 70%);
  pointer-events: none;
}

.report-card { --card-accent: var(--landing-violet); }
.history-card-landing { --card-accent: var(--landing-cyan); }

.continuity-card-topline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.continuity-symbol {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 45%, var(--landing-line));
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--card-accent) 12%, var(--landing-surface));
  color: var(--card-accent);
  font-size: 1.15rem;
  font-weight: 900;
}

.continuity-label {
  color: var(--card-accent);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.continuity-card h3 {
  max-width: 27rem;
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 820;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.continuity-card > p {
  margin: 1.1rem 0 0;
  color: var(--landing-muted) !important;
  line-height: 1.7;
}

.continuity-card ul {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  color: var(--landing-muted);
  list-style: none;
}

.continuity-card li {
  padding-left: 1.35rem;
  position: relative;
  line-height: 1.55;
}

.continuity-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--card-accent);
  font-weight: 900;
}

.continuity-card a {
  align-self: flex-start;
  margin-top: auto;
  color: var(--card-accent);
  font-weight: 800;
}

.continuity-card a:hover { color: var(--landing-ink); }

.continuity-note {
  margin: 1.25rem 0 0;
  border-left: 3px solid var(--landing-cyan);
  border-radius: 0 0.8rem 0.8rem 0;
  background: color-mix(in srgb, var(--landing-surface-soft) 72%, transparent);
  padding: 1rem 1.15rem;
  color: var(--landing-muted);
  line-height: 1.6;
}

.continuity-note strong { color: var(--landing-ink); }

.final-cta { padding: 1.5rem 0 clamp(4rem, 8vw, 7rem); }
.cta-panel { display: flex; gap: 2rem; align-items: center; justify-content: space-between; border-radius: 1.5rem; padding: clamp(1.75rem, 4vw, 3rem); }
.cta-panel h2 { font-size: clamp(1.65rem, 2.25vw, 2rem); }
.cta-panel a { flex: 0 0 auto; }

@media (max-width: 1024px) {
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline-arrow { justify-self: center; transform: rotate(90deg); }
  .pipeline-label { text-align: center; }
  .pipeline-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-column:nth-of-type(2) .pipeline-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline-core,
  .pipeline-result { min-height: auto; }
}

@media (max-width: 760px) {
  .landing-hero { min-height: auto; padding-top: 2.5rem; padding-bottom: 4rem; }
  .story-panel,
  .results-panel { grid-template-columns: 1fr; }
  .continuity-grid { grid-template-columns: 1fr; }
  .continuity-card { min-height: auto; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: auto; }
  .pipeline-stack,
  .pipeline-column:nth-of-type(2) .pipeline-stack { grid-template-columns: 1fr; }
  .result-pills { grid-template-columns: 1fr; }
  .cta-panel { align-items: stretch; flex-direction: column; }
  .cta-panel a { align-self: flex-start; }
}

@media (max-width: 420px) {
  .landing-shell { width: min(100% - 1.25rem, 72rem); }
  .story-panel { padding: 1.4rem; border-radius: 1.25rem; }
  .cta-panel a { width: 100%; text-align: center; }
}

html:not([data-theme="dark"]) footer {
  border-color: var(--cm-line) !important;
  background-color: rgba(239, 238, 233, 0.86) !important;
  color: var(--cm-muted) !important;
}

@media (max-width: 640px) {
  html:not([data-theme="dark"]) .auth-page { align-items: flex-start; padding: 0; }
  html:not([data-theme="dark"]) .auth-page main { border: 0; border-radius: 0; box-shadow: none; }
}

.skip-link {
  position: fixed;
  top: .65rem;
  left: .65rem;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: .55rem;
  background: #0f172a;
  padding: .7rem 1rem;
  color: #fff;
  font-weight: 750;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .28);
}

.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, summary, video):focus-visible {
  outline: 3px solid #0891b2 !important;
  outline-offset: 3px !important;
}

.theme-toggle {
  position: fixed;
  right: max(.75rem, env(safe-area-inset-right));
  top: max(.75rem, env(safe-area-inset-top));
  z-index: 70;
  min-height: 2.75rem;
  border: 1px solid var(--cm-line, #cbd5e1);
  border-radius: 999px;
  background: var(--cm-surface, #fff);
  padding: .65rem .9rem;
  color: var(--cm-text, #0f172a);
  font-size: .75rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
  display: inline-grid;
  place-items: center;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle-header:hover { transform: none; }

.theme-toggle-header {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  flex: 0 0 2.5rem;
  box-shadow: none;
  border-color: #334155;
  background: #0f172a;
  color: #f8fafc;
  align-self: center;
  margin: 0;
  line-height: 0;
}

.theme-toggle-corner {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border-color: #334155;
  background: #0f172a;
  color: #f8fafc;
}

.theme-header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: .75rem;
}

.theme-header-actions .theme-toggle-header {
  width: 2.25rem;
  min-height: 2.25rem;
  flex-basis: 2.25rem;
}

.pet-header-actions > .theme-toggle-header {
  width: 2.25rem;
  min-height: 2.25rem;
  flex: 0 0 2.25rem;
  padding: 0 !important;
}

.account-actions > a {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
}

:is(.theme-toggle-header, .theme-toggle-corner)::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  width: max-content;
  max-width: 9rem;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: .45rem;
  background: #0f172a;
  padding: .35rem .55rem;
  color: #f8fafc;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-.2rem);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}

:is(.theme-toggle-header, .theme-toggle-corner):hover::after,
:is(.theme-toggle-header, .theme-toggle-corner):focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* About page */
.about-page {
  --about-surface: rgba(255, 255, 255, 0.94);
  --about-surface-soft: #eef5f6;
  --about-surface-warm: #fbfaf5;
  --about-ink: #14213a;
  --about-muted: #606b7c;
  --about-line: #d8e1e2;
  --about-cyan: #087f9b;
  --about-cyan-bright: #0ea5c1;
  --about-blue: #2563eb;
  --about-green: #16805c;
  --about-shadow: 0 22px 65px rgba(36, 61, 74, 0.11), 0 3px 10px rgba(36, 61, 74, 0.05);
  background:
    radial-gradient(circle at 82% 10%, rgba(14, 165, 193, 0.11), transparent 30rem),
    radial-gradient(circle at 12% 38%, rgba(37, 99, 235, 0.06), transparent 27rem),
    var(--theme-bg);
  color: var(--about-ink);
}

html[data-theme="dark"] .about-page {
  --about-surface: rgba(15, 27, 48, 0.96);
  --about-surface-soft: #14263c;
  --about-surface-warm: #20281f;
  --about-ink: #f8fafc;
  --about-muted: #aeb9c9;
  --about-line: #33465d;
  --about-cyan: #22d3ee;
  --about-cyan-bright: #67e8f9;
  --about-blue: #60a5fa;
  --about-green: #5ee0ae;
  --about-shadow: 0 24px 68px rgba(0, 0, 0, 0.28);
}

.about-header {
  inset-inline: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--about-line) 72%, transparent);
  background: color-mix(in srgb, var(--theme-bg) 86%, transparent);
  backdrop-filter: blur(18px);
}

.about-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100% - 2rem, 82rem);
  min-height: 5.25rem;
  margin-inline: auto;
  gap: 2rem;
}

.about-header .account-actions { justify-self: end; }
.about-header .account-actions > a:first-child { color: var(--about-muted) !important; }
.about-header .account-actions > a:first-child:hover { color: var(--about-blue) !important; }

.about-page-nav { display: flex; align-items: center; gap: 1.75rem; }
.about-page-nav a {
  color: var(--about-muted);
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  transition: color 160ms ease;
}
.about-page-nav a:hover { color: var(--about-cyan); }

.about-shell { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.about-section { padding-block: clamp(4.5rem, 8vw, 7.5rem); scroll-margin-top: 6rem; }

.about-hero {
  display: flex;
  align-items: center;
  min-height: min(54rem, 100vh);
  padding: 9.5rem 0 5.5rem;
  overflow: hidden;
}

.about-hero-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(27rem, 0.97fr); align-items: center; gap: clamp(3rem, 7vw, 7rem); }
.about-hero-copy h1,
.about-story-intro h2,
.about-heading-row h2,
.about-energy-panel h2,
.about-company-copy h2,
.about-cta-panel h2 {
  color: var(--about-ink);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.06;
}
.about-hero-copy h1 { max-width: 18ch; margin-top: 0.85rem; font-size: var(--page-title-size); font-weight: 800; letter-spacing: normal; line-height: var(--page-title-line-height); }
.about-lead { max-width: 42rem; margin-top: 1.7rem; color: var(--about-muted); font-size: clamp(1.03rem, 1.6vw, 1.25rem); line-height: 1.75; }
.about-hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.25rem; }
.about-primary-action,
.about-secondary-action {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  padding: 0.8rem 1.5rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.about-primary-action { background: var(--about-blue); color: #fff !important; box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22); }
.about-secondary-action { border: 1px solid var(--about-line); background: var(--about-surface); color: var(--about-ink) !important; }
.about-primary-action:hover,
.about-secondary-action:hover { transform: translateY(-2px); }

.about-hero-visual { position: relative; min-height: 34rem; }
.about-signal-map { position: relative; width: min(100%, 34rem); aspect-ratio: 1; margin-inline: auto; }
.about-signal-map::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--about-cyan) 17%, transparent), transparent 68%);
  filter: blur(4px);
}
.signal-orbit { position: absolute; inset: 19%; border: 1px solid color-mix(in srgb, var(--about-cyan) 38%, transparent); border-radius: 50%; }
.orbit-two { inset: 7%; border-style: dashed; border-color: color-mix(in srgb, var(--about-blue) 24%, transparent); transform: rotate(-16deg); }
.signal-core {
  position: absolute;
  inset: 35%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--about-cyan) 42%, var(--about-line));
  border-radius: 50%;
  background: linear-gradient(145deg, var(--about-surface), var(--about-surface-soft));
  box-shadow: var(--about-shadow), inset 0 0 0 0.45rem color-mix(in srgb, var(--about-cyan) 6%, transparent);
  text-align: center;
}
.signal-core svg { width: 2.8rem; fill: none; stroke: var(--about-cyan); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.signal-core strong { margin-top: 0.4rem; color: var(--about-ink); font-size: 0.95rem; }
.signal-core small { margin-top: 0.15rem; color: var(--about-muted); font-size: 0.62rem; }
.signal-chip {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  width: 10.5rem;
  border: 1px solid var(--about-line);
  border-radius: 1rem;
  background: var(--about-surface);
  padding: 0.9rem;
  box-shadow: var(--about-shadow);
}
.signal-chip > span { grid-row: 1 / 3; display: grid; width: 1.7rem; height: 1.7rem; place-items: center; border-radius: 50%; background: var(--about-surface-soft); color: var(--about-cyan); font-size: 0.62rem; font-weight: 850; }
.signal-chip strong { color: var(--about-ink); font-size: 0.78rem; }
.signal-chip small { color: var(--about-muted); font-size: 0.64rem; }
.chip-video { top: 4%; left: 3%; }
.chip-audio { top: 11%; right: -1%; }
.chip-motion { bottom: 9%; left: -1%; }
.chip-context { right: 1%; bottom: 4%; }

.about-story-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(3rem, 8vw, 8rem); }
.about-story-intro h2,
.about-heading-row h2,
.about-energy-panel h2,
.about-company-copy h2,
.about-cta-panel h2 { margin-top: 0.75rem; font-size: clamp(1.65rem, 2.25vw, 2rem); }
.about-story-copy { display: grid; gap: 1.35rem; color: var(--about-muted); font-size: 1.03rem; line-height: 1.78; }

.about-journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--about-line); }
.about-journey article { position: relative; padding: 2.1rem 1.5rem 0 0; }
.about-journey article:not(:last-child) { border-right: 1px solid var(--about-line); }
.about-journey article:not(:first-child) { padding-left: 1.5rem; }
.about-journey article > span { position: absolute; top: -0.85rem; left: 0; display: grid; width: 1.7rem; height: 1.7rem; place-items: center; border-radius: 50%; background: var(--about-cyan); color: white; font-size: 0.58rem; font-weight: 850; }
.about-journey article:not(:first-child) > span { left: 1.5rem; }
.about-journey h3 { margin-top: 0.6rem; color: var(--about-ink); font-size: 1.05rem; font-weight: 800; }
.about-journey article > p:last-child { margin-top: 0.65rem; color: var(--about-muted); font-size: 0.86rem; line-height: 1.62; }

.about-approach-section { border-block: 1px solid color-mix(in srgb, var(--about-line) 72%, transparent); background: color-mix(in srgb, var(--about-surface-soft) 64%, transparent); }
.about-heading-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.78fr); align-items: end; gap: 4rem; }
.about-heading-row > p { color: var(--about-muted); line-height: 1.72; }
.about-principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 3rem; }
.about-principles article { min-height: 20rem; border: 1px solid var(--about-line); border-radius: 1.4rem; background: var(--about-surface); padding: 2rem; box-shadow: var(--about-shadow); }
.principle-icon { display: grid; width: 3.25rem; height: 3.25rem; place-items: center; margin-bottom: 2rem; border-radius: 1rem; background: var(--about-surface-soft); color: var(--about-cyan); }
.principle-icon svg { width: 2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.about-principles h3 { margin-top: 0.55rem; color: var(--about-ink); font-size: 1.3rem; font-weight: 820; }
.about-principles article > p:last-child { margin-top: 0.9rem; color: var(--about-muted); line-height: 1.7; }
.about-abstention-note { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; margin-top: 1.25rem; border: 1px solid color-mix(in srgb, var(--about-cyan) 35%, var(--about-line)); border-radius: 1.4rem; background: color-mix(in srgb, var(--about-cyan) 7%, var(--about-surface)); padding: 1.5rem 2rem; box-shadow: var(--about-shadow); }
.about-abstention-note .principle-icon { margin: 0; }
.about-abstention-note h3 { margin-top: 0.35rem; color: var(--about-ink); font-size: 1.2rem; font-weight: 820; }
.about-abstention-note div > p:last-child { margin-top: 0.55rem; color: var(--about-muted); line-height: 1.65; }

.about-energy-section { padding-top: clamp(3rem, 5vw, 5rem); }
.about-energy-panel { display: grid; grid-template-columns: minmax(17rem, 0.65fr) minmax(0, 1.35fr); align-items: center; gap: clamp(2.5rem, 7vw, 6.5rem); border: 1px solid color-mix(in srgb, var(--about-green) 24%, var(--about-line)); border-radius: 2rem; background: linear-gradient(135deg, color-mix(in srgb, var(--about-green) 9%, var(--about-surface-warm)), var(--about-surface)); padding: clamp(2rem, 5vw, 4.5rem); box-shadow: var(--about-shadow); }
.energy-visual { display: grid; place-items: center; }
.energy-visual svg { width: min(100%, 19rem); fill: none; stroke: var(--about-green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.about-energy-panel > div:last-child > p:not(.section-kicker) { margin-top: 1.25rem; color: var(--about-muted); line-height: 1.75; }
.energy-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 2rem; }
.energy-facts span { border-top: 1px solid color-mix(in srgb, var(--about-green) 35%, var(--about-line)); padding-top: 0.85rem; }
.energy-facts strong { display: block; color: var(--about-green); font-size: 1.2rem; }
.energy-facts small { display: block; margin-top: 0.15rem; color: var(--about-muted); font-size: 0.72rem; }

.about-company-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 1.1fr); align-items: start; gap: clamp(3rem, 8vw, 7rem); }
.about-company-copy > p:not(.section-kicker) { margin-top: 1.4rem; color: var(--about-muted); line-height: 1.75; }
.company-address { display: grid; gap: 0.35rem; margin-top: 2rem; border-left: 3px solid var(--about-cyan); padding-left: 1rem; color: var(--about-muted); font-size: 0.85rem; font-style: normal; }
.company-address strong { color: var(--about-ink); }
.company-activities { overflow: hidden; border: 1px solid var(--about-line); border-radius: 1.4rem; background: var(--about-surface); box-shadow: var(--about-shadow); }
.company-card-label { border-bottom: 1px solid var(--about-line); background: var(--about-surface-soft); padding: 1rem 1.4rem; color: var(--about-cyan); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.14em; text-transform: uppercase; }
.company-activities > div { display: grid; grid-template-columns: 4.2rem 1fr; gap: 1rem; padding: 1.35rem 1.4rem; }
.company-activities > div:not(:last-child) { border-bottom: 1px solid var(--about-line); }
.company-activities > div > span { color: var(--about-cyan); font-size: 0.78rem; font-weight: 850; }
.company-activities strong { display: block; color: var(--about-ink); font-size: 0.95rem; }
.company-activities small { display: block; margin-top: 0.25rem; color: var(--about-muted); font-size: 0.76rem; line-height: 1.45; }

.about-final-cta { padding: 1rem 0 clamp(5rem, 9vw, 8rem); }
.about-cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 2rem; border: 1px solid var(--about-line); border-radius: 1.7rem; background: linear-gradient(135deg, var(--about-surface-warm), var(--about-surface)); padding: clamp(2rem, 5vw, 4rem); box-shadow: var(--about-shadow); }
.about-cta-panel h2 { max-width: 17ch; }

@media (max-width: 1024px) {
  .about-page-nav { display: none; }
  .about-header-inner { grid-template-columns: 1fr auto; }
  .about-hero-grid { grid-template-columns: 1fr; }
  .about-hero-copy { text-align: center; }
  .about-hero-copy h1,
  .about-lead { margin-inline: auto; }
  .about-hero-actions { justify-content: center; }
  .about-hero-visual { min-height: 29rem; }
  .about-signal-map { max-width: 29rem; }
  .about-story-grid,
  .about-company-grid { grid-template-columns: 1fr; }
  .about-journey { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .about-journey article:nth-child(2) { border-right: 0; }
  .about-heading-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-principles { grid-template-columns: 1fr; }
  .about-principles article { min-height: auto; }
  .about-abstention-note { grid-template-columns: 1fr; padding: 1.5rem; }
}

@media (max-width: 700px) {
  .about-shell { width: min(100% - 1.25rem, 76rem); }
  .about-header-inner { width: min(100% - 1rem, 82rem); min-height: 4.75rem; gap: 0.5rem; }
  .about-header .account-actions { gap: 0.45rem !important; }
  .about-header .account-actions > a:first-child { display: none; }
  .about-header .theme-logo { max-width: 8.6rem; }
  .about-hero { min-height: auto; padding-top: 8rem; }
  .about-hero-copy h1 { font-size: var(--page-title-mobile-size); }
  .about-hero-visual { min-height: 24rem; }
  .about-signal-map { transform: scale(0.84); }
  .signal-chip { width: 9.5rem; }
  .chip-video { left: -7%; }
  .chip-audio { right: -7%; }
  .chip-motion { left: -7%; }
  .chip-context { right: -7%; }
  .about-journey { grid-template-columns: 1fr; border-top: 0; }
  .about-journey article,
  .about-journey article:not(:first-child) { border-top: 1px solid var(--about-line); border-right: 0; padding: 2rem 0 1.2rem; }
  .about-journey article > span,
  .about-journey article:not(:first-child) > span { left: 0; }
  .about-energy-panel { grid-template-columns: 1fr; }
  .energy-visual svg { width: 12rem; }
  .energy-facts { grid-template-columns: 1fr; }
  .about-cta-panel { align-items: flex-start; flex-direction: column; }
}

/* Terms of Service */
.terms-page {
  --about-ink: #13213a;
  --about-muted: #5c6878;
  --about-line: #d8dee3;
  --about-surface: #ffffff;
  --about-surface-soft: #eef7f8;
  --about-blue: #2563eb;
  --about-cyan: #07839d;
  --terms-page: #f7f6f2;
  --terms-warning: #9a5a09;
  --terms-warning-bg: #fff8e8;
  --terms-warning-line: #e8c988;
  margin: 0;
  background: var(--terms-page);
  color: var(--about-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] .terms-page {
  --about-ink: #eef5ff;
  --about-muted: #a7b2c2;
  --about-line: #2a3747;
  --about-surface: #121a25;
  --about-surface-soft: #122632;
  --about-blue: #60a5fa;
  --about-cyan: #55d8ec;
  --terms-page: #0b1017;
  --terms-warning: #f3c568;
  --terms-warning-bg: #211b11;
  --terms-warning-line: #5a4522;
}

.terms-page .about-header { background: color-mix(in srgb, var(--terms-page) 88%, transparent); }
.terms-header-label { justify-self: center; color: var(--about-muted); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.terms-shell { width: min(100% - 3rem, 76rem); margin-inline: auto; }

.terms-hero {
  padding: 10rem 0 4.5rem;
  border-bottom: 1px solid var(--about-line);
  background:
    radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--about-cyan) 12%, transparent), transparent 24rem),
    linear-gradient(180deg, color-mix(in srgb, var(--about-surface) 62%, transparent), transparent);
}

.terms-hero .about-kicker { color: var(--about-cyan); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.19em; text-transform: uppercase; }
.terms-hero h1 { margin-top: 0.75rem; color: var(--about-ink); font-size: var(--page-title-size); font-weight: 800; letter-spacing: normal; line-height: var(--page-title-line-height); }
.terms-intro { max-width: 45rem; margin-top: 1rem; color: var(--about-muted); font-size: 0.94rem; line-height: 1.7; }
.terms-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; margin-top: 2rem; color: var(--about-muted); font-size: 0.72rem; }
.terms-meta span { display: flex; gap: 0.4rem; }
.terms-meta strong { color: var(--about-ink); }

.terms-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: start; gap: clamp(2rem, 5vw, 5rem); padding-block: 4rem 6rem; }
.terms-index { position: sticky; top: 7.25rem; border-left: 2px solid var(--about-line); padding-left: 1.2rem; }
.terms-index > p { color: var(--about-ink); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
.terms-index nav { display: grid; gap: 0.65rem; margin-top: 1rem; }
.terms-index a { color: var(--about-muted); font-size: 0.72rem; font-weight: 650; line-height: 1.35; transition: color 150ms ease, transform 150ms ease; }
.terms-index a:hover { color: var(--about-cyan); transform: translateX(0.15rem); }

.terms-document { display: grid; gap: 1rem; min-width: 0; }
.terms-card { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 1.1rem; scroll-margin-top: 6.5rem; border: 1px solid var(--about-line); border-radius: 1rem; background: color-mix(in srgb, var(--about-surface) 94%, transparent); padding: clamp(1.35rem, 3vw, 2rem); box-shadow: 0 12px 36px rgba(15, 23, 42, 0.045); }
.terms-card > div { min-width: 0; }
.terms-number { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 0.65rem; background: var(--about-surface-soft); color: var(--about-cyan); font-size: 0.62rem; font-weight: 900; }
.terms-card h2 { color: var(--about-ink); font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 830; letter-spacing: -0.025em; line-height: 1.2; }
.terms-card h2 + p,
.terms-card p + p,
.terms-card p + ul,
.terms-card ul + p { margin-top: 0.85rem; }
.terms-card p,
.terms-card li { color: var(--about-muted); font-size: 0.79rem; line-height: 1.72; }
.terms-card p strong,
.terms-card li strong { color: var(--about-ink); font-weight: 780; }
.terms-card ul { display: grid; gap: 0.5rem; padding-left: 1.1rem; list-style: disc; }
.terms-card-accent { border-color: color-mix(in srgb, var(--about-cyan) 36%, var(--about-line)); background: linear-gradient(135deg, var(--about-surface), var(--about-surface-soft)); }
.terms-card-warning { border-color: var(--terms-warning-line); background: var(--terms-warning-bg); }
.terms-card-warning .terms-number { background: color-mix(in srgb, var(--terms-warning) 15%, transparent); color: var(--terms-warning); }
.terms-card-muted { background: color-mix(in srgb, var(--about-surface-soft) 42%, var(--about-surface)); }
.terms-eyebrow { margin-bottom: 0.35rem; color: var(--terms-warning) !important; font-size: 0.61rem !important; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; }
.terms-required-notice { display: grid; gap: 0.65rem; margin-top: 1.2rem; border-left: 3px solid var(--about-cyan); border-radius: 0 0.8rem 0.8rem 0; background: var(--about-surface-soft); padding: 1rem 1.15rem; }
.terms-required-notice p { margin: 0 !important; color: var(--about-ink); font-size: 0.74rem; font-weight: 700; line-height: 1.55; }
.terms-company { display: grid; gap: 0.25rem; margin-top: 1.1rem; border-top: 1px solid var(--about-line); padding-top: 1rem; color: var(--about-muted); font-size: 0.74rem; line-height: 1.55; }
.terms-company strong { color: var(--about-ink); font-size: 0.82rem; }
.terms-inline-link { color: var(--about-blue); font-weight: 750; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--about-blue) 35%, transparent); text-underline-offset: 0.16rem; }

.privacy-hero {
  background:
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--about-blue) 11%, transparent), transparent 23rem),
    radial-gradient(circle at 63% 100%, color-mix(in srgb, var(--about-cyan) 8%, transparent), transparent 19rem),
    linear-gradient(180deg, color-mix(in srgb, var(--about-surface) 62%, transparent), transparent);
}

.privacy-controller { display: grid; gap: 0.28rem; margin-block: 1rem; border: 1px solid var(--about-line); border-radius: 0.75rem; background: var(--about-surface); padding: 0.9rem 1rem; color: var(--about-muted); font-size: 0.73rem; line-height: 1.55; }
.privacy-controller strong { color: var(--about-ink); font-size: 0.79rem; }
.privacy-controller a { width: fit-content; color: var(--about-blue); font-weight: 750; }

.privacy-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1.15rem; }
.privacy-data-grid article { border: 1px solid var(--about-line); border-radius: 0.8rem; background: color-mix(in srgb, var(--about-surface-soft) 34%, var(--about-surface)); padding: 0.95rem; }
.privacy-data-grid article > span { color: var(--about-cyan); font-size: 0.56rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.privacy-data-grid h3 { margin-top: 0.28rem; color: var(--about-ink); font-size: 0.83rem; font-weight: 810; }
.privacy-data-grid p { margin-top: 0.45rem !important; font-size: 0.71rem; line-height: 1.58; }

.privacy-basis-list,
.privacy-retention { display: grid; gap: 0.55rem; margin-block: 1rem; }
.privacy-basis-list > div { display: grid; grid-template-columns: minmax(8rem, 0.28fr) minmax(0, 1fr) minmax(7rem, 0.25fr); gap: 0.8rem; align-items: start; border-bottom: 1px solid var(--about-line); padding: 0.65rem 0; }
.privacy-basis-list strong,
.privacy-retention strong { color: var(--about-ink); font-size: 0.73rem; }
.privacy-basis-list span,
.privacy-retention span { color: var(--about-muted); font-size: 0.7rem; line-height: 1.55; }
.privacy-basis-list em { border-radius: 999px; background: var(--about-surface-soft); padding: 0.3rem 0.55rem; color: var(--about-cyan); font-size: 0.58rem; font-style: normal; font-weight: 800; line-height: 1.35; text-align: center; }
.privacy-retention > div { display: grid; grid-template-columns: minmax(10rem, 0.35fr) minmax(0, 1fr); gap: 0.9rem; border-left: 2px solid var(--about-line); padding: 0.42rem 0 0.42rem 0.8rem; }

.cookies-hero {
  background:
    radial-gradient(circle at 82% 20%, color-mix(in srgb, #f59e0b 9%, transparent), transparent 22rem),
    radial-gradient(circle at 63% 100%, color-mix(in srgb, var(--about-cyan) 8%, transparent), transparent 19rem),
    linear-gradient(180deg, color-mix(in srgb, var(--about-surface) 62%, transparent), transparent);
}

.cookies-status-card { border-color: color-mix(in srgb, #16a34a 42%, var(--about-line)); background: linear-gradient(135deg, var(--about-surface), color-mix(in srgb, #16a34a 8%, var(--about-surface))); }
.cookies-status-card .terms-number { background: color-mix(in srgb, #16a34a 13%, transparent); color: #15803d; }
html[data-theme="dark"] .cookies-status-card .terms-number { color: #86efac; }
.cookies-status-label { display: flex; align-items: center; gap: 0.42rem; margin-bottom: 0.35rem; color: #15803d !important; font-size: 0.6rem !important; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
html[data-theme="dark"] .cookies-status-label { color: #86efac !important; }
.cookies-status-label span { width: 0.48rem; height: 0.48rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0.25rem color-mix(in srgb, #22c55e 14%, transparent); }

.cookies-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1.1rem; }
.cookies-category-grid article { border: 1px solid var(--about-line); border-radius: 0.85rem; background: color-mix(in srgb, var(--about-surface-soft) 28%, var(--about-surface)); padding: 1rem; }
.cookies-category-grid article.is-active { border-color: color-mix(in srgb, var(--about-cyan) 35%, var(--about-line)); }
.cookies-category-grid article > span { color: var(--about-muted); font-size: 0.55rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.cookies-category-grid article.is-active > span { color: var(--about-cyan); }
.cookies-category-grid h3 { margin-top: 0.3rem; color: var(--about-ink); font-size: 0.86rem; font-weight: 820; }
.cookies-category-grid p { margin-top: 0.5rem !important; font-size: 0.71rem; line-height: 1.58; }
.cookies-category-grid em { display: block; margin-top: 0.65rem; color: var(--about-cyan); font-size: 0.59rem; font-style: normal; font-weight: 800; }

.cookies-table-wrap { width: 100%; max-width: 100%; margin-block: 1rem; overflow-x: auto; border: 1px solid var(--about-line); border-radius: 0.85rem; background: var(--about-surface); }
.cookies-table { width: 100%; min-width: 46rem; border-collapse: collapse; color: var(--about-muted); font-size: 0.67rem; line-height: 1.5; }
.cookies-table th { background: var(--about-surface-soft); color: var(--about-ink); font-size: 0.57rem; font-weight: 900; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.cookies-table th,
.cookies-table td { border-bottom: 1px solid var(--about-line); padding: 0.72rem 0.8rem; vertical-align: top; }
.cookies-table tbody tr:last-child td { border-bottom: 0; }
.cookies-table code,
.terms-card code { border-radius: 0.28rem; background: var(--about-surface-soft); padding: 0.08rem 0.26rem; color: var(--about-cyan); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.64rem; font-weight: 750; }

.cookies-control-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; margin-block: 1rem; }
.cookies-control-list > div { display: grid; gap: 0.3rem; border-left: 2px solid var(--about-line); padding: 0.45rem 0.75rem; }
.cookies-control-list strong { color: var(--about-ink); font-size: 0.73rem; }
.cookies-control-list span { color: var(--about-muted); font-size: 0.69rem; line-height: 1.55; }

.support-main {
  position: relative;
  display: flex;
  flex: 1;
  min-height: calc(100vh - 5rem);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 9.5rem 1.5rem 5.5rem;
  background:
    radial-gradient(circle at 72% 28%, color-mix(in srgb, var(--about-blue) 12%, transparent), transparent 25rem),
    radial-gradient(circle at 25% 74%, color-mix(in srgb, var(--about-cyan) 10%, transparent), transparent 22rem);
}

.support-main::before,
.support-main::after { content: ""; position: absolute; border: 1px solid color-mix(in srgb, var(--about-cyan) 14%, transparent); border-radius: 50%; pointer-events: none; }
.support-main::before { width: 30rem; height: 30rem; top: 14%; right: -15rem; }
.support-main::after { width: 22rem; height: 22rem; bottom: -12rem; left: -9rem; }
.support-shell { position: relative; z-index: 1; width: min(100%, 48rem); }
.support-card { border: 1px solid var(--about-line); border-radius: 1.5rem; background: color-mix(in srgb, var(--about-surface) 94%, transparent); padding: clamp(2rem, 6vw, 4.5rem); box-shadow: 0 26px 80px rgba(15, 23, 42, 0.12); text-align: center; }
.support-icon { display: grid; width: 3.5rem; height: 3.5rem; place-items: center; margin: 0 auto 1.4rem; border: 1px solid color-mix(in srgb, var(--about-cyan) 35%, var(--about-line)); border-radius: 1rem; background: var(--about-surface-soft); color: var(--about-cyan); }
.support-icon svg { width: 1.8rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.support-card .about-kicker { color: var(--about-cyan); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
.support-card h1 { margin-top: 0.6rem; color: var(--about-ink); font-size: var(--page-title-size); font-weight: 800; letter-spacing: normal; line-height: var(--page-title-line-height); }

#plansTitle { font-size: var(--page-title-size); font-weight: 800; letter-spacing: normal; line-height: var(--page-title-line-height); }

@media (max-width: 640px) {
  .landing-hero #hero-title,
  .terms-hero h1,
  .support-card h1,
  #plansTitle { font-size: var(--page-title-mobile-size); }
}
.support-copy { margin-top: 1rem; color: var(--about-muted); font-size: 0.91rem; line-height: 1.7; }
.support-copy a { color: var(--about-blue); font-weight: 780; }
.contact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; width: min(100%, 34rem); margin: 1.4rem auto 0; }
.contact-detail-item { display: flex; min-width: 0; align-items: center; gap: 0.7rem; border: 1px solid var(--about-line); border-radius: 0.8rem; background: var(--about-surface-soft); padding: 0.75rem 0.9rem; color: var(--about-ink); font-size: 0.76rem; font-weight: 780; text-align: left; }
a.contact-detail-item { transition: border-color 160ms ease, color 160ms ease, transform 160ms ease; }
a.contact-detail-item:hover { border-color: color-mix(in srgb, var(--about-blue) 45%, var(--about-line)); color: var(--about-blue); transform: translateY(-1px); }
.contact-detail-icon { display: grid; width: 2rem; height: 2rem; flex: 0 0 2rem; place-items: center; border-radius: 0.58rem; background: color-mix(in srgb, var(--about-blue) 10%, var(--about-surface)); color: var(--about-blue); }
.contact-detail-icon svg { display: block; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-detail-value { display: block; min-width: 0; white-space: nowrap; }
.contact-form { display: grid; gap: 1rem; margin-top: 2rem; text-align: left; }
.contact-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.contact-form label { display: grid; gap: 0.42rem; color: var(--about-ink); font-size: 0.72rem; font-weight: 800; }
.contact-form input,
.contact-form textarea { width: 100%; border: 1px solid var(--about-line); border-radius: 0.7rem; background: var(--about-surface-soft); padding: 0.78rem 0.9rem; color: var(--about-ink); font: inherit; font-size: 0.8rem; font-weight: 500; outline: none; transition: border-color 160ms ease, box-shadow 160ms ease; }
.contact-form textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--about-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--about-blue) 18%, transparent); }
.contact-form .support-email-button { justify-self: center; margin-top: 0.25rem; border: 0; cursor: pointer; }
.contact-form .support-email-button:disabled { cursor: wait; opacity: 0.65; transform: none; }
.contact-form-status { min-height: 1.2rem; margin: 0; text-align: center; font-size: 0.72rem; font-weight: 750; }
.contact-form-status.is-success { color: #15803d; }
.contact-form-status.is-error { color: #dc2626; }
.contact-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.support-email-button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; gap: 0.55rem; margin-top: 1.75rem; border-radius: 0.72rem; background: #2563eb; padding: 0.7rem 1.25rem; color: #fff !important; font-size: 0.78rem; font-weight: 800; box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22); transition: transform 160ms ease, background 160ms ease; }
.support-email-button:hover { transform: translateY(-2px); background: #1d4ed8; }
.support-email-button svg { width: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.support-note { max-width: 30rem; margin: 1.5rem auto 0; border-top: 1px solid var(--about-line); padding-top: 1.1rem; color: var(--about-muted); font-size: 0.68rem; line-height: 1.6; }

.registration-legal-note { color: #aeb9c8; font-size: 0.7rem; line-height: 1.55; text-align: center; }
.registration-legal-note a { color: #60a5fa; font-weight: 700; text-decoration: underline; text-underline-offset: 0.15rem; }
html:not([data-theme="dark"]) .registration-legal-note { color: var(--cm-muted); }
html:not([data-theme="dark"]) .registration-legal-note a { color: var(--cm-blue); }

@media (max-width: 900px) {
  .terms-layout { grid-template-columns: 1fr; }
  .terms-index { position: static; display: none; }
}

@media (max-width: 700px) {
  .terms-header-label { display: none; }
  .terms-shell { width: min(100% - 1.25rem, 76rem); }
  .terms-hero { padding: 8.25rem 0 3.25rem; }
  .terms-meta { display: grid; gap: 0.45rem; }
  .terms-layout { padding-block: 1.25rem 4rem; }
  .terms-card { grid-template-columns: 1fr; gap: 0.8rem; padding: 1.2rem; }
  .terms-number { width: 1.85rem; height: 1.85rem; }
  .privacy-data-grid { grid-template-columns: 1fr; }
  .privacy-basis-list > div,
  .privacy-retention > div { grid-template-columns: 1fr; gap: 0.35rem; }
  .privacy-basis-list em { width: fit-content; }
  .cookies-category-grid,
  .cookies-control-list { grid-template-columns: 1fr; }
  .support-main { min-height: calc(100vh - 4.75rem); padding: 7.5rem 0.65rem 3rem; }
  .support-card { border-radius: 1.1rem; }
  .contact-details { grid-template-columns: 1fr; }
  .contact-form-grid { grid-template-columns: 1fr; }
}

.theme-icon { display: none; width: 1.25rem; height: 1.25rem; }
.theme-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html:not([data-theme="dark"]) .theme-icon-moon,
html[data-theme="dark"] .theme-icon-sun { display: block; }

html[data-theme="dark"] .theme-toggle {
  border-color: #475569;
  background: #0f172a;
  color: #e2e8f0;
}

html[data-theme="dark"] :is(.theme-toggle-header, .theme-toggle-corner) {
  border-color: #fde68a;
  background: #f8fafc;
  color: #b45309;
}

html[data-theme="dark"] :is(.text-slate-500, .text-gray-500) {
  color: #94a3b8 !important;
}

html:not([data-theme="dark"]) :is(#openShareReportBtn, #createPrivateLinkBtn, #copyPrivateLinkBtn) {
  color: #fff !important;
}

@media (max-width: 420px) {
  .theme-toggle { font-size: .7rem; }
}
