/* PTP_FL_H13_SITE_THEME_V1
 * Accessible, opt-in light/dark palette for Pinetree People.
 * The coastal masthead, brand green rail, image/video, Pinech art and official
 * colour badges keep their native colours. Only interface surfaces are themed.
 */
:root[data-ptp-theme="dark"] {
  color-scheme: dark;
  --bg: #0c2018;
  --canvas: #0c2018;
  --paper: #182e24;
  --ink: #ebf7ef;
  --muted: #b8d0c2;
  --line: #365e4a;
  --pine-soft: #234b38;
  --pine-glow: #45775c;
  --mint: #244a38;
  --mint-strong: #456b55;
  --shadow: 0 10px 32px rgba(0,0,0,.32);
}
html[data-ptp-theme="dark"] body {
  color: #ebf7ef;
  background: radial-gradient(circle at 0 0, #153e2d, transparent 29rem),
              linear-gradient(180deg, #081a13, #0c2119 55%, #091c14) !important;
}
/* Keep the photographic coastal masthead and the branded green navigation. */
html[data-ptp-theme="dark"] :is(.ptp-h01-masthead, .ptp-h02-standalone,
 .ptp-h08-rail, .left-rail, .community-hero, .hero) {
  color: #fff;
}
/* The original pages use both variables and literal white panel backgrounds. */
html[data-ptp-theme="dark"] :is(
  .card, .panel, .module, .content-card, .content-panel, .settings-card,
  .modal-content, .modal-panel, .dialog-content, .notification-card,
  .notification-item, .notice-card, .event-card, .bulletin-card,
  .chat-room-head, .message-card, .message-composer,
  .district-switcher-card, .system-state, .tab-panel,
  .ptp-h01-account-menu, .ptp-lobster-panel
) {
  background: #192f25;
  color: #ebf7ef;
  border-color: #3b624d;
}
html[data-ptp-theme="dark"] :is(.message-card.own,
 .message-card.deleted, .message-reply-quote) {
  background: #213c2d !important;
  color: #ebf7ef;
}
html[data-ptp-theme="dark"] :is(.event-card.official,
 .bulletin-card.official, .official-notice-banner,
 .system-state.warning) {
  background: #3d331c !important;
  color: #fff0c6;
  border-color: #ad8940;
}
html[data-ptp-theme="dark"] :is(.event-card.official,
 .bulletin-card.official, .official-notice-banner) :is(h3,p,span,strong) {
  color: #fff0c6;
}
html[data-ptp-theme="dark"] :is(.topbar:not(.ptp-h01-masthead),
 .top:not(.ptp-h01-masthead), .ptp-h02-legacy-tools) {
  background: #142e22;
  color: #e7f5ec;
  border-color: #375c48;
}
html[data-ptp-theme="dark"] :is(.community-shell, .main-feed,
 .chat-column, .chat-layout, .shell, .page-shell, .layout) {
  color: #eaf6ed;
}
html[data-ptp-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),
 select,textarea) {
  background: #10271c;
  color: #f2fff6;
  border-color: #4b775e;
}
html[data-ptp-theme="dark"] :is(input,select,textarea)::placeholder { color: #b6cabb; }
html[data-ptp-theme="dark"] :is(input,select,textarea):focus-visible {
  outline-color: #a5e4b9;
}
html[data-ptp-theme="dark"] :is(.button.secondary,.button.ghost,
 .btn-ghost, .rsvp-button, .message-action, button.secondary) {
  background: #284b37;
  color: #f0fff5;
  border-color: #568365;
}
html[data-ptp-theme="dark"] :is(.message-body, .message-author strong,
 .message-card h3, .event-card h3, .bulletin-card h3,
 .chat-room-head h2, .panel h2, .card h2) { color: #f1fff6; }
html[data-ptp-theme="dark"] :is(.message-time,.event-meta,.bulletin-meta,
 .event-description,.bulletin-body,.intro,.hint,.muted) { color: #bad1c1; }
html[data-ptp-theme="dark"] main a:not([class*="button"]):not(.btn):not(.return-button) {
  color: #9ce2b4;
}
/* The active sidebar item, pale role badges, and green calls-to-action stay
 * readable in their original branded palette. */
html[data-ptp-theme="dark"] :is(.ptp-h01-account-menu button,
 .ptp-h01-account-menu a) { color: #f7fff9; }
html[data-ptp-theme="dark"] .ptp-h01-account-menu { box-shadow: 0 15px 40px #0007; }
html[data-ptp-theme="dark"] :is(.ptp-h01-header-actions button[data-ptp-theme-toggle],
 .ptp-h02-standalone button[data-ptp-theme-toggle]) {
  outline: 2px solid #d7efb3;
  outline-offset: 2px;
}
/* Do not recolour media or rendered Pinech stickers. */
html[data-ptp-theme="dark"] :is(img,video,canvas,svg) { filter: none; }
@media (forced-colors: active) {
  html[data-ptp-theme="dark"] { forced-color-adjust: auto; }
}
/* Specific main-feed surfaces still use literal white backgrounds. */
html[data-ptp-theme="dark"] :is(
 .auth-landing, .loading-splash-card, .verification-details,
 .pwa-install-instructions, .notification-toggle-row,
 .engagement-stat, .post-menu-panel, .video-url-entry,
 .video-preview-box, .counter-box, .maine-bill-status-item,
 .role-summary-box, .federal-confirm-box, .federal-report-details,
 .ad-upload-zone, .district-dashboard-card, .community-search,
 .alignment-row, .modal, .settings-content, .settings-modal .modal-head,
 .settings-save-row, .settings-status-box, .settings-danger-zone,
 .pinetree-brief-result, .mobile-drawer-head, .guest-upgrade-dialog,
 .rep-email-dialog, .rep-email-notice
) {
 background: #192f25 !important;
 color: #eaf6ef;
 border-color: #3b624d;
}
html[data-ptp-theme="dark"] :is(.floating-feedback-link,
 .rep-email-mode-button, .settings-meta-pill) {
 background: #244535;
 color: #f1fff6;
 border-color: #548567;
}
/* Preserve fixed-colour provider sign-in buttons and illustrations. */
html[data-ptp-theme="dark"] :is(.microsoft-signin-button,
 .google-signin-mark, .microsoft-signin-mark,
 .auth-brand-logo, .brand-mark, .ad-upload-preview img) {
 filter: none;
}
/* The former accessibility/contrast glyph is now an unambiguous theme control. */
.ptp-h01-header-actions [data-ptp-theme-toggle] svg { display: none; }
.ptp-h01-header-actions [data-ptp-theme-toggle]::after {
  content: '☾';
  display: inline-block;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1;
}
html[data-ptp-theme="dark"] .ptp-h01-header-actions [data-ptp-theme-toggle]::after {
  content: '☀';
}
