/* Neutral surfaces throughout Nodora; colour belongs to artwork and actions. */
:root,body[data-theme="dark"]{
 --surface:#0d1117;--surface-raised:#161b22;--surface-hover:#21262d;
 --surface-line:#3d444d;--surface-text:#f5f5f5;--surface-muted:#aaa;--canvas:#080a0d;
}
body[data-theme="light"],html[data-theme="light"]{
 --surface:#fff;--surface-raised:#fff;--surface-hover:#f5f5f5;
 --surface-line:#e0e0e0;--surface-text:#171717;--surface-muted:#666;--canvas:#fff;
}
body[data-theme],body[data-theme] #memberProfile .profile-overview.has-profile-cover{
 --bg:var(--canvas);--panel:var(--surface);--panel2:var(--surface-raised);
 --line:var(--surface-line);--text:var(--surface-text);--muted:var(--surface-muted);
 --ui-field:var(--surface);--ui-hover:var(--surface-hover);
 --ui-joined-bg:var(--surface-raised);--ui-joined-text:var(--surface-text);
}
/* Explicit surfaces avoid altering images, chart lines or transparent feed rows. */
body[data-theme] :is(
 .card:not(.post):not(.sponsored-feed-card):not(.network-feed-card),.modal-card,
 .desktop-panel,.notification-panel,.header-dropdown,.profile-account-sheet,
 .growth-actions,.feed-sort-menu,.post-options-menu,.search-results,.mention-picker,
 .composer,.composer-open,.composer-chart-preview,.market-card,.market-highlight,
 .watched-market-card,.live-chart,.space-mini-chart,.post-news-preview,.news-preview,
 .nft-picker-item,.holding-card,.post-detail,.reward-choice,.achievement-tile,
 .analytics-metric,.analytics-post,.plus-share-row,.plus-share-comparison,
 .bits-balance,.bits-pack,.bits-subscription,.purchase-hero,.purchase-art,.purchase-cost,
 .purchase-tabs,.purchase-panel,.purchase-creator,.trade-card,.trade-pick,
 .growth-hub,.growth-coin,.growth-space-shortcut,.growth-preview-card,.desktop-cashtag,.desktop-tags a,
 .whitepaper-button,.trend-intro,.trend-topic,.trend-post,
 .inbox-workspace,.inbox-heading,.messenger-welcome,.messenger-request,
 .messenger-reply-draft,.profile-feature-links>button,.profile-cover-stage,
 .profile-about-votes .stat,.vote-stats>span,.profile-stats-grid .stat,
 .your-space-tile,.official-discovery-card,.community-discovery-card,
 .launch-card,.launch-trending-card,.launch-discovery-card,.launch-empty,
 .cosmetics-item,.wardrobe-item,.shop-preview,.profile-icon-button,.notice,
 .notification-button,.theme-toggle,
 .topbar,.bottomnav
 ){
 background-color:var(--surface)!important;background-image:none!important;
 border-color:var(--surface-line)!important;color:var(--text);
}
body[data-theme] .growth-hero::before,body[data-theme] .growth-hero::after{background:none}
body[data-theme] .growth-hero h1{color:var(--text)!important;text-shadow:none}
body[data-theme] .growth-hero :is(p,#growthCounter){color:var(--muted)!important}
body[data-theme] .growth-preview-label{color:var(--text)}
body[data-theme=light] .growth-flow .growth-step{color:#465778}
body[data-theme=light] .growth-space-pick-label{color:var(--text);background:var(--surface)}
body[data-theme=light] .growth-space-pick[aria-pressed=true] .growth-space-pick-label{color:#152a50;background:#e7eefc}
body[data-theme] .growth-preview-art::after,body[data-theme] .growth-space-pick-art::after{background:linear-gradient(0deg,var(--surface),transparent 55%)}
body[data-theme] .growth-hero .growth-eyebrow,
body[data-theme] .growth-topics .growth-topic,
body[data-theme] .growth-choices :is(.growth-coin-pick,.growth-space-pick):not([aria-pressed="true"]){
 background:var(--surface)!important;border-color:var(--line)!important;color:var(--text)!important;
}
body[data-theme] #page-tokencheck #tokenChart,
body[data-theme] .app .post .live-chart.post-chart-preview,
body[data-theme] .app #memberProfile .profile-feature-links>button,
body[data-theme] #officialSpaceView .space-hero.official-themed{
 background:var(--surface)!important;border-color:var(--line)!important;box-shadow:none!important;
}
/* The Space chart's outer card supplies its surface and single outline. */
body[data-theme] #spaceTokenBar{
 background:var(--surface)!important;border:1px solid var(--line)!important;box-shadow:none!important;
}
body[data-theme] #spaceTokenBar .space-mini-chart{
 background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;
}
/* Remove inset colour washes from idle controls, without removing selection. */
body[data-theme] :is(.input,.search input,#contractInput,.auth-field input,.chat-input,
 .social-reply-form input,.inbox-search,.messenger-quoted-message),
