/* Triple S solar — white base + dark accent bands (SAMPLE)
 *
 * Injected only by the preview proxy. Does not change the live site,
 * the dark WordPress staging, or the other preview services.
 *
 * Content base: clean white, dark readable text.
 * Near-black showcase bands (same family as the black version, #121316 / #1C1D21):
 *   - homepage hero (#top)
 *   - stats strip immediately after the hero (100MW+)
 *   - storage page hero (.flag .hero) and the "how storage earns" band
 *   - site footer
 *
 * Brand paints unchanged: red #E2381B / orange #FD8943 / sand #F6BA65
 * Effects stay quiet: hairlines, soft edge glows, no flashy motion.
 */

/* Light theme only. Dark mode unsets this overlay so the origin navy staging theme shows through. */
html:not([data-theme="dark"]) {
  --logo-gray: #6D6D6D;
  --dark: #121316;
  --dark-2: #1C1D21;

  --background: #FFFFFF;
  --surface: #F7F7F8;
  --card: #FFFFFF;

  --foreground: #1A1A1A;
  --card-foreground: var(--foreground);
  --popover: #FFFFFF;
  --popover-foreground: var(--foreground);

  --primary: #FD8943;
  --primary-foreground: #FFFFFF;

  --secondary: #F7F7F8;
  --secondary-foreground: var(--foreground);
  --muted: #F3F3F4;
  --muted-foreground: #5C5C5C; /* ~7:1 on white, AA */
  --accent: #F0F0F1;
  --accent-foreground: var(--foreground);
  --destructive: #E2381B;
  --destructive-foreground: #FFFFFF;

  --border: #E6E6E8;
  --input: #D8D8DA;
  --ring: #FD8943;

  --brand-gray: #6D6D6D;
  --brand-red: #E2381B;
  --brand-orange: #FD8943;
  --brand-sand: #F6BA65;

  --text-orange: #985228;
  --text-sand: #7B5D32;
  --text-red: #C03017;

  --gradient-brand: linear-gradient(120deg, var(--brand-red), var(--brand-orange) 55%, var(--brand-sand));
  /* Darker fill so white button text meets WCAG AA 4.5:1 (sand/stock orange do not). */
  --gradient-brand-btn: linear-gradient(120deg, #C81E12, #C44715 70%);
  --btn-fill-start: #C81E12; /* white 5.75:1 */
  --btn-fill-end: #C44715;   /* white 4.93:1 */
  --gradient-glow: radial-gradient(closest-side, color-mix(in oklab, var(--brand-orange) 45%, transparent), transparent);
  --shadow-glow: 0 10px 40px -10px color-mix(in oklab, var(--brand-red) 35%, transparent);
  --shadow-glow-lg: 0 20px 80px -20px color-mix(in oklab, var(--brand-orange) 35%, transparent);
}

html:not([data-theme="dark"]),
html:not([data-theme="dark"]) body {
  background-color: var(--background) !important;
  color: var(--foreground) !important;
}

html:not([data-theme="dark"]) ::selection {
  background: var(--brand-orange);
  color: #1A1A1A;
}

/* ---------- Text accents that fail AA at full brand brightness ---------- */
html:not([data-theme="dark"]) .text-brand-orange,
html:not([data-theme="dark"]) a.text-brand-orange {
  color: var(--text-orange) !important;
}
html:not([data-theme="dark"]) .hover\:text-brand-orange:hover,
html:not([data-theme="dark"]) a.hover\:text-brand-orange:hover,
html:not([data-theme="dark"]) nav a:hover {
  color: var(--text-orange);
}
html:not([data-theme="dark"]) .text-brand-sand {
  color: var(--text-sand) !important;
}
html:not([data-theme="dark"]) .ts-prose a,
html:not([data-theme="dark"]) .ts-link {
  color: var(--text-orange);
}
html:not([data-theme="dark"]) .ts-link:hover {
  color: var(--text-sand);
}
html:not([data-theme="dark"]) .ts-chip.on {
  color: var(--text-sand);
}
html:not([data-theme="dark"]) .ts-cmp th {
  color: var(--text-sand);
}

/* ---------- Light chrome ---------- */
html:not([data-theme="dark"]) .glass {
  background: color-mix(in oklab, #FFFFFF 86%, transparent) !important;
  border-color: color-mix(in oklab, #1A1A1A 10%, white) !important;
}

html:not([data-theme="dark"]) .grain::before,
html:not([data-theme="dark"]) .grain:before {
  opacity: 0.025 !important;
}

html:not([data-theme="dark"]) .logo-grey {
  filter: grayscale(1) brightness(0) invert(0.28) !important;
  opacity: 0.75;
}
html:not([data-theme="dark"]) .logo-grey:hover {
  filter: grayscale(1) brightness(0) invert(0.14) !important;
  opacity: 1;
}
html:not([data-theme="dark"]) .logo-white {
  filter: none !important;
  opacity: 0.85;
}

html:not([data-theme="dark"]) .ts-prose .btn,
html:not([data-theme="dark"]) .ts-pager .current {
  background: var(--gradient-brand-btn) !important;
  color: #FFFFFF !important;
}
html:not([data-theme="dark"]) .ts-prose .btn2 {
  color: #1A1A1A !important;
  background: #FFFFFF !important;
  border: 1.5px solid rgba(26, 26, 26, 0.55) !important;
}

html:not([data-theme="dark"]) .ts-card,
html:not([data-theme="dark"]) .ts-prose .card,
html:not([data-theme="dark"]) .ts-prose blockquote,
html:not([data-theme="dark"]) .ts-prose th,
html:not([data-theme="dark"]) .ts-prose .ctabox,
html:not([data-theme="dark"]) .ts-prose .dates {
  background-color: #FFFFFF;
}

html:not([data-theme="dark"]) .ts-video {
  background: #F3F3F4;
}
html:not([data-theme="dark"]) .ts-video figcaption {
  background: rgba(18, 19, 22, 0.58);
  color: #F6BA65;
}

html:not([data-theme="dark"]) .ts-tl-dot,
html:not([data-theme="dark"]) .ts-bar {
  background-color: #FFFFFF;
}

/* ---------- Shared dark-band tokens (hero, stats, storage, footer) ---------- */
html:not([data-theme="dark"]) #top,
html:not([data-theme="dark"]) #ts-stats,
html:not([data-theme="dark"]) footer,
html:not([data-theme="dark"]) .flag .hero,
html:not([data-theme="dark"]) .ts-dark-band {
  --foreground: #F4F4F5;
  --muted-foreground: #C6C6C9;
  --background: #121316;
  --surface: #1C1D21;
  --card: #1C1D21;
  --card-foreground: #F4F4F5;
  --border: rgba(255, 255, 255, 0.10);
  --text-orange: #F6BA65;
  --text-sand: #F6BA65;
  --primary-foreground: #FFFFFF;
  color: var(--foreground);
  background-color: #121316;
}

/* Quiet corner glow — innovative, not flashy */
html:not([data-theme="dark"]) #top::after,
html:not([data-theme="dark"]) footer::after,
html:not([data-theme="dark"]) .ts-dark-band::after {
  content: "";
  position: absolute;
  inset: auto auto -20% -15%;
  width: min(42rem, 90vw);
  height: min(42rem, 90vw);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    closest-side,
    color-mix(in oklab, var(--brand-orange) 22%, transparent),
    transparent 72%
  );
  opacity: 0.45;
}
html:not([data-theme="dark"]) footer::after,
html:not([data-theme="dark"]) .ts-dark-band::after {
  inset: auto -18% -30% auto;
  opacity: 0.28;
  background: radial-gradient(
    closest-side,
    color-mix(in oklab, var(--brand-sand) 20%, transparent),
    transparent 72%
  );
}

/* ---------- Homepage hero ---------- */
html:not([data-theme="dark"]) #top {
  position: relative;
  background-color: #121316 !important;
  color: #F4F4F5;
}
html:not([data-theme="dark"]) #top .pointer-events-none,
html:not([data-theme="dark"]) #top > .relative {
  z-index: 1;
}
html:not([data-theme="dark"]) #top img.opacity-20,
html:not([data-theme="dark"]) #top .pointer-events-none img {
  opacity: 0.22 !important;
}
html:not([data-theme="dark"]) #top .bg-gradient-to-b {
  background-image: linear-gradient(
    to bottom,
    color-mix(in oklab, #121316 55%, transparent),
    color-mix(in oklab, #121316 35%, transparent),
    #121316
  ) !important;
}
html:not([data-theme="dark"]) #top .bg-gradient-to-t {
  background-image: linear-gradient(to top, #121316, transparent) !important;
}
html:not([data-theme="dark"]) #top .animate-sun-spin {
  opacity: 0.22 !important;
}
html:not([data-theme="dark"]) #top .animate-drift {
  opacity: 0.22 !important;
}
html:not([data-theme="dark"]) #top .glass {
  background: color-mix(in oklab, #121316 55%, transparent) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #F4F4F5;
}
html:not([data-theme="dark"]) #top p,
html:not([data-theme="dark"]) #top .text-foreground\/75,
html:not([data-theme="dark"]) #top .text-foreground\/70,
html:not([data-theme="dark"]) #top .text-muted-foreground {
  color: rgba(244, 244, 245, 0.82) !important;
}
html:not([data-theme="dark"]) #top a.border,
html:not([data-theme="dark"]) #top a.border-foreground\/25 {
  color: #F4F4F5 !important;
  border-color: rgba(244, 244, 245, 0.28) !important;
}
html:not([data-theme="dark"]) #top a.border:hover {
  border-color: var(--brand-orange) !important;
  background: color-mix(in oklab, var(--brand-orange) 14%, transparent) !important;
}

