/* Shared community light palette; dark remains the default. */
.reading-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;flex-shrink:0;min-height:40px;padding:.5rem .7rem;border:1px solid #537996;border-radius:10px;background:#102139;color:#e8f3fe;font-family:inherit;font-weight:600;font-size:.8rem;line-height:1.4;cursor:pointer;white-space:nowrap}
.reading-theme-toggle[hidden]{display:none!important}
.reading-theme-toggle:focus-visible{outline:3px solid #1687b5;outline-offset:3px}
.reading-table-hint{display:none}
html[data-theme="light"]{color-scheme:light;--bg:#e8eef4!important;--bg-2:#e9f0f7!important;--bg2:#e9f0f7!important;--bg3:#fdfdfc!important;--bg-3:#fdfdfc!important;--surface:#fdfdfc!important;--surface-2:#edf4fa!important;--text:#1e2a36!important;--text2:#435264!important;--muted:#435264!important;--dim:#596b7d!important;--line:#cedce8!important;--line-strong:#a9c4d9!important;--border:#cedce8!important;--border2:#a9c4d9!important;--brand:#076ca6!important;--brand-hover:#055580!important;--accent:#076ca6!important;--accent-h:#055580!important;--accent-d:#075580!important;--success:#166b45!important;--ok:#166b45!important;--danger:#a1272a!important;--err:#a1272a!important;--warn:#7e4e09!important}
html[data-theme="light"],html[data-theme="light"] body{background:#e8eef4!important;color:#1e2a36!important}
html[data-theme="light"] :is(.site-header,.site-footer,.admin-top){background:#fdfdfc!important;border-color:#b0c2d2!important;color:#1e2a36!important}
html[data-theme="light"] .reading-theme-toggle{background:#f8fbff!important;color:#1e2a36!important;border-color:#b6cbdc!important}
html[data-theme="light"] .hero-title-brand{background:none!important;color:#234965!important;-webkit-text-fill-color:#234965!important;text-shadow:none!important}
html[data-theme="light"] .nav-link.is-active{background:#e1edf8!important;color:#075580!important;border-color:#bdd4e6!important}
html[data-theme="light"] :is(.hero,.community-hero,.home-hero,.project-hero){background:linear-gradient(120deg,#e4f0fd,#eef7f3)!important;border-color:#c4d9e9!important;color:#23435e!important;box-shadow:0 8px 28px #183b6010!important}
html[data-theme="light"] :is(.category-card,.project-card,.forum-post,.post,.topic-list,.topic-header,.category-hero,.composer,.reply-box,.profile-card,.auth-card,.sidebar-card,.panel,.notification-settings,.project-guide-step,.admin-card){background:#fdfdfc!important;border-color:#b0c2d2!important;box-shadow:0 5px 20px #183b600a!important}
html[data-theme="light"] :is(.post-author,.post>aside,.forum-post-aside,.admin-sidebar,.admin-nav){background:#eaf2fa!important;border-color:#b0c2d2!important}
html[data-theme="light"] :is(.post,.forum-post):nth-child(even){border-left:3px solid #aacbdc!important}
html[data-theme="light"] :is(.post-content,.prose,.project-content,.forum-post-content){color:#1e2a36!important;line-height:1.85;overflow-wrap:anywhere;min-width:0}
html[data-theme="light"] :is(.prose,.post-content,.project-content,.forum-post-content) :is(h1,h2,h3){color:#234965!important;-webkit-text-fill-color:#234965!important;line-height:1.4;scroll-margin-top:110px}
html[data-theme="light"] :is(.prose,.post-content,.project-content,.forum-post-content) h2{margin-block:1.8rem 1rem;padding:.7rem .9rem;border-left:4px solid #1687b5!important;border-bottom:1px solid #cee1ef!important;border-radius:0 10px 10px 0;background:linear-gradient(90deg,#e5f1fb,#f8fbfd)!important}
html[data-theme="light"] :is(.prose,.post-content,.project-content,.forum-post-content,.editor-preview) :is(pre,.hljs){background:#edf3fa!important;color:#23435b!important;border-color:#c5d7e6!important;max-width:100%;overflow-x:auto}
html[data-theme="light"] :is(.prose,.post-content,.project-content,.forum-post-content,.editor-preview) code{color:#22577a!important;background:#e7f0f8!important}
html[data-theme="light"] pre code{background:transparent!important}
html[data-theme="light"] :is(.hljs-comment,.hljs-quote){color:#536779!important}
html[data-theme="light"] :is(.hljs-keyword,.hljs-literal,.hljs-selector-tag){color:#854397!important}
html[data-theme="light"] :is(.hljs-string,.hljs-title,.hljs-attr){color:#166b45!important}
html[data-theme="light"] :is(.hljs-number,.hljs-built_in,.hljs-type){color:#985a09!important}
html[data-theme="light"] :is(blockquote,.forum-quote){background:#edf5fd!important;color:#3a566d!important;border-left-color:#1687b5!important}
html[data-theme="light"] :is(input,select,textarea,.CodeMirror,.editor-preview,.editor-preview-side){background:#fff!important;color:#1e2a36!important;border-color:#b6cddd!important}
html[data-theme="light"] :is(.editor-toolbar,.editor-footer,.editor-statusbar,.CodeMirror-gutters){background:#eaf2fa!important;color:#435264!important;border-color:#c4d8e8!important}
html[data-theme="light"] .CodeMirror-cursor{border-left-color:#1e2a36!important}
html[data-theme="light"] .CodeMirror-selected{background:#cde3f7!important}
html[data-theme="light"] :is(.CodeMirror,.cm-s-easymde) span{color:#1e2a36}
html[data-theme="light"] :is(.button.primary,.btn-primary){background:#076ca6!important;color:#fff!important;border-color:#076ca6!important}
html[data-theme="light"] :is(.brand::before,.logo-mark,.avatar-placeholder){background:#076ca6!important;color:#fff!important}
html[data-theme="light"] :is(.step-safety-note,.alert.warning,.system-notice--warning){background:#fff5df!important;border-color:#dec386!important;color:#65460b!important}
html[data-theme="light"] :is(.alert.error,.project-danger-zone){background:#fff0ee!important;color:#922e31!important;border-color:#dfb4af!important}
html[data-theme="light"] :is(.alert.success,.notice-success,.badge-success){background:#e7f5ec!important;color:#166b45!important;border-color:#b9d7c5!important}
html[data-theme="light"] [data-reading-shell]{background:transparent!important;color:#1e2a36!important}
html[data-theme="light"] [data-reading-panel]{background:#edf5fd!important;border-color:#c6dded!important;color:#1e2a36!important}
html[data-theme="light"] [data-reading-panel="amber"]{background:#fff5df!important;border-color:#ead59f!important}
html[data-theme="light"] [data-reading-panel="red"]{background:#fff0ee!important;border-color:#e7c3bf!important}
html[data-theme="light"] [data-reading-panel="green"]{background:#edf8f1!important;border-color:#bedbc9!important}
html[data-theme="light"] .lc-table-scroll{max-width:100%;overflow-x:auto;border:1px solid #c8d9e8;border-radius:10px;scrollbar-color:#96aec2 #eef4fa}
html[data-theme="light"] table[data-reading-table]{width:100%!important;display:table!important;border-collapse:collapse!important}
html[data-theme="light"] table[data-reading-table="compact"]{min-width:0!important}
html[data-theme="light"] table[data-reading-table="wide"]{min-width:var(--reading-table-width)!important}
html[data-theme="light"] :is(.prose,.post-content,.project-content,.forum-post-content,.editor-preview) :is(th,td){padding:.7rem!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important;vertical-align:top;color:#1e2a36!important;border:1px solid #ccdae6!important;background:#fdfdfc!important}
html[data-theme="light"] :is(.prose,.post-content,.project-content,.forum-post-content,.editor-preview) th{background:#e2eef8!important;color:#244963!important}
html[data-theme="light"] tbody tr:nth-child(even) td{background:#f0f5fa!important}
html[data-theme="light"] .reading-table-hint{display:block;font-size:.8rem;color:#435264!important;margin:.6rem 0}
@media(max-width:1100px){.nav-wrap,.header-inner{flex-wrap:wrap;gap:10px}.reading-theme-toggle{margin-left:auto}.nav-wrap .account{margin-left:0}}
@media(max-width:720px){.reading-theme-toggle{font-size:.72rem;min-height:38px;padding:.45rem .6rem}.nav-wrap,.header-inner{padding-block:8px;gap:8px}.nav-wrap .brand,.header-inner .logo{margin-right:auto}.nav-wrap .account{order:3;width:100%;justify-content:flex-end}.nav-wrap .forum-nav-toggle{margin-left:0}.header-inner .logo-text{font-size:14px}.post-content,.prose{max-width:100%}}

/* Higher contrast for reading, controls and legacy HTML. */
html[data-theme="light"]{--text:#1e2a36;--muted:#435264;--ml-text:#1e2a36;--ml-text-secondary:#435264;--ml-muted:#435264}
html[data-theme="light"] body{color:#1e2a36}
html[data-theme="light"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){border-color:#8094a6!important}
html[data-theme="light"] :is(input,textarea)::placeholder{color:#596b7b!important;opacity:1}
html[data-theme="light"] :is(button,a,input,textarea,select):focus-visible{outline:3px solid #00609b;outline-offset:3px}
html[data-theme="light"] :is(#reading-contrast-override,[data-reading-contrast="ink"]){color:#1e2a36!important;-webkit-text-fill-color:#1e2a36!important;--reading-inline-color:#1e2a36!important;--reading-inline--webkit-text-fill-color:#1e2a36!important}
html[data-theme="light"] :is(#reading-contrast-override,[data-reading-contrast="paper"]){color:#fff!important;-webkit-text-fill-color:#fff!important;--reading-inline-color:#fff!important;--reading-inline--webkit-text-fill-color:#fff!important}
html[data-theme="light"] [data-reading-gradient-text="1"]{background-image:none!important;--reading-inline-background-image:none!important}
