/* DESK-504 (Tate, 2026-11-27 20:04 UTC): what the app's light and dark themes add beyond the colour tokens.
   Loaded by every app page after styles.css. Applies only under :root[data-theme], which theme-boot.js sets
   before first paint; the marketing pages never set it, so nothing here reaches them. */

/* Inter, self-hosted: the same file the marketing pages load. No third-party font request. */
@font-face {
  font-family: "Inter";
  src: url("/landing/public/assets/fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}
:root[data-theme] { --font-family-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

/* The brand mark: the dark-ground mark in the dark theme, the light-ground mark on white. Every mark the app shows
   (header, sign-in card, viewer invite) is swapped, found by the slice 3 screenshot pass. */
:root[data-theme="light"] img[src*="/mark-small-light.svg"] { content: url("/landing/public/assets/mark-small.svg"); }
:root[data-theme="light"] img[src*="/mark-light.svg"] { content: url("/landing/public/assets/mark.svg"); }

/* The site spinner's track was a typed light rgba for the navy canvas; in a theme it takes the border token. */
:root[data-theme] .spin { border-color: var(--color-border-strong); border-top-color: var(--color-text-primary); }

/* Flat cards with a 1px border; depth comes from scrims, not shadows. */
:root[data-theme] { --shadow-tinted: none; }

/* In light, surface.raised and canvas are both white (Tate's spec: flat cards with a 1px border), so a state that
   was shown only by a raised fill vanished (DESK-504 cold review). The picked segment, the current page and the
   current Help step take the accent tint. The invite field's edge is border.control in pages.css (#407). */
:root[data-theme] .how-segmented .how-option.is-picked,
:root[data-theme] .hwr-segmented .hwr-option.is-picked,
:root[data-theme] .navlinks a[aria-current="page"],
:root[data-theme] nav.site.has-menu .navlinks a[aria-current="page"],
:root[data-theme] .nav-phone a[aria-current="page"] { background: var(--color-action-tint); }
:root[data-theme] .help-strip span[data-current] { background: var(--color-action-tint); color: var(--color-text-primary); }

/* The header switch (theme.js): a text button that reads as a toggle, 44px tall to tap. */
.theme-switch { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-xs);
  background: none; border: 0; border-radius: var(--radius-button); font: inherit; color: var(--color-text-secondary); cursor: pointer; }
.theme-switch::before { content: ""; flex: none; width: 28px; height: 16px; border-radius: 8px; box-sizing: border-box;
  border: 1px solid var(--color-text-muted); background: radial-gradient(circle at 7px 50%, var(--color-text-muted) 0 4px, transparent 5px) var(--color-surface-subtle); }
.theme-switch[aria-checked="true"]::before { background: radial-gradient(circle at 19px 50%, var(--color-action-label) 0 4px, transparent 5px) var(--color-action-primary); border-color: var(--color-action-primary); }
.theme-switch:hover { color: var(--color-text-primary); }
.theme-switch:focus-visible { outline: var(--focus-ring-width) solid var(--color-action-primary); outline-offset: var(--focus-ring-offset); }
/* On a phone the header holds the mark, Your Desk, the toggle and Menu: the words go, the name stays for screen readers. */
@media (max-width: 719px) {
  .theme-switch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  nav.site.has-menu .theme-switch { margin-left: auto; }
}