/* ---------- Stats band: continuous with the hero, instrument-panel cells ---------- */
html:not([data-theme="dark"]) #top + section,
html:not([data-theme="dark"]) #ts-stats {
  position: relative;
  background-color: #121316 !important;
  color: #F4F4F5;
  padding-top: 0;
  padding-bottom: 3.25rem;
  margin-top: -0.25rem;
}
html:not([data-theme="dark"]) #top + section::before,
html:not([data-theme="dark"]) #ts-stats::before {
  content: "";
  display: block;
  height: 2px;
  width: min(14rem, 46%);
  margin: 0 auto 1.35rem;
  background: var(--gradient-brand);
  border-radius: 999px;
  opacity: 0.75;
}
html:not([data-theme="dark"]) #top + section > div,
html:not([data-theme="dark"]) #ts-stats > div {
  position: relative;
  z-index: 1;
  background: #1C1D21 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--brand-sand) 32%, transparent),
    0 22px 48px -24px rgba(0, 0, 0, 0.55);
}
html:not([data-theme="dark"]) #top + section > div .bg-surface,
html:not([data-theme="dark"]) #ts-stats > div .bg-surface {
  background-color: transparent !important;
}
html:not([data-theme="dark"]) #top + section .text-muted-foreground,
html:not([data-theme="dark"]) #ts-stats .text-muted-foreground {
  color: #D0D0D3 !important;
}

