/* The Officina look (officina.productions): near-black ink on cream, Archivo
   throughout, and rules (the wordmark's filets) as the structure. At night,
   a warm near-black with off-white ink. Tokens: web/themes/README.md. */

@font-face {
  font-family: "Archivo";
  font-weight: 100 900;
  font-display: swap;
  src: url(/_/fonts/archivo-latin-wght-normal.woff2) format("woff2");
}

:root {
  color-scheme: light;
  --ink: #111111;
  --cream: #f4f0e8;
  /* Panels: the website's paper (#fbf9f5) is close to a neutral white and
     reads grey when it covers most of the page, as it does here. Same
     lightness, the cream's warmth. */
  --paper: #fbf7ee;
  /* What hover, selected rows and progress tracks are tinted with: an umber,
     since the ink is a neutral black and its tints are plain greys. */
  --umber: #6b5836;
  /* Night: the warm near-black, off-white and raised tone of Officina's
     admin home page (officina-website's docs/admin-home.html), not the ink
     and cream swapped: a neutral #111 reads cold next to it. */
  --night: #141311;
  --night-ink: #f2efe7;
  --night-raised: #1c1a17;

  --bg: var(--cream);
  --fg: var(--ink);
  --dim: color-mix(in srgb, var(--ink) 55%, #b9a986);
  --surface: var(--paper);
  --line: color-mix(in srgb, var(--fg) 30%, transparent);
  --tint: var(--umber);
  --sel: color-mix(in srgb, var(--tint) 12%, transparent);
  --ok: var(--ink);
  --bad: #a8261c;
  --tag-bad-bg: var(--bad);
  --tag-bad-fg: var(--paper);
  --shade: var(--ink);

  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display-weight: 800;
  --display-scale: 0.95;
  --display-tracking: -0.02em;
  --body: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: var(--night);
    --fg: var(--night-ink);
    --dim: color-mix(in srgb, var(--night-ink) 60%, var(--night));
    --surface: var(--night-raised);
    --tint: var(--night-ink);
    --ok: var(--night-ink);
    --bad: #ffb4a8;
    --tag-bad-fg: var(--night);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--night);
  --fg: var(--night-ink);
  --dim: color-mix(in srgb, var(--night-ink) 60%, var(--night));
  --surface: var(--night-raised);
  --tint: var(--night-ink);
  --ok: var(--night-ink);
  --bad: #ffb4a8;
  --tag-bad-fg: var(--night);
}

/* The TRANSFER logo as the Officina wordmark is set: no frame, a thick rule
   above, a thin and a thick one below, tight letters. */
.logo, .auth-logo {
  border: 0;
  border-top: 5px solid var(--fg);
  border-bottom: 5px solid var(--fg);
  background: linear-gradient(var(--fg), var(--fg)) left bottom 6px / 100% 2px no-repeat;
  padding: 0.2em 0.1em 0.3em;
  letter-spacing: -0.04em;
}

/* The header on the page's own cream, held by its rule alone, as the
   website's is: panels are the only raised surface. */
.top { background: var(--bg); }

/* The sign-in box: with room above and below the wordmark, so it
   stands like the logo instead of lying flat. */
.auth-panel {
  max-width: 420px;
  padding: 80px 40px 72px;
  gap: 44px;
}
/* Its rules as long as the word, as the wordmark's are, not the box's width. */
.auth-logo {
  align-self: center;
  padding-inline: 0;
  /* Sized for its box, not by --display-scale: at the headings' scale the
     word is wider than the box. */
  font-size: calc(clamp(48px, 10vw, 75px) * 0.72);
}
