/* MeshAbout Glass 0.1.17 – opt-in visitor color scheme.
   The front page never receives this stylesheet or the toggle. */
.mesh-theme-toggle { display:flex; align-items:center; justify-content:center; flex:0 0 38px; width:38px; height:38px; margin-left:8px; padding:7px; background:transparent; border:0; border-radius:50%; color:var(--ps-nav-link); cursor:pointer; }
.mesh-theme-toggle:hover,.mesh-theme-toggle:focus-visible { background:rgba(128,128,128,.16); }
.mesh-theme-toggle svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.mesh-theme-toggle__sun { display:none; }
html.mesh-light-mode .mesh-theme-toggle__moon { display:none; }
html.mesh-light-mode .mesh-theme-toggle__sun { display:block; }
@media(max-width:900px){.mesh-theme-toggle{margin-left:0; flex-shrink:0;}}
/* The light palette is applied only to interior pages. Existing dark settings are untouched. */
html.mesh-light-mode body:not(.home) {
    --ps-site-background:var(--mesh-light-bg, #f5f7f4);
    --ps-panel-text:var(--mesh-light-text, #172b29);
    --ps-panel-heading:var(--mesh-light-link, #13734c);
    --ps-page-heading:var(--mesh-light-heading, #173b31);
    --ps-glass-background:rgba(255,255,255,.94);
    --ps-glass-border:rgba(20,65,47,.10);
    --ps-shadow:0 9px 28px rgba(24,50,40,.10);
    color:var(--mesh-light-text, #172b29);
    background-color:var(--mesh-light-bg, #f5f7f4);
}
/* The current animated night sky is preserved in dark mode and not rendered in light mode. */
html.mesh-light-mode body:not(.home) .ps-site-background {
    background-image:none !important;
    background-color:var(--mesh-light-bg, #f5f7f4) !important;
}
html.mesh-light-mode body:not(.home) .ps-site-background > * {display:none !important;}
html.mesh-light-mode body:not(.home) .ps-entry__content h2,
html.mesh-light-mode body:not(.home) .ps-article h2,
html.mesh-light-mode body:not(.home) .ps-article h3 {color:var(--mesh-light-heading, #173b31);}
html.mesh-light-mode body:not(.home) .ps-entry__title,
html.mesh-light-mode body:not(.home) .ps-archive-header h1 {color:var(--mesh-light-heading, #173b31);text-shadow:none;}
html.mesh-light-mode body:not(.home) .ps-glass-surface {color:var(--mesh-light-text, #172b29);background:rgba(255,255,255,.94);}
html.mesh-light-mode body:not(.home) .ps-entry__content a {color:var(--mesh-light-link, #13734c);}
html.mesh-light-mode body:not(.home) .ps-entry__content a:hover {color:var(--mesh-light-hover, #075b39);}
/* Do not override custom inline colors of independent plugins. */

/* Navigation: theme control before social links, with deliberate separation. */
.ps-navigation > .mesh-theme-toggle { margin-left:auto; margin-right:24px; width:36px; height:36px; flex:0 0 36px; }
.ps-navigation > .mesh-theme-toggle + .ps-navigation__social { margin-left:0; }
@media(max-width:900px) {
  .ps-navigation > .mesh-theme-toggle { margin:12px var(--ps-gutter, 20px) 12px auto; }
  .ps-navigation > .mesh-theme-toggle + .ps-navigation__social { margin-left:0; }
}

/* v0.1.20: the configured night image and dark overlay are pseudo-elements. */
html.mesh-light-mode body:not(.home) .ps-site-background::before,
html.mesh-light-mode body:not(.home) .ps-site-background::after {
    content:none!important; display:none!important; background:none!important;
}
html.mesh-light-mode body:not(.home) .ps-site-background { background:var(--mesh-light-bg, #f5f7f4)!important; }
/* Theme content: preserve custom inline colors of independent plugins. */
html.mesh-light-mode body:not(.home) .ps-entry__content,
html.mesh-light-mode body:not(.home) .ps-article {color:var(--mesh-light-text, #172b29);}
html.mesh-light-mode body:not(.home) .ps-entry__content :is(h1,h2,h3,h4,h5,h6),
html.mesh-light-mode body:not(.home) .ps-article :is(h1,h2,h3,h4,h5,h6) {color:var(--mesh-light-heading, #173b31);text-shadow:none;}
html.mesh-light-mode body:not(.home) .ps-entry__content .wp-block-table,
html.mesh-light-mode body:not(.home) .ps-article .wp-block-table {background:rgba(255,255,255,.95);color:var(--mesh-light-text, #172b29);}
html.mesh-light-mode body:not(.home) .ps-entry__content .wp-block-table :is(th,td),
html.mesh-light-mode body:not(.home) .ps-article .wp-block-table :is(th,td) {border-color:var(--mesh-light-border, #d6e2dc);}
html.mesh-light-mode body:not(.home) .ps-entry__content .wp-block-table th,
html.mesh-light-mode body:not(.home) .ps-article .wp-block-table th {color:var(--mesh-light-link, #13734c);}

/* v0.1.22: accessible, quiet light surfaces; interior pages only. */
html.mesh-light-mode body:not(.home) {
 --ps-panel-heading:var(--mesh-light-heading,#000000);
 --ps-page-heading:var(--mesh-light-heading,#000000);
}
html.mesh-light-mode body:not(.home) .il-box {
 background:color-mix(in srgb,var(--mesh-light-info_bg,#e5f2e9) calc(var(--mesh-light-info_opacity,85)*1%),transparent)!important;
 background-image:none!important;
 border-color:transparent!important;
 color:var(--mesh-light-info_text,#151515)!important;
 box-shadow:0 8px 22px rgba(15,40,27,.09)!important;
 --il-body-color:var(--mesh-light-info_text,#151515);
 --il-title-color:var(--mesh-light-heading,#000000);
 --il-icon-color:var(--mesh-light-link,#13734c);
 --il-link-color:var(--mesh-light-info_link,#087847);
 --il-link-hover:var(--mesh-light-hover,#075b39);
}
html.mesh-light-mode body:not(.home) .il-box .il-title {color:var(--mesh-light-heading,#000000)!important;}
html.mesh-light-mode body:not(.home) .il-box .il-icon {color:var(--mesh-light-link,#13734c)!important;}
html.mesh-light-mode body:not(.home) .il-box .il-content,
html.mesh-light-mode body:not(.home) .il-box .il-content p {color:var(--mesh-light-info_text,#151515)!important;}
html.mesh-light-mode body:not(.home) .il-box .il-content a,
html.mesh-light-mode body:not(.home) .il-box .il-content a:visited {color:var(--mesh-light-info_link,#087847)!important;}
html.mesh-light-mode body:not(.home) .il-box .il-content a:hover,
html.mesh-light-mode body:not(.home) .il-box .il-content a:focus {color:var(--mesh-light-hover,#075b39)!important;text-decoration:underline;}
html.mesh-light-mode body:not(.home) .ps-entry__content mark,
html.mesh-light-mode body:not(.home) .ps-article mark,
html.mesh-light-mode body:not(.home) .wp-block-post-content mark {
 background:var(--mesh-light-mark_bg,#e7e9e8)!important;
 color:var(--mesh-light-mark_text,#252525)!important;
 border-color:transparent!important;
}


/* v0.1.24 — Light palette defaults for independently styled content blocks.
   Scoped to interior pages only; dark mode and homepage remain untouched. */
html.mesh-light-mode body:not(.home) .wp-block-table {
 --mtbl-text-color:var(--mesh-light-text,#151515);
 --mtbl-header-bg:#e5eee8;
 --mtbl-header-color:var(--mesh-light-heading,#000000);
 --mtbl-odd-bg:var(--mesh-light-tablebg,#ffffff);
 --mtbl-even-bg:var(--mesh-light-stripe,#eaf2ed);
 --mtbl-hover-bg:#dcece2;
 --mtbl-border-color:var(--mesh-light-border,#d6e2dc);
 --mtbl-accent-green:#087847;
 --mtbl-accent-red:#b4232e;
}
html.mesh-light-mode body:not(.home) .wp-block-table table,
html.mesh-light-mode body:not(.home) .wp-block-table table :is(th,td) {color:var(--mesh-light-text,#151515)!important;}
html.mesh-light-mode body:not(.home) .wp-block-table table th {background:var(--mtbl-header-bg)!important;color:var(--mesh-light-heading,#000000)!important;}
html.mesh-light-mode body:not(.home) .wp-block-table table tbody tr:nth-child(odd) td {background:var(--mtbl-odd-bg)!important;}
html.mesh-light-mode body:not(.home) .wp-block-table table tbody tr:nth-child(even) td {background:var(--mtbl-even-bg)!important;}
html.mesh-light-mode body:not(.home) .wp-block-table.mtbl-hover table tbody tr:hover td {background:var(--mtbl-hover-bg)!important;}
html.mesh-light-mode body:not(.home) .wp-block-table .mtbl-yes {color:#087847!important;}
html.mesh-light-mode body:not(.home) .wp-block-table .mtbl-no {color:#b4232e!important;}
/* Link library: make dark plugin-configured gradients and tiles quiet in light mode. */
html.mesh-light-mode body:not(.home) .lk-library,
html.mesh-light-mode body:not(.home) .lk-library > .lk-backdrop {
 background:#f2f6f2!important;background-image:none!important;color:var(--mesh-light-text,#151515)!important;
}
html.mesh-light-mode body:not(.home) .lk-library .lk-card {
 background:#e6eee8!important;background-image:none!important;
 color:var(--mesh-light-text,#151515)!important;
 border-color:var(--mesh-light-border,#d6e2dc)!important;
 box-shadow:0 2px 8px rgba(20,50,35,.05)!important;
}
html.mesh-light-mode body:not(.home) .lk-library .lk-card:hover,
html.mesh-light-mode body:not(.home) .lk-library .lk-card:focus-visible {background:#d8e9df!important;}
html.mesh-light-mode body:not(.home) .lk-library :is(.lk-title,.lk-description,.lk-intro) {color:var(--mesh-light-text,#151515)!important;}
/* MARK in custom content, including spans not inside the theme's article wrappers. */
html.mesh-light-mode body:not(.home) :is(main,.ps-main,.ps-glass-panel) mark {
 background:var(--mesh-light-mark_bg,#e7e9e8)!important;
 color:var(--mesh-light-mark_text,#252525)!important;
}

/* v0.1.25: interior-page readability and independent plugin surface corrections.
   All overrides require the visitor's light-mode class; dark mode is unaffected. */
html.mesh-light-mode body:not(.home) :is(.ps-entry__content,.ps-article,.wp-block-post-content) :is(p,li,dt,dd,blockquote,figcaption) {
 color:var(--mesh-light-text,#151515)!important;
}
html.mesh-light-mode body:not(.home) :is(.ps-entry__content,.ps-article,.wp-block-post-content) :is(h1,h2,h3,h4,h5,h6) {
 color:var(--mesh-light-heading,#000000)!important;
 text-shadow:none!important;
}
/* Preserve semantic link color even within paragraphs whose old inline styles were pale. */
html.mesh-light-mode body:not(.home) :is(.ps-entry__content,.ps-article,.wp-block-post-content) :is(p,li,blockquote) a:not(.wp-block-button__link) {
 color:var(--mesh-light-link,#13734c)!important;
}
html.mesh-light-mode body:not(.home) :is(.ps-entry__content,.ps-article,.wp-block-post-content) :is(p,li,blockquote) a:not(.wp-block-button__link):hover {
 color:var(--mesh-light-hover,#075b39)!important;
}
/* Some legacy content uses spans with explicit pale text colors. Keep inline
   semantic badges/marks and independent plugin controls outside this rule. */
html.mesh-light-mode body:not(.home) :is(.ps-entry__content,.ps-article,.wp-block-post-content) :is(p,li) > span:not([class]):not([style*="background"]) {
 color:inherit!important;
}
/* The link library renders dark gradient panels from its own saved settings. */
html.mesh-light-mode body:not(.home) .lk-library :is(.lk-panel-filled,.lk-panel-fill-wrapper,.lk-content) {
 background-color:var(--mesh-light-surface,#ffffff)!important;
 background-image:none!important;
 color:var(--mesh-light-text,#151515)!important;
}
html.mesh-light-mode body:not(.home) .lk-library :is(.lk-title,.lk-intro,.lk-description,.lk-card) {
 color:var(--mesh-light-text,#151515)!important;
}
html.mesh-light-mode body:not(.home) .lk-library .lk-title {color:var(--mesh-light-heading,#000000)!important;}
/* Gutenberg table wrappers may have an explicit plugin-supplied dark background. */
html.mesh-light-mode body:not(.home) .wp-block-table,
html.mesh-light-mode body:not(.home) .wp-block-table table {
 background:var(--mesh-light-tablebg,#ffffff)!important;
 color:var(--mesh-light-text,#151515)!important;
}
html.mesh-light-mode body:not(.home) .il-box :is(.il-title,h2,h3,h4) {
 color:var(--mesh-light-heading,#000000)!important;
}

/* v0.1.26: Gutenberg paragraphs, light mode only */
html.mesh-light-mode body:not(.home) .ps-entry__content > p,
html.mesh-light-mode body:not(.home) .ps-entry__content .wp-block-group p,
html.mesh-light-mode body:not(.home) .ps-entry__content .wp-block-columns p,
html.mesh-light-mode body:not(.home) .ps-article p.wp-block-paragraph {color:var(--mesh-light-text,#151515)!important;}