/* ---------- Storage page: keep the photo hero dark; one mid-page dark band ---------- */
html:not([data-theme="dark"]) .flag .hero {
  position: relative;
  color: #fff !important;
  background-color: #121316;
}
html:not([data-theme="dark"]) .flag .hero::after,
html:not([data-theme="dark"]) .flag .hero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* RTL: first stop sits on the right, behind the text */
  background: linear-gradient(270deg, rgba(12, 16, 20, 0.82), rgba(12, 16, 20, 0.12));
}
html:not([data-theme="dark"]) .flag .hero .in {
  position: relative;
  z-index: 2;
}
html:not([data-theme="dark"]) .flag .hero .in,
html:not([data-theme="dark"]) .flag .hero h1,
html:not([data-theme="dark"]) .flag .hero p {
  color: #fff !important;
}
html:not([data-theme="dark"]) .flag .hero h1 {
  font-weight: 700 !important;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}
html:not([data-theme="dark"]) .flag .hero p {
  font-weight: 450;
  font-size: 18px;
  line-height: 1.55;
  opacity: 1 !important;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}
@media (max-width: 640px) {
  html:not([data-theme="dark"]) .flag .hero::after,
  html:not([data-theme="dark"]) .flag .hero:after {
    background: linear-gradient(
      to top,
      rgba(12, 16, 20, 0.90) 0%,
      rgba(12, 16, 20, 0.62) 42%,
      rgba(12, 16, 20, 0.18) 72%,
      rgba(12, 16, 20, 0.06) 100%
    );
  }
  html:not([data-theme="dark"]) .flag .hero p {
    font-size: 16px;
    line-height: 1.5;
  }
}
html:not([data-theme="dark"]) main.flag {
  background: transparent;
  color: var(--foreground, #1A1A1A);
}
html:not([data-theme="dark"]) .flag section {
  background: transparent;
  color: inherit;
}
html:not([data-theme="dark"]) .flag section.alt {
  background: #F7F7F8 !important;
}
html:not([data-theme="dark"]) .flag .card {
  background: #FFFFFF !important;
  color: #1A1A1A !important;
  border: 1px solid #E6E6E8 !important;
  box-shadow: 0 8px 28px rgba(18, 19, 22, 0.06);
}
html:not([data-theme="dark"]) .flag h2,
html:not([data-theme="dark"]) .flag h3,
html:not([data-theme="dark"]) .flag b,
html:not([data-theme="dark"]) .flag p,
html:not([data-theme="dark"]) .flag li {
  color: inherit;
}
html:not([data-theme="dark"]) .flag section.cta {
  --foreground: #F4F4F5;
  --muted-foreground: #C6C6C9;
  background: linear-gradient(120deg, #121316, #1C1D21 55%, #241C18) !important;
  color: #F4F4F5 !important;
}
html:not([data-theme="dark"]) .flag section.cta p,
html:not([data-theme="dark"]) .flag section.cta h2 {
  color: #F4F4F5 !important;
}

/* "How storage earns" mid-page band, class added by the preview script */
html:not([data-theme="dark"]) .flag section.ts-dark-band {
  position: relative;
  overflow: hidden;
  background-color: #121316 !important;
  color: #F4F4F5 !important;
}
html:not([data-theme="dark"]) .flag section.ts-dark-band h2,
html:not([data-theme="dark"]) .flag section.ts-dark-band p,
html:not([data-theme="dark"]) .flag section.ts-dark-band li,
html:not([data-theme="dark"]) .flag section.ts-dark-band b,
html:not([data-theme="dark"]) .flag section.ts-dark-band h3 {
  color: #F4F4F5 !important;
}
html:not([data-theme="dark"]) .flag section.ts-dark-band .card,
html:not([data-theme="dark"]) .flag section.ts-dark-band .flow .st {
  background: #1C1D21 !important;
  color: #F4F4F5 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--brand-sand) 28%, transparent);
}

/* ---------- Footer ---------- */
html:not([data-theme="dark"]) footer {
  position: relative;
  overflow: hidden;
  background-color: #121316 !important;
  color: #F4F4F5 !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}
html:not([data-theme="dark"]) footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(14rem, 46%);
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 999px;
  opacity: 0.75;
  z-index: 1;
}
html:not([data-theme="dark"]) footer > * {
  position: relative;
  z-index: 1;
}
html:not([data-theme="dark"]) footer .text-muted-foreground,
html:not([data-theme="dark"]) footer nav,
html:not([data-theme="dark"]) footer .space-y-2 {
  color: #C6C6C9 !important;
}
html:not([data-theme="dark"]) footer .text-foreground,
html:not([data-theme="dark"]) footer p.font-bold,
html:not([data-theme="dark"]) footer .font-bold {
  color: #F4F4F5 !important;
}
html:not([data-theme="dark"]) footer a {
  color: #D2D2D5;
}
html:not([data-theme="dark"]) footer a:hover {
  color: #F6BA65 !important;
}

/* ---------- Contact band: keep light text on the brand gradient ---------- */
html:not([data-theme="dark"]) #contact {
  color: #fff;
}
html:not([data-theme="dark"]) #contact .relative > div:first-child,
html:not([data-theme="dark"]) #contact .relative > div:first-child h2,
html:not([data-theme="dark"]) #contact .relative > div:first-child p,
html:not([data-theme="dark"]) #contact .relative > div:first-child svg {
  color: #fff !important;
}
html:not([data-theme="dark"]) #contact .bg-gradient-to-b {
  background-image: linear-gradient(
    to bottom,
    rgba(18, 19, 22, 0.08),
    rgba(18, 19, 22, 0.22)
  ) !important;
}
html:not([data-theme="dark"]) #contact form,
html:not([data-theme="dark"]) #contact form input,
html:not([data-theme="dark"]) #contact form select,
html:not([data-theme="dark"]) #contact form input::placeholder,
html:not([data-theme="dark"]) #contact form select option {
  color: #1A1A1A;
}
html:not([data-theme="dark"]) #contact form button {
  background: var(--gradient-brand-btn) !important;
  color: #FFFFFF !important;
}

