/* fedipad global stylesheet — the DOCUMENT-level token source. Custom
   properties only reach shadow roots by INHERITING from the document, so
   every token any page/component sheet consumes MUST be declared here (the
   :root blocks inside shadow-scoped page stylesheets never match — that is
   exactly how the app-grid collapsed when --maxw lived only in page.css).
   Keep palettes in sync with app/page.css. */
:root {
  color-scheme: light dark;
  --orange: #ff6a00;
  --orange-soft: rgba(255, 106, 0, 0.12);
  --orange-hover: #ff833a;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 640px;
  /* dark (default — the design's pure-black theme) */
  --bg: #000000;
  --bg-elev: #0c0c0d;
  --bg-hover: #141416;
  --card: #0a0a0b;
  --border: #1f1f22;
  --text: #f5f5f7;
  --text-dim: #8b8b92;
  --text-faint: #5c5c63;
  /* legacy aliases consumed by older component sheets */
  --panel: #0c0c0d;
  --muted: #8b8b92;
  --accent: #ff6a00;
  --accent-ink: #ffffff;
  --err: #fca5a5;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff;
    --bg-elev: #ffffff;
    --bg-hover: #f6f6f7;
    --card: #ffffff;
    --border: #ebebed;
    --text: #111114;
    --text-dim: #6a6a72;
    --text-faint: #9b9ba3;
    --panel: #ffffff;
    --muted: #6a6a72;
    --err: #b91c1c;
  }
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-hover: #f6f6f7;
  --card: #ffffff;
  --border: #ebebed;
  --text: #111114;
  --text-dim: #6a6a72;
  --text-faint: #9b9ba3;
  --panel: #ffffff;
  --muted: #6a6a72;
  --err: #b91c1c;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #0c0c0d;
  --bg-hover: #141416;
  --card: #0a0a0b;
  --border: #1f1f22;
  --text: #f5f5f7;
  --text-dim: #8b8b92;
  --text-faint: #5c5c63;
  --panel: #0c0c0d;
  --muted: #8b8b92;
  --accent: #ff6a00;
  --accent-ink: #ffffff;
  --err: #fca5a5;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
