/* Content tokens (reader package 6, 2026-11-22) - the ONE place for the colours of content types and of special posts.
   Record: Server/docs/Reader_Frames_Opacity_2026-11-22.md. Loaded right after design.css, so a theme (styles.css, design.css) can override any token later
   with its own selector, e.g. :root[data-style=press]{--type-news:#b3261e}. Other packages use the tokens, they never copy the hex values.

   1. Content type colours, warm -> cold (news red ... community blue). They complement the frame (frame style = content type), they never colour the frame.
      DECIDED by Michael 2026-11-23: the palette follows the brightness of the theme (data-theme), never the edition, so new themes are assigned automatically:
        dark themes (AI Today dark, Terminal, Matrix ...)      -> palette C "leuchtend"
        light themes (All Today bright, newspaper styles ...)  -> palette B "gedeckt"
        anything else (no data-theme)                          -> palette A "klar" (fallback)
      Each palette is ONE token block; to swap, replace the block. */
:root{--type-news:#E5484D;--type-products:#F08A24;--type-creative:#F2C230;--type-discussions:#3FB36B;--type-opinions:#22B8B0;--type-community:#4C7DF0}
:root[data-theme=dark]{--type-news:#FF4D5A;--type-products:#FF9A3C;--type-creative:#FFE14D;--type-discussions:#4CE08A;--type-opinions:#2EE6D6;--type-community:#5B8CFF}
:root[data-theme=light]{--type-news:#C8423B;--type-products:#D9822B;--type-creative:#D4B13A;--type-discussions:#5E9E5A;--type-opinions:#3E9C9A;--type-community:#4A6FB5}

/* Ink variants for text and icons: on light themes the colours are darkened so that yellow and turquoise stay readable on white (contrast >= 3:1 for icons).
   --type-ink-mix is the share of the palette colour, the rest is black. Dark themes use the colours as they are. */
:root{--type-ink-mix:100%;
 --type-news-ink:color-mix(in oklab,var(--type-news) var(--type-ink-mix),#000);--type-products-ink:color-mix(in oklab,var(--type-products) var(--type-ink-mix),#000);
 --type-creative-ink:color-mix(in oklab,var(--type-creative) var(--type-ink-mix),#000);--type-discussions-ink:color-mix(in oklab,var(--type-discussions) var(--type-ink-mix),#000);
 --type-opinions-ink:color-mix(in oklab,var(--type-opinions) var(--type-ink-mix),#000);--type-community-ink:color-mix(in oklab,var(--type-community) var(--type-ink-mix),#000)}
:root[data-theme=light]{--type-ink-mix:72%}

/* 2. Frame colours. Every frame has the same colour: the style's own card line (--card-line, set by the styles on body, else --line). A theme may set --frame-line
      to give all frames another common colour; it is deliberately NOT defined here (a value on :root would freeze --card-line before the styles set it on body).
      Only special posts get their own frame colour, chosen per theme
      as complementary colours to the theme's accent (not selectable by the reader):
        --frame-game         post with a game
        --frame-interaction  post with a digital human interaction (format announced 2026-11-22; the card gets data-interaction="ready")
        --frame-shared       post that was opened from a share link (the reader received it)
      Priority on one card: shared > interaction > game. The static values are the fallback for browsers without relative colours. */
/* Shared posts (package 15, 2026-11-23): --frame-shared-in = received (opened from a share link, = --frame-shared), --frame-shared-out = shared by the reader. */
:root{--frame-game:#0090ad;--frame-interaction:#a347c8;--frame-shared:#c23f7f;--frame-shared-out:#2f8f3a}
:root[data-theme=dark]{--frame-game:#22e4ff;--frame-interaction:#d08bff;--frame-shared:#ff7ab8;--frame-shared-out:#7be38a}
@supports (color:oklch(from red l c calc(h + 180))){
 /* :root[data-theme] so that these win over the static dark fallback above (same specificity, later in the file). */
 :root,:root[data-theme]{--frame-special-l:.56;--frame-special-c:.17;
  --frame-game:oklch(from var(--accent,#ffc36b) var(--frame-special-l) var(--frame-special-c) calc(h + 180));
  --frame-interaction:oklch(from var(--accent,#ffc36b) var(--frame-special-l) var(--frame-special-c) calc(h + 235));
  --frame-shared:oklch(from var(--accent,#ffc36b) var(--frame-special-l) var(--frame-special-c) calc(h + 125));
  --frame-shared-out:oklch(from var(--accent,#ffc36b) var(--frame-special-l) var(--frame-special-c) calc(h + 65))}
 :root[data-theme=dark]{--frame-special-l:.82;--frame-special-c:.15}
}
/* Ink variants (text in the colour of a special frame, e.g. "Which posts?" and the shared banner). */
:root{--frame-shared-in:var(--frame-shared);--frame-game-ink:var(--frame-game);--frame-interaction-ink:var(--frame-interaction);--frame-shared-ink:var(--frame-shared);--frame-shared-in-ink:var(--frame-shared-ink);--frame-shared-out-ink:var(--frame-shared-out)}
:root[data-theme=light]{--frame-game-ink:color-mix(in oklab,var(--frame-game) 82%,#000);--frame-interaction-ink:color-mix(in oklab,var(--frame-interaction) 82%,#000);--frame-shared-ink:color-mix(in oklab,var(--frame-shared) 82%,#000);--frame-shared-out-ink:color-mix(in oklab,var(--frame-shared-out) 82%,#000)}