/* ---------- Project photos: keep a dark scrim so titles stay readable ---------- */
html:not([data-theme="dark"]) #projects article .bg-gradient-to-t {
  background-image: linear-gradient(
    to top,
    rgba(18, 19, 22, 0.86),
    rgba(18, 19, 22, 0.28),
    transparent
  ) !important;
}
html:not([data-theme="dark"]) #projects article h3,
html:not([data-theme="dark"]) #projects article p,
html:not([data-theme="dark"]) #projects article .text-foreground,
html:not([data-theme="dark"]) #projects article .text-foreground\/70 {
  color: #fff !important;
}
html:not([data-theme="dark"]) #projects article .text-brand-sand {
  color: #F6BA65 !important;
}

/* ---------- Buttons / CTAs / chips: no white-on-white, WCAG AA text ---------- */
/*
 * Light sections: brand-filled (deeper red/orange + white text) OR
 * dark outline + dark text. Light outline + light text only over dark bands.
 * White on stock #FD8943 is 2.38:1 and on #F6BA65 is 1.73:1 — those fills
 * are not used for buttons. White on #C81E12 / #C44715 is 5.75 / 4.93.
 */

html:not([data-theme="dark"]) .bg-gradient-brand,
html:not([data-theme="dark"]) a.bg-gradient-brand,
html:not([data-theme="dark"]) button.bg-gradient-brand,
html:not([data-theme="dark"]) .ts-prose .btn,
html:not([data-theme="dark"]) .flag .btn,
html:not([data-theme="dark"]) .flag a.btn,
html:not([data-theme="dark"]) #tracks [role="tab"][aria-selected="true"] > span.bg-gradient-brand,
html:not([data-theme="dark"]) #contact form button[type="submit"],
html:not([data-theme="dark"]) #tsroi .cta,
html:not([data-theme="dark"]) #tslf .next,
html:not([data-theme="dark"]) #tsfab .fab .f2 {
  background-image: var(--gradient-brand-btn) !important;
  background-color: var(--btn-fill-end) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF;
}

/* Selected track tab label sits in a sibling span */
html:not([data-theme="dark"]) #tracks [role="tab"][aria-selected="true"] .text-primary-foreground,
html:not([data-theme="dark"]) a.bg-gradient-brand,
html:not([data-theme="dark"]) button.bg-gradient-brand,
html:not([data-theme="dark"]) header a.bg-gradient-brand,
html:not([data-theme="dark"]) header #ts-mnav a.bg-gradient-brand {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF;
}

/* Don't let a hover rule wash the nav CTA to sand */
html:not([data-theme="dark"]) header a.bg-gradient-brand:hover,
html:not([data-theme="dark"]) header #ts-mnav a.bg-gradient-brand:hover {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF;
  filter: brightness(1.05);
}

