/* Latin Modern Mono: the typewriter face of LaTeX, and so of most
   cryptography papers. */
@font-face {
  font-family: "Latin Modern Mono";
  src: url("fonts/lmmono10-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Latin Modern Mono";
  src: url("fonts/lmmonolt10-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* The CIRG was black. The CIRGRG was white. The CIRGRGRG was grey. The
   CIRGRGRGRG could not agree. The CIRGRGRGRGRG reviewed all four and
   kept every one of them, each under review by the one outside it. */
:root {
  --cirg-ground: #333;
  --cirg-ink: #fff;
  --cirgrg-ground: #fff;
  --cirgrgrg-ground: #ccc;
  --ground: var(--cirg-ground);
  --ink: var(--cirg-ink);
  --rule: #999;
  --muted: #aaa;
  /* Finding 1: the CIRGRGRGRG changed cards about seven times a second,
     past the three-flashes-per-second limit of WCAG 2.3.1. It now
     changes cards two and a half times a second. */
  --speed: 3.2s;
  --band: clamp(0.5rem, 2.5vmin, 1.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #f00;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  animation: rainbow var(--speed) step-end infinite;
}

body {
  margin: 0;
  font-family: "Latin Modern Mono", "CMU Typewriter Text", "Courier New", Courier, monospace;
  font-size: 1rem;
  line-height: 1.5;
  font-synthesis: none;
  /* Match the original font rendering. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--ink);
  color: var(--ground);
}

/* ------------------------------------------------------------------
   The review. The page is the CIRGRGRGRG (the rainbow), reviewing the
   CIRGRGRG (grey), reviewing the CIRGRG (white), reviewing the CIRG
   (black), which is where the words are.
   ------------------------------------------------------------------ */
body,
.under-review {
  display: flex;
  flex-direction: column;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--band);
}

.under-review {
  flex: 1;
}

.cirgrgrg {
  background: var(--cirgrgrg-ground);
  padding: var(--band);
}

.cirgrg {
  background: var(--cirgrg-ground);
  padding: var(--band);
}

.cirg {
  display: block;
  background: var(--ground);
  color: var(--ink);
}

/* A narrow centred column, 72 characters wide. */
main {
  max-width: calc(72ch + 3rem);
  margin-inline: auto;
  padding: clamp(3rem, 14vh, 7.5rem) 1.5rem 4rem;
}

h1,
h2,
p,
ul {
  margin: 0;
  padding: 0;
  font-size: inherit;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  text-wrap: balance;
}

.mission {
  margin-top: 1rem;
  text-wrap: pretty;
}

.mission p + p {
  margin-top: 0.75rem;
}

/* Links follow the original quiet underline treatment. */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

section {
  margin-top: 3rem;
}

h2 + * {
  margin-top: 0.5rem;
}

.roll {
  list-style: none;
}

/* Names are reproduced exactly as submitted, spacing included. */
.roll .name {
  white-space: pre-wrap;
}

.note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-wrap: balance;
}

/* Narrow screens: affiliation sits under the name, indented. */
.roll li + li {
  margin-top: 0.5rem;
}

.roll .affiliation {
  display: block;
  padding-left: 2ch;
}

@media (min-width: 40rem) {
  .roll {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 6ch;
  }

  .roll li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 24ch 1fr;
    column-gap: 6ch;
  }

  @supports (grid-template-columns: subgrid) {
    .roll li {
      grid-template-columns: subgrid;
    }
  }

  .roll li + li {
    margin-top: 0;
  }

  .roll .affiliation {
    padding-left: 0;
  }
}

.byline { margin-top: 1rem; }
header + p { margin-top: 3rem; }

/* The CIRGRGRGRG's cards, unchanged apart from the speed. Only the
   ground is kept: the ink stays inside the CIRG, where it can be read. */
@keyframes rainbow {
  0%     { background-color: #ff0000; }
  12.5%  { background-color: #ff8000; }
  25%    { background-color: #ffff00; }
  37.5%  { background-color: #00ff00; }
  50%    { background-color: #00ffff; }
  62.5%  { background-color: #0000ff; }
  75%    { background-color: #8000ff; }
  87.5%  { background-color: #ff00ff; }
}

.halt {
  margin-top: 3rem;
  display: inline-block;
  padding-inline: 0.5ch;
  font: inherit;
  font-size: 0.875rem;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  cursor: pointer;
}

.halt:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

/* "Stop the review": freezes the CIRGRGRGRG on whichever card it is on. */
.stopped,
.stopped * {
  animation-play-state: paused !important;
}

/* People who have asked their computer to calm down get a slow drift
   through the same colours instead. */
@media (prefers-reduced-motion: reduce) {
  :root { --speed: 16s; }
}

@media print {
  :root {
    --ground: #fff;
    --ink: #000;
  }

  html {
    animation: none;
    background: #fff;
  }

  body,
  .under-review {
    padding: 0;
    background: #fff;
  }

  main {
    padding-top: 0;
  }

  .halt { display: none; }
}
