/* ============================================================================
 * SJS CALM — shared/calm.css (+ shared/calm.js)
 * The one look of every tool page: hub, Training, Viewer, Audio Studio, Test Cases, the manuals.
 * Akash, 2026-10-12: "flashy bright colors … my eyes hurt reading anything … i'd avoid white
 * background but dark mode doesnt have to hurt eyes … too thick, override fonts 100%".
 *
 * Loaded LAST on every page, so it wins over each page's own styles:
 *   - ONE font: Inter (shared/fonts/), and it never draws heavier than semi-bold — the faces only
 *     go up to 600, so a page asking for 700/800 gets 600, never a fake bold.
 *   - no pure black page, no pure white text: soft dark grey + soft off-white.
 *   - each page's colour names (--gold, --red, --soft, --ink-0 …) point at calm versions.
 *   - calm.js softens what the pages hard-code (solid red/green/gold buttons → a soft tint,
 *     grey-on-black text → readable grey, glows and blinking off, tiny text → 12px at least).
 * The SLIDE is never touched (#slideHtml, .sh-stage, #_wsHtmlOv): that is the video's look.
 * Kill switch for a test: add ?calm=0 to the address (calm.js turns this file off).
 * ========================================================================== */

@font-face{font-family:'SJS UI';font-style:normal;font-weight:400 600;font-display:swap;
  src:url('fonts/inter-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:'SJS UI';font-style:normal;font-weight:400 600;font-display:swap;
  src:url('fonts/inter-latin-ext.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-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'SJS UI';font-style:italic;font-weight:400 600;font-display:swap;
  src:url('fonts/inter-latin-italic.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:'SJS UI';font-style:italic;font-weight:400 600;font-display:swap;
  src:url('fonts/inter-latin-ext-italic.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-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;}

/* ── the calm palette ───────────────────────────────────────────────────── */
html:root{
  --calm-bg:#16181d; --calm-surface:#1c1f25; --calm-surface2:#23272e; --calm-raised:#2a2e36;
  --calm-line:#30353e; --calm-line-soft:rgba(255,255,255,.07);
  --calm-text:#dcdfe4; --calm-text2:#b4bac3; --calm-muted:#8f96a1;
  --calm-gold:#d3b473; --calm-gold-line:rgba(179,137,43,.55);
  --calm-cyan:#86c9d3; --calm-green:#8dc9a0; --calm-red:#e39a93; --calm-orange:#e2b07e;
  --calm-purple:#bcaedb; --calm-blue:#93bfe0;
  --calm-font:'SJS UI',system-ui,'Segoe UI',sans-serif;
  --calm-mono:ui-monospace,'Cascadia Mono',Consolas,monospace;

  /* each page's own colour names → calm (Viewer + hub: --soft/--dim/--gold-bright …,
     Test Cases: --text/--muted/--gold-light/--red-light …, Audio: --gold-hi/--cyan-hi …,
     manuals: --ink-0 … --ink-7) */
  --soft:#dcdfe4; --text:#dcdfe4; --soft-mid:#b4bac3; --dim:#8f96a1; --muted:#8f96a1;
  --gold-bright:#c2a66c; --gold-light:#c2a66c; --gold-hi:#c2a66c;   /* the Viewer's calm gold since v2.20, now on every page */
  --cyan:#86c9d3; --cyan-hi:#86c9d3;
  --green:#8dc9a0; --green-light:#8dc9a0; --green-hi:#8dc9a0;
  --red:#e39a93; --red-light:#e39a93; --red-hi:#e39a93;
  --orange-light:#e2b07e; --skip-light:#bcaedb;
  --ink-0:#dcdfe4; --ink-1:#b4bac3; --ink-2:#8f96a1;
}
/* (backgrounds are calmed by calm.js from what each page really paints, so the layers keep their order) */

/* the slide keeps the Viewer's ORIGINAL colour names — the slide is the video's look, not the tool's */
#slideHtml,#_wsHtmlOv{ --soft:#e7e5df; --soft-mid:#c6c1b6; --dim:#9b968c; --gold-bright:#c2a66c; --cyan:#6fa6b0; --green:#5aa95a; --red:#c0605f; }
/* …and inherits exactly what it did before (the Viewer's own page values), so nothing of the calm look leaks in */
#slideHtml,#_wsHtmlOv,.sh-stage{
  font-family:'Space Mono',monospace; color:#e7e5df; line-height:normal; letter-spacing:normal;
  text-transform:none; font-style:normal; font-synthesis:weight style small-caps;
}

/* ── the page itself ────────────────────────────────────────────────────── */
html{ background:var(--calm-bg); }
html body{
  background:var(--calm-bg) !important;
  color:var(--calm-text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  font-synthesis-weight:none;
}

/* ONE font, everywhere but the slide. Wide letter-spacing, forced CAPITALS, italics and text glows
   all make small text harder to read, so they go too. */
html body :not(:is(#slideHtml,#_wsHtmlOv,.sh-stage,[data-calm-skip]) *):not(#slideHtml,#_wsHtmlOv,.sh-stage,[data-calm-skip],svg *,pre,code,kbd,samp,pre *,code *){
  font-family:var(--calm-font) !important;
  font-synthesis-weight:none;
  letter-spacing:.01em !important;
  text-transform:none !important;
  text-shadow:none !important;
}
html body :not(:is(#slideHtml,#_wsHtmlOv,.sh-stage,[data-calm-skip]) *):not(em,i,cite,#slideHtml,#_wsHtmlOv,.sh-stage,[data-calm-skip]){
  font-style:normal !important;
}
html body :is(pre,code,kbd,samp):not(:is(#slideHtml,#_wsHtmlOv,.sh-stage,[data-calm-skip]) *),
html body :is(pre,code) *:not(:is(#slideHtml,#_wsHtmlOv,.sh-stage,[data-calm-skip]) *){
  font-family:var(--calm-mono) !important;
  font-weight:400 !important;
  letter-spacing:0 !important;
}
html body :is(b,strong,th,h1,h2,h3,h4,h5,h6):not(:is(#slideHtml,#_wsHtmlOv,.sh-stage,[data-calm-skip]) *){ font-weight:600; }

/* Bebas was a narrow font: a heading that was Bebas in a tight bar takes the same room in Inter at a smaller size
   (the studio's top row is one line at 1440 px — ONE_DOOR OD-08) */
html body #waveStudio .v3-brand > span:first-child{ font-size:15px !important; font-weight:600 !important; letter-spacing:.03em !important; }

/* forms */
html body :is(input,textarea,select)::placeholder{ color:#7d848f !important; opacity:1 !important; }
html body :is(input,textarea,select,button):focus-visible:not(:is(#slideHtml,#_wsHtmlOv,.sh-stage) *){
  outline:2px solid rgba(134,201,211,.55) !important; outline-offset:1px;
}
::selection{ background:rgba(134,201,211,.28); }

/* quiet scrollbars */
html body *:not(:is(#slideHtml,#_wsHtmlOv,.sh-stage) *){ scrollbar-color:#3a3f48 transparent; }

/* ── what calm.js writes ────────────────────────────────────────────────── *
 * calm.js reads each element's own colours, works out the calm version and tags the element
 * sjs-calm-kN (not a data- name, so the tools' el.dataset never sees it); the rule for kN lives in <style id="sjs-calm-dyn">. Buttons also get a quiet
 * hover (a faint lift, no jump, no flash). */
[sjs-calm-x]:not(#_c#_c#_c), html[sjs-calm-x] *:not(#_c#_c#_c){ transition:none !important; }
[sjs-calm-h]:not(#_c#_c#_c):not(:disabled):hover{ box-shadow:inset 0 0 0 999px rgba(255,255,255,.06) !important; }
[sjs-calm-h]:not(#_c#_c#_c):not(:disabled):active{ box-shadow:inset 0 0 0 999px rgba(255,255,255,.10) !important; }

@media (prefers-reduced-motion: reduce){
  html body *:not(:is(#slideHtml,#_wsHtmlOv,.sh-stage) *){ animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
