/* Shared surfaces and controls, loaded after the individual page styles. */
:root {
  color-scheme: light;
  --accent-text: #fff;
  --accent-fill: #a94300;
  --pm-hero-end: #edf6f5;
  --pm-section-bg: #f2f5f4;
  --pm-card-bg: #f6f7f6;
  --pm-line: #dce5e3;
  --pm-faq-line: #c9d5d2;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary-dark: #ffb078;
  --primary-soft: #39271f;
  --ink: #f1f1f1;
  --ink-soft: #d2d4d6;
  --text-muted: #b8bdc2;
  --border-color: #42494f;
  --border-strong: #747e87;
  --surface: #171a1d;
  --surface-soft: #20252a;
  --surface-subtle: #1c2024;
  --success: #79d8a4;
  --danger: #ffa1a1;
  --focus-color: #ffb078;
  --accent-text: #24170e;
  --pm-hero-end: #172e30;
  --pm-section-bg: #1c2628;
  --pm-card-bg: #202a2d;
  --pm-line: #425456;
  --pm-faq-line: #526569;
}
.site-header { background: var(--surface); border-bottom-color: var(--border-color); }
.site-header .nav-flex { gap: 18px; }
.site-header .nav-cluster { order: 2; margin-left: auto; }
.theme-toggle {
  order: 3; display: inline-grid; place-items: center; flex: 0 0 44px;
  width: 44px; min-height: 44px; padding: 10px; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); background: var(--surface-soft); color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--primary-dark); color: var(--primary-dark); }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-toggle .theme-sun, [data-theme="dark"] .theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-sun { display: block; }
.site-header .menu-toggle { order: 4; }
.header-cta:hover, .btn-primary:hover, .btn-accent, .btn-accent:hover {
  background: var(--primary-dark); border-color: var(--primary-dark); color: var(--accent-text);
}
.btn-outline:hover { color: var(--accent-text); background: var(--primary-dark); }
.pm-header-action:hover, .social-links a:hover { background: var(--accent-fill); color: #fff; }
[data-theme="dark"] .project-media:not(.project-media--coming) { background: var(--surface-soft); }
.pm-landing { --pm-teal: #12636a; --pm-muted: #53636a; }
[data-theme="dark"] .pm-landing { --pm-teal: #8ed3d3; --pm-muted: #bbced0; }
.pm-hero { background: linear-gradient(120deg, var(--surface) 52%, var(--pm-hero-end)); }
.pm-ai-section, .pm-faq-section { background: var(--pm-section-bg); }
.pm-question-grid blockquote { background: var(--surface); border-color: var(--pm-line); }
.pm-feature { background: var(--pm-card-bg); border-color: var(--pm-line); }
.pm-privacy-list > div { border-color: var(--pm-line); }
.pm-faq-list details, .pm-faq-list details:last-child { border-color: var(--pm-faq-line); }
.pm-faq-list details p { color: var(--pm-muted); }
.pm-faq-list summary:focus-visible { outline-color: var(--focus-color); }
.pm-text-link { color: var(--primary-dark); }
/* QR codes and store/screenshot artwork retain their original colours. */
.pm-qr { background: #fff; color-scheme: light; }
[data-theme="dark"] :is(.pm-badge,.pm-doc-meta,.pm-doc-date,.pm-doc-count) { color: var(--text-muted); }
[data-theme="dark"] .status--waiting { background: #382e18; border-color: #856c32; color: #f4d48d; }
[data-theme="dark"] .status--ready { background: #193629; border-color: #416c53; color: #a8e8c5; }
[data-theme="dark"] .status--error { background: #3a2226; border-color: #88575c; color: #ffc1c1; }
@media (max-width: 991px) {
  .site-header .nav-flex { gap: 12px; }
  .site-header .theme-toggle { margin-left: auto; }
  .site-header.navigation-ready .menu-toggle { margin-left: 0; }
  .site-header .nav-cluster { order: 5; margin-left: 0; }
  .site-header .nav-cluster > .header-cta { display: flex; justify-content: center; width: 100%; margin-top: 0; }
}
