:root{--paper:#f6efdf;--gold:#e6b777;--black:#151512}
body{margin:0}
.malnav,.end{background:#141410;color:#f6efdf;padding:18px 5vw;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.malnav a{color:inherit;text-decoration:none}.wordmark,.cinema h1,.cinema h2,.projects span{font-family:Georgia,"Songti TC",serif}.wordmark{font-size:1.45rem}.malnav nav{display:flex;gap:1.4rem;flex-wrap:wrap}.malnav nav a{font:15px system-ui}
.cinema{background:var(--black);color:var(--paper);font-family:system-ui}
.cinema *{box-sizing:border-box}
.lamp{min-height:78svh;background:linear-gradient(90deg,#15130ed9 0%,#211c1388 38%,transparent 72%),url("assets/sunlit-workbench.webp") center/cover;display:grid;align-items:center;padding:6vw}
.covercopy h1{font-size:clamp(38px,6.3vw,100px);line-height:1.13;letter-spacing:-.045em;margin:0}.covercopy p{font:italic 1.6rem Georgia;color:var(--gold)}.enter{display:inline-block;border:1px solid #efce9b;padding:.65rem 1.4rem;color:var(--paper);text-decoration:none}
.spread,.directory{padding:clamp(38px,6vw,92px) 6vw}.cinema h2{font-size:clamp(2rem,4vw,4rem);margin:0 0 .55em}.projects{display:grid;grid-template-columns:1.45fr 1fr;gap:2vw}.projects a{position:relative;overflow:hidden;color:white}.projects img{display:block;width:100%;height:clamp(250px,32vw,530px);object-fit:cover}.projects span{position:absolute;inset:auto 0 0;padding:3rem 1.4rem 1rem;background:linear-gradient(transparent,#111e);font-size:clamp(1.35rem,2vw,2.15rem)}
.directory{background:var(--paper);color:#2b241c}.directory div{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:0 2.4rem}.directory a{padding:14px 0;border-bottom:1px solid #b4a58e;text-decoration:none;color:inherit}.end{font-family:Georgia}
@media(prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}.covercopy,.film-inner h1{animation:enter .8s ease-out both}.projects img{transition:transform .65s}.projects a:is(:hover,:focus-visible) img{transform:scale(1.045)}@keyframes enter{from{opacity:0;transform:translateY(17px)}to{opacity:1;transform:none}}@supports(animation-timeline:view()){.spread h2,.projects a,.directory h2{animation:enter both;animation-timeline:view();animation-range:entry 0% entry 65%}}}
@media(max-width:680px){.projects{grid-template-columns:1fr}.malnav{gap:10px}.malnav nav{gap:.8rem}.lamp{background-position:63% center;align-items:end;padding-bottom:11vw}.covercopy h1{font-size:clamp(35px,7.8vw,52px)}}

.covercopy{max-width:11em;font-size:clamp(38px,6.3vw,100px)}
.covercopy h1{max-width:8em;text-wrap:balance}
.covercopy .enter{font:600 1rem/1.4 system-ui}
.end nav{display:flex;gap:1rem;flex-wrap:wrap}
.end a{color:#efe1cf}
html.sunlit body:not(.cinema){background-color:#f7f1e7}
.sunlit body:not(.cinema) :is(h1,h2){font-family:Georgia,"Songti TC","PMingLiU",serif;letter-spacing:-.025em}
.sunlit :is(.journal-article-header,.catalog-hero,.field-hero,.daily-masthead,.rank-masthead,.journal-masthead){border-block-start:3px solid #ab7436;background-color:#f5ecdc}
.sunlit :is(.article-main,.journal-article-body,.catalog-item,.resource-panel,.local-panel){border-color:#d1bd9f}
.sunlit :is(.ad-cover,.about-hero-media,.services-hero,.gods-hero,.local-hero,.openclaw-hero,.resource-hero){border-bottom:3px solid #b68c50}
.sunlit body:not(.cinema) :focus-visible,.cinema :focus-visible{outline:3px solid #b67626;outline-offset:3px}
@media(prefers-reduced-motion:no-preference){.sunlit body:not(.cinema) h1{animation:enter .65s ease-out both}}

/* Shared page design, with enough specificity to survive the legacy page layers. */
html.sunlit {
  color-scheme: light;
  --editorial-paper: #f6efdf;
  --editorial-surface: #fffaf0;
  --editorial-ink: #2d251b;
  --editorial-muted: #6c5c47;
  --editorial-line: #d8c6a7;
  --editorial-accent: #8c5a24;
  --editorial-olive: #806037;
  --depth-ink: #2d251b;
  --depth-muted: #6c5c47;
  --depth-green: #8c5a24;
  --depth-line: #d8c6a7;
}
html.sunlit body:not(.cinema) {
  --bg: #f6efdf;
  --surface: #fffaf0;
  --surface-2: #f0e4ce;
  --ink: #2d251b;
  --text: #2d251b;
  --muted: #6c5c47;
  --line: #d8c6a7;
  --accent: #8c5a24;
  --journal-paper: #f6efdf;
  --journal-surface: #fffaf0;
  --journal-bronze: #8c5a24;
  --about-bg: #f6efdf;
  --about-surface: #fffaf0;
  --about-bronze: #8c5a24;
  --home-paper: #f6efdf;
  --home-accent: #8c5a24;
  --editorial-paper: #f6efdf;
  --editorial-surface: #fffaf0;
  --editorial-accent: #8c5a24;
  --editorial-line: #d8c6a7;
  background: #f6efdf !important;
  color: #2d251b;
}
html.sunlit body :is(.training-site-nav, .topbar, .editorial-topbar, .privacy-nav) {
  background: #151512 !important;
  color: #f6efdf !important;
  border-bottom: 1px solid #97703d;
  box-shadow: none;
}
html.sunlit body :is(.training-site-nav, .topbar, .editorial-topbar, .privacy-nav)
  :is(a, summary, strong, small) {
  color: #f6efdf !important;
}
html.sunlit body .training-site-brand {
  font-family: Georgia, "Songti TC", serif;
  font-size: 1.35rem;
  font-weight: 400;
}
html.sunlit body .training-explore-panel {
  background: #242017;
  border-color: #97703d;
}
html.sunlit body .training-explore-panel a:hover {
  background: #3a3021;
}
html.sunlit body:not(.cinema) :is(
  .journal-masthead, .journal-article-header, .about-hero, .services-hero,
  .catalog-hero, .field-hero, .daily-masthead, .rank-masthead,
  .local-hero, .openclaw-hero, .resource-hero, .gods-hero, .ad-cover
) {
  background: linear-gradient(90deg, #19160ff5, #251d13dc 55%, #251d1355),
    url("assets/sunlit-workbench.webp") center / cover !important;
  color: #f6efdf !important;
  padding: clamp(26px, 4vw, 60px) !important;
  border: 0;
  border-bottom: 3px solid #b68c50;
  min-height: 260px;
  gap: 28px;
}
html.sunlit body:not(.cinema) :is(
  .journal-masthead, .journal-article-header, .about-hero, .services-hero,
  .catalog-hero, .field-hero, .daily-masthead, .rank-masthead,
  .local-hero, .openclaw-hero, .resource-hero, .gods-hero, .ad-cover
) :is(h1, h2, p, a, time, .journal-article-meta, .journal-intro, .about-lede) {
  color: #f6efdf !important;
}
html.sunlit body:not(.cinema) :is(
  .local-hero, .openclaw-hero, .resource-hero, .gods-hero, .catalog-hero
) :is(.local-panel, .openclaw-panel, .resource-panel, .gods-panel, .catalog-panel) {
  background: transparent !important;
}
html.sunlit body .about-intro { padding: 16px 0; }
html.sunlit body .about-intro h1 { white-space: normal; line-height: 1.25; }
html.sunlit body :is(.about-hero-media, .editorial-page-photo) {
  box-shadow: none;
  border: 1px solid #b68c50;
  overflow: hidden;
}
html.sunlit body.home-page .summary-visual {
  min-height: 210px;
  background: linear-gradient(90deg, #19160fc9, #251d1333),
    url("assets/sunlit-workbench.webp") center / cover;
}
html.sunlit body.home-page .summary-visual span { color: #f6efdf; }
html.sunlit body:not(.cinema) :is(
  .journal-article-body, .article-main, .detail-main, .agent-main, .case-main,
  .resource-detail-main, .god-detail-main, .about-content-grid,
  .catalog-item, .local-card, .resource-card, .openclaw-card, .gods-card,
  .feature-entry-card, .tutorial-card
) {
  background-color: #fffaf0 !important;
  border-color: #d8c6a7 !important;
  box-shadow: none;
}
html.sunlit body .journal-note:hover { background: #eddfc5; }
html.sunlit body .journal-note { border-color: #d8c6a7; }
html.sunlit body:not(.cinema) :is(input, select, textarea) {
  background: #fffaf0;
  color: #2d251b;
  border-color: #bfa47b;
}
@media(max-width:700px) {
  html.sunlit body:not(.cinema) :is(
    .journal-masthead, .journal-article-header, .about-hero, .services-hero,
    .catalog-hero, .field-hero, .daily-masthead, .rank-masthead,
    .local-hero, .openclaw-hero, .resource-hero, .gods-hero, .ad-cover
  ) { min-height: 220px; background-position: 65% center !important; }
  html.sunlit body .training-primary-links > a:first-child {
    display: block;
    white-space: nowrap;
  }
  html.sunlit body .training-primary-links { gap: 12px; }
  html.sunlit body .training-site-brand { font-size: 1rem; }
}

html.sunlit .training-site-nav :is(.site-language-bar, .lesson-languages) {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  background: transparent;
  color: inherit;
  padding: 2px;
  border: 1px solid currentColor;
  border-radius: 8px;
}
html.sunlit .training-site-nav :is(.site-language-bar, .lesson-languages) button {
  border-radius: 5px;
  min-width: 38px;
  min-height: 32px;
  padding: 3px 7px;
}

body:has(.training-site-nav .lesson-languages) > .site-language-bar { display: none; }
.training-site-nav .lesson-languages { display: flex; }
.training-site-nav .lesson-languages button { color: inherit; background: transparent; border: 0; cursor: pointer; }
.training-site-nav .lesson-languages button[aria-pressed=true] { background: #fff; color: #26342b; }
