/* AI Buildable theme tokens. Repo path: src/theme.css, served at /assets/theme.css and loaded BEFORE style.css.
   Rule: style.css and app.js never use hex/rgb values directly. They only use var(--token).
   To re-theme the whole site, edit this file only. Day (light) values first, night (dark) values below.
   Look: calm sage-and-cream, inspired by socialshelf.me. Cream paper, deep green-black ink, olive labels,
   one fresh lime accent, Inter everywhere with tight headline tracking, soft rounded cards. */

:root {
  /* Brand */
  --brand: #1d2518;            /* primary buttons, active states (deep green-black) */
  --brand-ink: #ffffff;        /* text on top of --brand */
  --brand-text: #5a6d10;       /* olive: eyebrows, small labels, accents in text */
  --brand-soft: #eef3d6;       /* pale lime: selected chips, tinted panels */
  --lime: #a5c700;             /* fresh lime: logo tile, dots, highlights, small fills */
  --lime-ink: #1d2518;         /* text on lime (same in day and night) */

  /* Surfaces (pages, cards, windows) */
  --bg: #f7f8ef;               /* cream-sage page background */
  --surface: #fffef9;          /* cards, panels, sidebar cards */
  --surface-2: #f0f3e4;        /* inset areas, table headers, prompt box */
  --surface-hover: #f2f5e6;
  --overlay: rgba(29, 37, 24, .42);
  --window-bg: #fffef9;
  --window-border: #d9ded3;
  --window-shadow: 0 24px 60px rgba(35, 51, 26, .18);

  /* Text */
  --text: #1d2518;
  --text-2: #3d4935;
  --text-3: #60695d;
  --link: #3f5a14;
  --link-hover: #1d2518;

  /* Lines */
  --border: #d9ded3;
  --border-strong: #c3cab8;
  --focus-ring: #637711;

  /* Buttons */
  --btn-bg: rgba(255, 255, 255, .6);
  --btn-text: #1d2518;
  --btn-border: #d6dbce;
  --btn-hover-bg: #ffffff;
  --btn-primary-bg: var(--brand);
  --btn-primary-text: var(--brand-ink);
  --btn-primary-border: var(--brand);
  --btn-primary-hover-bg: #33402a;
  --btn-pressed-bg: var(--brand-soft);
  --btn-pressed-border: #a9b98a;
  --btn-radius: 13px;

  /* Vote buttons */
  --vote-up: #4f7a12;
  --vote-down: #b2453a;
  --vote-built: #3f5a14;

  /* Inputs / text windows */
  --input-bg: rgba(255, 255, 255, .7);
  --input-text: #1d2518;
  --input-border: #d6dbce;
  --input-focus-border: #637711;
  --input-placeholder: #8a9282;
  --code-bg: #f0f3e4;
  --code-text: #263020;
  --code-border: #d9ded3;

  /* Tooltips */
  --tooltip-bg: #1d2518;
  --tooltip-text: #f7f8ef;
  --tooltip-shadow: 0 10px 28px rgba(35, 51, 26, .25);

  /* Scores and bars (all bars: higher is better) */
  --bar-track: #e3e8d6;
  --bar-fill: #8aa617;
  --bar-fill-community: #3f5a14;
  --score-high: #4f7a12; --score-mid: #b08a12; --score-low: #b2453a;

  /* Difficulty meter, 1 (easy) to 5 (hard) */
  --d1: #5c8a14; --d2: #8aa617; --d3: #c9a12a; --d4: #cf7a35; --d5: #b2453a;

  /* Status and labels */
  --good: #4f7a12; --bad: #b2453a; --info: #3f5a14; --warn: #9a6b0c; --purple: #7a5a9e;
  --on-color: #ffffff;
  --pro-bg: #eef3d6; --pro-text: #3f5a14;
  --con-bg: #f7ebe4; --con-text: #9c4a3c;
  --pill-bg: #eef3d6; --pill-text: #3d4935;
  --badge-bg: #1d2518; --badge-text: #f7f8ef;   /* "Made by Claude" badge */
  --chip-bg: #eef1e3; --chip-text: #3d4935; --chip-hover-bg: #e3e9d2;
  --highlight: #e2ef9e;                         /* lime marker under headline words */

  /* Share card (always dark) */
  --share-bg: #1d2518; --share-text: #f7f8ef; --share-accent: #c8e65a;

  /* Shape, depth, type */
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 1px 2px rgba(35, 51, 26, .04);
  --shadow-hover: 0 18px 40px rgba(35, 51, 26, .12);
  --font-display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --heading-weight: 500;
  --heading-tracking: -.045em;
  --transition: 160ms ease;
}

