/* ════════════════════════════════════════════════════════════════
   Stoei Core — app starter theme (the Stoei app look)

   Copy this file into a new app as its theme file (for example
   public/css/theme.css) and load it after the kit files. From then on
   it belongs to the app: it is the one place where a developer changes
   the app's whole look. Anything left out keeps the default from
   css/tokens.css. Full list of settings: docs/THEME-SETTINGS.md.

   Colors are written once for both modes: light-dark(light, dark).
   Check after a change: php tools/check-css.php <kit files> theme.css
════════════════════════════════════════════════════════════════ */

:root {
    /* Fonts (self-hosted by css/fonts.css) */
    --st-font-serif: "Newsreader", Georgia, "Times New Roman", serif;
    --st-font-sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Page and boxes */
    --st-color-bg: light-dark(#EFE9DC, #16120E);
    --st-color-surface: light-dark(#F6F2E8, #201B16);
    --st-color-raised: light-dark(#FBF8F1, #29231C);
    --st-color-sunk: light-dark(#E4DCCB, #2A231C);
    --st-color-line: light-dark(#D6CCB8, #3B332A);
    --st-color-line-strong: light-dark(#B3A68C, #5A4E40);
    --st-color-backdrop: light-dark(rgb(20 20 18 / 0.38), rgb(0 0 0 / 0.6));

    /* Text */
    --st-color-text: light-dark(#14100C, #F3EDE1);
    --st-color-text-soft: light-dark(#3B332A, #D6CCB8);
    --st-color-text-muted: light-dark(#6B6052, #A89B86);
    --st-color-text-faint: light-dark(#8A7D6C, #7D725F);
    --st-color-eyebrow: light-dark(#8A6317, #D4AA5C);

    /* Brand green. Solid fills stay deep green in both modes, so cream
       text on them always reads well. */
    --st-color-accent: light-dark(#2F6D55, #6FB396);
    --st-color-accent-hover: light-dark(#17503B, #8CC7AE);
    --st-color-accent-tint: light-dark(#E4F3EA, #1E3329);
    --st-color-on-accent: #EFE9DC;
    --st-color-accent-fill: #2F6D55;
    --st-color-accent-fill-hover: light-dark(#17503B, #3A8268);

    /* Status */
    --st-color-ok: light-dark(#2F6D55, #6FB396);
    --st-color-ok-tint: light-dark(#E4F3EA, #1E3329);
    --st-color-warn: light-dark(#8A6317, #D4AA5C);
    --st-color-warn-tint: light-dark(#F3E7CC, #33281A);
    --st-color-bad: light-dark(#A3362A, #E08A7C);
    --st-color-bad-hover: light-dark(#86281E, #EBA597);
    --st-color-bad-tint: light-dark(#F6DDD7, #3A1F1A);
    --st-color-info: light-dark(#3D5F7A, #8FB3CF);
    --st-color-info-tint: light-dark(#E2EAF1, #1C2731);
    /* Solid status fills with cream text (both modes) */
    --st-color-ok-fill: #2F6D55;
    --st-color-warn-fill: #7A5714;
    --st-color-bad-fill: #A3362A;
    --st-color-info-fill: #3D5F7A;

    /* Sidebar: dark in both modes, like stoei.co's header bar */
    --st-color-sidebar: light-dark(#14100C, #0E0B08);
    --st-color-on-sidebar: #CFE0D4;
    --st-color-on-sidebar-strong: #EFE9DC;
    --st-color-on-sidebar-muted: light-dark(#A9BFB0, #8AA394);
    --st-color-on-sidebar-accent: #8CC7AE;
    --st-color-on-sidebar-bad: #E08A7C;
    --st-color-sidebar-line: light-dark(#2A231C, #221C16);
    --st-color-sidebar-hover: light-dark(rgb(207 224 212 / 0.08), rgb(207 224 212 / 0.07));
    --st-color-on-sidebar-active: #EFE9DC;

    /* Text and shape */
    --st-text-body: var(--st-text-4);
    --st-weight-heading: 500;
    --st-radius-control: var(--st-radius-1);
    --st-radius-card: var(--st-radius-3);
    --st-radius-big: var(--st-radius-5);
    --st-focus-width: 2px;

    /* Buttons and fields: the compact app size (websites use the larger
       defaults from tokens.css). Secondary buttons are green outlines. */
    --st-button-height: var(--st-touch);
    --st-button-pad: var(--st-space-5);
    --st-button-text: var(--st-text-3);
    --st-button-weight: 500;
    --st-button-secondary-bg: transparent;
    --st-button-secondary-text: var(--st-color-accent);
    --st-button-secondary-line: var(--st-color-accent);
    --st-button-secondary-hover-bg: var(--st-color-accent-tint);
    --st-field-height: var(--st-touch);
    --st-field-pad: var(--st-space-3);
    --st-textarea-height: 5rem;
    --st-color-icon-line: transparent;   /* the top-bar switch has no ring */
}

/* ════════════════════════════════════════════════════════════════
   Stoei Log's own settings (on top of the starter look)
════════════════════════════════════════════════════════════════ */
:root {
    /* Hover on small icon buttons; dim layer behind a task in focus mode */
    --st-color-hover: light-dark(rgb(0 0 0 / 0.05), rgb(255 255 255 / 0.08));
    --st-color-focus-backdrop: light-dark(rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.7));

    /* Lines drawn as shadows: under a title being edited, and where a
       dragged task will land */
    --st-shadow-edit-line: 0 1px 0 var(--st-color-accent-fill);
    --st-shadow-drop-above: 0 -2px 0 var(--st-color-accent-fill);
    --st-shadow-drop-below: 0 2px 0 var(--st-color-accent-fill);

    /* Pulsing rings: the notification bell, and a highlighted row */
    --st-ring-pulse-bad-start: 0 0 0 0 color-mix(in srgb, var(--st-color-bad) 40%, transparent);
    --st-ring-pulse-bad-end: 0 0 0 4px transparent;
    --st-ring-pulse-accent: 0 0 0 4px var(--st-color-accent-fill);

    /* Stripe beside the active sidebar item */
    --st-border-stripe: 3px;

    /* Border for delete and error boxes: the bad color, softened */
    --st-color-bad-line: color-mix(in srgb, var(--st-color-bad) 45%, transparent);

    /* Category tags: ten earthy background and text pairs that read in
       both modes. A task with no category uses sunk and text-muted. */
    --st-color-tag-green-bg: light-dark(#E2EEE6, #1F3329);
    --st-color-tag-green-ink: light-dark(#24563F, #9FD1B8);
    --st-color-tag-amber-bg: light-dark(#F1E6CC, #33281A);
    --st-color-tag-amber-ink: light-dark(#6E4E12, #E2C385);
    --st-color-tag-rust-bg: light-dark(#F3DDD3, #3A241B);
    --st-color-tag-rust-ink: light-dark(#8A3B22, #EEB19B);
    --st-color-tag-blue-bg: light-dark(#DDE7EE, #1C2731);
    --st-color-tag-blue-ink: light-dark(#2F5470, #A6C6DE);
    --st-color-tag-plum-bg: light-dark(#EBDFE9, #30202D);
    --st-color-tag-plum-ink: light-dark(#6A3A62, #D8B1D0);
    --st-color-tag-teal-bg: light-dark(#D9EBE8, #1A302D);
    --st-color-tag-teal-ink: light-dark(#1F5D56, #92D1C7);
    --st-color-tag-olive-bg: light-dark(#E7E8D2, #2A2C19);
    --st-color-tag-olive-ink: light-dark(#525A1E, #C9D08E);
    --st-color-tag-red-bg: light-dark(#F0DCDA, #381F1D);
    --st-color-tag-red-ink: light-dark(#842F2B, #ECAAA4);
    --st-color-tag-slate-bg: light-dark(#E2E3E6, #262A31);
    --st-color-tag-slate-ink: light-dark(#3E4450, #C2C7D1);
    --st-color-tag-brown-bg: light-dark(#EFE1D2, #33241A);
    --st-color-tag-brown-ink: light-dark(#7A4A24, #E5B98F);
}
