/* MF150C-R: Shared System/Dark/Light website theme layer. The existing site remains the Dark palette. */
html {
  color-scheme: dark;
}

.theme-picker {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.theme-trigger {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0;
  background: rgba(255,255,255,0.055);
  color: var(--text);
  cursor: pointer;
}

.theme-trigger:hover,
.theme-trigger[aria-expanded="true"] {
  border-color: rgba(130,189,255,0.52);
  background-color: rgba(255,255,255,0.085);
}

.theme-trigger:focus-visible,
.theme-menu button:focus-visible {
  outline: 3px solid rgba(130,189,255,0.42);
  outline-offset: 2px;
  border-color: var(--accent-2);
}

.theme-icon,
.theme-menu-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.theme-picker[data-theme-preference="system"] > .theme-trigger .theme-icon::before,
.theme-menu-icon-system::before { content: "\25D0"; }

.theme-picker[data-theme-preference="dark"] > .theme-trigger .theme-icon::before,
.theme-menu-icon-dark::before { content: "\263E"; }

.theme-picker[data-theme-preference="light"] > .theme-trigger .theme-icon::before,
.theme-menu-icon-light::before { content: "\2600"; }

.theme-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 152px;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #111827;
  box-shadow: 0 18px 42px rgba(0,0,0,0.42);
}

.theme-menu[hidden] { display: none; }

.theme-menu button {
  display: grid;
  grid-template-columns: 22px 1fr 14px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 9px;
  background: transparent;
  color: #f3f6fb;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.theme-menu button:hover,
.theme-menu button:focus-visible {
  border-color: rgba(130,189,255,0.28);
  background: rgba(130,189,255,0.12);
}

.theme-menu button[aria-checked="true"]::after {
  content: "\2713";
  color: #82bdff;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 900px) and (min-width: 641px) {
  .nav { flex-wrap: wrap; }
  .theme-picker { margin-left: auto; }
}

@media (max-width: 640px) {
  .theme-picker { align-self: flex-start; }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-2: #eaf0f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #edf2f8;
  --line: rgba(24,43,72,0.13);
  --line-strong: rgba(24,43,72,0.22);
  --text: #14233a;
  --muted: #4d5f78;
  --muted-2: #64758d;
  --accent: #2f70b7;
  --accent-2: #1f5d9f;
  --accent-soft: rgba(57,125,204,0.12);
  --pro: #a66a05;
  --pro-soft: rgba(166,106,5,0.11);
  --success: #167556;
  --success-soft: rgba(22,117,86,0.10);
  --danger: #b42343;
  --shadow-soft: 0 18px 56px rgba(39,61,91,0.14);
  --shadow-card: 0 12px 34px rgba(39,61,91,0.11);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(57,125,204,0.14), transparent 32rem),
    radial-gradient(circle at top right, rgba(207,143,33,0.11), transparent 26rem),
    linear-gradient(180deg, #f8faff 0, var(--bg) 44%, var(--bg-2) 100%);
  color: var(--text);
}

html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(24,43,72,0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,43,72,0.022) 1px, transparent 1px);
}

html[data-theme="light"] a:hover,
html[data-theme="light"] a:focus-visible {
  color: #174b82;
}

html[data-theme="light"] a:focus-visible,
html[data-theme="light"] button:focus-visible {
  outline-color: rgba(31,93,159,0.38);
}

html[data-theme="light"] .site-header {
  background: rgba(248,250,255,0.88);
}

html[data-theme="light"] .site-footer {
  background: rgba(238,243,249,0.90);
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a:focus-visible,
html[data-theme="light"] .nav-links a[aria-current="page"] {
  background: rgba(31,93,159,0.09);
}

html[data-theme="light"] .theme-trigger {
  background-color: rgba(255,255,255,0.88);
}

html[data-theme="light"] .theme-trigger:hover,
html[data-theme="light"] .theme-trigger[aria-expanded="true"] {
  border-color: rgba(31,93,159,0.42);
  background-color: #ffffff;
}

html[data-theme="light"] .theme-menu {
  border-color: rgba(24,43,72,0.20);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(39,61,91,0.20);
}

html[data-theme="light"] .theme-menu button {
  color: #14233a;
}

html[data-theme="light"] .theme-menu button:hover,
html[data-theme="light"] .theme-menu button:focus-visible {
  border-color: rgba(31,93,159,0.20);
  background: rgba(31,93,159,0.09);
}

html[data-theme="light"] .theme-menu button[aria-checked="true"]::after {
  color: #1f5d9f;
}

html[data-theme="light"] .lead,
html[data-theme="light"] .plan-meta,
html[data-theme="light"] .tier-panel p,
html[data-theme="light"] .pfx-side-compare .section-heading p:last-child,
html[data-theme="light"] .pfx-tier-table tbody td,
html[data-theme="light"] .pfx-plan-head p,
html[data-theme="light"] .pfx-plan-summary,
html[data-theme="light"] .pfx-plan-feature-grid li,
html[data-theme="light"] .pfx-table-cta p {
  color: #42546d;
}

html[data-theme="light"] .button {
  color: #ffffff;
  border-color: rgba(20,67,116,0.24);
  box-shadow: 0 12px 30px rgba(31,93,159,0.22);
}

html[data-theme="light"] .button:hover,
html[data-theme="light"] .button:focus-visible {
  color: #ffffff;
  box-shadow: 0 15px 34px rgba(31,93,159,0.28);
}

html[data-theme="light"] .button-muted {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255,255,255,0.78);
}

