/* ─── Nav Base ─── */
.nav-enhance-ready nav { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: #0e0c08; border-bottom: 1px solid rgba(201,169,110,0.18); z-index: 9999; font-family: "IBM Plex Mono", monospace; }
.nav-enhance-ready .nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: stretch; justify-content: space-between; height: 100%; }
.nav-enhance-ready .nav-left { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.nav-enhance-ready .nav-wordmark { display: flex; flex-direction: column; justify-content: center; flex-shrink: 0; text-decoration: none; }
.nav-enhance-ready .nav-wordmark-foh { font-family: "Playfair Display", Georgia, serif; font-size: 22px; font-weight: 700; color: #c9a96e; line-height: 1; }
.nav-enhance-ready .nav-wordmark-sub { font-size: 11px; letter-spacing: 0.28em; color: #7a6040; text-transform: uppercase; }
.nav-enhance-ready .nav-divider { width: 1px; background: rgba(201,169,110,0.18); margin: 12px 0; flex-shrink: 0; }
.nav-enhance-ready .nav-links { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; min-width: 0; mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%); -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%); }
.nav-enhance-ready .nav-links::-webkit-scrollbar { display: none; }
.nav-enhance-ready .nav-link { display: flex; align-items: center; padding: 0 14px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #5a5040; border-bottom: 2px solid transparent; white-space: nowrap; transition: color 0.15s, border-bottom-color 0.15s, opacity 0.18s; flex-shrink: 0; text-decoration: none; }
.nav-enhance-ready .nav-link:hover { color: #b8ae9e; opacity: 0.65; }
.nav-enhance-ready .nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-enhance-ready #nav-beta { font-size: 10px; letter-spacing: 0.2em; color: #3a3020; text-transform: uppercase; border: 1px solid rgba(201,169,110,0.12); padding: 3px 8px; border-radius: 4px; }
.nav-enhance-ready #nav-support-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #7a6040; border: 1px solid rgba(201,169,110,0.18); flex-shrink: 0; position: relative; transition: color 0.18s, border-color 0.18s, box-shadow 0.18s; text-decoration: none; }
.nav-enhance-ready #nav-support-icon:hover { color: #c9a96e; border-color: rgba(201,169,110,0.4); box-shadow: 0 0 10px rgba(201,169,110,0.15); opacity: 1; transform: none; }
.nav-enhance-ready #nav-support-icon::after { content: "Support"; position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #c9a96e; background: #0e0c08; border: 1px solid rgba(201,169,110,0.2); padding: 4px 9px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.18s ease 0.12s; z-index: 100; }
.nav-enhance-ready #nav-support-icon:hover::after { opacity: 1; }
.nav-enhance-ready #nav-support-icon.active { color: #c9a96e; border-color: rgba(201,169,110,0.65); box-shadow: 0 0 14px rgba(201,169,110,0.14); }
.nav-enhance-ready #nav-account-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #5a5040; border: 1px solid transparent; transition: color 0.15s, border-color 0.15s, box-shadow 0.15s; flex-shrink: 0; text-decoration: none; }
.nav-enhance-ready #nav-account-icon:hover,
.nav-enhance-ready #nav-account-icon.logged-in { color: #c9a96e; border-color: rgba(201,169,110,0.4); box-shadow: 0 0 8px rgba(201,169,110,0.12); opacity: 1; }

/* ─── Nav link visibility ─── */
.nav-links > a { display: none !important; }
.nav-links > a#nav-calculator,
.nav-links > a#nav-rota,
.nav-links > a#nav-menu,
.nav-links > a.nav-current-link { display: flex !important; }
.nav-links > a.nav-current-link { color: #c9a96e !important; border-bottom-color: #c9a96e !important; }

/* ─── Tools toggle ─── */
.nav-links > .nav-tools-toggle {
  all: unset;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5a5040;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  line-height: normal;
  flex-shrink: 0;
  transition: color 0.18s, border-bottom-color 0.18s, opacity 0.18s;
}
.nav-links > .nav-tools-toggle svg {
  width: 13px; height: 13px;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links > .nav-tools-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-links > .nav-tools-toggle:hover { color: #b8ae9e; opacity: 0.65; }
.nav-links > .nav-tools-toggle.is-active { color: #c9a96e !important; border-bottom-color: #c9a96e !important; }
.nav-links > .nav-tools-toggle[aria-expanded="true"] { color: #c9a96e !important; border-bottom-color: rgba(201,169,110,0.45) !important; opacity: 1 !important; }

/* ─── Overlay system ─── */
body.nav-tools-open { overflow: hidden; }
.nav-tools-overlay {
  position: fixed; inset: 0; z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity 0.24s ease;
}
.nav-tools-overlay.is-open { opacity: 1; pointer-events: auto; }
.nav-tools-overlay,
.nav-tools-overlay *,
.nav-tools-overlay *::before,
.nav-tools-overlay *::after {
  box-sizing: border-box;
  text-shadow: none !important;
  text-decoration: none !important;
  outline: none !important;
}

/* ─── Backdrop — deep blackout, low blur ─── */
.nav-tools-backdrop {
  position: absolute; inset: 0;
  margin: 0; padding: 0;
  border: 0 !important; outline: 0 !important;
  border-radius: 0 !important;
  appearance: none; -webkit-appearance: none;
  background: rgba(2, 1, 0, 0.86);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.nav-tools-backdrop, .nav-tools-panel {
  box-shadow: none !important;
  filter: none !important;
}

/* ─── Panel — seamless drop from nav ─── */
.nav-tools-panel {
  position: absolute;
  top: 56px; left: 50%;
  transform: translate(-50%, -10px);
  opacity: 0;
  width: min(1020px, calc(100vw - 48px));
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-top: none;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(165deg, rgba(20, 17, 10, 0.99) 0%, rgba(11, 9, 4, 0.99) 100%);
  box-shadow: 0 48px 120px rgba(0,0,0,0.72), inset 0 -1px 0 rgba(201,169,110,0.04) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
  overflow: hidden;
  font-family: "IBM Plex Mono", monospace;
}
.nav-tools-overlay.is-open .nav-tools-panel {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ─── Panel header ─── */
.nav-tools-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 28px 16px;
  border-bottom: 1px solid rgba(201, 169, 110, 0.07);
}
.nav-tools-kicker {
  margin-bottom: 6px;
  font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: #4a3e2e;
}
.nav-tools-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px; line-height: 0.92;
  color: #c9a96e; letter-spacing: -0.3px;
}
.nav-tools-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid rgba(201, 169, 110, 0.12);
  background: transparent;
  color: #4a3e2e; cursor: pointer;
  font-size: 20px; line-height: 1;
  font-family: "Playfair Display", Georgia, serif;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  flex-shrink: 0;
}
.nav-tools-close:hover { color: #c9a96e; border-color: rgba(201, 169, 110, 0.3); background: rgba(201,169,110,0.04); }

/* ─── Body / Grid ─── */
.nav-tools-body { padding: 20px 28px 26px; }
.nav-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: start;
}

/* ─── Group columns ─── */
.nav-tools-group {
  padding: 0 22px !important;
  margin: 0 !important;
  min-width: 0;
}
.nav-tools-group:first-child { padding-left: 0 !important; }
.nav-tools-group:last-child  { padding-right: 0 !important; }
.nav-tools-group:not(:last-child) {
  border-right: 1px solid rgba(201, 169, 110, 0.07);
}

/* ─── Group label with pastel dot ─── */
.nav-tools-group-label {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(201, 169, 110, 0.06);
  font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase;
  opacity: 0.58;
}
.nav-tools-group-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* ─── Pseudo-element resets ─── */
.nav-tools-group::before, .nav-tools-group::after,
.nav-tools-list::before, .nav-tools-list::after,
.nav-tools-item-head::before, .nav-tools-item-head::after,
.nav-tools-item-name::before, .nav-tools-item-name::after,
.nav-tools-item-desc::before, .nav-tools-item-desc::after {
  content: none !important;
  display: none !important;
}

/* ─── Item list ─── */
.nav-tools-list { display: grid; gap: 5px; }

/* ─── Item stagger animation ─── */
@keyframes toolItemIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Item cards ─── */
.nav-tools-item {
  display: block;
  padding: 13px 14px 12px;
  border: 1px solid rgba(201, 169, 110, 0.08);
  border-radius: 12px;
  background: rgba(201, 169, 110, 0.012);
  position: relative; overflow: hidden;
  opacity: 0; /* animated in when panel opens */
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
  box-shadow: none !important; filter: none !important;
}
.nav-tools-item::before {
  content: "" !important;
  display: block !important;
  position: absolute; left: 0; top: 18%; bottom: 18%; width: 2px;
  background: linear-gradient(180deg, transparent, rgba(201,169,110,0.5), transparent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.nav-tools-item * { box-shadow: none !important; filter: none !important; }
.nav-tools-item:hover { border-color: rgba(201, 169, 110, 0.22); background: rgba(201, 169, 110, 0.048); transform: translateY(-1px); }
.nav-tools-item:hover::before { opacity: 1; }
.nav-tools-item.is-active { border-color: rgba(201, 169, 110, 0.32); background: rgba(201, 169, 110, 0.06); }
.nav-tools-item.is-active::before { opacity: 1; }

/* ─── Item animation — fires on panel open ─── */
.nav-tools-overlay.is-open .nav-tools-item {
  animation: toolItemIn 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.nav-tools-overlay.is-open .nav-tools-list .nav-tools-item:nth-child(1) { animation-delay: 0.06s; }
.nav-tools-overlay.is-open .nav-tools-list .nav-tools-item:nth-child(2) { animation-delay: 0.11s; }
.nav-tools-overlay.is-open .nav-tools-list .nav-tools-item:nth-child(3) { animation-delay: 0.16s; }
.nav-tools-overlay.is-open .nav-tools-list .nav-tools-item:nth-child(4) { animation-delay: 0.21s; }

/* ─── Item internals ─── */
.nav-tools-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.nav-tools-item-name {
  font-family: "Playfair Display", Georgia, serif !important;
  font-size: 17px !important; font-weight: 700 !important;
  letter-spacing: 0 !important; text-transform: none !important;
  color: rgba(220, 208, 188, 0.6);
  line-height: 1.1;
  transition: color 0.2s;
}
.nav-tools-item:hover .nav-tools-item-name  { color: rgba(255, 252, 245, 0.92); }
.nav-tools-item.is-active .nav-tools-item-name { color: #c9a96e; }

.nav-tools-item-arrow {
  color: transparent; /* hidden at rest */
  font-size: 11px; flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.nav-tools-item:hover .nav-tools-item-arrow { color: rgba(201,169,110,0.6); transform: translate(1px, -1px); }
.nav-tools-item.is-active .nav-tools-item-arrow { color: rgba(201,169,110,0.45); }

.nav-tools-item-desc {
  font-size: 11px; line-height: 1.72;
  color: rgba(140, 124, 96, 0.65);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-tools-item:hover .nav-tools-item-desc { color: rgba(168, 152, 124, 0.88); }

/* ─── Mobile ─── */
@media (max-width: 860px) {
  .nav-enhance-ready #nav-beta { display: none !important; }
  .nav-enhance-ready #nav-support-icon { display: none !important; }
  .nav-enhance-ready .nav-inner { padding: 0 16px; }
  .nav-links { mask-image: none !important; -webkit-mask-image: none !important; }
  .nav-links > .nav-tools-toggle { display: inline-flex !important; padding-right: 0 !important; }
  .nav-tools-panel {
    top: 56px; left: auto; right: 0; width: min(420px, 100vw); max-width: 100vw;
    height: calc(100dvh - 56px); border-radius: 0;
    border-top: 1px solid rgba(201, 169, 110, 0.12); border-bottom: 0; border-right: 0;
    border-left: 1px solid rgba(201, 169, 110, 0.18);
    opacity: 1;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; touch-action: pan-y;
  }
  .nav-tools-overlay.is-open .nav-tools-panel { transform: translateX(0); }
  .nav-tools-header { padding: 22px 18px 16px; position: sticky; top: 0; z-index: 10; background: linear-gradient(160deg, rgba(18,15,10,0.99) 0%, rgba(11,9,4,0.99) 100%); }
  .nav-tools-body { padding: 14px 18px 24px; }
  .nav-tools-grid { grid-template-columns: 1fr; gap: 16px; }
  .nav-tools-group { padding: 0 !important; border-right: none !important; }
}

/* ─── Nav link stagger animation ─── */
@keyframes navLinkIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.nav-enhance-ready #nav-links > a#nav-calculator  { animation: navLinkIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.20s both; }
.nav-enhance-ready #nav-links > a#nav-rota         { animation: navLinkIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.28s both; }
.nav-enhance-ready #nav-links > a#nav-menu         { animation: navLinkIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.36s both; }
.nav-enhance-ready #nav-links > a.nav-current-link { animation: navLinkIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.44s both; }
.nav-enhance-ready #nav-links > .nav-tools-toggle  { animation: navLinkIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.52s both; }


/* ═══════════════════════════════════════════════════════════
   LIGHT MODE — FOH Tools
   Palette: White · Deep Purple #5c44b0 · Lavender #ebe6f9
   ═══════════════════════════════════════════════════════════ */

:root.light-mode {
  --bg: #ffffff; --panel: #f8f6fd; --panel2: #f0ecf9; --surface: #f0ecf9;
  --text: #0c0a10; --muted: #635a78;
  --border: rgba(92,68,176,.12);
  --gold: #5c44b0; --gold-dim: #3d2e85;
  --green: #1e6e2e; --amber: #8a6010; --red: #a83228;
}
html.light-mode { background: #fff !important; color-scheme: light; }

/* ── Nav bar ── */
html.light-mode .nav-enhance-ready nav {
  background: #fff;
  border-bottom: 1px solid rgba(92,68,176,.1);
  box-shadow: 0 1px 0 rgba(92,68,176,.06), 0 2px 12px rgba(0,0,0,.04);
}
html.light-mode nav { background: rgba(255,255,255,.92) !important; }
html.light-mode .nav-enhance-ready .nav-wordmark-foh { color: #5c44b0; }
html.light-mode .nav-enhance-ready .nav-wordmark-sub { color: #3d2e85; }
html.light-mode .nav-enhance-ready .nav-divider { background: rgba(92,68,176,.12); }
html.light-mode .nav-enhance-ready .nav-link { color: #635a78; }
html.light-mode .nav-enhance-ready .nav-link:hover { color: #0c0a10; opacity: 1; }
html.light-mode .nav-enhance-ready .nav-links > a.nav-current-link { color: #5c44b0 !important; border-bottom-color: #5c44b0 !important; }
html.light-mode .nav-enhance-ready #nav-beta { color: #635a78; border-color: rgba(92,68,176,.18); background: transparent; }
html.light-mode .nav-enhance-ready #nav-support-icon { color: #635a78; border-color: rgba(92,68,176,.16); }
html.light-mode .nav-enhance-ready #nav-support-icon:hover { color: #5c44b0; border-color: rgba(92,68,176,.42); box-shadow: 0 0 10px rgba(92,68,176,.14); }
html.light-mode .nav-enhance-ready #nav-support-icon::after { color: #5c44b0; background: #fff; border-color: rgba(92,68,176,.2); }
html.light-mode .nav-enhance-ready #nav-account-icon { color: #635a78; border-color: transparent; }
html.light-mode .nav-enhance-ready #nav-account-icon:hover,
html.light-mode .nav-enhance-ready #nav-account-icon.logged-in { color: #5c44b0; border-color: rgba(92,68,176,.38); box-shadow: 0 0 8px rgba(92,68,176,.12); }

/* ── Nav tools toggle ── */
html.light-mode .nav-links > .nav-tools-toggle { color: #635a78; }
html.light-mode .nav-links > .nav-tools-toggle:hover { color: #0c0a10; opacity: 1; }
html.light-mode .nav-links > .nav-tools-toggle.is-active { color: #5c44b0 !important; border-bottom-color: #5c44b0 !important; }
html.light-mode .nav-links > .nav-tools-toggle[aria-expanded="true"] { color: #5c44b0 !important; border-bottom-color: rgba(92,68,176,.4) !important; opacity: 1 !important; }

/* ── Tools overlay ── */
html.light-mode .nav-tools-backdrop { background: rgba(200,195,220,.75); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
html.light-mode .nav-tools-panel {
  background: #fff !important;
  border-color: rgba(92,68,176,.16);
  box-shadow: 0 24px 60px rgba(92,68,176,.12), 0 4px 16px rgba(0,0,0,.06) !important;
}
html.light-mode .nav-tools-header { border-bottom-color: rgba(92,68,176,.08); }
html.light-mode .nav-tools-kicker { color: #635a78; }
html.light-mode .nav-tools-title { color: #5c44b0; }
html.light-mode .nav-tools-close { color: #635a78; border-color: rgba(92,68,176,.14); background: transparent; }
html.light-mode .nav-tools-close:hover { color: #5c44b0; border-color: rgba(92,68,176,.32); background: rgba(92,68,176,.04); }
html.light-mode .nav-tools-group-label { opacity: 0.7; }
html.light-mode .nav-tools-group:not(:last-child) { border-right-color: rgba(92,68,176,.08); }
html.light-mode .nav-tools-item { border-color: rgba(92,68,176,.09); background: transparent; }
html.light-mode .nav-tools-item::before { background: linear-gradient(180deg, transparent, rgba(92,68,176,.4), transparent); }
html.light-mode .nav-tools-item:hover { border-color: rgba(92,68,176,.22); background: rgba(92,68,176,.04); }
html.light-mode .nav-tools-item.is-active { border-color: rgba(92,68,176,.28); background: #ebe6f9; }
html.light-mode .nav-tools-item-name { color: rgba(12,10,16,.52); }
html.light-mode .nav-tools-item:hover .nav-tools-item-name { color: #0c0a10; }
html.light-mode .nav-tools-item.is-active .nav-tools-item-name { color: #5c44b0; }
html.light-mode .nav-tools-item:hover .nav-tools-item-arrow { color: rgba(92,68,176,.5); }
html.light-mode .nav-tools-item.is-active .nav-tools-item-arrow { color: rgba(92,68,176,.45); }
html.light-mode .nav-tools-item-desc { color: rgba(99,90,120,.62); }
html.light-mode .nav-tools-item:hover .nav-tools-item-desc { color: rgba(80,72,100,.88); }

/* ── Theme toggle button ── */
.nav-enhance-ready #nav-theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #7a6040; border: 1px solid rgba(201,169,110,.18);
  background: transparent; cursor: pointer; flex-shrink: 0;
  transition: color .18s, border-color .18s, box-shadow .18s; padding: 0;
}
.nav-enhance-ready #nav-theme-toggle:hover { color: #c9a96e; border-color: rgba(201,169,110,.4); box-shadow: 0 0 10px rgba(201,169,110,.15); }
html.light-mode .nav-enhance-ready #nav-theme-toggle { color: #635a78; border-color: rgba(92,68,176,.18); }
html.light-mode .nav-enhance-ready #nav-theme-toggle:hover { color: #5c44b0; border-color: rgba(92,68,176,.4); box-shadow: 0 0 10px rgba(92,68,176,.14); }

/* ── Mobile ── */
@media (max-width: 860px) {
  html.light-mode .nav-tools-panel { border-color: rgba(92,68,176,.18) !important; }
  html.light-mode .nav-tools-header { background: #fff !important; border-bottom-color: rgba(92,68,176,.08) !important; }
}

/* ═══ LANDING PAGE (index.html) ═══ */

/* Launcher section — dark background → white/lavender */
html.light-mode .launcher-section {
  background: #f0ecf9 !important;
  border-top-color: rgba(92,68,176,.12) !important;
  border-bottom: 1px solid rgba(92,68,176,.1);
}
html.light-mode .launcher-card {
  background: #fff !important;
  border-color: rgba(92,68,176,.14) !important;
  box-shadow: 0 2px 12px rgba(92,68,176,.07) !important;
}
html.light-mode .launcher-card::before { background: rgba(92,68,176,.06) !important; }
html.light-mode .launcher-card::after { color: rgba(92,68,176,.07) !important; }
html.light-mode .launcher-card:hover {
  border-color: rgba(92,68,176,.3) !important;
  box-shadow: 0 8px 28px rgba(92,68,176,.12) !important;
}
/* Tool cards */
html.light-mode .tool-card { background: #fff; border-color: rgba(92,68,176,.1); }
html.light-mode .tool-card:hover { border-color: rgba(92,68,176,.28); box-shadow: 0 8px 24px rgba(92,68,176,.1); }
html.light-mode .tool-card:hover::after { background: linear-gradient(90deg, transparent, rgba(92,68,176,.18), transparent) !important; }
html.light-mode .tool-card:hover .tool-icon { background: rgba(92,68,176,.08); border-color: rgba(92,68,176,.22); }
/* Hero proof chips — target all chips (a and div), not just <a> */
html.light-mode .hero-proof .proof-chip { border-color: rgba(92,68,176,.12) !important; background: #fff !important; }
html.light-mode .hero-proof .proof-chip:hover { border-color: rgba(92,68,176,.28) !important; }
html.light-mode .proof-chip[data-accent="gold"] { border-left-color: rgba(92,68,176,.5) !important; }
html.light-mode .proof-chip .proof-label { color: #635a78 !important; }
html.light-mode .proof-chip .proof-value { color: #0c0a10 !important; }
html.light-mode .proof-chip .proof-copy { color: #635a78 !important; }
/* Hero orbs — change glow colour */
html.light-mode .hero-orb-1 { background: radial-gradient(ellipse, rgba(92,68,176,.06) 0%, transparent 68%) !important; }
/* Ticker */
html.light-mode .ticker-sep { color: rgba(92,68,176,.25) !important; }
/* Sub pills */
html.light-mode .hero-sub-pill:hover { background: rgba(92,68,176,.22) !important; }
/* Section with dark panels on landing */
html.light-mode .stats-section,
html.light-mode .footer-section { border-top-color: rgba(92,68,176,.1) !important; }

/* ═══ ROTA TOOL ═══ */

/* Generic cards */
html.light-mode .card {
  background: linear-gradient(180deg, rgba(92,68,176,.03), rgba(92,68,176,.01)) !important;
  border-color: rgba(92,68,176,.14) !important;
}
/* Hero note panel — the jarring dark card */
html.light-mode .hero-note-panel {
  background: #ebe6f9 !important;
  border-color: rgba(92,68,176,.22) !important;
  box-shadow: 0 2px 12px rgba(92,68,176,.08) !important;
}
html.light-mode .hero-note-title { color: #5c44b0 !important; }
html.light-mode .hero-note-item { color: #0c0a10 !important; }
html.light-mode .hero-note-item::before { background: #5c44b0 !important; box-shadow: 0 0 8px rgba(92,68,176,.28) !important; }
html.light-mode .hero-kicker { color: #635a78 !important; }
html.light-mode .hero-sub { color: #0c0a10 !important; }

/* Feas cards */
html.light-mode .feas-summary-card { background: #ebe6f9 !important; border-color: rgba(92,68,176,.16) !important; }
html.light-mode .feas-summary-label { color: #635a78 !important; }
html.light-mode .feas-summary-value { color: #5c44b0 !important; }
html.light-mode .feas-note-card { background: #fff !important; border-color: rgba(92,68,176,.12) !important; }
html.light-mode .feas-note-card.warn { border-color: rgba(168,50,40,.3) !important; background: rgba(168,50,40,.04) !important; }
html.light-mode .feas-note-card.tight { border-color: rgba(138,96,16,.3) !important; background: rgba(138,96,16,.04) !important; }
html.light-mode .feas-tight { border-color: rgba(138,96,16,.4) !important; background: rgba(138,96,16,.06) !important; color: #4a3200 !important; }
html.light-mode .feas-bad { border-color: rgba(168,50,40,.45) !important; background: rgba(168,50,40,.06) !important; color: #5a1008 !important; }

/* Gantt */
html.light-mode .gantt-shift { filter: saturate(2.4) brightness(0.68) !important; }
html.light-mode .gantt-shift:hover { filter: saturate(2.8) brightness(0.62) !important; }
html.light-mode .gantt-row-stripe .gantt-staff,
html.light-mode .gantt-row-stripe .gantt-cell { background: rgba(0,0,0,.022) !important; }

/* Rota buttons */
html.light-mode button:hover:not(.primary):not(.danger):not(.btn-demo) {
  background: rgba(92,68,176,.07) !important;
  border-color: rgba(92,68,176,.3) !important;
}
html.light-mode input:focus,
html.light-mode textarea:focus,
html.light-mode select:focus,
html.light-mode button:focus { outline-color: rgba(92,68,176,.3) !important; }

/* Sep/solve cards */
html.light-mode .sep-card { border-color: rgba(168,50,40,.24) !important; background: rgba(168,50,40,.03) !important; }
html.light-mode .sep-section-head .sep-count { background: rgba(168,50,40,.12) !important; color: #7a1808 !important; }

/* ═══ ALL TOOLS — common patterns ═══ */

/* Demo ribbon — keep dark but tint purple not brown */
html.light-mode .demo-ribbon-wrap {
  background: linear-gradient(135deg, #1a1530 0%, #110e22 55%, #0c0a18 100%) !important;
}
/* Primary demo button */
html.light-mode .btn-demo-primary {
  background: linear-gradient(160deg, #5c44b0 0%, #3d2e85 100%) !important;
  color: #fff !important; border-color: transparent !important;
  box-shadow: 0 2px 10px rgba(92,68,176,.28) !important;
}
html.light-mode .btn-demo-primary:hover {
  background: linear-gradient(160deg, #6d54c4 0%, #4d3a99 100%) !important;
}
/* Modal overlays */
html.light-mode .modal-overlay,
html.light-mode .nav-tools-overlay .nav-tools-backdrop { background: rgba(12,10,16,.65) !important; }


/* ─── Accessibility controls ─── */
.nav-enhance-ready #nav-accessibility-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a6040;
  border: 1px solid rgba(201,169,110,.18);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: color .18s, border-color .18s, box-shadow .18s, background .18s;
}
.nav-enhance-ready #nav-accessibility-toggle:hover,
.nav-enhance-ready #nav-accessibility-toggle.is-active {
  color: #c9a96e;
  border-color: rgba(201,169,110,.42);
  box-shadow: 0 0 10px rgba(201,169,110,.12);
}

html.light-mode .nav-enhance-ready #nav-accessibility-toggle {
  color: #635a78;
  border-color: rgba(92,68,176,.18);
}
html.light-mode .nav-enhance-ready #nav-accessibility-toggle:hover,
html.light-mode .nav-enhance-ready #nav-accessibility-toggle.is-active {
  color: #5c44b0;
  border-color: rgba(92,68,176,.4);
  box-shadow: 0 0 10px rgba(92,68,176,.14);
}

.nav-accessibility-panel {
  position: fixed;
  top: 68px;
  right: 24px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 88px);
  overflow: hidden;
  z-index: 10001;
  border: 1px solid rgba(201,169,110,.18);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(20,17,10,.99) 0%, rgba(11,9,4,.99) 100%);
  box-shadow: 0 32px 80px rgba(0,0,0,.58);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  font-family: "IBM Plex Mono", monospace;
}
.nav-accessibility-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-accessibility-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(201,169,110,.08);
}
.nav-accessibility-kicker {
  margin-bottom: 8px;
  font-size: 9px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #7a6040;
}
.nav-accessibility-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  line-height: 1;
  color: #c9a96e;
}
.nav-accessibility-copy {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(184,174,158,.8);
}
.nav-accessibility-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(201,169,110,.14);
  background: transparent;
  color: #7a6040;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.nav-accessibility-body {
  padding: 18px 22px 22px;
  max-height: calc(100dvh - 220px);
  overflow-y: auto;
}
.nav-accessibility-master {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(201,169,110,.1);
  border-radius: 18px;
  background: rgba(201,169,110,.03);
  margin-bottom: 18px;
}
.nav-accessibility-label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #c9a96e;
}
.nav-accessibility-meta {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(184,174,158,.72);
}
.nav-accessibility-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e8dcc8;
  cursor: pointer;
  font: inherit;
}
.nav-accessibility-switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(184,174,158,.18);
  border: 1px solid rgba(201,169,110,.15);
  transition: background .18s ease, border-color .18s ease;
}
.nav-accessibility-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff8eb;
  transition: transform .18s ease;
}
.nav-accessibility-switch.is-on .nav-accessibility-switch-track {
  background: rgba(201,169,110,.34);
  border-color: rgba(201,169,110,.34);
}
.nav-accessibility-switch.is-on .nav-accessibility-switch-thumb {
  transform: translateX(20px);
}
.nav-accessibility-switch-text {
  min-width: 24px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-accessibility-groups {
  display: grid;
  gap: 14px;
}
.nav-accessibility-group {
  padding: 15px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(201,169,110,.08);
  background: rgba(255,255,255,.01);
}
.nav-accessibility-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.nav-accessibility-option {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(201,169,110,.12);
  background: transparent;
  color: rgba(232,220,200,.85);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.nav-accessibility-option:hover,
.nav-accessibility-option.is-selected {
  border-color: rgba(201,169,110,.34);
  background: rgba(201,169,110,.07);
  color: #fff8eb;
}

html.light-mode .nav-accessibility-panel {
  border-color: rgba(92,68,176,.16);
  background: #fff;
  box-shadow: 0 28px 72px rgba(92,68,176,.12), 0 6px 20px rgba(0,0,0,.08);
}
html.light-mode .nav-accessibility-header {
  border-bottom-color: rgba(92,68,176,.08);
}
html.light-mode .nav-accessibility-kicker {
  color: #635a78;
}
html.light-mode .nav-accessibility-title,
html.light-mode .nav-accessibility-label {
  color: #5c44b0;
}
html.light-mode .nav-accessibility-copy,
html.light-mode .nav-accessibility-meta {
  color: rgba(77,70,96,.82);
}
html.light-mode .nav-accessibility-close {
  color: #635a78;
  border-color: rgba(92,68,176,.14);
}
html.light-mode .nav-accessibility-master {
  border-color: rgba(92,68,176,.1);
  background: rgba(92,68,176,.04);
}
html.light-mode .nav-accessibility-switch {
  color: #0c0a10;
}
html.light-mode .nav-accessibility-switch-track {
  background: rgba(92,68,176,.12);
  border-color: rgba(92,68,176,.16);
}
html.light-mode .nav-accessibility-switch-thumb {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
html.light-mode .nav-accessibility-switch.is-on .nav-accessibility-switch-track {
  background: rgba(92,68,176,.28);
  border-color: rgba(92,68,176,.28);
}
html.light-mode .nav-accessibility-group {
  border-color: rgba(92,68,176,.08);
  background: rgba(248,246,253,.92);
}
html.light-mode .nav-accessibility-option {
  border-color: rgba(92,68,176,.12);
  color: #363046;
}
html.light-mode .nav-accessibility-option:hover,
html.light-mode .nav-accessibility-option.is-selected {
  border-color: rgba(92,68,176,.28);
  background: rgba(92,68,176,.08);
  color: #0c0a10;
}

@media (max-width: 860px) {
  .nav-accessibility-panel {
    top: 56px;
    right: 0;
    width: min(440px, 100vw);
    max-width: 100vw;
    max-height: none;
    height: calc(100dvh - 56px);
    border-radius: 0;
    border-right: 0;
    border-top: 1px solid rgba(201,169,110,.16);
    border-left: 1px solid rgba(201,169,110,.16);
    overflow-y: auto;
  }
  .nav-accessibility-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(165deg, rgba(20,17,10,.99) 0%, rgba(11,9,4,.99) 100%);
  }
  html.light-mode .nav-accessibility-header {
    background: #fff;
  }
}

/* Accessibility panel scroll hardening */
.nav-accessibility-panel {
  display: flex !important;
  flex-direction: column !important;
  max-height: calc(100dvh - 72px) !important;
}

.nav-accessibility-header {
  flex-shrink: 0 !important;
}

.nav-accessibility-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 28px !important;
}

@media (max-width: 860px) {
  .nav-accessibility-panel {
    max-height: calc(100dvh - 56px) !important;
    height: calc(100dvh - 56px) !important;
  }

  .nav-accessibility-body {
    max-height: none !important;
  }
}

/* Regular-mode polish sweep: mobile modal safety, wrapping controls, dense row resilience */
@media (max-width: 760px) {
  html:not(.light-mode):not(.accessible-mode) .modal-overlay,
  html:not(.light-mode):not(.accessible-mode) .modal-backdrop {
    align-items: flex-start !important;
    justify-content: center !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 10px !important;
  }

  html:not(.light-mode):not(.accessible-mode) .modal,
  html:not(.light-mode):not(.accessible-mode) .modal-box {
    width: min(560px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    margin: 0 auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
  }

  html:not(.light-mode):not(.accessible-mode) .modal-actions,
  html:not(.light-mode):not(.accessible-mode) .modal-footer {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html:not(.light-mode):not(.accessible-mode) .hero-actions,
  html:not(.light-mode):not(.accessible-mode) .demo-ribbon-actions,
  html:not(.light-mode):not(.accessible-mode) .summary-bar-inner,
  html:not(.light-mode):not(.accessible-mode) .controls-bar-inner,
  html:not(.light-mode):not(.accessible-mode) .panel-header,
  html:not(.light-mode):not(.accessible-mode) .actions-section,
  html:not(.light-mode):not(.accessible-mode) .list-controls {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  html:not(.light-mode):not(.accessible-mode) .hero-actions .btn,
  html:not(.light-mode):not(.accessible-mode) .demo-ribbon-actions .btn-demo,
  html:not(.light-mode):not(.accessible-mode) .controls-bar-inner .btn,
  html:not(.light-mode):not(.accessible-mode) .controls-bar-inner .country-select,
  html:not(.light-mode):not(.accessible-mode) .panel-header .btn,
  html:not(.light-mode):not(.accessible-mode) .actions-section .btn,
  html:not(.light-mode):not(.accessible-mode) .modal-actions .btn,
  html:not(.light-mode):not(.accessible-mode) .modal-footer button {
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  html:not(.light-mode):not(.accessible-mode) .result-row {
    align-items: flex-start !important;
    gap: 8px !important;
  }

  html:not(.light-mode):not(.accessible-mode) .result-row-val,
  html:not(.light-mode):not(.accessible-mode) .rev-stream-value,
  html:not(.light-mode):not(.accessible-mode) .save-event-name,
  html:not(.light-mode):not(.accessible-mode) .save-event-sub,
  html:not(.light-mode):not(.accessible-mode) .acct-session-name,
  html:not(.light-mode):not(.accessible-mode) .brief-item-venue,
  html:not(.light-mode):not(.accessible-mode) .sheet-item-meta,
  html:not(.light-mode):not(.accessible-mode) .dish-item-name,
  html:not(.light-mode):not(.accessible-mode) .dlib-name,
  html:not(.light-mode):not(.accessible-mode) .ov-hcard-val,
  html:not(.light-mode):not(.accessible-mode) .ov-hcard-val.ov-hcard-name {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}