/* Ghost / outline / glass chips on the white base: dark stroke + dark text */
html:not([data-theme="dark"]) a.border.border-foreground\/25,
html:not([data-theme="dark"]) a.inline-flex.border,
html:not([data-theme="dark"]) button.inline-flex.border,
html:not([data-theme="dark"]) .ts-prose .btn2,
html:not([data-theme="dark"]) .flag .btn.g,
html:not([data-theme="dark"]) .flag a.btn.g,
html:not([data-theme="dark"]) #tsroi .cta.cta2,
html:not([data-theme="dark"]) #tslf .back,
html:not([data-theme="dark"]) a.rounded-full.glass,
html:not([data-theme="dark"]) button.rounded-full.glass,
html:not([data-theme="dark"]) .rounded-full.glass.glow-hover {
  color: #1A1A1A !important;
  -webkit-text-fill-color: #1A1A1A;
  background: #FFFFFF !important;
  background-image: none !important;
  border: 1.5px solid rgba(26, 26, 26, 0.55) !important;
}

html:not([data-theme="dark"]) a.border.border-foreground\/25:hover,
html:not([data-theme="dark"]) a.inline-flex.border:hover,
html:not([data-theme="dark"]) .ts-prose .btn2:hover,
html:not([data-theme="dark"]) .flag .btn.g:hover,
html:not([data-theme="dark"]) #tsroi .cta.cta2:hover,
html:not([data-theme="dark"]) a.rounded-full.glass:hover,
html:not([data-theme="dark"]) button.rounded-full.glass:hover,
html:not([data-theme="dark"]) .rounded-full.glass.glow-hover:hover {
  border-color: var(--text-red) !important;
  color: var(--text-red) !important;
  -webkit-text-fill-color: var(--text-red);
  background: #FFF4F0 !important;
}

/* Outline CTA "בדיקת מסלולים ללא השקעה" and any border button over dark bands */
html:not([data-theme="dark"]) #top a.border,
html:not([data-theme="dark"]) #top a.border-foreground\/25,
html:not([data-theme="dark"]) #top a.inline-flex.border,
html:not([data-theme="dark"]) .flag .hero a.border,
html:not([data-theme="dark"]) .flag .hero a.inline-flex.border,
html:not([data-theme="dark"]) .ts-dark-band a.border,
html:not([data-theme="dark"]) .flag section.cta a.border,
html:not([data-theme="dark"]) footer a.border {
  color: #F4F4F5 !important;
  -webkit-text-fill-color: #F4F4F5;
  background: transparent !important;
  background-image: none !important;
  border: 1.5px solid rgba(244, 244, 245, 0.55) !important;
}
html:not([data-theme="dark"]) #top a.border:hover,
html:not([data-theme="dark"]) #top a.border-foreground\/25:hover,
html:not([data-theme="dark"]) .flag .hero a.border:hover,
html:not([data-theme="dark"]) .ts-dark-band a.border:hover {
  border-color: var(--brand-orange) !important;
  background: color-mix(in oklab, var(--brand-orange) 14%, transparent) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF;
}

/* Product-card hover: sand on white is 1.73:1 — use the AA text-orange instead */
html:not([data-theme="dark"]) #products .group:hover .group-hover\:text-brand-sand,
html:not([data-theme="dark"]) #products .group:hover .text-brand-sand,
html:not([data-theme="dark"]) #products a.group:hover .text-muted-foreground {
  color: var(--text-orange) !important;
}

/* FAB / calculator / lead-form fills (inline styles in fab.html come later) */
html:not([data-theme="dark"]) #tsroi { --acc-t: #FFFFFF; --red: #C81E12; --org: #C44715; }
html:not([data-theme="dark"]) #tsroi .cta.cta2 {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #C03017 !important;
  -webkit-text-fill-color: #C03017;
  border: 2px solid #C03017 !important;
  box-shadow: none !important;
}
html:not([data-theme="dark"]) #tslf { --a: #C81E12; --b: #C44715; }
html:not([data-theme="dark"]) #tslf .next { color: #FFFFFF !important; -webkit-text-fill-color: #FFFFFF; }
html:not([data-theme="dark"]) #tslf .back {
  background: #FFFFFF !important;
  color: #1A1A1A !important;
  -webkit-text-fill-color: #1A1A1A;
  border: 2px solid rgba(26, 26, 26, 0.45) !important;
}
html:not([data-theme="dark"]) #tsfab { --fa: #C81E12; --fb: #C44715; }
html:not([data-theme="dark"]) #tsfab .fab .f2,
html:not([data-theme="dark"]) #tsfab .fab .f1 {
  color: #FFFFFF !important;
}