html[data-theme="light"] .button-muted:hover,
html[data-theme="light"] .button-muted:focus-visible {
  color: var(--text);
  background: #ffffff;
}

html[data-theme="light"] .button-disabled {
  color: #765314;
  border-color: rgba(166,106,5,0.28);
  background: linear-gradient(135deg, rgba(207,143,33,0.14), rgba(255,255,255,0.72));
}

html[data-theme="light"] .trust-pill,
html[data-theme="light"] .value-points span,
html[data-theme="light"] .tier-stats li,
html[data-theme="light"] .value-strip > div,
html[data-theme="light"] .showdown-feature,
html[data-theme="light"] .showdown-cell,
html[data-theme="light"] .legal-subnav a,
html[data-theme="light"] .notice,
html[data-theme="light"] main.legal-page .card {
  border-color: var(--line);
  background: rgba(255,255,255,0.72);
}

html[data-theme="light"] .product-visual,
html[data-theme="light"] .card,
html[data-theme="light"] .notice,
html[data-theme="light"] .price-card,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .tier-value-card,
html[data-theme="light"] .tier-panel,
html[data-theme="light"] main.legal-page {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,249,252,0.96));
}

html[data-theme="light"] .product-visual::before,
html[data-theme="light"] .card::before,
html[data-theme="light"] .notice::before,
html[data-theme="light"] .price-card::before,
html[data-theme="light"] main.legal-page::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.90), transparent 38%);
  opacity: 0.44;
}

html[data-theme="light"] .visual-titlebar,
html[data-theme="light"] .comparison-table thead th {
  background: rgba(31,93,159,0.055);
}

html[data-theme="light"] .visual-row,
html[data-theme="light"] .comparison-table th,
html[data-theme="light"] .comparison-table td,
html[data-theme="light"] .comparison-card .comparison-table th,
html[data-theme="light"] .comparison-card .comparison-table td {
  border-color: var(--line);
}

html[data-theme="light"] .band {
  background: linear-gradient(180deg, rgba(255,255,255,0.60), rgba(238,243,249,0.70));
}

html[data-theme="light"] .notice {
  border-color: rgba(166,106,5,0.28);
  background:
    radial-gradient(circle at top right, rgba(207,143,33,0.13), transparent 18rem),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,247,239,0.98));
}

html[data-theme="light"] .notice h2,
html[data-theme="light"] .recommended-badge,
html[data-theme="light"] .tier-dash,
html[data-theme="light"] .pro-value .value-label,
html[data-theme="light"] .pro-metric .metric-value,
html[data-theme="light"] .pro-text,
html[data-theme="light"] .pro-chip,
html[data-theme="light"] .pro-price,
html[data-theme="light"] .pro-stats strong,
html[data-theme="light"] .pfx-pill.pro,
html[data-theme="light"] .pfx-plan-head.pro .pfx-plan-title span,
html[data-theme="light"] .pfx-tier-table tbody td:nth-child(3) .pfx-cell-main,
html[data-theme="light"] .pfx-upgrade,
html[data-theme="light"] .pfx-market-plan.pro .pfx-plan-tag,
html[data-theme="light"] .pfx-market-plan.pro .pfx-plan-price {
  color: #855600;
}

html[data-theme="light"] .success {
  border-color: rgba(22,117,86,0.26);
  background: radial-gradient(circle at top right, rgba(22,117,86,0.11), transparent 18rem), #ffffff;
}

