/* Design tokens: every value a stylesheet here uses has a name in this file or in utopia.css.
   A bare number or color in a rule is a defect; give it a token that says what it is for. */
:root {
  /* The widest a line of running text gets. About 66 characters is the measure books are set to. */
  --measure: 66ch;
  /* The widest the page itself gets, so a desktop window shows a page and not a ribbon. */
  --page-width: 72rem;
  /* The widest a form gets: one column of fields that a thumb or an eye takes in at once. */
  --form-width: 28rem;
  /* The QR code's side. Large enough for a phone camera held over a laptop screen to read, and
     small enough to sit on a phone's own screen with room either side. */
  --qr-code-size: 14rem;
  /* The narrowest a column of backup codes gets before the list drops to fewer columns. Wide
     enough for one ten-character code at its spacing. */
  --backup-code-column: 11rem;
  /* Room between the page's content and the window's edge. */
  --page-gutter: var(--space-s-l);

  /* What .stack puts between its children unless a modifier says otherwise. */
  --stack-margin: var(--space-m);

  --line-height-text: 1.5;
  /* The shorter line reset.css gives headings and controls. */
  --line-height-tight: 1.1;
  --font-weight-bold: 700;

  /* Two values the reset uses, at the sizes its author chose. A textarea with no rows attribute
     is at least this tall, so it reads as a place to write and not a single line. */
  --textarea-min-block-size: 10em;
  /* Space kept above anything jumped to by an in-page link, so it does not land flush against
     the top of the window. */
  --anchor-scroll-margin: 5ex;

  /* THE PALETTE. Style direction A, "Broadsheet": black on white, heavy rules, and color that
     arrives in whole blocks with one job per color. Chosen from three rendered directions on
     2026-11-25; docs/css-conventions.md describes it. test/assets/palette_contrast_test.rb holds
     every pairing used for text to a readable contrast, so a retuned color cannot quietly stop
     being legible. */
  --color-ink: #0b0b0b;
  --color-paper: #ffffff;
  /* Needs you now: the thing readers are waiting on, a date inside two days, and a notice that
     something went wrong. */
  --color-pink: #ff5c9a;
  /* Yours: a date you set yourself, drawn lighter than one somebody else set. Also the accent on
     the wordmark, and a notice that something went as you asked. */
  --color-mint: #addab8;
  /* Go: the session button, a link under the pointer, the focus ring. */
  --color-cobalt: #1f3bff;
  /* Secondary text: a note under a title, a label over a number. */
  --color-muted: #5a5a5a;

  /* THE TYPEFACES, both served from app/assets/fonts (see fonts.css). A wide grotesque for
     titles, labels and the wordmark; a reading serif for everything meant to be read. The names
     after each are what shows for the moment before the real face arrives, or if it never does. */
  --font-family-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-family-text: "Newsreader", Georgia, "Times New Roman", serif;
  /* The heaviest cut, for the wordmark and for numerals meant to be seen from across the room. */
  --font-weight-black: 900;
  /* Archivo's width axis at its widest, which is what gives the wordmark its stance. */
  --font-stretch-wide: 125%;
  /* Tracking for a code read digit by digit. Wide enough to count the characters at a glance. */
  --letter-spacing-code: 0.15em;
  /* Tracking for uppercase labels. Capitals have no ascenders or descenders to tell them apart,
     so a little air is what keeps a run of them from reading as one block. */
  --letter-spacing-label: 0.08em;

  /* THE RULES AND SHADOWS that make a block look printed and pasted down: a heavy black line, and
     a hard shadow with no blur, offset down and to the right. */
  --border-heavy: 2px;
  --rule-heavy: var(--border-heavy) solid var(--color-ink);
  --shadow-offset: 6px;
  --shadow-hard: var(--shadow-offset) var(--shadow-offset) 0 var(--color-ink);
  /* The same shadow at a button's scale. */
  --shadow-offset-small: 4px;
  --shadow-hard-small: var(--shadow-offset-small) var(--shadow-offset-small) 0 var(--color-ink);

  /* The outline on whatever the keyboard is on. Thick enough to find at a glance. */
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-family-text);
  font-size: var(--step-0);
  line-height: var(--line-height-text);
}

h1, h2, h3, h4 {
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-bold);
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-cobalt);
  outline-offset: var(--focus-ring-offset);
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