/* ---------- Header: dark glass over hero/stats, light glass on content ---------- */
html:not([data-theme="dark"]) body.ts-nav-dark header .glass {
  /* More opaque so light nav text stays readable over bright photos (storage hero). */
  background: color-mix(in oklab, #121316 90%, transparent) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}
html:not([data-theme="dark"]) body.ts-nav-dark header nav a:not(.bg-gradient-brand),
html:not([data-theme="dark"]) body.ts-nav-dark header #ts-mnav a:not(.bg-gradient-brand) {
  color: #F4F4F5 !important;
}
html:not([data-theme="dark"]) body.ts-nav-dark header nav a:not(.bg-gradient-brand):hover,
html:not([data-theme="dark"]) body.ts-nav-dark header #ts-mnav a:not(.bg-gradient-brand):hover {
  color: #F6BA65 !important;
}
html:not([data-theme="dark"]) body.ts-nav-dark #ts-burger {
  color: #F4F4F5;
}
html:not([data-theme="dark"]) body.ts-nav-dark #ts-burger svg {
  stroke: #F4F4F5;
  fill: none;
  color: #F4F4F5;
}

html:not([data-theme="dark"]) body.ts-nav-light header .glass {
  background: color-mix(in oklab, #FFFFFF 90%, transparent) !important;
  border-color: rgba(26, 26, 26, 0.10) !important;
  box-shadow: 0 8px 28px rgba(18, 19, 22, 0.08);
}
html:not([data-theme="dark"]) body.ts-nav-light header nav a:not(.bg-gradient-brand),
html:not([data-theme="dark"]) body.ts-nav-light header #ts-mnav a:not(.bg-gradient-brand) {
  color: rgba(26, 26, 26, 0.78) !important;
}
html:not([data-theme="dark"]) body.ts-nav-light header nav a:not(.bg-gradient-brand):hover,
html:not([data-theme="dark"]) body.ts-nav-light header #ts-mnav a:not(.bg-gradient-brand):hover {
  color: var(--text-orange) !important;
}
html:not([data-theme="dark"]) body.ts-nav-light #ts-burger {
  color: #1A1A1A;
}
html:not([data-theme="dark"]) body.ts-nav-light #ts-burger svg {
  stroke: #1A1A1A;
}

/* Header logo: light wordmark over dark bands, dark wordmark on the white nav */
html:not([data-theme="dark"]) header .ts-logo-on-light {
  display: none;
}
html:not([data-theme="dark"]) body.ts-nav-light header .ts-logo-on-dark {
  display: none;
}
html:not([data-theme="dark"]) body.ts-nav-light header .ts-logo-on-light {
  display: inline;
}
html:not([data-theme="dark"]) body.ts-nav-dark header .ts-logo-on-light {
  display: none;
}
html:not([data-theme="dark"]) body.ts-nav-dark header .ts-logo-on-dark {
  display: inline;
}


/* ---------- Homepage hero typography and line break ---------- */
html:not([data-theme="dark"]) #top h1 {
  line-height: 1.08 !important;
}
html:not([data-theme="dark"]) #top h1 .ts-hero-keep {
  white-space: nowrap;
}
@media (min-width: 768px) {
  html:not([data-theme="dark"]) #top h1 {
    font-size: clamp(52px, 5vw, 72px) !important;
    line-height: 1.08 !important;
  }
  html:not([data-theme="dark"]) #top h1 .ts-hero-line2 {
    white-space: nowrap;
  }
}

/* ---------- Reveal: visible by default, short motion, no stuck faded cards ---------- */
html:not([data-theme="dark"]) [data-reveal],
html:not([data-theme="dark"]) .flag .rv,
html:not([data-theme="dark"]) .flag .flow .st,
html:not([data-theme="dark"]) .ts-rise {
  opacity: 1 !important;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 300ms ease;
}
html:not([data-theme="dark"]) [data-reveal].is-in,
html:not([data-theme="dark"]) .flag .rv.on,
html:not([data-theme="dark"]) .flag .flow .st.on,
html:not([data-theme="dark"]) .ts-rise.is-in {
  opacity: 1 !important;
  transform: none;
}