html[data-theme="light"] .price-card.recommended,
html[data-theme="light"] .tier-value-card.pro-value,
html[data-theme="light"] .tier-panel-pro,
html[data-theme="light"] .pfx-plan-head.pro,
html[data-theme="light"] .pfx-market-plan.pro {
  border-color: rgba(166,106,5,0.33);
  background:
    radial-gradient(circle at top right, rgba(207,143,33,0.14), transparent 21rem),
    linear-gradient(180deg, #ffffff, #faf7ef);
}

html[data-theme="light"] .comparison-card,
html[data-theme="light"] .feature-showdown,
html[data-theme="light"] .pfx-comparison-shell,
html[data-theme="light"] .pfx-table-cta {
  border-color: rgba(166,106,5,0.27);
  background:
    radial-gradient(circle at top right, rgba(207,143,33,0.10), transparent 27rem),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,252,0.98));
  box-shadow: var(--shadow-card);
}

html[data-theme="light"] .comparison-card .comparison-table thead th,
html[data-theme="light"] .pfx-tier-table thead th {
  background: linear-gradient(180deg, #eaf2fc, #dce9f8);
  border-color: rgba(31,93,159,0.16);
}

html[data-theme="light"] .pro-plan-head,
html[data-theme="light"] .pfx-tier-table tbody td:nth-child(3),
html[data-theme="light"] .pfx-tier-table tbody tr:not(.pfx-group-row) td:nth-child(3) {
  background:
    linear-gradient(90deg, rgba(207,143,33,0.13), rgba(207,143,33,0.055)),
    rgba(255,255,255,0.76) !important;
}

html[data-theme="light"] .comparison-card .comparison-table tbody tr:not(.feature-group):nth-child(odd) td,
html[data-theme="light"] .comparison-card .comparison-table tbody tr:not(.feature-group):nth-child(odd) th,
html[data-theme="light"] .pfx-tier-table tbody th,
html[data-theme="light"] .pfx-tier-table tbody td,
html[data-theme="light"] .pfx-tier-table tbody tr:nth-child(even) td,
html[data-theme="light"] .pfx-tier-table tbody tr:nth-child(even) th,
html[data-theme="light"] .pfx-tier-table tbody tr:not(.pfx-group-row),
html[data-theme="light"] .pfx-tier-table tbody tr:not(.pfx-group-row) th[scope="row"],
html[data-theme="light"] .pfx-tier-table tbody tr:not(.pfx-group-row) td {
  background: rgba(255,255,255,0.72);
  border-color: var(--line);
}

html[data-theme="light"] .comparison-card .comparison-table tbody tr:not(.feature-group):hover td,
html[data-theme="light"] .comparison-card .comparison-table tbody tr:not(.feature-group):hover th {
  background: rgba(31,93,159,0.065);
}

html[data-theme="light"] .feature-group th,
html[data-theme="light"] .pfx-group-row th {
  color: #765314 !important;
  border-color: rgba(166,106,5,0.18) !important;
  background: linear-gradient(90deg, rgba(31,93,159,0.09), rgba(207,143,33,0.11)) !important;
}

html[data-theme="light"] .plan-name,
html[data-theme="light"] .metric-value,
html[data-theme="light"] .tier-price,
html[data-theme="light"] .tier-stats strong,
html[data-theme="light"] .value-strip strong,
html[data-theme="light"] .showdown-feature h3,
html[data-theme="light"] .showdown-cell strong,
html[data-theme="light"] .pfx-value-card strong,
html[data-theme="light"] .pfx-tier-table thead th:first-child,
html[data-theme="light"] .pfx-tier-table tbody th,
html[data-theme="light"] .pfx-tier-table tbody th strong,
html[data-theme="light"] .pfx-plan-title strong,
html[data-theme="light"] .pfx-plan-title span,
html[data-theme="light"] .pfx-cell-main,
html[data-theme="light"] .pfx-plan-price-row h3,
html[data-theme="light"] .pfx-plan-price,
html[data-theme="light"] .pfx-plan-feature-grid strong {
  color: var(--text);
}

html[data-theme="light"] .plan-subtitle,
html[data-theme="light"] .pfx-value-card p,
html[data-theme="light"] .pfx-tier-table tbody th span,
html[data-theme="light"] .pfx-plan-title small,
html[data-theme="light"] .pfx-cell-note,
html[data-theme="light"] .pfx-cta-note,
html[data-theme="light"] .checkout-note,
html[data-theme="light"] .pfx-scroll-note,
html[data-theme="light"] .pfx-plan-name,
html[data-theme="light"] .pfx-plan-price small,
html[data-theme="light"] .pfx-plan-note {
  color: var(--muted);
}

html[data-theme="light"] .value-points span,
html[data-theme="light"] .pfx-mini-list li {
  color: #2e4563;
}

html[data-theme="light"] .pro-value .value-points span,
html[data-theme="light"] .pro-stats span,
html[data-theme="light"] .pro-cell-new strong,
html[data-theme="light"] .pro-cell-new span,
html[data-theme="light"] .upgrade-cell strong,
html[data-theme="light"] .limited-cell strong {
  color: #765314;
}

html[data-theme="light"] .pfx-value-card,
html[data-theme="light"] .pfx-plan-head,
html[data-theme="light"] .pfx-market-plan {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
  box-shadow: var(--shadow-card);
}

html[data-theme="light"] .pfx-plan-actions {
  border-color: var(--line);
}

html[data-theme="light"] .pfx-check,
html[data-theme="light"] .pfx-plan-tag {
  color: #126247;
  border-color: rgba(22,117,86,0.24);
  background: rgba(22,117,86,0.09);
}

html[data-theme="light"] .pfx-pill,
html[data-theme="light"] .pfx-preview,
html[data-theme="light"] .limited-badge,
html[data-theme="light"] .feature-tag,
html[data-theme="light"] .showdown-cell::before,
html[data-theme="light"] .pfx-tier-table tbody tr:not(.pfx-group-row) td::before {
  color: #174f91;
  border-color: rgba(31,93,159,0.22);
  background: rgba(31,93,159,0.09);
}

html[data-theme="light"] .pfx-pill.pro,
html[data-theme="light"] .pfx-upgrade,
html[data-theme="light"] .pfx-market-plan.pro .pfx-plan-tag,
html[data-theme="light"] .pro-cell-new::before,
html[data-theme="light"] .pfx-tier-table tbody tr:not(.pfx-group-row) td:nth-child(3)::before {
  color: #765314;
  border-color: rgba(166,106,5,0.24);
  background: rgba(207,143,33,0.11);
}

html[data-theme="light"] .recovery-form input {
  background: rgba(255,255,255,0.94);
  color: var(--text);
}

html[data-theme="light"] .recovery-form input:hover {
  border-color: rgba(31,93,159,0.40);
}

html[data-theme="light"] .recovery-form input:focus-visible {
  outline-color: rgba(31,93,159,0.34);
}

html[data-theme="light"] code {
  color: #244e7b;
  background: rgba(31,93,159,0.08);
}

/* Preserve the established green Home/Pricing calls to action in both palettes. */
html[data-theme="light"] .home-hero .button,
html[data-theme="light"] .pricing-hero .button {
  color: #ffffff;
  border-color: rgba(22,117,86,0.42);
  background: linear-gradient(180deg, #1e7c63 0%, #14634f 100%);
  box-shadow: 0 12px 30px rgba(22,117,86,0.22);
}

html[data-theme="light"] .home-hero .button:hover,
html[data-theme="light"] .home-hero .button:focus-visible,
html[data-theme="light"] .pricing-hero .button:hover,
html[data-theme="light"] .pricing-hero .button:focus-visible {
  color: #ffffff;
  border-color: rgba(22,117,86,0.58);
  background: linear-gradient(180deg, #1b755e 0%, #115844 100%);
  box-shadow: 0 15px 34px rgba(22,117,86,0.28);
}

html[data-theme="light"] button.button[data-pastefx-buy-pro],
html[data-theme="light"] .recovery-form .button {
  color: #ffffff;
  border-color: rgba(31,93,159,0.38);
  background: linear-gradient(180deg, #285a99 0%, #1a3f70 100%);
  box-shadow: 0 12px 30px rgba(31,93,159,0.24);
}

html[data-theme="light"] button.button[data-pastefx-buy-pro]:hover,
html[data-theme="light"] button.button[data-pastefx-buy-pro]:focus-visible,
html[data-theme="light"] .recovery-form .button:hover,
html[data-theme="light"] .recovery-form .button:focus-visible {
  color: #ffffff;
  border-color: rgba(31,93,159,0.52);
  background: linear-gradient(180deg, #3166a5 0%, #204b82 100%);
  box-shadow: 0 15px 34px rgba(31,93,159,0.30);
}



/* MF150C-R: Keep the compact mobile menu inside the left-aligned header viewport. */
@media (max-width: 640px) {
  .theme-menu {
    right: auto;
    left: 0;
  }
}
