/* Library of Cernê: day mode v1.3.0
 * Active when <html data-theme="day">. Night (the approved design) stays the base stylesheet.
 * Set before first paint by the inline head script; toggled by code/loc-theme-toggle.js.
 * Inactive-mode art is never downloaded: hero art is a CSS background scoped to the mode, and the
 * gardens/footer-logo <img>s are loading="lazy" + display:none in the other mode.
 */
:root[data-theme="day"]{
  color-scheme:light;
  --ink:#f5eedf;      /* parchment page */
  --ink2:#ede3cf;     /* alternate section */
  --ink3:#e4d7bd;
  --ivory:#1b1311;    /* primary text (near-black) */
  --ivory2:#4a3c33;   /* secondary text */
  --ember:#8c3d0c;    /* links, emphasis (dark ember) */
  --crimson-text:#a10f13; /* small crimson labels on light (6.4-7.6:1) */
  --crimson:#d41317;  /* unchanged: buttons, rules, stars, accents */
  --crimson-d:#b90f10;
  --rule:rgba(212,19,23,.45);
  --card:rgba(251,247,238,.92);
  --line:rgba(27,19,17,.16);
}
/* Tokens also live on .loc26 in loc-2026.css; re-declare so the day swap wins inside the page. */
:root[data-theme="day"] .loc26{
  --ink:#f5eedf;
  --ink2:#ede3cf;
  --ink3:#e4d7bd;
  --ivory:#1b1311;
  --ivory2:#4a3c33;
  --ember:#8c3d0c;
  --crimson-text:#a10f13;
  --crimson:#d41317;
  --crimson-d:#b90f10;
  --rule:rgba(212,19,23,.45);
  --card:rgba(251,247,238,.92);
  --line:rgba(27,19,17,.16);
}
:root{color-scheme:dark}
/* ---- mode switch transition (only while toggling; never under reduced motion) ---- */
html.theme-anim,html.theme-anim *,html.theme-anim *::before,html.theme-anim *::after{transition:background-color .45s ease,color .45s ease,border-color .45s ease,opacity .45s ease!important}
@media (prefers-reduced-motion:reduce){html.theme-anim,html.theme-anim *,html.theme-anim *::before,html.theme-anim *::after{transition:none!important}}
/* Don't opacity-transition the fixed sky layers: hiding them with display:none mid-animation, then transitioning opacity, left the starfield blank after day→night until reload. */
html.theme-anim .loc-sky,html.theme-anim .loc-sky *,html.theme-anim .loc-sky *::before,html.theme-anim .loc-sky *::after{transition:none!important}
/* ---- toggle button (both modes) ---- */
.theme-toggle{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:50%;border:1px solid var(--rule);background:transparent;color:var(--ivory);cursor:pointer;flex:none}
.theme-toggle:hover{border-color:var(--crimson)}
.theme-toggle:focus-visible{outline:2px solid var(--crimson-text);outline-offset:3px}
.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.theme-toggle .i-sun{display:none}
:root[data-theme="day"] .theme-toggle .i-sun{display:block}
:root[data-theme="day"] .theme-toggle .i-moon{display:none}
/* Day hover was a black disc: OceanWP/night button:hover (dark fill) plus day --ivory (#1b1311) icon. Override only in day; night hover stays a crimson border on a transparent ground. */
:root[data-theme="day"] .loc26 .theme-toggle{
  color:#1b1311;
  background:transparent;
}
:root[data-theme="day"] .loc26 .theme-toggle:hover,
:root[data-theme="day"] .loc26 .theme-toggle:active{
  background:rgba(140,61,12,.12)!important;
  border-color:#8c3d0c!important;
  color:#1b1311!important;
}
:root[data-theme="day"] .loc26 .theme-toggle:focus-visible{
  outline:2px solid #8c3d0c;
  outline-offset:3px;
  color:#1b1311;
  background:rgba(140,61,12,.08);
}
.head-r{display:flex;align-items:center;gap:18px}
/* ---- per-mode art visibility ---- */
.only-day{display:none!important}
:root[data-theme="day"] .only-day{display:block!important}
:root[data-theme="day"] .only-night{display:none!important}
/* ---- header & buttons ---- */
:root[data-theme="day"] header{background:rgba(245,238,223,.9);border-bottom-color:rgba(212,19,23,.3)}
:root[data-theme="day"] .btn.ghost{background:rgba(251,247,238,.75)}
:root[data-theme="day"] .btn.ghost:hover{background:rgba(212,19,23,.1)}
:root[data-theme="day"] .btn.solid{box-shadow:0 8px 24px rgba(212,19,23,.25)}
/* ---- hero: sunlit library ---- */
:root[data-theme="day"] .hero{background-image:url(/wp-content/uploads/loc/hero-library-day-1920.webp)}
:root[data-theme="day"] .hero:before{background:radial-gradient(ellipse at 38% 50%,rgba(245,238,223,.66),rgba(245,238,223,.5) 75%),linear-gradient(180deg,rgba(245,238,223,0) 60%,var(--ink))}
:root[data-theme="day"] .hero h1{text-shadow:0 1px 18px rgba(245,238,223,.9)}
/* hero eyebrow sits over the busiest part of the art: deeper ember (measured on worst 5% of pixels) */
:root[data-theme="day"] .hero .eyebrow{color:#6b2a05}
/* v1.3.1: drop the 1px hairline ring on the hero cover (night + day). This file is draft-only; loc-2026.css is left unchanged. */
.loc26 .cover img{display:block;width:100%;height:auto;aspect-ratio:1027/1600;border-radius:2px;box-shadow:0 2px 6px rgba(0,0,0,.55),0 28px 64px -12px rgba(0,0,0,.85);backface-visibility:hidden}
:root[data-theme="day"] .cover img{box-shadow:0 2px 5px rgba(60,30,10,.28),0 26px 54px -12px rgba(60,30,10,.48)}
:root[data-theme="day"] .cover:before{background:radial-gradient(circle,rgba(242,199,155,.55),transparent 60%)}
@media (max-width:900px){:root[data-theme="day"] .hero{background-image:url(/wp-content/uploads/loc/hero-library-day-mobile-800.webp)}}
/* ---- Book cards ---- */
:root[data-theme="day"] .bk{background:linear-gradient(180deg,#fbf7ee,#f2e9d7);border-color:rgba(212,19,23,.25)}
/* ---- Library lattice ---- */
:root[data-theme="day"] .library .art img.robe{filter:saturate(.95) brightness(.95)}
:root[data-theme="day"] .library .art img.mark{background:#fbf7ee}
/* ---- Readers cards + gardens (day image, light scrim) ---- */
:root[data-theme="day"] .rv{background:var(--card);border-color:var(--line)}
:root[data-theme="day"] .gardens .rv{background:rgba(251,247,238,.9)}
:root[data-theme="day"] .gardens::before{background:
  linear-gradient(180deg,var(--ink) 0,rgba(245,238,223,.25) 14%,rgba(245,238,223,.25) 60%,rgba(245,238,223,.85) 88%,var(--ink) 100%),
  radial-gradient(ellipse 50% 20% at 50% 14%,rgba(245,238,223,.8),rgba(245,238,223,0) 100%)}
@media (max-width:760px){:root[data-theme="day"] .gardens::before{background:
  linear-gradient(180deg,var(--ink) 0,rgba(245,238,223,.2) 10%,rgba(245,238,223,.45) 45%,rgba(245,238,223,.88) 80%,var(--ink) 100%),
  radial-gradient(ellipse 90% 18% at 50% 12%,rgba(245,238,223,.8),rgba(245,238,223,0) 100%)}}
/* ---- Film: section brightens, the poster/player stays dark ---- */
:root[data-theme="day"] .film{background:radial-gradient(ellipse at 75% 50%,rgba(212,19,23,.10),transparent 60%),var(--ink3);border-color:rgba(212,19,23,.25)}
:root[data-theme="day"] .film a.credit{color:var(--ivory)}
:root[data-theme="day"] .yt-facade{box-shadow:0 22px 44px -14px rgba(27,19,17,.45),0 0 0 1px rgba(212,19,23,.25)}  /* lighter shadow so the label beneath stays on parchment */
.yt-cap{color:#efe6d2}
.yt-play{border-color:#efe6d2}
/* ---- Buy ---- */
:root[data-theme="day"] .buy{background:radial-gradient(ellipse at 50% 0,rgba(212,19,23,.08),transparent 60%),var(--ink)}
:root[data-theme="day"] .fmt{background:var(--card)}
/* ---- Community + Contact form + privacy notice ---- */
:root[data-theme="day"] .community{border-color:var(--line)}
:root[data-theme="day"] .cform{background:var(--card)}
/* Day WPForms fields: loc-2026.css sets night chrome with !important; override only under data-theme=day. */
:root[data-theme="day"] .loc26 .cform input[type=text],
:root[data-theme="day"] .loc26 .cform input[type=email],
:root[data-theme="day"] .loc26 .cform input[type=tel],
:root[data-theme="day"] .loc26 .cform input[type=url],
:root[data-theme="day"] .loc26 .cform input:not([type]),
:root[data-theme="day"] .loc26 .cform textarea,
:root[data-theme="day"] .loc26 .cform select{
  background:#fffdf8!important;
  color:#1b1311!important;
  border:1px solid #6e5f54!important; /* 6.03:1 vs field, 5.73:1 vs card; ≥3:1 UI */
  box-shadow:none!important;
}
:root[data-theme="day"] .loc26 .cform input::placeholder,:root[data-theme="day"] .loc26 .cform textarea::placeholder{color:#6e5f54!important;opacity:1!important}
:root[data-theme="day"] .loc26 .cform input::-webkit-input-placeholder,:root[data-theme="day"] .loc26 .cform textarea::-webkit-input-placeholder{color:#6e5f54!important;opacity:1!important}
:root[data-theme="day"] .loc26 .cform input::-moz-placeholder,:root[data-theme="day"] .loc26 .cform textarea::-moz-placeholder{color:#6e5f54!important;opacity:1!important}
:root[data-theme="day"] .loc26 .cform input:focus,
:root[data-theme="day"] .loc26 .cform textarea:focus,
:root[data-theme="day"] .loc26 .cform select:focus,
:root[data-theme="day"] .loc26 .cform input:focus-visible,
:root[data-theme="day"] .loc26 .cform textarea:focus-visible,
:root[data-theme="day"] .loc26 .cform select:focus-visible{
  border-color:#8c3d0c!important;
  outline:2px solid #8c3d0c;
  outline-offset:2px;
}
:root[data-theme="day"] .stars{color:var(--crimson-text)}
/* ivory trident watermark in #book: tinted to ink so it still reads on parchment (same file, no extra download) */
:root[data-theme="day"] .wm{filter:brightness(.22) sepia(.5);opacity:.8}
:root[data-theme="day"] .ts{background:#f7f1e4;border-color:var(--line)}
:root[data-theme="day"] .sticky-buy a+a{background:#2a1716}
/* ---- Footer: fixed twilight-to-day sky (same clip-path technique as the night starfield) ---- */
/* Must beat .loc26 .loc-sky>i{display:block} (0,2,1). The unscoped .loc-sky .day rule lost, so the day sky stayed painted after day→night and covered the starfield. */
.loc26 .loc-sky>.day,.loc26 .loc-sky>.cl1,.loc26 .loc-sky>.cl2,.loc26 .loc-sky>.rays{display:none}
:root[data-theme="day"] .loc-sky{background:#e9d9bf}
/* Hide night star layers in day without display:none, so they paint again immediately on day→night (no reload). Day layers stay display:none in night (rule above). */
:root[data-theme="day"] .loc-sky>.dust,
:root[data-theme="day"] .loc-sky>.med,
:root[data-theme="day"] .loc-sky>.tw1,
:root[data-theme="day"] .loc-sky>.tw2,
:root[data-theme="day"] .loc-sky>.tw3,
:root[data-theme="day"] .loc-sky>.tw4,
:root[data-theme="day"] .loc-sky>.m45,
:root[data-theme="day"] .loc-sky>.spk-a,
:root[data-theme="day"] .loc-sky>.spk-b{
  visibility:hidden;
  opacity:0;
}
:root[data-theme="day"] .loc26 .loc-sky>.day,:root[data-theme="day"] .loc26 .loc-sky>.cl1,:root[data-theme="day"] .loc26 .loc-sky>.cl2,:root[data-theme="day"] .loc26 .loc-sky>.rays{display:block}
/* sky: warm dawn haze at the top easing into clear pale day blue, sun low at upper left */
.loc-sky .day{background:
  radial-gradient(circle at 18% 30%,rgba(255,250,235,1) 0,rgba(255,240,205,.9) 3%,rgba(255,228,180,.55) 9%,rgba(255,220,170,0) 30%),
  linear-gradient(180deg,#f1d3b0 0%,#f3e2c6 28%,#dfe7e6 58%,#c9dde6 100%)}
/* sun rays: soft conic beams fading out radially */
.loc-sky .rays{background:repeating-conic-gradient(from 0deg at 18% 30%,rgba(255,246,222,.32) 0deg 3deg,rgba(255,246,222,0) 3deg 11deg);
  -webkit-mask:radial-gradient(circle at 18% 30%,#000 0,rgba(0,0,0,.6) 18%,transparent 55%);mask:radial-gradient(circle at 18% 30%,#000 0,rgba(0,0,0,.6) 18%,transparent 55%)}
/* clouds: two stitched-noise layers, twice the viewport wide, drifting gently.
   Must beat .loc26 .loc-sky>i{inset:0;background-repeat:no-repeat;background-position:50% 100%;background-size:cover} (0,2,1).
   Unscoped .loc-sky .cl1/.cl2 (0,2,0) lost, so layers stayed viewport-sized with one cover-stretched tile and the 240s/160s drift was nearly invisible. */
:root[data-theme="day"] .loc26 .loc-sky>.cl1,
:root[data-theme="day"] .loc26 .loc-sky>.cl2{
  right:auto;
  left:0;
  width:200%;
  background-repeat:repeat;
  background-position:0 0;
}
:root[data-theme="day"] .loc26 .loc-sky>.cl1{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='700'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0026 .0062' numOctaves='5' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 .99  0 0 0 0 .97  0 0 0 4.2 -2.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E") 0 0/1400px 700px repeat;opacity:.85;animation:loc-drift 90s linear infinite;-webkit-mask:linear-gradient(180deg,transparent 0,#000 18%,#000 52%,transparent 80%);mask:linear-gradient(180deg,transparent 0,#000 18%,#000 52%,transparent 80%)}
:root[data-theme="day"] .loc26 .loc-sky>.cl2{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1100' height='560'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0036 .0085' numOctaves='5' seed='23' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 .99  0 0 0 0 .97  0 0 0 3.6 -1.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E") 0 0/1100px 560px repeat;opacity:.6;animation:loc-drift 60s linear infinite reverse;-webkit-mask:linear-gradient(180deg,transparent 35%,#000 62%,#000 82%,transparent 100%);mask:linear-gradient(180deg,transparent 35%,#000 62%,#000 82%,transparent 100%)}
/* Lens flare / sun rays: slow linear spin around the sun at 18% 30%. Transform only (compositor-friendly). */
:root[data-theme="day"] .loc26 .loc-sky>.rays{
  transform-origin:18% 30%;
  animation:loc-rays 150s linear infinite;
}
@keyframes loc-drift{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes loc-rays{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
:root[data-theme="day"] .loc-starfield{background:#e9d9bf;color:var(--ivory)}
:root[data-theme="day"] .loc-starfield::before{background:radial-gradient(closest-side,rgba(245,238,223,.82),rgba(245,238,223,.55) 55%,rgba(245,238,223,0))}
:root[data-theme="day"] .loc-starfield a{color:var(--ember)}
@media (prefers-reduced-motion:reduce){
  :root[data-theme="day"] .loc26 .loc-sky>.cl1,
  :root[data-theme="day"] .loc26 .loc-sky>.cl2,
  :root[data-theme="day"] .loc26 .loc-sky>.rays{animation:none!important}
}

/* Privacy draft (1239) uses the same header/tokens. Body chrome follows the mode. */
.loc26-page{background:var(--ink);color:var(--ivory)}
.loc26 .privacy-body{max-width:760px;margin:0 auto;padding:80px 22px 120px;color:var(--ivory);font:18px/1.7 "Galliard","EB Garamond",Georgia,serif}
.loc26 .privacy-body h1,.loc26 .privacy-body h2,.loc26 .privacy-body h3{color:var(--ivory);font-family:"Mantinia","Cinzel",serif;letter-spacing:.04em;font-weight:400}
.loc26 .privacy-body a{color:var(--ember)}
@media (max-width:900px){.loc26 nav{display:none}}