/* ---------- Mobile FAB: one toggle that opens מחשבון / יצירת קשר ---------- */
html:not([data-theme="dark"]) #tsfab .fab .ts-fab-toggle {
  display: none;
}
@media (max-width: 640px) {
  html:not([data-theme="dark"]) #tsfab .fab {
    right: 16px !important;
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    gap: 10px;
  }
  html:not([data-theme="dark"]) #tsfab .fab .f1,
  html:not([data-theme="dark"]) #tsfab .fab .f2,
  html:not([data-theme="dark"]) #tsfab .fab .f3 {
    display: none !important;
  }
  html:not([data-theme="dark"]) #tsfab .fab.ts-fab-open .f1,
  html:not([data-theme="dark"]) #tsfab .fab.ts-fab-open .f2,
  html:not([data-theme="dark"]) #tsfab .fab.ts-fab-open .f3 {
    display: flex !important;
    border-radius: 30px !important;
    padding: 11px 16px 11px 14px !important;
    width: auto;
    height: auto;
    min-height: 44px;
  }
  html:not([data-theme="dark"]) #tsfab .fab.ts-fab-open .f1 span,
  html:not([data-theme="dark"]) #tsfab .fab.ts-fab-open .f2 span,
  html:not([data-theme="dark"]) #tsfab .fab.ts-fab-open .f3 span {
    display: inline !important;
  }
  html:not([data-theme="dark"]) #tsfab .fab .ts-fab-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    padding: 0 !important;
    border: 0;
    border-radius: 50% !important;
    background: var(--gradient-brand-btn, linear-gradient(120deg, #C81E12, #C44715 70%)) !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    cursor: pointer;
  }
  html:not([data-theme="dark"]) #tsfab .fab .ts-fab-toggle svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
  }
  html:not([data-theme="dark"]) #tsfab .fab.ts-fab-open .ts-fab-toggle svg {
    transform: rotate(45deg);
  }
  html:not([data-theme="dark"]) body.ts-lda-preview {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

/* ---------- Tiny variant switch only when ?demo=1 ---------- */
html:not([data-theme="dark"]) .ts-lda-switch {
  display: none;
}
html:not([data-theme="dark"]) body.ts-lda-demo .ts-lda-switch {
  display: flex;
  position: fixed;
  z-index: 10000;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in oklab, #121316 82%, transparent);
  color: #D2D2D5;
  font-family: Heebo, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
}
html:not([data-theme="dark"]) body.ts-lda-demo .ts-lda-switch a {
  color: #F6BA65;
  font-weight: 700;
  text-decoration: none;
}
html:not([data-theme="dark"]) body.ts-lda-demo .ts-lda-switch a:hover {
  text-decoration: underline;
}
html:not([data-theme="dark"]) body.ts-lda-preview header.fixed {
  top: 0;
}

@media (max-width: 640px) {
  html:not([data-theme="dark"]) #top {
    min-height: 0 !important;
    padding-top: 5.25rem !important;
    padding-bottom: 1.75rem !important;
  }
  html:not([data-theme="dark"]) #top h1 {
    font-size: clamp(38px, 9vw, 54px) !important;
    line-height: 1.08 !important;
    margin-top: 0.7rem !important;
  }
  html:not([data-theme="dark"]) #top p {
    margin-top: 1.25rem !important; /* 20px */
    margin-bottom: 0;
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
    max-width: 36rem;
  }
  html:not([data-theme="dark"]) #top .mt-10 {
    margin-top: 1.25rem !important;
    gap: 0.6rem !important;
  }
  html:not([data-theme="dark"]) #top a.bg-gradient-brand {
    min-height: 54px;
    padding: 0.7rem 1.15rem !important;
    font-size: 0.92rem;
  }
  html:not([data-theme="dark"]) #top a.border,
  html:not([data-theme="dark"]) #top a.border-foreground\/25,
  html:not([data-theme="dark"]) #top a.inline-flex.border {
    min-height: 50px;
    padding: 0.6rem 1.1rem !important;
    font-size: 0.9rem;
  }
  html:not([data-theme="dark"]) #top + section,
  html:not([data-theme="dark"]) #ts-stats {
    padding-bottom: 2.25rem;
    padding-inline: 0.85rem;
  }
  html:not([data-theme="dark"]) #top + section > div,
  html:not([data-theme="dark"]) #ts-stats > div {
    border-radius: 1.25rem;
  }
  html:not([data-theme="dark"]) footer {
    padding-inline: 1rem;
    padding-bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-theme="dark"]) #top .animate-sun-spin,
  html:not([data-theme="dark"]) #top .animate-drift {
    animation: none !important;
  }
  html:not([data-theme="dark"]) #top::after,
  html:not([data-theme="dark"]) footer::after,
  html:not([data-theme="dark"]) .ts-dark-band::after {
    opacity: 0.2;
  }
  html:not([data-theme="dark"]) [data-reveal],
  html:not([data-theme="dark"]) [data-reveal].is-in,
  html:not([data-theme="dark"]) .flag .rv,
  html:not([data-theme="dark"]) .flag .rv.on,
  html:not([data-theme="dark"]) .flag .flow .st,
  html:not([data-theme="dark"]) .ts-rise,
  html:not([data-theme="dark"]) .ts-rise.is-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ========== Theme toggle + dark-mode logo (applies in both themes) ========== */
html[data-theme="dark"] {
  color-scheme: dark;
  background-color: #16171b;
}
html[data-theme="dark"] body {
  color-scheme: dark;
}

/* After first paint, soften theme changes. Skipped when the user prefers reduced motion. */
html.ts-theme-ready,
html.ts-theme-ready body,
html.ts-theme-ready header,
html.ts-theme-ready header .glass,
html.ts-theme-ready #top,
html.ts-theme-ready #ts-stats,
html.ts-theme-ready footer,
html.ts-theme-ready .ts-card,
html.ts-theme-ready .ts-prose .card,
html.ts-theme-ready main {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease, background-image .35s ease;
}
@media (prefers-reduced-motion: reduce) {
  html.ts-theme-ready,
  html.ts-theme-ready body,
  html.ts-theme-ready header,
  html.ts-theme-ready header .glass,
  html.ts-theme-ready #top,
  html.ts-theme-ready #ts-stats,
  html.ts-theme-ready footer,
  html.ts-theme-ready .ts-card,
  html.ts-theme-ready .ts-prose .card,
  html.ts-theme-ready main {
    transition: none !important;
  }
}

