/* Canary Copy brand tokens. One file, used by the site, the app, the brand guide and the videos.
   The system is a carbonless form set: white top copy, canary second copy, and carbon ink. */

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-var-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Courier Prime';
  src: url('fonts/courier-prime-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Courier Prime';
  src: url('fonts/courier-prime-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Ink: the blue-violet of a carbonless impression. All type and all lines. */
  --ink: #23205f;
  --ink-2: #4b4889;      /* secondary text */
  --ink-3: #8c8ab8;      /* rules, disabled */
  --ink-wash: #e6e5f2;   /* hairlines on white */

  /* Sheets. Each one means something. */
  --white: #ffffff;      /* top copy: the platform's record, and neutral surfaces */
  --canary: #ffe45c;     /* your copy. The brand colour. */
  --canary-pale: #fff7c9;
  --goldenrod: #f0ad23;  /* late, or needs you */
  --goldenrod-pale: #fde9bd;
  --pink: #f7a8bd;       /* money at risk */
  --pink-pale: #fde0e8;
  --green: #a9dcb9;      /* paid */
  --green-pale: #dff3e5;
  --desk: #efeef7;       /* the surface the sheets sit on */

  /* Type */
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --typed: 'Courier Prime', 'Courier New', monospace;

  /* Scale: 1.25 major third from 17px */
  --t-xs: 0.78rem;
  --t-sm: 0.88rem;
  --t-base: 1.0625rem;
  --t-md: 1.33rem;
  --t-lg: 1.66rem;
  --t-xl: 2.6rem;
  --t-2xl: clamp(2.9rem, 7.4vw, 6.4rem);

  --radius: 3px;         /* paper has almost no radius */
  --line: 1.5px solid var(--ink);
  --hair: 1px solid var(--ink-wash);
  --shadow-sheet: 0 1px 0 rgba(35, 32, 95, 0.12), 0 14px 30px -18px rgba(35, 32, 95, 0.45);
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--desk);
  font-stretch: 100%;
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 800; font-stretch: 118%; line-height: 1.04; letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { background: var(--canary); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--canary); color: var(--ink); }

/* Form label: condensed, sentence case, the way a printed form names a box. */
.label { font-stretch: 78%; font-weight: 650; font-size: var(--t-xs); letter-spacing: 0.02em; color: var(--ink-2); }
/* Typed value: what a person or a machine filled in. */
.typed { font-family: var(--typed); font-weight: 400; letter-spacing: -0.01em; }

/* A sheet of the form set. */
.sheet { background: var(--white); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sheet); }
.sheet.canary { background: var(--canary); }
.sheet.pink { background: var(--pink-pale); }
.sheet.goldenrod { background: var(--goldenrod-pale); }
.sheet.green { background: var(--green-pale); }

/* A date stamp: a typed date in a ruled box, tilted a degree, the way a clerk's stamp lands. */
.stamp {
  display: inline-block; font-family: var(--typed); font-weight: 700; font-size: var(--t-sm);
  border: 2px solid currentColor; border-radius: 2px; padding: 0.12em 0.5em 0.02em; letter-spacing: 0.04em;
  transform: rotate(-1.2deg); white-space: nowrap;
}

/* Status chip: the colour of the sheet the session is filed on. */
.chip { display: inline-flex; align-items: center; gap: 0.4em; font-stretch: 82%; font-weight: 700; font-size: var(--t-xs); padding: 0.18em 0.6em; border: 1.5px solid var(--ink); border-radius: 2px; white-space: nowrap; background: var(--white); }
.chip.green { background: var(--green); }
.chip.canary { background: var(--canary); }
.chip.goldenrod { background: var(--goldenrod); }
.chip.pink { background: var(--pink); }

.btn {
  font: inherit; font-weight: 750; font-stretch: 105%; color: var(--ink); background: var(--canary);
  border: var(--line); border-radius: var(--radius); padding: 0.62em 1.1em; cursor: pointer; text-decoration: none; display: inline-block;
  box-shadow: 3px 3px 0 var(--ink); transition: transform 80ms, box-shadow 80ms;
}
.btn:hover { background: var(--canary); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn.plain { background: var(--white); }
.btn.small { padding: 0.36em 0.7em; font-size: var(--t-sm); box-shadow: 2px 2px 0 var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
