/* ============================================================
   THE SCREENS' OWN LOOK -- shared by AccSys and the course.

   One look for both products: the course's. Its colours, its type and
   the few defaults the screens were drawn on used to come from the
   course website the software sat in; they are set here instead, on
   the software itself, so it looks the same wherever it is shown.

   The look is light: a white frame and menu, soft grey ground, and
   purple for everything that acts -- buttons, links, the chosen tab, a
   ticked box -- with blue beside it. Its rounded finish is in msw-look.css.

   Loaded before msw.css. Every selector here is wrapped in :where(),
   which adds nothing to its weight, so each rule weighs what the
   website's did and msw.css overrides it exactly as it did before.

   The software's containers are #msw-app, and the layers it opens over
   the page, #msw-pop and #msw-ask. A window it opens on its own -- a
   document in a tab of its own -- carries data-msw-theme to take the
   same colours.
   ============================================================ */

/* ---- the palette ----
   Always light, whatever the computer's own setting: the software keeps
   the same colours in dark mode, and so do its boxes, lists and scrollbars. */
:where(#msw-app, #msw-pop, #msw-ask, [data-msw-theme]){
  color-scheme:light;
  --paper:#F6F7FB; --card:#FFFFFF; --ink:#111827; --ink-soft:#4B5563; --ink-faint:#8A92A3;
  --rule:#E4E7EE; --rule-soft:#EEF0F5; --band:#F3F4F8;
  --accent:#6C4CF1; --accent-ink:#5B3DE0; --accent-soft:#EFEBFF; --accent-hover:#5A3BE0;
  --blue:#3B82F6; --blue-soft:#E8F1FF;
  --brass:#4B5563; --brass-soft:#F7F8FB; --row-hover:#FAF9FF;
  --good:#16A34A; --good-soft:#E7F7EE;
  --warn:#D97706; --warn-soft:#FEF3E2;
  --bad:#DC2626; --bad-soft:#FDECEC;
  --shadow:0 1px 2px rgba(17,24,39,.04), 0 8px 24px -12px rgba(17,24,39,.10);
  --ring:rgba(108,76,241,.14); --glow:rgba(108,76,241,.55);
  /* the frame: a white menu and top bar */
  --msw-nav:#FFFFFF; --msw-nav-soft:#EFEBFF; --msw-nav-deep:#FFFFFF; --msw-nav-ink:#4B5563;
  --msw-nav-line:#E4E7EE; --msw-nav-label:#9CA3AF;
  --msw-scrim:rgba(17,24,39,.35); --msw-lift:rgba(17,24,39,.12);
  /* the logo's own two colours, for anything that stands beside it; the
     logo itself is the artwork, in msw.css */
  --msw-brand-acc:#028A81; --msw-brand-sys:#1C2D40;
}
/* ---- the type ---- */
:where(#msw-app, #msw-pop, #msw-ask){
  font-family:"Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size:16.5px; line-height:1.6; letter-spacing:0; color:var(--ink);
  -webkit-font-smoothing:antialiased;
}

/* ---- the defaults the screens were drawn on ---- */
:where(#msw-app, #msw-pop, #msw-ask), :where(#msw-app, #msw-pop, #msw-ask) *{box-sizing:border-box}
:where(#msw-app, #msw-pop, #msw-ask) h1, :where(#msw-app, #msw-pop, #msw-ask) h2,
:where(#msw-app, #msw-pop, #msw-ask) h3, :where(#msw-app, #msw-pop, #msw-ask) h4{
  font-family:"Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight:700; letter-spacing:-.015em; text-wrap:balance; margin:0;
}
:where(#msw-app, #msw-pop, #msw-ask) p{margin:0}
:where(#msw-app, #msw-pop, #msw-ask) button{
  font-family:"Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:where(#msw-app, #msw-pop, #msw-ask) strong, :where(#msw-app, #msw-pop, #msw-ask) b{font-weight:600}
:where(#msw-app, #msw-pop, #msw-ask) table td{font-variant-numeric:tabular-nums; font-feature-settings:"tnum"}
:where(#msw-app, #msw-pop, #msw-ask) table td, :where(#msw-app, #msw-pop, #msw-ask) table th{text-align:initial; hyphens:none}

/* Paragraphs set to both margins, as the course sets the reading around
   the software -- and the labels, figures, buttons and table cells that
   must not be, left as they are. The doubled class gives each rule the
   weight the course's own had, so msw.css meets them exactly as before. */
:is(.msw-app):is(.msw-app) p, :is(.msw-app):is(.msw-app) li{
  text-align:justify; text-justify:inter-word; hyphens:auto;
}
:is(.msw-app):is(.msw-app) :is(td, th, button, h2, h3, h4),
:is(.msw-app):is(.msw-app) table :is(p, li),
:is(.msw-app):is(.msw-app) :is(.entry, .splitbar, .m3row, .chain-doc, .test, .dstat, .num, .val, .v, .k, .lab,
  .op-lab, .cl-lab, .cl-plab, .cl-hint, .cl-q, .partlab, .kind, .sn-lab, .sn-next, .qn, .hint, .btn,
  .stitle, .name, .inv-lab, .inv-f),
:is(.msw-app):is(.msw-app) :is(.entry, .splitbar) p{
  text-align:initial; hyphens:none;
}