/* Dark mode: always the light-on-dark wordmark (origin logo.png). */
html[data-theme="dark"] header .ts-logo-on-light {
  display: none !important;
}
html[data-theme="dark"] header .ts-logo-on-dark {
  display: inline !important;
}

.ts-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin-inline: 2px;
  border-radius: 999px;
  border: 1px solid rgba(26, 26, 26, 0.14);
  background: color-mix(in oklab, #ffffff 82%, transparent);
  box-shadow: 0 2px 10px rgba(18, 19, 22, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
  vertical-align: middle;
}
body.ts-nav-dark .ts-theme-toggle,
html[data-theme="dark"] .ts-theme-toggle {
  border-color: rgba(255, 255, 255, 0.16);
  background: color-mix(in oklab, #121316 78%, transparent);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}
.ts-theme-toggle button {
  appearance: none;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1A1A1A;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  line-height: 0;
}
body.ts-nav-dark .ts-theme-toggle button,
html[data-theme="dark"] .ts-theme-toggle button {
  color: #F4F4F5;
}
.ts-theme-toggle button svg {
  width: 20px;
  height: 20px;
  display: block;
}
.ts-theme-toggle button:hover {
  background: color-mix(in oklab, currentColor 10%, transparent);
}
.ts-theme-toggle button:focus-visible {
  outline: 2px solid #F47721;
  outline-offset: 2px;
}
.ts-theme-toggle button[aria-pressed="true"] {
  background: linear-gradient(120deg, #C81E12, #C44715 70%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(200, 30, 18, 0.28);
}
html[data-theme="dark"] .ts-theme-toggle button[aria-pressed="true"] {
  background: #F47721;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(244, 119, 33, 0.35);
}
@media (max-width: 640px) {
  .ts-theme-toggle button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .ts-theme-toggle {
    padding: 2px;
  }
}


/* The preview injects a mobile FAB toggle. Hide it in dark mode (and on desktop)
   so the origin dark staging FABs are left as they were. Light mobile still shows
   it via the scoped rule that uses display:flex !important. */
#tsfab .fab .ts-fab-toggle {
  display: none;
}

/* ===== WP theme port (ts-solar 0.2.2): contrast fixes found by automated scan (WCAG AA 4.5:1) ===== */
/* Interactive systems map (#dsRoot.tsmap) was built for the dark theme; on the white page its legend,
   captions and credit were light-on-white (1.7–1.9:1). Light mode: dark text, darker brand orange for links. */
html:not([data-theme="dark"]) #dsRoot.tsmap {
  --text: #1A1A1A;
  --text-light: #5C5C5C;
  --border: rgba(26, 26, 26, 0.12);
  --bg-alt: #F3F3F4;
}
html:not([data-theme="dark"]) #dsRoot .gm-panel,
html:not([data-theme="dark"]) #dsRoot .gm-list-seg,
html:not([data-theme="dark"]) #dsRoot .gm-entry,
html:not([data-theme="dark"]) #dsRoot .gm-legend,
html:not([data-theme="dark"]) #dsRoot .ds-legend {
  background: #FFFFFF;
  border-color: rgba(26, 26, 26, 0.1);
}
html:not([data-theme="dark"]) #dsRoot .ds-leg-a:hover,
html:not([data-theme="dark"]) #dsRoot .ds-leg-a:focus-visible,
html:not([data-theme="dark"]) #dsRoot .ds-leg-a.is-active { color: #C44715; }
html:not([data-theme="dark"]) .tsmap-credit { color: #5C5C5C; }
html:not([data-theme="dark"]) .tsmap-credit a { color: #C44715; }
/* storage page: source links and "to verify" note */
html:not([data-theme="dark"]) main.flag .src a { color: #C44715; }
main.flag .gap { color: #5c3d00; }
/* Dark mode: storage "value chain" cards (.st) kept a white card under light text (1.1:1). */
html[data-theme="dark"] main.flag .st {
  background: #1C1D21;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] main.flag .src { color: #9a9aa0; }
html:not([data-theme="dark"]) #dsRoot a { color: #C44715; }
html:not([data-theme="dark"]) #dsRoot a.ds-leg-a { color: #1A1A1A; }
html:not([data-theme="dark"]) #dsRoot a.ds-leg-a:hover,
html:not([data-theme="dark"]) #dsRoot a.ds-leg-a.is-active { color: #A3360F; }
html:not([data-theme="dark"]) #dsRoot .ds-rule-t,
html:not([data-theme="dark"]) #dsRoot .ds-rule-route,
html:not([data-theme="dark"]) #dsRoot .gm-sub { color: #A3360F !important; }
html:not([data-theme="dark"]) #dsRoot .ds-rule-list,
html:not([data-theme="dark"]) #dsRoot .gm-checks { color: #1A1A1A; }
/* view switch (illustration / text list) sits on a dark pill: keep light text there */
html:not([data-theme="dark"]) #dsRoot .gm-vbtn { color: #F4F4F5; }
