/* Sage design tokens: the one place they live (SG-82; Greenhouse values since SG-83).
   The palette, type and shape scale are SAGE-MAKEOVER-PLAN.html §06, light and dark. Every app page links
   this before its own <style>; js/theme.js sets data-theme on <html> before first paint (light by default,
   dark when the Dark switch saved it). The Laboratory defines its own tokens and is not served from here. */

/* Self-hosted variable fonts (latin; Greek for science notes). Sora is for headlines, Source Sans 3 for body. */
@font-face { font-family:"Sora"; font-style:normal; font-weight:600 800; font-display:swap;
  src:url(/fonts/sora-latin.woff2) format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family:"Source Sans 3"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url(/fonts/source-sans-3-latin.woff2) format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family:"Source Sans 3"; font-style:italic; font-weight:400 700; font-display:swap;
  src:url(/fonts/source-sans-3-italic-latin.woff2) format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family:"Source Sans 3"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url(/fonts/source-sans-3-greek.woff2) format("woff2");
  unicode-range:U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

:root {
    /* surfaces */
    --bg:#F5F5F5; --panel:#E6EDE3; --panel-2:#D9E3D6; --sheet:#F2ECDD; --line:#D5DCD3; --edge:#718076;
    /* text: there is no fainter text color than --ink-2 */
    --ink:#18221C; --ink-2:#526058;
    /* the accent */
    --leaf:#2B7A4C; --on-leaf:#FFFFFF; --leaf-soft:#D5E7D8; --leaf-text:#1F6039;
    /* the Soren owl (SG-156): the body flips with the theme (walnut here, tawny in dark and on the Play green); its face and pupils don't */
    --owl:#6B4A2F; --owl-face:#F3E6CC; --owl-pupil:#2B1D12;
    /* Play */
    --field:#1D5839; --tile-play:#123C26; --shape-1:#256B45; --shape-2:#2A7449;
    --marigold:#F0B43F; --on-marigold:#18221C; --coral:#EC7B5D; --hl:#F5E38C;
    /* grading */
    --good:#1F6B40; --good-bg:#D5E7D8; --mid:#7A5200; --mid-bg:#F6E7BF; --miss:#A93B28; --miss-bg:#F6DFD9;
    /* the notebook sheet (Notes) */
    --sheet-line:#DDD5BF; --sheet-margin:var(--coral);
    /* Writing's four categories: a closed set, retuned with Writing (SG-93) */
    --c-mech:#A8482A; --c-clar:#7A5600; --c-struct:#2A6A96; --c-arg:#74499A;
    /* type and shape */
    --font-head:"Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body:"Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --r-card:16px; --r-ctl:12px; --r-sm:10px; --r-pill:999px;
    /* motion (§06): entrances in Home and Play spring, and a press springs back */
    --ease-spring:cubic-bezier(.2,.9,.3,1.15); --ease-press:cubic-bezier(.3,1.6,.5,1);
    /* read by css/chrome.css, which falls back to the old look where these are missing (the Laboratory) */
    --fs-min:12px; --tag-style:normal;

    /* The Forest & Gold names still read by css/chrome.css and js/chrome.js (the shared shell, which the Laboratory also uses
       and which falls back to the old look there), kept as aliases. The rest were removed in SG-95. New code uses the names above.
       --ink-faint is gone on purpose: text is --ink-2, decoration is --line. The shadows are off; --shadow-lift
       stays because css/chrome.css reads it (the Laboratory still has a shadow under its You panel). */
    --paper:var(--bg); --card:var(--panel); --ink-soft:var(--ink-2);
    --forest:var(--leaf); --forest-soft:var(--leaf-soft); --on-forest:var(--on-leaf);
    --miss-soft:var(--miss-bg); --shadow-lift:none;
}
:root:not([data-theme="light"]) { @media (prefers-color-scheme: dark) {
    --bg:#171717; --panel:#252525; --panel-2:#303030; --sheet:#262420; --line:#3A3A3A; --edge:#7C837E;
    --ink:#EEF0EC; --ink-2:#A9AFAA;
    --leaf:#62C58B; --on-leaf:#0E1F15; --leaf-soft:#213528; --leaf-text:#8ADBA9;
    --owl:#C49A6C;
    --field:#143F29; --tile-play:#0E301E; --shape-1:#1B4F33; --shape-2:#1F5C3B;
    --marigold:#F2BE55; --coral:#F08B70; --hl:#665719;
    --good:#7CD3A0; --good-bg:#1D3326; --mid:#E9BE5A; --mid-bg:#33290F; --miss:#F1907D; --miss-bg:#3A201B;
    --sheet-line:#38352D;
    --c-mech:#F08B70; --c-clar:#F2BE55; --c-struct:#7DB7DE; --c-arg:#C3A2DB;
} }
:root[data-theme="dark"] {
    --bg:#171717; --panel:#252525; --panel-2:#303030; --sheet:#262420; --line:#3A3A3A; --edge:#7C837E;
    --ink:#EEF0EC; --ink-2:#A9AFAA;
    --leaf:#62C58B; --on-leaf:#0E1F15; --leaf-soft:#213528; --leaf-text:#8ADBA9;
    --owl:#C49A6C;
    --field:#143F29; --tile-play:#0E301E; --shape-1:#1B4F33; --shape-2:#1F5C3B;
    --marigold:#F2BE55; --coral:#F08B70; --hl:#665719;
    --good:#7CD3A0; --good-bg:#1D3326; --mid:#E9BE5A; --mid-bg:#33290F; --miss:#F1907D; --miss-bg:#3A201B;
    --sheet-line:#38352D;
    --c-mech:#F08B70; --c-clar:#F2BE55; --c-struct:#7DB7DE; --c-arg:#C3A2DB;
}

/* Icons (SG-84, js/icons.js). .ic-slot is the placeholder static markup uses; it sits before a button's label. */
.ic { flex:none; vertical-align:-.2em; }
.ic-slot { display:inline-flex; vertical-align:-.2em; margin-right:.45em; }
.ic-tile { flex:none; width:32px; height:32px; border-radius:10px; background:var(--leaf-soft); color:var(--leaf-text); display:inline-flex; align-items:center; justify-content:center; }

/* Entrances and skeletons (SG-87, §06 Motion). A screen gets class "go" when it is shown, and its .st children
   fade up in order from that moment, never one element at a time (--i is the step, eight at most; SagePlay.stagger
   sets both). Home and Play spring; add "calm" for the Focus move. The fill is backwards only, so a finished
   entrance leaves no transform behind to block a press. .sk is a list's skeleton. All off under reduced motion. */
@keyframes sg-up { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
@keyframes sg-pulse { from { opacity:.45; } to { opacity:1; } }
@media (prefers-reduced-motion: no-preference) {
  .go .st { animation:sg-up .55s var(--ease-spring) backwards; animation-delay:calc(var(--i, 0) * 60ms + 120ms); }
  .go.calm .st { animation:sg-up .4s ease-out backwards; animation-delay:calc(var(--i, 0) * 35ms + 60ms); }
  .sk { animation:sg-pulse .9s ease-in-out infinite alternate; }
}

/* Visually hidden, still read aloud (SG-112: was study.html's .vh and play.css's .p-sr). */
.vh { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
