/* Shared readable surfaces for pages migrated from the former dark palette. */
body {
  --read-ink: #293d33;
  --read-muted: #596653;
  --read-paper: #f8f5ee;
  --read-surface: #fffdf8;
  --read-soft: #ecefe5;
  --read-accent: #365b46;
}
body.theme-moonlit {
  --read-ink: #eae5d9;
  --read-muted: #b0bdae;
  --read-paper: #181d1a;
  --read-surface: #222924;
  --read-soft: #2a352d;
  --read-accent: #a3c9ac;
  --muted: #b0bdae;
  --clay: #e1a58c;
  --gold-primary: #e1a58c;
}
body.legacy-page {
  --text-main: var(--read-ink);
  --text-muted: var(--read-muted);
  --text-dim: var(--read-muted);
  --teal-accent: var(--read-accent);
  background: var(--read-paper);
  color: var(--read-ink);
}
.legacy-page :is(.navbar,.footer,.agora-modal-header,.agora-modal-footer,.agora-modal-dialog) {
  background: var(--read-surface) !important;
  color: var(--read-ink);
}
.legacy-page :is(.subpage-hero,.book-section,.studio-frame-container,.dice-app-toolbar,.nav-cta-btn) {
  background: var(--read-surface) !important;
}
.legacy-page :is(h1,h2,h3,h4,.mountain-title,.section-title,.subpage-title) {
  color: var(--read-ink) !important;
  -webkit-text-fill-color: currentColor;
}
.legacy-page [style*="color:"] { color: var(--read-ink) !important; }
.legacy-page :is(p,strong,blockquote) { color: var(--read-ink); }
.legacy-page :is(.dice-app-toolbar,.toolbar-btn) {
  background: var(--read-surface) !important;
  color: var(--read-ink) !important;
}
.legacy-page .dice-toolbar-status { color: var(--read-accent); }
.legacy-page :is(.agora-filter-btn.active,.download-badge) {
  background: var(--read-soft) !important;
  color: var(--read-accent) !important;
}
.legacy-page [style*="background:"] { background: var(--read-soft) !important; }
.legacy-page :is(input,textarea,select) {
  background: var(--read-surface) !important;
  color: var(--read-ink) !important;
  border-color: var(--border-subtle);
}
.legacy-page :is(input,textarea)::placeholder { color: var(--read-muted); opacity:1; }
.legacy-page :is(.mountain-badge,.mountain-num,.section-tag,.nav-cta-btn,.nav-links a.active) {
  color: var(--read-accent) !important;
}
.legacy-page .mountain-num { opacity:1; }
.legacy-page :is(.brand-symbol,.btn-primary) {
  background: #365b46 !important;
  color: #fffdf8 !important;
}
body.theme-moonlit :is(.quiet-link,.text-action,.nav-active,.section-title,.btn-secondary) {
  color: var(--read-accent) !important;
}
body.theme-moonlit :is(.card-action,.step-summary-edit) { color: var(--read-accent) !important; }
body.theme-moonlit .path-overline { color: #e1a58c; }
body.friendly-studio { --muted: #596653 !important; }
body.theme-moonlit :is(.button-primary,.btn-primary,.brand-seal) {
  background: #365b46 !important;
  color: #fffdf8 !important;
}
.friendly-home .paths-section .eyebrow { color: #596653; }
body.theme-moonlit .paths-section .eyebrow { color: var(--read-muted); }
body.theme-moonlit :is(.step-number,.path-number,.demo-token-value) { color: var(--read-muted); }
:is(input,textarea)::placeholder { opacity:1; }
.legacy-page :is(.umun-locale,.umun-locale label,.umun-locale-note) {
  color: var(--read-muted) !important;
}
.legacy-page .umun-locale { background: var(--read-surface) !important; }
#studioSiteNavigation {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:4px 12px;
  width:100%;
  max-width:1080px;
  padding:10px 16px;
  margin:0 auto 16px;
  border:1px solid #dddccf;
  border-radius:14px;
  background:#fffdf8;
  color:#293d33;
  font:15px/1.5 -apple-system,BlinkMacSystemFont,"Malgun Gothic",sans-serif;
}
#studioSiteNavigation a { padding:10px 8px; color:#293d33; text-decoration:none; }
#studioSiteNavigation a[aria-current="page"] { color:#365b46; font-weight:700; background:#e9eee3; border-radius:8px; }
#studioSiteNavigation a:focus-visible { outline:2px solid #365b46; outline-offset:2px; }
@media(max-width:600px) {
  #studioSiteNavigation { gap:0 4px; padding:6px; }
  #studioSiteNavigation a { font-size:14px; padding:10px 8px; }
}
/* Body copy should remain easy to read without artificially heavy weights. */
.legacy-page :is(.case-card p,.case-card blockquote,.mountain-desc,.agora-form-textarea) {
  line-height:1.85;
}
