/* ==========================================================================
   The redesign's fonts and colours, shared by every page that wears it.

   The workspace itself loads this and then redesign.css; the pages that open
   inside it in a frame (Chat, Mail, a client's page) load this and then
   redesign-pages.css. One palette, so a frame can't drift from the app
   around it.

   DRAFT, like redesign.css: taking the two links out puts each page back.
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-500.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-600.woff2") format("woff2");
}
@font-face {
  font-family: "Josefin Sans";
  font-weight: 300;
  font-display: swap;
  src: url("/static/fonts/josefin-sans-300.woff2") format("woff2");
}
@font-face {
  font-family: "Josefin Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/josefin-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Josefin Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/josefin-sans-600.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   The redesign's own colours (the blush, the mint, the black pill, Home's
   tones, the calendar's days) are in palette.css with the rest, because
   Settings > Appearance can set every one of them, for light and dark
   separately (nest/themes.py, EXTRAS). What stays here isn't a plain
   colour: the fonts, the corners, and the see-through whites and shadows,
   which follow whatever is under them by themselves.
   -------------------------------------------------------------------------- */

:root {
  --font: "Josefin Sans", -apple-system, "Segoe UI", system-ui, sans-serif !important;
  --font-display: "Cormorant Garamond", Georgia, serif !important;
  --radius: 12px;
  --radius-lg: 22px;

  /* Over the blush bar: a row you're pointing at, the soft fills, the
     chosen tab and the bar's edge. */
  --rail-hover: rgba(255, 255, 255, 0.45);
  --rail-soft: rgba(255, 255, 255, 0.55);
  --rail-on: rgba(255, 255, 255, 0.7);
  --rail-edge: rgba(255, 255, 255, 0.6);
}

/* Light, the site's own look. */
:root:not([data-scheme="dark"]) {
  --card-shadow: 0 30px 60px -36px rgba(90, 60, 55, 0.35);
  --shade: rgba(18, 18, 18, 0.18);
  /* The initials on a client tile with no photo. */
  --tile-ink: rgba(18, 18, 18, 0.45);
}

/* Dark: the black card on a warm near-black ground, no shadow. */
:root[data-scheme="dark"] {
  --card-shadow: none;
  --shade: rgba(0, 0, 0, 0.6);
  --tile-ink: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   Where the keyboard is. Moving with Tab, whatever you're on gets a clear
   accent ring a little outside it, the same on every page. :where() keeps
   it the weakest rule, so a control that shows focus its own way (a menu
   row lighting up, a field's border) still does. Fields show it by their
   border already, so they're left out.
   -------------------------------------------------------------------------- */

:where(button, a[href], summary, select, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
