/* Shared MuchoWorm palette. Page styles retain layout and semantic status colours. */
:root {
  color-scheme: dark;
  --mw-bg: #080b0a;
  --mw-surface: #121914;
  --mw-surface-raised: #19221b;
  --mw-border: #2c3930;
  --mw-text: #f0f4ed;
  --mw-muted: #a2afa2;
  --mw-accent: #ccfa66;
  --mw-accent-hover: #defe9e;
  --mw-on-accent: #14200d;
  --bg: var(--mw-bg);
  --panel: var(--mw-surface);
  --line: var(--mw-border);
  --text: var(--mw-text);
  --ink: var(--mw-text);
  --muted: var(--mw-muted);
  --yellow: var(--mw-accent);
  --lime: var(--mw-accent);
}
html { background: var(--mw-bg); }
html body, html body[class] {
  background: var(--mw-bg);
  color: var(--mw-text);
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  --community-accent: var(--mw-accent);
  --macro-green: var(--mw-accent);
  --macro-line: var(--mw-border);
  --rh-lime: var(--mw-accent);
}
body :is(button, input, textarea, select) { font-family: inherit; }
body :is(button, .button) {
  background: var(--mw-surface-raised);
  border-color: var(--mw-border);
}
body :is(button, .button):hover:not(:disabled) { background: #263322; }
body :is(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--mw-accent);
  outline-offset: 4px;
}
body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select) {
  background: var(--mw-bg);
  border-color: #4b5b4c;
  color: var(--mw-text);
  border-radius: 7px;
  accent-color: var(--mw-accent);
}
body :is(input, textarea)::placeholder { color: #8b9b8b; opacity: 1; }
body :is(.workspace > header, .rail) {
  background: #0d120e;
  border-color: var(--mw-border);
}
.workspace { background: none; }
body :is(.panel, .metrics, .standalone, .admin-member, .admin-create,
  .admin-inbox, .admin-invitation, .message-card, .mailbox-panel, .thread-person,
  .thread-original, .reply-panel, .compose-card, .community-auth, .community-account,
  .community-coming, .glossary-tools, .glossary-entry, .testnet-panel,
  .testnet-confirmation, .testnet-position, .testnet-order, .cx-timeline,
  .cx-wallet, .cx-daily, .cx-benchmark, .ix-scope, .alert-card,
  .macro-panel, .macro-market, .macro-connection, .macro-families,
  .rh-study, .rh-unavailable, .contact-dialog, .help-panel) {
  background: var(--mw-surface);
  border-color: var(--mw-border);
  border-radius: 12px;
}
body :is(.source, .lab-wallet, .lab-wallet.selective, .thread-reply,
  .community-support, .glossary-example, .testnet-balance, .testnet-setup,
  .testnet-jobs, .testnet-fees, .cx-difference, .ix-source-times,
  .ix-source-note, .rh-arm, .rh-results, .rh-limits, .key-permissions) {
  background: #0e150f;
  border-color: var(--mw-border);
}
body :is(.panel-head, .live-preparation .panel-head, .funding-guide .panel-head,
  .cx-daily thead th, .cx-daily caption, .ix-shell th, .rh-scroll thead th) {
  background: var(--mw-surface-raised);
  border-color: var(--mw-border);
}
/* One action style across login, administration, mail and trading screens. */
html body :is(.primary, .button-primary, .macro-primary, .testnet-primary,
  .reply-bottom button, .compose-submit button, .alert-card button,
  .ops-shell > .button, .mode-switch a[aria-current]) {
  background: var(--mw-accent);
  border-color: var(--mw-accent);
  color: var(--mw-on-accent);
  border-radius: 7px;
}
html body :is(.primary, .button-primary, .macro-primary, .testnet-primary,
  .reply-bottom button, .compose-submit button, .alert-card button,
  .ops-shell > .button, .mode-switch a[aria-current]):hover:not(:disabled) {
  background: var(--mw-accent-hover);
  border-color: var(--mw-accent-hover);
  color: var(--mw-on-accent);
}
html body :is(.secondary, .button-secondary, .macro-secondary,
  .testnet-refresh button, .mail-sync button:first-of-type) {
  background: var(--mw-surface-raised);
  border-color: #526545;
  color: var(--mw-text);
  border-radius: 7px;
}
html body :is(.secondary, .button-secondary, .macro-secondary,
  .testnet-refresh button, .mail-sync button:first-of-type):hover:not(:disabled) {
  background: #263322;
  border-color: #91ac6b;
  color: var(--mw-text);
}
body :is(.quiet, .mode-switch a:not([aria-current])) {
  background: transparent;
  border-color: var(--mw-border);
}
body :is(.quiet, .mode-switch a:not([aria-current])):hover:not(:disabled) {
  background: var(--mw-surface-raised);
}
body :is(.accent, .admin-step, .source-value, .metrics article:first-child strong,
  .testnet-heading h1 > span, .ops-shell h1 > span, .glossary-heading h1 > span,
  .community-heading h1 > span) { color: var(--mw-accent); }
body :is(.admin-skip, .messages-skip, .community-skip, .testnet-skip,
  .glossary-skip, .rh-skip, .skip-link) {
  background: var(--mw-accent);
  color: var(--mw-on-accent);
}
body :is(.cx-letter, .cx-selective .cx-letter, .cx-daily-arm, .cx-daily-arm-b,
  .strategy-icon, .selective .strategy-icon, .testnet-orbit > i) {
  background: #263322;
  border-color: #526545;
  color: #d5eba9;
}
body :is(.rh-ongoing, .ops-status, .testnet-boundary) {
  background: #182219;
  border-color: #405237;
}
body :is(.rh-nav, .admin-nav, .messages-nav, .community-nav, .macro-nav,
  .glossary-nav, .testnet-nav, .cx-nav, .ix-nav) { border-color: var(--mw-border); }
body :is(.rh-nav, .admin-nav, .messages-nav, .community-nav, .macro-nav,
  .glossary-nav, .testnet-nav, .cx-nav, .ix-nav) a:hover { color: var(--mw-accent); }
/* Loss, error, warning, stale and disabled states deliberately keep their meaning. */
html body .danger { background: #2b1e26; border-color: #533039; color: var(--red, #f47b88); }
body button:disabled { cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
