/**
 * Forsa MVP: light-mode card elevation + optional dark theme via html[data-forsa-theme="dark"].
 * Loaded after page-specific <style> blocks so these rules can layer on top.
 */

/* —— Theme toggle —— */
.forsa-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.forsa-theme-toggle:hover {
  background: rgba(20, 83, 45, 0.1);
  border-color: rgba(20, 83, 45, 0.15);
}
.forsa-theme-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.forsa-theme-toggle svg {
  display: block;
}

nav .forsa-theme-toggle,
.nav-auth .forsa-theme-toggle,
.prod-site-header .forsa-theme-toggle,
.site-header .forsa-theme-toggle {
  color: #3d5246;
}

/* —— Light: slightly more modern card surfaces —— */
.card,
.form-card,
.dashboard-shell,
.entry-card,
.cta-card,
.cumul-bar,
.addr-suggestions,
.mission-panel-card,
.demo-form,
.empty-state {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 10px 32px rgba(15, 23, 42, 0.07);
  border-color: rgba(15, 23, 42, 0.09);
}

.result-card.green,
.result-card.red,
.result-card.dark {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 26px rgba(15, 23, 42, 0.08);
}

@media print {
  .card,
  .form-card,
  .dashboard-shell,
  .entry-card,
  .cta-card,
  .cumul-bar,
  .demo-form,
  .mission-panel-card {
    box-shadow: none !important;
  }
}

html[data-forsa-theme="dark"] {
  color-scheme: dark;
}

html[data-forsa-theme="dark"] ::selection {
  background: #3d5a40;
  color: #f4faf4;
}

html[data-forsa-theme="dark"] .forsa-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-forsa-theme="dark"] .nav-auth .forsa-theme-toggle {
  color: #d1dbd4;
}

/* —— DM Sans marketing pages (index, tools, contact, book-a-demo): nav & footer —— */
html[data-forsa-theme="dark"] body {
  background: #121612 !important;
  color: #e7ebe8 !important;
}

html[data-forsa-theme="dark"] nav {
  background: #252b29 !important;
  border-bottom-color: rgba(0, 0, 0, 0.45) !important;
}

html[data-forsa-theme="dark"] .logo {
  color: #f1f7f3 !important;
}
html[data-forsa-theme="dark"] .logo-accent {
  color: #9fdfaa !important;
}

html[data-forsa-theme="dark"] .prod-brand,
html[data-forsa-theme="dark"] .site-header .brand {
  color: #ecfdf5 !important;
}
html[data-forsa-theme="dark"] .site-header .brand:visited {
  color: #ecfdf5 !important;
}

html[data-forsa-theme="dark"] .nav-links > li > a,
html[data-forsa-theme="dark"] .nav-contact {
  color: #b8c2b9 !important;
}