/* Night values. Applied by the system setting unless the visitor picked day with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #d4ef5a; --brand-ink: #1d2518; --brand-text: #c3e04a; --brand-soft: #29331a; --lime: #c3e04a;
    --bg: #12160f; --surface: #191e15; --surface-2: #20271a; --surface-hover: #222a1b;
    --overlay: rgba(0, 0, 0, .6); --window-bg: #1b2117; --window-border: #2d3526; --window-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    --text: #eef1e4; --text-2: #c9cfbd; --text-3: #98a08b; --link: #c3e04a; --link-hover: #e2f59a;
    --border: #2d3526; --border-strong: #3c4633; --focus-ring: #c3e04a;
    --btn-bg: #1b2117; --btn-text: #eef1e4; --btn-border: #343d2c; --btn-hover-bg: #232b1d; --btn-primary-hover-bg: #e2f59a;
    --btn-pressed-bg: #29331a; --btn-pressed-border: #6d7f2c;
    --input-bg: #151a11; --input-text: #eef1e4; --input-border: #343d2c; --input-focus-border: #c3e04a; --input-placeholder: #7a8270;
    --code-bg: #20271a; --code-text: #e4e9d6; --code-border: #2d3526;
    --tooltip-bg: #eef1e4; --tooltip-text: #1d2518; --tooltip-shadow: 0 10px 28px rgba(0, 0, 0, .5);
    --bar-track: #2d3526; --bar-fill: #b5d62f; --bar-fill-community: #8fbf4a;
    --score-high: #9bd04a; --score-mid: #e0b84a; --score-low: #ff8a7a;
    --d1: #9bd04a; --d2: #c3e04a; --d3: #e0b84a; --d4: #f09a5b; --d5: #ff8a7a;
    --good: #9bd04a; --bad: #ff8a7a; --info: #c3e04a; --warn: #e0b84a; --purple: #c4a5ef; --on-color: #1d2518;
    --pro-bg: #222c17; --pro-text: #b9dc6a; --con-bg: #2e1d18; --con-text: #ffab98;
    --pill-bg: #232b1d; --pill-text: #c9cfbd; --badge-bg: #eef1e4; --badge-text: #1d2518;
    --chip-bg: #232b1d; --chip-text: #c9cfbd; --chip-hover-bg: #2d3526; --highlight: #4a5a14;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-hover: 0 18px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
/* Visitor picked night with the toggle: keep this block identical to the one above. */
:root[data-theme="dark"] {
    --brand: #d4ef5a; --brand-ink: #1d2518; --brand-text: #c3e04a; --brand-soft: #29331a; --lime: #c3e04a;
    --bg: #12160f; --surface: #191e15; --surface-2: #20271a; --surface-hover: #222a1b;
    --overlay: rgba(0, 0, 0, .6); --window-bg: #1b2117; --window-border: #2d3526; --window-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    --text: #eef1e4; --text-2: #c9cfbd; --text-3: #98a08b; --link: #c3e04a; --link-hover: #e2f59a;
    --border: #2d3526; --border-strong: #3c4633; --focus-ring: #c3e04a;
    --btn-bg: #1b2117; --btn-text: #eef1e4; --btn-border: #343d2c; --btn-hover-bg: #232b1d; --btn-primary-hover-bg: #e2f59a;
    --btn-pressed-bg: #29331a; --btn-pressed-border: #6d7f2c;
    --input-bg: #151a11; --input-text: #eef1e4; --input-border: #343d2c; --input-focus-border: #c3e04a; --input-placeholder: #7a8270;
    --code-bg: #20271a; --code-text: #e4e9d6; --code-border: #2d3526;
    --tooltip-bg: #eef1e4; --tooltip-text: #1d2518; --tooltip-shadow: 0 10px 28px rgba(0, 0, 0, .5);
    --bar-track: #2d3526; --bar-fill: #b5d62f; --bar-fill-community: #8fbf4a;
    --score-high: #9bd04a; --score-mid: #e0b84a; --score-low: #ff8a7a;
    --d1: #9bd04a; --d2: #c3e04a; --d3: #e0b84a; --d4: #f09a5b; --d5: #ff8a7a;
    --good: #9bd04a; --bad: #ff8a7a; --info: #c3e04a; --warn: #e0b84a; --purple: #c4a5ef; --on-color: #1d2518;
    --pro-bg: #222c17; --pro-text: #b9dc6a; --con-bg: #2e1d18; --con-text: #ffab98;
    --pill-bg: #232b1d; --pill-text: #c9cfbd; --badge-bg: #eef1e4; --badge-text: #1d2518;
    --chip-bg: #232b1d; --chip-text: #c9cfbd; --chip-hover-bg: #2d3526; --highlight: #4a5a14;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-hover: 0 18px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
}
