/* wiserwork-theme-v1
   Part 1: navbar extras (theme toggle + language selector) — both modes.
   Part 2: light-mode overrides. Dark mode is the site default and untouched:
   light mode activates only when <html data-theme="light"> is set (persisted
   in localStorage by /assets/ww-ui.js; applied pre-paint by an inline snippet
   in each page's <head>). */

/* ---------- Part 1: navbar extras ---------- */
.ww-nav-extras {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  order: 98;
  margin-left: 0.6rem;
}
.navbar-toggler {
  order: 99;
  margin-left: 0.5rem;
}
.ww-theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border, #2e3642);
  background: var(--surface-light, #252b35);
  color: #fbbf24;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  padding: 0;
}
.ww-theme-toggle:hover {
  border-color: #a78bfa;
  transform: rotate(15deg);
}
.ww-lang {
  position: relative;
}
.ww-lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 0.8rem;
  border-radius: 2rem;
  border: 1px solid var(--border, #2e3642);
  background: var(--surface-light, #252b35);
  color: var(--text-primary, #e8edf2);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.2s;
}
.ww-lang-btn:hover {
  border-color: #a78bfa;
}
.ww-lang-caret {
  font-size: 0.6rem;
  opacity: 0.7;
  transition: transform 0.2s;
}
.ww-lang.open .ww-lang-caret {
  transform: rotate(180deg);
}
.ww-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--surface, #1a1e26);
  border: 1px solid var(--border, #2e3642);
  border-radius: 1rem;
  padding: 0.4rem;
  min-width: 205px;
  max-height: min(70vh, 430px);
  overflow-y: auto;
  display: none;
  z-index: 1000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.ww-lang.open .ww-lang-menu {
  display: block;
}
.ww-lang-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.48rem 0.7rem;
  border: none;
  border-radius: 0.7rem;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: var(--text-primary, #e8edf2);
  font-size: 0.85rem;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.ww-lang-item:hover {
  background: var(--surface-light, #252b35);
  color: var(--text-primary, #e8edf2);
}
.ww-flag,
.ww-lang-flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.ww-flag svg,
.ww-lang-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ww-lang-flag i {
  font-size: 0.85rem;
  margin: auto;
}
.ww-lang-current {
  margin-left: auto;
  font-size: 0.7rem;
  color: #4ade80;
}
@media (max-width: 420px) {
  .ww-lang-btn .ww-lang-code {
    display: none;
  }
  .ww-nav-extras {
    gap: 0.4rem;
    margin-left: 0.4rem;
  }
}

/* ---------- Part 3: layout, fields & tables (added 2026-07-16) ----------
   These rules are global on purpose: every page loads this file AFTER its own
   inline <style>, so equal-specificity selectors here win without !important.
   Ladder below keeps the content column >= 900px whenever an ad rail is shown:

     viewport      rails shown        content column
     >= 1600px     left + right       912 -> 1000px
     1280-1599px   right only         920 -> 1000px
     < 1280px      none               fluid, capped at 1000px

   Content column math: app-main-wrap = viewport - 32 (padding) - rails - gaps. */

/* --- 3a. wider, better-balanced content column ---
   Everything here is scoped `body:not(.ww-home)`. The homepage is explicitly out
   of scope, and it reuses two of these class names for different jobs: its
   .main-container is a 1300px grid shell (not an 1000px reading column) and its
   .tool-card is a compact grid tile (not a padded panel). Without the guard this
   block silently narrowed the homepage and dropped its grid from 5 to 4 columns. */
.leaderboard-ad-wrap {
  max-width: 1688px;
  min-height: 90px;
}
.app-layout {
  max-width: 1688px;
  gap: 1.75rem;
  padding: 0 1rem 3rem;
  align-items: flex-start;
}
body:not(.ww-home) .main-container {
  max-width: 1000px;
  padding: 2.25rem 1.25rem 3.5rem;
}

/* Rails are all-or-nothing, never one-at-a-time. The old ladder showed the
   right rail alone from 1280–1599px, which shoved the content column ~160px
   left of centre (measured on a live 1440px screen). Showing both rails or
   neither keeps the content column centred in the viewport at every width:
   with two equal 300px rails the flexbox centres the middle column, and with
   none the .main-container's own margin:auto centres it. Both appear at
   >=1600px, where 1000px content + 2x300 rails + gaps still fit comfortably.

   That symmetry assumption breaks the moment only one rail actually renders:
   an ad blocker's cosmetic filters target class names containing "ad-" (ours
   included), and they don't necessarily catch .ad-left and .ad-right in the
   same pass. When one aside gets display:none'd and the other doesn't, plain
   flexbox reclaims the hidden one's space for .app-main-wrap alone, and the
   1000px column (still centred *within* app-main-wrap) drifts ~160px off the
   true viewport centre. Grid fixes this at the root: with an explicit
   `300px / 1fr / 300px` template, each column keeps its declared width
   whether or not the element placed in it is visible, so the middle column
   never moves regardless of which rail an ad blocker decides to hide. */
.ad-left,
.ad-right {
  display: none;
}
@media (min-width: 1600px) {
  .app-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 300px;
  }
  .ad-left,
  .ad-right {
    display: flex;
    align-self: start;
  }
  .ad-left {
    grid-column: 1;
  }
  .app-main-wrap {
    grid-column: 2;
  }
  .ad-right {
    grid-column: 3;
  }
}

/* --- 3b. breathing room inside cards --- */
body:not(.ww-home) .tool-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
body:not(.ww-home) .tool-header {
  margin-bottom: 2.25rem;
}

/* The description box tracks the tool container exactly — same width as the
   cards above it, on tool pages and category pages alike. (An earlier revision
   capped this at 780px for line length; per review it must line up instead.)

   Nesting differs: on 311 pages .tool-info is a SIBLING of .main-container
   (so it spans the full 1000px), on the rest it lives inside it (already 960px
   thanks to that container's 1.25rem padding). The child combinator below only
   insets the sibling case, so both end up flush with .tool-card at 960px. */
.tool-info {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 1.75rem;
}
/* Line the info panel + related grid up with the tool cards above them.
   .main-container is max-width 1000px, centred, with 1.25rem side padding, so
   its cards occupy a 960px content strip inset 1.25rem from the container edge.
   Reproduce that strip exactly: inset 1.25rem per side (matching the container
   padding when the wrap is narrower than 1000px, e.g. rails showing) but never
   exceed 960px (matching the card strip when the wrap is wider, e.g. no rails).
   This holds the panels flush with the cards at every width. */
.app-main-wrap > .tool-info,
.app-main-wrap > .ww-related {
  width: calc(100% - 2.5rem);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.tool-info p,
.tool-info li {
  font-size: 0.97rem;
  line-height: 1.75;
}

/* --- 3c. mobile navbar: keep brand + extras + hamburger on ONE line ---
   At 375px the row measured 325px of content against 319px of usable width, so
   the hamburger wrapped to a second line. Trimming the oversized gutters and
   control sizes gets it back to ~282px with room to spare. */
@media (max-width: 575.98px) {
  .navbar {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .navbar > .container-fluid {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  .navbar-brand {
    font-size: 1.18rem;
    gap: 0.4rem;
  }
  .navbar-brand svg {
    width: 32px;
    height: 32px;
  }
  .ww-nav-extras {
    gap: 0.3rem;
    margin-left: 0.3rem;
  }
  .ww-theme-toggle {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
  .ww-lang-btn {
    height: 34px;
    padding: 0 0.55rem;
  }
  .navbar-toggler {
    padding: 0.3rem 0.5rem;
    margin-left: 0.3rem;
  }
  body:not(.ww-home) .main-container {
    padding: 1.5rem 0.9rem 2.5rem;
  }
  body:not(.ww-home) .tool-card {
    padding: 1.15rem;
  }
  .tool-info {
    padding: 1.25rem;
  }
  /* match .main-container's tighter mobile padding so the inset still lines up */
  .app-main-wrap > .tool-info,
  .app-main-wrap > .ww-related {
    width: auto;
    max-width: none;
    margin-left: 0.9rem;
    margin-right: 0.9rem;
  }
}

/* --- 3d. number inputs: modern stepper, no dead space ---
   The native spin button is tiny, OS-styled and not reliably restylable, so it
   is hidden and /assets/ww-ui.js wraps every number input in .ww-num and adds a
   themed stepper. Wrapping is safe: no page CSS uses child (>) or sibling
   (+ ~) combinators on inputs — verified across all 320 English pages. */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.ww-num {
  position: relative;
  display: block;
  width: 100%;
}
/* (0,2,1) beats the pages' own `.some-cell input` (0,1,1), so the padding that
   keeps digits clear of the buttons lands without !important */
.ww-num > input[type="number"] {
  width: 100%;
  padding-right: 2.25rem;
}
.ww-num-btns {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 1.8rem;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border, #2e3642);
  border-radius: 0 0.85rem 0.85rem 0;
  overflow: hidden;
}
.ww-num-btns button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted, #8f9bb5);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ww-num-btns button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent, #7c5cfc);
}
.ww-num-btns button:active {
  background: rgba(255, 255, 255, 0.13);
}
.ww-num-btns .ww-num-down {
  border-top: 1px solid var(--border, #2e3642);
}
/* currentColor keeps the chevron correct in both themes with no second copy */
.ww-num-btns svg {
  width: 9px;
  height: 9px;
  display: block;
}
.ww-num-down svg {
  transform: rotate(180deg);
}
.ww-num > input[type="number"]:disabled ~ .ww-num-btns,
.ww-num > input[type="number"][readonly] ~ .ww-num-btns {
  display: none;
}

/* A number is short. Letting one stretch to 440px is the "dead space" problem:
   cap the field, keep it fluid below the cap. Opt out with .ww-field-wide.
   Both the wrapper and the bare input are capped, so the cap still holds if JS
   never runs.

   Scoped to DIRECT children of .tool-card only (`>`, not a descendant match):
   a lone field that stretches edge-to-edge always sits straight inside
   .tool-card with no row wrapper. A field in a 2-up/3-up grid (the far more
   common case -- BMI, Body Fat, Calorie, Compound Interest, Percentage, Tip,
   etc.) always lives one level deeper, inside that grid's own column div, so
   its available width is already set by the grid -- capping it at a flat
   260px there just leaves a gap between the field and its column edge instead
   of removing dead space. The old descendant selector (no `>`) caught both
   cases identically and broke every grid layout to fix the lone-field one. */
.tool-card > .ww-num:not(.ww-field-wide),
.tool-card > input[type="number"]:not(.ww-field-wide) {
  max-width: 260px;
}
/* A select only needs room for its longest option, not a third of the row.
   Same direct-child scoping as above, and for the same reason. */
.tool-card > select:not(.ww-field-wide):not([multiple]) {
  max-width: 260px;
}
@media (max-width: 575.98px) {
  .tool-card > .ww-num:not(.ww-field-wide),
  .tool-card > input[type="number"]:not(.ww-field-wide),
  .tool-card > select:not(.ww-field-wide):not([multiple]) {
    max-width: 100%;
  }
}

/* --- 3f. checkboxes must never be squashed by their own label ---
   A checkbox/radio is a fixed-size control, not a flexible one. Several tools
   drop one into a `display:flex` row and set only width/height, so the default
   flex-shrink:1 lets long label text deform the box — measured 13x17 instead of
   17x17 on the self-employment tax calculator at mobile width, which reads as
   the text being crammed into the checkbox. Pinning the basis fixes every
   instance, including any the page CSS forgot. */
input[type="checkbox"],
input[type="radio"] {
  flex-shrink: 0;
}

/* --- 3e. reference tables at full height (CHANGE FOUR) ---
   Only for bounded content: lookup tables and fixed-length schedules. Google
   indexes scrollable content fine, so this is an SEO-neutral UX win — it also
   lengthens the page, which gives the rail ads more viewport to stick to.
   Unbounded, user-generated lists (history, laps, file queues, parsed output)
   deliberately KEEP their scroll — see the block after this one. */
.data-table-wrap,
.ww-sched-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}
.morse-table,
.roman-table,
.char-table,
.ascii-table,
.entity-table,
.emoji-grid,
.conversion-table,
.amortization-table {
  max-height: none;
  overflow-y: visible;
}
.amortization-table,
.roman-table,
.char-table,
.ascii-table,
.entity-table,
.conversion-table {
  overflow-x: auto;
}

/* ---------- Part 4: shared charts & schedule tables ----------
   Generalized from the hand-rolled SVG donut/line/amortization code that
   previously existed only in calculator-tools/mortgage-calculator.html (as
   page-local .mc-* classes). Promoted here + into assets/ww-charts.js so the
   real-estate-tools calculators (and any future one) can reuse the same
   chart/table look instead of re-pasting bespoke CSS per page. Colors come
   from CSS custom properties and currentColor, so no light-mode copy is
   needed -- same approach the original file used. */
.ww-chart-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin-bottom: 0.2rem; }
.ww-chart-headline-value { font-size: 2.3rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.ww-chart-headline-label { font-size: 0.9rem; color: var(--text-muted); }

.ww-chart-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,240px); gap: 1.5rem; align-items: center; }
@media (max-width: 720px) { .ww-chart-split { grid-template-columns: 1fr; } }

.ww-chart-rows { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.ww-chart-rows td { padding: 0.42rem 0; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.ww-chart-rows td:last-child { text-align: right; color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.ww-chart-rows tr:last-child td { border-bottom: 0; }
.ww-chart-rows tr.ww-chart-total td { border-top: 2px solid var(--border); padding-top: 0.6rem; color: var(--text-primary); font-weight: 700; }
.ww-chart-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.5rem; flex-shrink: 0; }

.ww-chart { width: 100%; height: auto; display: block; }
.ww-chart-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.7rem; font-size: 0.78rem; color: var(--text-muted); }
.ww-chart-legend span { display: flex; align-items: center; }

.ww-chart-note { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.8rem; line-height: 1.5;
                 color: var(--text-muted); margin-top: 0.9rem; }
.ww-chart-note i { margin-top: 0.15rem; color: var(--accent); flex-shrink: 0; }
.ww-chart-save { background: #22c55e14; border: 1px solid #22c55e55; color: #4ade80; border-radius: 1rem;
                 padding: 0.8rem 1rem; margin-top: 1rem; font-size: 0.85rem; line-height: 1.55; }
.ww-chart-save[hidden] { display: none; }

.ww-sched-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.8rem; }
.ww-sched-tab { background: var(--surface-light); border: 1px solid var(--border); color: var(--text-muted);
                border-radius: 2rem; padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 600;
                font-family: inherit; cursor: pointer; transition: 0.15s; }
.ww-sched-tab.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.ww-sched-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.ww-sched-table th, .ww-sched-table td { padding: 0.45rem 0.55rem; text-align: right; border-bottom: 1px solid var(--border);
                                   font-variant-numeric: tabular-nums; white-space: nowrap; }
.ww-sched-table th { color: var(--text-muted); font-size: 0.68rem; text-transform: uppercase;
                     letter-spacing: 0.5px; text-align: right; position: sticky; top: 0; background: var(--surface); }
.ww-sched-table th:first-child, .ww-sched-table td:first-child { text-align: left; }
.ww-sched-table td { color: var(--text-primary); }
.ww-sched-table tr.ww-chart-year-row td { background: var(--surface-light); font-weight: 600; }
.ww-sched-wrap { overflow-x: auto; }

/* ---------- Part 2: light mode ---------- */

/* === WW-LIGHT-PALETTE (variant C: Cool Sky — chosen 2026-07-14) === */
html[data-theme="light"] {
  --bg-deep: #edf3fa;
  --surface: #ffffff;
  --surface-light: #dfe9f4;
  --text-primary: #122033;
  --text-muted: #48607a;
  --border: #c9d9e9;
  /* every page mirrors its accent into --accent-src; darkening the working
     --accent here fixes accent-colored text/buttons on all pages at once */
  --accent: color-mix(in srgb, var(--accent-src, #7c5cfc) 50%, #10141c);
}
/* === /WW-LIGHT-PALETTE === */

html[data-theme="light"] body {
  background: var(--bg-deep);
  color: var(--text-primary);
}
html[data-theme="light"] body::before {
  background-image: radial-gradient(circle, #b7c9dd 1px, transparent 1px);
  opacity: 0.5;
}
html[data-theme="light"] body::after {
  display: none; /* homepage light-beam overlay is designed for dark only */
}

/* --- constellation network, light mode (homepage concept B) ---
   The canvas reads these rather than hardcoding colours, and re-reads them when
   data-theme flips. Dark's #a78bfa/#fbbf24 are far too pale on #edf3fa, so light
   gets the darkened accent (#6d28d9) and a burnt amber (#b45309), with the link
   lines pushed up in alpha — thin light-on-light strokes otherwise disappear. */
html[data-theme="light"] {
  --net-dot: 109, 40, 217;
  --net-line: 109, 40, 217;
  --net-hot: 180, 83, 9;
  --net-dot-a: 0.42;
  --net-line-a: 0.2;
}
html[data-theme="light"] body::before {
  opacity: 0.32; /* the dot grid competes with the network on a light ground */
}
/* the hero rule is a solid amber bar — needs darkening for contrast on light */
html[data-theme="light"] .hero-section h1 em::after {
  background: #b45309;
  opacity: 0.5;
}
html[data-theme="light"] * {
  scrollbar-color: #aebfd2 #e3ecf5;
}
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #e3ecf5;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #aebfd2;
  border-color: #e3ecf5;
}
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  color-scheme: light;
}

/* navbar + footer */
html[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(22, 32, 44, 0.08);
}
html[data-theme="light"] .navbar-brand {
  color: #16202c !important;
}
html[data-theme="light"] .navbar-brand:hover {
  color: #6d28d9 !important;
}
html[data-theme="light"] .nav-link:hover {
  color: #6d28d9 !important;
}
html[data-theme="light"] .navbar-collapse {
  background: transparent;
}
html[data-theme="light"] .footer {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--border);
}
html[data-theme="light"] .footer a {
  color: #6d28d9;
}
html[data-theme="light"] .ww-theme-toggle {
  color: #6d28d9;
  background: #ffffff;
}
html[data-theme="light"] .ww-flag,
html[data-theme="light"] .ww-lang-flag {
  box-shadow: 0 0 0 1px rgba(22, 32, 44, 0.18);
}
html[data-theme="light"] .ww-lang-menu {
  box-shadow: 0 12px 32px rgba(22, 32, 44, 0.18);
}
html[data-theme="light"] .ww-lang-current {
  color: #15803d;
}

/* cards & surfaces that hardcode dark rgba backgrounds */
html[data-theme="light"] .tool-card,
html[data-theme="light"] .about-card,
html[data-theme="light"] .team-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 2px 10px rgba(22, 32, 44, 0.05);
}
html[data-theme="light"] .nav-link.active {
  color: #6d28d9 !important;
}
html[data-theme="light"] .hero-stat {
  background: rgba(255, 255, 255, 0.8);
}
html[data-theme="light"] .hero-stat-value {
  color: #6d28d9;
}
html[data-theme="light"] .search-box input {
  background: #ffffff !important;
  color: var(--text-primary) !important;
}
html[data-theme="light"] .search-box input::placeholder {
  color: var(--text-muted);
}
html[data-theme="light"] .search-clear {
  background: rgba(18, 32, 51, 0.08);
}
html[data-theme="light"] .search-clear:hover {
  background: rgba(109, 40, 217, 0.14);
  color: #6d28d9;
}

/* page H1 gradients hardcode a bright second color — rebuild from the accent */
html[data-theme="light"] .tool-title-section h1,
html[data-theme="light"] .cat-title-section h1 {
  background: linear-gradient(
    135deg,
    var(--accent),
    color-mix(in srgb, var(--accent-src, #7c5cfc) 72%, #10141c)
  );
  -webkit-background-clip: text;
  background-clip: text;
}
/* .back-link uses !important in page CSS, so it needs an equally strong rule */
html[data-theme="light"] .back-link {
  color: var(--accent) !important;
}

/* colored category/card elements: real darkened colors (via their CSS custom
   properties) so contrast audits pass — filters are invisible to Lighthouse */
html[data-theme="light"] .category-title {
  color: color-mix(in srgb, var(--cat-color) 48%, #10141c) !important;
}
html[data-theme="light"] .category-icon,
html[data-theme="light"] .card-icon-box,
html[data-theme="light"] .cat-card-icon,
html[data-theme="light"] .cat-other-icon {
  color: color-mix(in srgb, var(--tc-color, var(--accent)) 45%, #10141c) !important;
}
html[data-theme="light"] .ww-icn {
  color: color-mix(in srgb, var(--rt-color, var(--accent)) 45%, #10141c) !important;
}
/* pure icon elements (no text nodes): a filter is fine and keeps them vivid */
html[data-theme="light"] .tool-icon-large,
html[data-theme="light"] .upload-zone > i,
html[data-theme="light"] .ww-share-heading i,
html[data-theme="light"] .ww-related-heading i,
html[data-theme="light"] .autosave-note i,
html[data-theme="light"] .calc-hint i {
  filter: brightness(0.62) saturate(1.35);
}

/* with --accent darkened, accent-background buttons need white text — pages
   that paired dark text with the formerly bright accent flip to white here */
html[data-theme="light"] .toast {
  box-shadow: 0 8px 24px rgba(22, 32, 44, 0.25);
}
html[data-theme="light"] .btn-action,
html[data-theme="light"] .btn-wz-next,
html[data-theme="light"] .keyword-count {
  color: #ffffff;
}

/* status & feedback colors tuned for light backgrounds */
html[data-theme="light"] .error-banner {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b91c1c;
}
html[data-theme="light"] .error-msg,
html[data-theme="light"] .wz-error {
  color: #b91c1c;
}
html[data-theme="light"] .saved-indicator {
  color: #15803d;
}
html[data-theme="light"] .btn-clear:hover {
  border-color: #dc2626;
  color: #dc2626;
}
html[data-theme="light"] .disclaimer-box {
  background: #fef3c7;
  border-color: #f59e0b;
}
html[data-theme="light"] .disclaimer-box i {
  color: #b45309;
}

/* wizard/action buttons that pair dark text with the accent */
html[data-theme="light"] .btn-wz-next,
html[data-theme="light"] .btn-action {
  color: #10141c;
}
html[data-theme="light"] .btn-action.btn-secondary-ww,
html[data-theme="light"] .btn-wz-back {
  color: var(--text-muted);
}
html[data-theme="light"] .btn-action.btn-secondary-ww:hover,
html[data-theme="light"] .btn-wz-back:hover {
  color: color-mix(in srgb, var(--accent) 52%, #10141c);
  border-color: color-mix(in srgb, var(--accent) 52%, #10141c);
}

/* the stepper chevrons use currentColor, so they need no light-mode copy —
   only the hover wash has to flip from white-on-dark to dark-on-light */
html[data-theme="light"] .ww-num-btns button:hover {
  background: rgba(18, 32, 51, 0.07);
}
html[data-theme="light"] .ww-num-btns button:active {
  background: rgba(18, 32, 51, 0.13);
}