body[data-theme] .app :is(.btn.ghost,.desktop-pill,.chip:not(.active):not([aria-pressed="true"])),
body[data-theme] .composer .composer-action-row>button:is(#attachImage,#addPoll,#addChart,#shareTrade,#addTrade):not(.active){
 background-color:var(--surface)!important;border-color:var(--line)!important;color:var(--text);
}
body[data-theme] .composer .composer-action-row>button:is(#attachImage,#addPoll,#addChart,#shareTrade,#addTrade):not(.active){background-image:none!important}
body[data-theme] .messenger-message:not(.is-own) .messenger-bubble{
 background:var(--surface-raised);border:1px solid var(--line);
}
body[data-theme] #spaceDirectory .official-space-art::after{background:linear-gradient(0deg,var(--panel),transparent 48%)}
/* Membership artwork stays colourful, with readable copy on the neutral box. */
body[data-theme] #socialDialog .plus-membership-hero{background:var(--surface);border:1px solid var(--line);color:var(--text)}
body[data-theme] #socialDialog .plus-membership-hero h2{color:var(--text)!important}
body[data-theme] #socialDialog .plus-membership-hero p{color:var(--muted)}
body[data-theme] :is(.purchase-hero,.purchase-creator){color:var(--text)}
body[data-theme] .purchase-tabs button:not(.active){color:var(--muted)}
/* Explicit carets stay visible even when native controls keep a default colour. */
body[data-theme] :is(input,textarea,[contenteditable="true"]){caret-color:var(--text)!important}
body[data-theme] .composer #postText{color:var(--text)!important}
/* These surfaces are opaque, so blurring the scrolling page underneath is wasted. */
body[data-theme] :is(.topbar,.bottomnav){backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
/* Public guides and server-rendered discussions share the same palette. */
body:not([data-theme]){
 --bg:var(--canvas);--panel:var(--surface);--line:var(--surface-line);
 --text:var(--surface-text);--muted:var(--surface-muted);
 background:var(--canvas)!important;color:var(--surface-text)!important;
}
body:not([data-theme]) :is(.feature-card,.notice,.skip-link){background:var(--surface)!important;border-color:var(--surface-line)!important}
body:not([data-theme]) :is(.site-nav,.site-footer,header,footer,.related,td,th){border-color:var(--surface-line)!important}
body:not([data-theme]) :is(.intro,.notice,.updated,.breadcrumbs){color:var(--surface-muted)!important}
@media(prefers-color-scheme:light){
 body:not([data-theme]){
  --surface:#fff;--surface-raised:#fff;--surface-hover:#f5f5f5;
  --surface-line:#e0e0e0;--surface-text:#171717;--surface-muted:#666;--canvas:#fff;
 }
}

/* Keep the browser canvas in step with the slightly lifted dark page. */
html:not([data-theme="light"]){background:#080a0d}
