
    :root{color-scheme:dark}
    html[data-theme="light"]{color-scheme:light}

    html[data-theme="light"],
    html[data-theme="light"] body{
      background:#eef2f7 !important;
      color:#162031 !important;
    }

    html[data-theme="light"] body{
      background:
        radial-gradient(circle at top, rgba(87,119,171,.08), transparent 34%),
        linear-gradient(180deg, #f8fbfe 0%, #edf2f7 100%) !important;
    }

    html[data-theme="light"] body::before,
    html[data-theme="light"] html::before{
      opacity:.14 !important;
      filter:grayscale(.08) brightness(1.08) contrast(.96) !important;
    }

    html[data-theme="light"] .topbar,
    html[data-theme="light"] .sidebar,
    html[data-theme="light"] .panel,
    html[data-theme="light"] .controls-panel-inner,
    html[data-theme="light"] .archive,
    html[data-theme="light"] .caseboard,
    html[data-theme="light"] .docbox-side,
    html[data-theme="light"] .docbox-view,
    html[data-theme="light"] .search-results,
    html[data-theme="light"] .lightbox-figure,
    html[data-theme="light"] .pdf-lightbox__panel,
    html[data-theme="light"] .controls-panel-body,
    html[data-theme="light"] .panel-body,
    html[data-theme="light"] .archive-body,
    html[data-theme="light"] .caseboard-body,
    html[data-theme="light"] .legend,
    html[data-theme="light"] .strip,
    html[data-theme="light"] .modebar,
    html[data-theme="light"] .searchwrap,
    html[data-theme="light"] .card,
    html[data-theme="light"] .module,
    html[data-theme="light"] .lm-module,
    html[data-theme="light"] .controls-card,
    html[data-theme="light"] #panelBody,
    html[data-theme="light"] #sidebar,
    html[data-theme="light"] #legend,
    html[data-theme="light"] #controlStrip{
      background:rgba(255,255,255,.90) !important;
      color:#162031 !important;
      border-color:rgba(44,66,101,.14) !important;
      box-shadow:0 18px 52px rgba(34,52,84,.10) !important;
      backdrop-filter:blur(14px) saturate(1.04);
    }

    html[data-theme="light"] .controls-panel::before,
    html[data-theme="light"] .docbox-backdrop,
    html[data-theme="light"] .lightbox-backdrop,
    html[data-theme="light"] .pdf-lightbox__backdrop,
    html[data-theme="light"] .cyoa-backdrop,
    html[data-theme="light"] .sv-backdrop{
      background:rgba(219,229,240,.66) !important;
      backdrop-filter:blur(10px);
    }

    html[data-theme="light"] .title,
    html[data-theme="light"] .panel-title,
    html[data-theme="light"] .controls-panel-title,
    html[data-theme="light"] .archive-title,
    html[data-theme="light"] .caseboard-title,
    html[data-theme="light"] .legend-title,
    html[data-theme="light"] .char-rail-title,
    html[data-theme="light"] .sb-bcast-text,
    html[data-theme="light"] .panel h1,
    html[data-theme="light"] .panel h2,
    html[data-theme="light"] .panel h3,
    html[data-theme="light"] .panel h4,
    html[data-theme="light"] .controls-panel h1,
    html[data-theme="light"] .controls-panel h2,
    html[data-theme="light"] .controls-panel h3,
    html[data-theme="light"] .legend-item,
    html[data-theme="light"] .cc-name,
    html[data-theme="light"] .cc-years,
    html[data-theme="light"] .seg-label,
    html[data-theme="light"] .search-results,
    html[data-theme="light"] .search-results *,
    html[data-theme="light"] p,
    html[data-theme="light"] li,
    html[data-theme="light"] label,
    html[data-theme="light"] strong,
    html[data-theme="light"] b,
    html[data-theme="light"] span,
    html[data-theme="light"] div{
      color:#162031 !important;
    }

    html[data-theme="light"] .subtitle,
    html[data-theme="light"] .muted,
    html[data-theme="light"] .panel-meta,
    html[data-theme="light"] .legend-sub,
    html[data-theme="light"] .archive-card .meta,
    html[data-theme="light"] .search-item .meta,
    html[data-theme="light"] .char-row-meta,
    html[data-theme="light"] .cc-tag,
    html[data-theme="light"] .cyoa-work,
    html[data-theme="light"] .cyoa-meta,
    html[data-theme="light"] .cyoa-footer,
    html[data-theme="light"] small{
      color:rgba(22,32,49,.72) !important;
    }

    html[data-theme="light"] a,
    html[data-theme="light"] .linkish,
    html[data-theme="light"] .archive-card a,
    html[data-theme="light"] .search-item a{
      color:#214b7a !important;
    }

    html[data-theme="light"] .btn,
    html[data-theme="light"] .action,
    html[data-theme="light"] .modebtn,
    html[data-theme="light"] .ghost,
    html[data-theme="light"] .cycle-card,
    html[data-theme="light"] .search,
    html[data-theme="light"] button,
    html[data-theme="light"] input,
    html[data-theme="light"] select,
    html[data-theme="light"] textarea,
    html[data-theme="light"] .select,
    html[data-theme="light"] .docbtn,
    html[data-theme="light"] .chip,
    html[data-theme="light"] .badge,
    html[data-theme="light"] .pill,
    html[data-theme="light"] .char-row,
    html[data-theme="light"] .char-rail-item,
    html[data-theme="light"] .lm-item,
    html[data-theme="light"] .archive-card,
    html[data-theme="light"] .archive-filters,
    html[data-theme="light"] .archive-side,
    html[data-theme="light"] .cb-node,
    html[data-theme="light"] .route47-stop,
    html[data-theme="light"] .streetview-btn,
    html[data-theme="light"] .sb-bcast,
    html[data-theme="light"] .sb-bcast-feed,
    html[data-theme="light"] .docchip,
    html[data-theme="light"] .region-bubble{
      background:linear-gradient(180deg, rgba(255,255,255,.97), rgba(243,247,251,.94)) !important;
      color:#162031 !important;
      border-color:rgba(52,77,118,.18) !important;
      box-shadow:0 8px 24px rgba(57,83,121,.08), inset 0 1px 0 rgba(255,255,255,.88) !important;
      text-shadow:none !important;
    }

    html[data-theme="light"] .btn:hover,
    html[data-theme="light"] .action:hover,
    html[data-theme="light"] .modebtn:hover,
    html[data-theme="light"] .cycle-card:hover,
    html[data-theme="light"] button:hover,
    html[data-theme="light"] .archive-card:hover,
    html[data-theme="light"] .char-row:hover,
    html[data-theme="light"] .char-rail-item:hover,
    html[data-theme="light"] .lm-item:hover{
      background:linear-gradient(180deg, rgba(255,255,255,1), rgba(234,241,248,.98)) !important;
      border-color:rgba(52,77,118,.30) !important;
    }

    html[data-theme="light"] .btn.ghost,
    html[data-theme="light"] .ghost{
      background:rgba(246,249,253,.92) !important;
    }

    html[data-theme="light"] .modebtn.active,
    html[data-theme="light"] .btn.active,
    html[data-theme="light"] .chipbtn.active,
    html[data-theme="light"] .chipbtn[aria-pressed="true"],
    html[data-theme="light"] .cycle-card.active,
    html[data-theme="light"] .cycle-card[aria-pressed="true"]{
      background:linear-gradient(180deg, rgba(228,236,246,.98), rgba(217,228,242,.96)) !important;
      border-color:rgba(52,77,118,.34) !important;
      color:#122033 !important;
      box-shadow:0 0 0 3px rgba(52,77,118,.08), 0 10px 28px rgba(57,83,121,.10) !important;
    }

    html[data-theme="light"] .search::placeholder,
    html[data-theme="light"] input::placeholder,
    html[data-theme="light"] textarea::placeholder{
      color:rgba(22,32,49,.48) !important;
    }

    html[data-theme="light"] .leaflet-container,
    html[data-theme="light"] #map{
      background:#d8e4ef !important;
    }

    html[data-theme="light"] .leaflet-control-zoom a,
    html[data-theme="light"] .leaflet-bar a{
      background:#fff !important;
      color:#162031 !important;
      border-bottom-color:rgba(52,77,118,.16) !important;
      text-shadow:none !important;
    }

    html[data-theme="light"] .sb-tooltip{
      background:rgba(255,255,255,.96) !important;
      color:#162031 !important;
      border-color:rgba(52,77,118,.18) !important;
      box-shadow:0 18px 60px rgba(57,83,121,.16) !important;
      text-shadow:none !important;
    }
    html[data-theme="light"] .sb-tooltip b{ color:#214b7a !important; }

    html[data-theme="light"] .region-label span{
      background:rgba(255,255,255,.88) !important;
      color:#162031 !important;
      border-color:rgba(52,77,118,.14) !important;
      text-shadow:none !important;
      box-shadow:0 10px 24px rgba(57,83,121,.10) !important;
    }

    html[data-theme="light"] .pdf-lightbox__panel,
    html[data-theme="light"] .cyoa-panel{
      background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,247,252,.98)) !important;
      color:#162031 !important;
      border-color:rgba(52,77,118,.16) !important;
      box-shadow:0 28px 80px rgba(49,72,112,.16) !important;
    }

    html[data-theme="light"] .cyoa-head,
    html[data-theme="light"] .cyoa-foot{
      border-color:rgba(52,77,118,.10) !important;
      background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(245,248,252,.82)) !important;
    }

    html[data-theme="light"] .cyoa-body,
    html[data-theme="light"] .cyoa-title,
    html[data-theme="light"] .cyoa-choice,
    html[data-theme="light"] .cyoa-panel .action{
      color:#162031 !important;
      text-shadow:none !important;
    }

    html[data-theme="light"] #panelHeaderRail,
    html[data-theme="light"] #panelActionsRail{
      background:rgba(250,252,255,.96) !important;
      border-color:rgba(52,77,118,.16) !important;
      color:#162031 !important;
    }

    html[data-theme="light"] #panelHeaderRail .panel-title,
    html[data-theme="light"] #panelHeaderRail #panelTitle,
    html[data-theme="light"] #panelHeaderRail .title,
    html[data-theme="light"] #panelHeaderRail .panel-meta,
    html[data-theme="light"] #panelHeaderRail #panelMeta,
    html[data-theme="light"] #panelHeaderRail .subtitle,
    html[data-theme="light"] #panelHeaderRail .muted,
    html[data-theme="light"] #panelActionsRail,
    html[data-theme="light"] #panelActionsRail *{
      color:#162031 !important;
      text-shadow:none !important;
    }

    html[data-theme="light"] #panelBadges .sb-pill{
      background:rgba(236,242,249,.98) !important;
      color:#18324f !important;
      border-color:rgba(52,77,118,.22) !important;
      opacity:1 !important;
      box-shadow:none !important;
    }

    html[data-theme="light"] #panelBadges .sb-pill-obs,
    html[data-theme="light"] .sb-pill-obs,
    html[data-theme="light"] .lm-item .lm-tag,
    html[data-theme="light"] .touched-tag,
    html[data-theme="light"] .sb-canon-badge{
      background:linear-gradient(180deg, rgba(255,248,224,.98), rgba(247,233,187,.96)) !important;
      color:#7a5600 !important;
      border-color:rgba(184,137,24,.46) !important;
      box-shadow:0 8px 18px rgba(184,137,24,.14), inset 0 1px 0 rgba(255,255,255,.82) !important;
      font-weight:700 !important;
    }

    html[data-theme="light"] .cycle-pulse{
      background:rgba(236,242,249,.98) !important;
      border-color:rgba(52,77,118,.18) !important;
      box-shadow:none !important;
    }

    html[data-theme="light"] .cycle-pulse .cp-label,
    html[data-theme="light"] .cycle-pulse span,
    html[data-theme="light"] .cycle-pulse div,
    html[data-theme="light"] .cycle-card .cc-name,
    html[data-theme="light"] .cycle-card .cc-years,
    html[data-theme="light"] .cycle-card .cc-tag{
      color:#162031 !important;
      opacity:1 !important;
      text-shadow:none !important;
    }

    html[data-theme="light"] .lm-item.is-touched{
      border-color:rgba(184,137,24,.34) !important;
      background:linear-gradient(90deg, rgba(247,233,187,.20), rgba(255,255,255,.78) 52%, rgba(255,255,255,.96)) !important;
      box-shadow:0 10px 24px rgba(184,137,24,.10) !important;
    }

    html[data-theme="light"] .lm-item.is-touched .lm-name,
    html[data-theme="light"] .lm-item.is-touched .lm-name::after{
      color:#8a6200 !important;
    }

    html[data-theme="light"] .lm-item.is-touched .lm-name::after{
      font-weight:800 !important;
      opacity:1 !important;
      letter-spacing:.01em;
    }

    html[data-theme="light"] .caseboard{
      background:linear-gradient(180deg, rgba(252,254,255,.98), rgba(239,244,250,.98)) !important;
      border-color:rgba(52,77,118,.18) !important;
      box-shadow:0 24px 72px rgba(45,68,104,.16) !important;
    }

    html[data-theme="light"] .caseboard-header{
      background:linear-gradient(180deg, rgba(255,255,255,.90), rgba(242,247,252,.88)) !important;
      border-bottom-color:rgba(52,77,118,.12) !important;
    }

    html[data-theme="light"] .caseboard-canvas{
      background:
        radial-gradient(circle at 18% 16%, rgba(184,137,24,.08), transparent 28%),
        radial-gradient(circle at 78% 22%, rgba(69,102,149,.08), transparent 30%),
        linear-gradient(180deg, rgba(251,253,255,.98), rgba(236,242,248,.96)) !important;
      box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
    }

    html[data-theme="light"] .caseboard-side{
      background:linear-gradient(180deg, rgba(248,251,255,.96), rgba(239,244,250,.96)) !important;
      border-left-color:rgba(52,77,118,.12) !important;
      color:#162031 !important;
    }

    html[data-theme="light"] .caseboard-side .legend-title,
    html[data-theme="light"] .caseboard-side .muted,
    html[data-theme="light"] .caseboard-side #cbInspector{
      color:#162031 !important;
    }

    html[data-theme="light"] .cb-node{
      background:linear-gradient(180deg, rgba(255,255,255,.99), rgba(243,247,252,.96)) !important;
      color:#162031 !important;
      border-color:rgba(52,77,118,.18) !important;
      box-shadow:0 14px 34px rgba(46,70,108,.14), inset 0 1px 0 rgba(255,255,255,.9) !important;
    }

    html[data-theme="light"] .cb-node .title,
    html[data-theme="light"] .cb-node .meta,
    html[data-theme="light"] .cb-node .cb-title,
    html[data-theme="light"] .cb-node .cb-row,
    html[data-theme="light"] .cb-node .cb-k,
    html[data-theme="light"] .cb-node .cb-badge,
    html[data-theme="light"] .cb-node .cb-chip{
      color:#162031 !important;
    }

    html[data-theme="light"] .cb-node .cb-badge,
    html[data-theme="light"] .cb-node .cb-chip,
    html[data-theme="light"] .cb-connector{
      background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(238,243,249,.96)) !important;
      border-color:rgba(52,77,118,.18) !important;
    }

    html[data-theme="light"] .cb-node.selected{
      border-color:rgba(184,137,24,.44) !important;
      box-shadow:0 0 0 3px rgba(184,137,24,.14), 0 20px 44px rgba(46,70,108,.18) !important;
    }

    html[data-theme="light"] .cb-thread path{
      stroke:rgba(184,137,24,.72) !important;
      filter:drop-shadow(0 0 4px rgba(184,137,24,.18)) !important;
    }

    html[data-theme="light"] .cb-thread.selected path{
      stroke:#2d5f99 !important;
    }

    html[data-theme="light"] .cb-thread text,
    html[data-theme="light"] .cb-thread text.cb-thread-stamp,
    html[data-theme="light"] .cb-thread-stamp{
      fill:#4a607c !important;
      color:#4a607c !important;
      stroke:rgba(255,255,255,.85) !important;
    }

    html[data-theme="light"] .sigil{
      filter:brightness(.88) saturate(.86);
    }
  