html[data-forsa-theme="dark"] .nav-links > li > a:hover,
html[data-forsa-theme="dark"] .nav-contact:hover {
  color: #f2f7f3 !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

html[data-forsa-theme="dark"] .nav-resources-trigger,
html[data-forsa-theme="dark"] .nav-tools-trigger {
  color: #e7ebe8 !important;
}

html[data-forsa-theme="dark"] .nav-resources-panel,
html[data-forsa-theme="dark"] .nav-tools-panel {
  background: #1c231e !important;
  border-color: #2f3a31 !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45) !important;
}

html[data-forsa-theme="dark"] .nav-resources-heading {
  color: #8f9e91 !important;
}

html[data-forsa-theme="dark"] .nav-resources-panel a,
html[data-forsa-theme="dark"] .nav-tools-panel a {
  color: #e7ebe8 !important;
}

html[data-forsa-theme="dark"] .nav-resources-panel a:hover,
html[data-forsa-theme="dark"] .nav-tools-panel a:hover {
  color: #8fdb9f !important;
}

html[data-forsa-theme="dark"] .nav-auth-link:not(.nav-auth-signup-bubble),
html[data-forsa-theme="dark"] .nav-auth-contact {
  color: #b8c2b9 !important;
}

html[data-forsa-theme="dark"] .site-footer {
  background: #181e19 !important;
  border-top-color: #2a342c !important;
  color: #a3ada4 !important;
}

/* Product shell (tools.html, contact.html) */
html[data-forsa-theme="dark"] .prod-site-sidebar {
  background: #151a16 !important;
  border-right-color: #2a342c !important;
}

html[data-forsa-theme="dark"] .prod-sidebar-nav a {
  color: #c4cdc5 !important;
}

html[data-forsa-theme="dark"] .prod-sidebar-nav a:hover {
  background: rgba(143, 219, 159, 0.08) !important;
  color: #abedb8 !important;
}

html[data-forsa-theme="dark"] .prod-sidebar-nav a[aria-current="page"] {
  background: rgba(20, 83, 45, 0.35) !important;
  color: #d8f5de !important;
}

html[data-forsa-theme="dark"] .prod-site-header {
  background: #252b29 !important;
  border-bottom-color: rgba(0, 0, 0, 0.45) !important;
}

html[data-forsa-theme="dark"] .prod-header-signup,
html[data-forsa-theme="dark"] .header-signup {
  color: #b9e8c8 !important;
}
html[data-forsa-theme="dark"] .prod-header-signup-bubble,
html[data-forsa-theme="dark"] .header-signup-bubble {
  color: #d8f5e2 !important;
  background: rgba(120, 220, 150, 0.14) !important;
  border-color: rgba(130, 220, 160, 0.38) !important;
}

html[data-forsa-theme="dark"] .prod-header-signup:not(.prod-header-signup-bubble) {
  color: #aeb7af !important;
}

html[data-forsa-theme="dark"] .prod-site-header .prod-account {
  color: #c4cdc5 !important;
}

html[data-forsa-theme="dark"] .prod-app-main main {
  color: inherit;
}

/* Tools calculator */
html[data-forsa-theme="dark"] .form-card,
html[data-forsa-theme="dark"] .empty-state,
html[data-forsa-theme="dark"] .cumul-bar,
html[data-forsa-theme="dark"] .cta-card {
  background: #1a211c !important;
  border-color: #323d34 !important;
  color: #e7ebe8 !important;
}

html[data-forsa-theme="dark"] .field-label,
html[data-forsa-theme="dark"] .form-title {
  color: #8f9e91 !important;
}

html[data-forsa-theme="dark"] .field-input,
html[data-forsa-theme="dark"] select.field-input {
  background: #121612 !important;
  border-color: #3d4a41 !important;
  color: #e7ebe8 !important;
}

html[data-forsa-theme="dark"] main.about-wrap[aria-label="Local Law 97 calculator"] .kicker {
  color: #8f9e91 !important;
}

html[data-forsa-theme="dark"] main.about-wrap[aria-label="Local Law 97 calculator"] h1 {
  color: #dff3e6 !important;
}

html[data-forsa-theme="dark"] #card2024.result-card.dark,
html[data-forsa-theme="dark"] #card2030.result-card.dark {
  background: #252d27 !important;
  color: #f0f5f1 !important;
}

html[data-forsa-theme="dark"] #card2024.result-card.green,
html[data-forsa-theme="dark"] #card2030.result-card.green,
html[data-forsa-theme="dark"] .result-card.green {
  background: #1f2e24 !important;
  color: #e7ebe8 !important;
}

html[data-forsa-theme="dark"] #card2024.result-card,
html[data-forsa-theme="dark"] #card2030.result-card {
  border-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .tools-disclaimer p {
  color: #7d8980 !important;
  border-top-color: #323d34 !important;
}

html[data-forsa-theme="dark"] nav .nav-contact {
  color: #aeb7af !important;
}

/* Contact */
html[data-forsa-theme="dark"] main.contact-wrap h1,
html[data-forsa-theme="dark"] main.contact-wrap .contact-improve {
  color: #dfe8df !important;
}

html[data-forsa-theme="dark"] .contact-prose,
html[data-forsa-theme="dark"] .contact-email-line {
  color: #aeb7af !important;
}

