/* ═══════════════════════════════════════════════════════════════════════
   Foundation — base reset, fonts, keyframes, shared behavioural classes.
   Load AFTER tokens.css, BEFORE any screen renders.
   This is the only stylesheet besides tokens.css; all layout/colour lives
   inline in the components, pulled from tokens.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Fonts — self-hosted (S23): strictly no external host at runtime. Newsreader
   and Plus Jakarta Sans are Google *variable* woff2 — one file per family / style
   / subset spans the whole weight range (the 500/600 URLs are byte-identical to
   the 400 file), so the six vendored files under fonts/ cover every weight the
   design uses (Newsreader 400–600 + italic, PJS 300–600) via font-weight ranges.
   unicode-range + latin / latin-ext splits are Google's own css2 values.
   Attribution + OFL note: fonts/NOTICE.md. ── */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/app/fonts/newsreader-normal-w400-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: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/app/fonts/newsreader-normal-w400-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/app/fonts/newsreader-italic-w400-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: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/app/fonts/newsreader-italic-w400-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/static/app/fonts/plusjakartasans-normal-w300-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: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/static/app/fonts/plusjakartasans-normal-w300-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
html, body { margin: 0; padding: 0; background: var(--bg-body); }
body {
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: rgba(89,163,114,0.20); }
input::placeholder, textarea::placeholder { color: var(--text-placeholder); }

/* ── Keyframes (exact names from the design — components reference these) ── */
@keyframes wplDrawer { from { opacity:0; transform:translateY(6px);} to { opacity:1; transform:translateY(0);} }
@keyframes wplPulse  { 0%,100% { box-shadow:0 0 0 0 rgba(0,188,111,0.5);} 50% { box-shadow:0 0 0 8px rgba(0,188,111,0);} }
@keyframes wplAmber  { 0%,100% { box-shadow:0 0 0 0 rgba(168,129,74,0.45);} 50% { box-shadow:0 0 0 7px rgba(168,129,74,0);} }
@keyframes wplFade   { from { opacity:0;} to { opacity:1;} }
@keyframes wplPop    { from { opacity:0; transform:scale(0.95) translateY(8px);} to { opacity:1; transform:scale(1) translateY(0);} }
@keyframes wplDraw   { from { opacity:0; clip-path:inset(0 0 90% 0 round 14px); transform:translateY(-5px);} to { opacity:1; clip-path:inset(0 0 0 0 round 14px); transform:translateY(0);} }
@keyframes wplSheen  { 0% { transform:translateX(-130%);} 100% { transform:translateX(560%);} }
@keyframes wplRowIn  { from { opacity:0; transform:translateY(-10px);} to { opacity:1; transform:translateY(0);} }
@keyframes wplRowOut { from { opacity:1; transform:translateY(0);} to { opacity:0; transform:translateY(12px);} }
@keyframes wplDot    { 0%,80%,100% { opacity:0.28;} 40% { opacity:0.8;} }
@keyframes wplBreathe{ 0%,100% { opacity:0.4;} 50% { opacity:0.82;} }
@keyframes wplRedGlow    { 0%,100% { box-shadow:0 0 0 2px rgba(218,90,71,0.12);} 50% { box-shadow:0 0 0 5px rgba(218,90,71,0.20);} }
/* S28 item 5: the V13 time-filter calendar levitates while a window is active. */
@keyframes wplFloat      { 0%,100% { transform:translateY(0);} 50% { transform:translateY(-2px);} }
@keyframes wplYellowGlow { 0%,100% { box-shadow:0 0 0 2px rgba(224,161,0,0.16);} 50% { box-shadow:0 0 0 5px rgba(224,161,0,0.28);} }
@keyframes wplQuoteIn { from { opacity:0.5; transform:scale(0.9);} to { opacity:1; transform:scale(1);} }
@keyframes wplSpiral  { from { stroke-dashoffset:1000;} to { stroke-dashoffset:0;} }
@keyframes wplSubIn   { from { max-height:0; opacity:0; transform:translateY(-5px);} to { max-height:48px; opacity:1; transform:translateY(0);} }

/* ── Shared behavioural classes (hover-only scrollbar, spiral) ─────────── */
.wpl-scroll { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.wpl-scroll:hover { scrollbar-color: #C4CFC7 transparent; }
.wpl-scroll::-webkit-scrollbar { width: 10px; }
.wpl-scroll::-webkit-scrollbar-track { background: transparent; }
.wpl-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; transition: background .18s ease; }
.wpl-scroll:hover::-webkit-scrollbar-thumb { background: #C4CFC7; background-clip: padding-box; }
.wpl-scroll::-webkit-scrollbar-thumb:hover { background: #A8B6AC; background-clip: padding-box; }

.em-spiral { stroke-dasharray: 1000; stroke-dashoffset: 0; animation: wplSpiral 1s cubic-bezier(.35,.15,.25,1) .24s both; }

/* ── Inline-hover states the design draws but React inline styles can't express.
   Each pairs with a className on the component (the package's own approach). ── */
/* Emma transport / nav buttons + the calendar's pickable briefing cells */
.em-obtn:hover { border-color: #CFC9BA !important; }
.em-pbtn:hover { filter: brightness(0.94); }
.em-live:hover { background: #EDF3EE !important; }
/* Sidebar account row wash */
.ws-acct:hover { background: rgba(255,255,255,0.07); }
/* Products spreadsheet — row hover + kebab reveal (classes were already wired) */
.pmr:hover { background: #FAFBFA; }
.pmr:hover .pmst { background: #FAFBFA !important; }
.pmr .pmkeb { opacity: 0.4; }
.pmr:hover .pmkeb { opacity: 1; }

/* ── Responsive shell: at ≤820px the dark rail becomes a horizontal top bar
   (labels/sub-item/footer fold away, logo + nav chips only). Desktop is the
   demo target; this is the drawn tablet/mobile collapse. ── */
@media (max-width: 820px) {
  .ws-root { flex-direction: column !important; }
  .ws-side {
    width: 100% !important; height: auto !important; flex-direction: row !important;
    align-items: center !important; padding: 10px 14px !important;
    border-right: none !important; border-bottom: 1px solid rgba(0,0,0,0.2);
    overflow-x: auto; z-index: 45;
  }
  .ws-logo { width: 40px !important; margin: 0 12px 0 0 !important; }
  .ws-lbl, .ws-sub, .ws-foot { display: none !important; }
  .ws-item { padding: 8px 11px !important; white-space: nowrap; flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .em-spiral { animation: none; }
  * { animation-duration: 0.001s !important; }
}
