/* Theme controls are shared; the existing light palette remains unchanged. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--m-line);
  border-radius: 7px;
  background: var(--m-white);
  color: var(--m-ink);
}
.theme-toggle:hover { background: var(--m-soft); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .theme-sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-sun { display: block; }
[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
.login-short { display: none; }
.nav-actions { gap: 16px; }
.menu-toggle { flex-shrink: 0; }
@media (max-width: 600px) {
  .nav { gap: 10px; }
  .nav-actions { gap: 8px; }
}
@media (max-width: 374px) {
  .login-full { display: none; }
  .login-short { display: inline; }
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --m-ink: #ecf2ec;
  --m-text: #b6c7bb;
  --m-primary: #b8d99b;
  --m-primary-hover: #cde8b5;
  --m-paper: #17221d;
  --m-white: #101914;
  --m-line: #34443b;
  --m-soft: #223126;
  --m-warning: #edc787;
  --m-warning-bg: #392e1d;
  --m-error: #ffb7ad;
  --m-error-bg: #3b2424;
  --m-focus: #9bc8f5;
}

/* Fixed light surfaces need semantic counterparts in the dark palette. */
[data-theme="dark"] .site-header { background: #101914f5; }
[data-theme="dark"] .skip-link { background: #23372c; }
[data-theme="dark"] .product-top,
[data-theme="dark"] .contact-section { background: #0c1511; }
[data-theme="dark"] .button.primary,
[data-theme="dark"] .form-submit,
[data-theme="dark"] .recommended .price-cta a,
[data-theme="dark"] .example-check { color: #142417; }
[data-theme="dark"] .button.secondary,
[data-theme="dark"] .menu-toggle,
[data-theme="dark"] .lead-form,
[data-theme="dark"] .table-scroll tbody tr { background: var(--m-paper); }
[data-theme="dark"] .button.secondary,
[data-theme="dark"] .price-cta a { border-color: #536858; }
[data-theme="dark"] .product-window { border-color: #3f5145; box-shadow: 0 16px 40px #00000030; }
[data-theme="dark"] .flow-tabs,
[data-theme="dark"] .table-scroll th { background: #19251e; }
[data-theme="dark"] .status-badge { border-color: #445d38; }
[data-theme="dark"] .status-badge.warning { border-color: #604a29; }
[data-theme="dark"] .source-arrow { color: #99ad9c; }
[data-theme="dark"] .source-document { background: #18221c; }
[data-theme="dark"] .candidate-example { background: #203022; border-color: #45603b; }
[data-theme="dark"] .price-up { color: #efbd96; background: #38281d; }
[data-theme="dark"] .price-down { color: #b8d99b; background: #263628; }
[data-theme="dark"] .workflow-grid article { border-color: #4c6755; }
[data-theme="dark"] .workflow-result { border-color: var(--m-line); }
[data-theme="dark"] .text-link { border-color: #6a826c; }
[data-theme="dark"] .boundary-section { background: #202d20; border-color: #43563b; }
[data-theme="dark"] .boundary-icon { border-color: #829773; }
[data-theme="dark"] .price-card.recommended { background: #202d20; border-color: #68825c; }
[data-theme="dark"] .lead-form input,
[data-theme="dark"] .lead-form textarea { background: var(--m-white); border-color: #63766a; }
[data-theme="dark"] .lead-form ::placeholder { color: #91a696; }
/* The existing third-party verification widget keeps its own light rendering. */
.turnstile-wrap { color-scheme: light; }

/* Public identity surfaces retain the same contrast hierarchy in dark appearance. */
:root[data-theme="dark"] {
  --m-canvas: #111e18;
  --m-surface-soft: #17271e;
  --m-forest: #193c2e;
  --m-forest-deep: #0e261d;
}
[data-theme="dark"] .site-header { background: #111e18f5; }
[data-theme="dark"] .hero-journey { border-color: #3d6148; box-shadow: 0 24px 52px #00000025; }
[data-theme="dark"] .journey-review { background: #243b2b; color: #eef4e5; }
[data-theme="dark"] .journey-step { color: #b2c9ac; }
[data-theme="dark"] .journey-review ul { color: #cbdcc2; }
[data-theme="dark"] .journey-review li > span { background: #3c5537; color: #d6edc3; }
[data-theme="dark"] .journey-output { background: #c3dca3; color: #20351f; }
[data-theme="dark"] .journey-output small,
[data-theme="dark"] .journey-output p { color: #3f5834; }
[data-theme="dark"] .boundary-section { background: transparent; border-color: var(--m-line); }
[data-theme="dark"] .guide-callout { background: #22351f; border-color: #3f5933; }
[data-theme="dark"] .workflow-grid article { border-color: var(--m-line); }
[data-theme="dark"] .price-card.recommended { background: #22351f; border-color: #5e7950; }
[data-theme="dark"] .lead-form { background: var(--m-paper); }

/* Package scope is readable without hiding any feature on narrow screens. */
.price-scope{margin-top:28px;overflow-x:auto;border:1px solid var(--m-line);border-radius:16px;background:var(--m-paper)}
.price-scope table{width:100%;min-width:680px;border-collapse:collapse;font-size:14px;line-height:1.6}
.price-scope caption{text-align:left;padding:20px;font-size:19px;font-weight:700}
.price-scope th,.price-scope td{padding:16px;text-align:left;border-top:1px solid var(--m-line);vertical-align:top}
.price-scope thead th{font-size:13px}.price-scope tbody th{width:27%}
.price-scope:focus-visible{outline:3px solid var(--m-ink);outline-offset:4px}