/* Dashboard, portfolio & product shell pages (deeper backdrop than flat marketing body) */
html[data-forsa-theme="dark"] body:has(#app-shell),
html[data-forsa-theme="dark"] body:has(#prod-app-shell) {
  background: #111410 !important;
  color: #e6eae7 !important;
}

html[data-forsa-theme="dark"] .site-sidebar {
  background: #151a16 !important;
  border-right-color: #2a342c !important;
}

html[data-forsa-theme="dark"] .sidebar-nav a {
  color: #c4cdc5 !important;
}

html[data-forsa-theme="dark"] .sidebar-nav a:hover {
  background: rgba(143, 219, 159, 0.08) !important;
  color: #abedb8 !important;
}

html[data-forsa-theme="dark"] .sidebar-nav a[aria-current="page"] {
  background: rgba(20, 83, 45, 0.38) !important;
  color: #d8f5de !important;
}

html[data-forsa-theme="dark"] .site-header {
  background: #252b29 !important;
  border-bottom-color: rgba(0, 0, 0, 0.45) !important;
}

html[data-forsa-theme="dark"] .header-actions .header-signup:not(.header-signup-bubble) {
  color: #aeb7af !important;
}

html[data-forsa-theme="dark"] .site-header .account {
  color: #c4cdc5 !important;
}

html[data-forsa-theme="dark"] .card {
  background: #1a211c !important;
  border-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .card h3,
html[data-forsa-theme="dark"] .dash-col-title {
  color: #9cb39e !important;
  border-bottom-color: #2f4a34 !important;
}

html[data-forsa-theme="dark"] .kv span:first-child,
html[data-forsa-theme="dark"] .property-facts,
html[data-forsa-theme="dark"] .pdf-print-hint {
  color: #aec0b2;
}

html[data-forsa-theme="dark"] .kv strong:not(.val-pos):not(.val-neg) {
  color: #f2f7f4 !important;
}

html[data-forsa-theme="dark"] .pdf-btn {
  background: #1a211c !important;
  border-color: #3d5542 !important;
  color: #c8f0d0 !important;
}

html[data-forsa-theme="dark"] main {
  color: #e6eae7;
}

html[data-forsa-theme="dark"] .pct-row span,
html[data-forsa-theme="dark"] .pct-row strong {
  color: inherit;
}

html[data-forsa-theme="dark"] .pct-row span {
  color: #aeb7af !important;
}

html[data-forsa-theme="dark"] .pct-row strong {
  color: #f2f7f4 !important;
}

html[data-forsa-theme="dark"] .banner {
  background: #2a1f14 !important;
  border-color: #4a3b28 !important;
  color: #f0e8dd !important;
}

/* Portfolio */
html[data-forsa-theme="dark"] main .page-title {
  color: #d8ebe0 !important;
}

html[data-forsa-theme="dark"] main .page-sub {
  color: #9aaa9c !important;
}

html[data-forsa-theme="dark"] .entry-card {
  background: #1a211c !important;
  border-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .entry-card label,
html[data-forsa-theme="dark"] .entry-card input,
html[data-forsa-theme="dark"] .entry-card textarea,
html[data-forsa-theme="dark"] .entry-card select {
  color-scheme: dark;
}

/* Book-a-demo */
html[data-forsa-theme="dark"] .demo-top-bar {
  background: linear-gradient(165deg, #232e26 0%, #1c251f 100%) !important;
  border-top-color: #323d34 !important;
  border-bottom-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .demo-top-bar h1 {
  color: #eaf2eb !important;
}

html[data-forsa-theme="dark"] .demo-top-bar-sub,
html[data-forsa-theme="dark"] .demo-note,
html[data-forsa-theme="dark"] .demo-lede,
html[data-forsa-theme="dark"] .kicker {
  color: #aeb7af !important;
}

html[data-forsa-theme="dark"] .demo-form {
  background: #1a211c !important;
  border-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .demo-label {
  color: #c9d5ca !important;
}

html[data-forsa-theme="dark"] .demo-input,
html[data-forsa-theme="dark"] .demo-textarea {
  background: #121612 !important;
  border-color: #404b42 !important;
  color: #e7ebe8 !important;
}

html[data-forsa-theme="dark"] .demo-thanks {
  background: rgba(20, 83, 45, 0.35) !important;
  border-color: rgba(143, 219, 159, 0.35) !important;
  color: #cfe9d6 !important;
}

/* Landing (index.html) core sections */
html[data-forsa-theme="dark"] .landing-hero {
  background: #121612 !important;
  color: #e8ece9 !important;
}

html[data-forsa-theme="dark"] .landing-hero-headline:not(.landing-hero-headline-accent),
html[data-forsa-theme="dark"] .landing-hero-copy .landing-hero-headline {
  color: #eef2ee !important;
}

html[data-forsa-theme="dark"] .landing-hero-sub {
  color: rgba(232, 236, 233, 0.72) !important;
}

html[data-forsa-theme="dark"] .landing-audience {
  background: #151a14 !important;
}

html[data-forsa-theme="dark"] .landing-audience-inner {
  border-top-color: #2a342c !important;
  border-bottom-color: #2a342c !important;
  background: linear-gradient(165deg, #1f2a21 0%, #1b221d 100%) !important;
}

html[data-forsa-theme="dark"] .landing-audience-title {
  color: #e8f0ea !important;
}

html[data-forsa-theme="dark"] .landing-demo-video-title {
  color: #b8edc4 !important;
}

html[data-forsa-theme="dark"] .landing-demo-video-frame {
  border-color: #2f3d34 !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35) !important;
  background: #0d1210 !important;
}

html[data-forsa-theme="dark"] .about-wrap .kicker,
html[data-forsa-theme="dark"] .landing-hero-lookup-note {
  color: #939e94 !important;
}

html[data-forsa-theme="dark"] .field-input,
html[data-forsa-theme="dark"] .landing-hero-lookup-inner.tools-field .field-input {
  background: #121612 !important;
  border-color: #384038 !important;
  color: #e7ebe8 !important;
}

html[data-forsa-theme="dark"] .field-label {
  color: #8f9e91 !important;
}

html[data-forsa-theme="dark"] .addr-suggestions {
  background: #1a211c !important;
  border-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .option-name {
  color: #e8ece9 !important;
}

html[data-forsa-theme="dark"] .option-sub,
html[data-forsa-theme="dark"] .k-value + *,
html[data-forsa-theme="dark"] .muted {
  color: #9aaa9c !important;
}

html[data-forsa-theme="dark"] .dashboard-shell {
  background: #1a211c !important;
  border-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .dash-title {
  color: #dcebdf !important;
}

html[data-forsa-theme="dark"] .dash-note,
html[data-forsa-theme="dark"] .k-value {
  color: #b4bfba !important;
}

html[data-forsa-theme="dark"] .solutions h2 {
  color: #b8edc4 !important;
}

html[data-forsa-theme="dark"] .solutions-list,
html[data-forsa-theme="dark"] .solutions-item-copy,
html[data-forsa-theme="dark"] .solutions-item-btn {
  color: #c9d6cc !important;
}

html[data-forsa-theme="dark"] .solutions-interactive {
  filter: brightness(0.92);
}

html[data-forsa-theme="dark"] .landing-bottom-cta-inner {
  background: linear-gradient(160deg, #1f2720 0%, #1a211c 100%) !important;
  border-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .landing-bottom-cta-title {
  color: #eef4ef !important;
}

html[data-forsa-theme="dark"] .landing-built-by {
  color: #9aaa9c !important;
}

html[data-forsa-theme="dark"] .mission-capabilities {
  background: #141814 !important;
  border-top-color: #2a342c !important;
}

html[data-forsa-theme="dark"] .mission-capabilities-kicker,
html[data-forsa-theme="dark"] .mission-capabilities-title em {
  color: #8f9e91 !important;
}

html[data-forsa-theme="dark"] .mission-capabilities-title {
  color: #eaf2eb !important;
}

html[data-forsa-theme="dark"] .mission-capability-btn {
  color: #dfe8df !important;
}

html[data-forsa-theme="dark"] .mission-capabilities-grid {
  border-top-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .mission-capability {
  border-bottom-color: #323d34 !important;
}

html[data-forsa-theme="dark"] .mission-capabilities-panel {
  opacity: 0.98;
  border-color: #3d5542 !important;
  filter: saturate(0.85) brightness(0.82);
}

html[data-forsa-theme="dark"] .mission-panel-card {
  background: rgba(26, 33, 28, 0.92) !important;
  border-color: rgba(143, 219, 159, 0.2) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4) !important;
}

html[data-forsa-theme="dark"] .mission-panel-card h3 {
  color: #e8f6ea !important;
}

html[data-forsa-theme="dark"] #missionActionLogList {
  color: #c9d6cc !important;
}
