/* The house style of the chain below us (cirgrg.org and friends):
   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;
}

/* Light: the text. Regular: the names, so they stand out from it. */
@font-face {
  font-family: "Latin Modern Mono";
  src: url("fonts/lmmonolt10-regular.otf") format("opentype");
  font-weight: 300;
  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;
}

:root {
  --ground: #fff;
  --ink: #222;
  --rule: #666;
  --muted: #444;
}

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

html {
  background: var(--ground);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Latin Modern Mono", "CMU Typewriter Text", "Courier New", Courier, monospace;
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.6;
  font-synthesis: none;
}

/* Names in regular above the light text: each group of the chain, each
   statement, each member. Emphasis in bold. */
.chain li > a,
.chain .rg,
.statements .name,
.roll .name {
  font-weight: 400;
}

strong {
  font-weight: 700;
}

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

/* A narrow centred column, 72 characters wide. */
main {
  max-width: calc(72ch + 3rem);
  margin-inline: auto;
  /* Long CIRG names break rather than push the page sideways. */
  overflow-wrap: anywhere;
  padding: clamp(3rem, 14vh, 7.5rem) 1.5rem 4rem;
}

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

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

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.2rem;
}

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

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

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;
}

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

/* Review status: the pizza, and the verdict beside it. */
.status {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid var(--rule);
}

.status p {
  min-width: 0;
}

@media (max-width: 40rem) {
  .status {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pizza {
  font-size: 6rem;
  line-height: 1;
  flex-shrink: 0;
}

.nw {
  white-space: nowrap;
}

/* ARP desk. */
.desk {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid var(--rule);
}

.desk h3 {
  margin-bottom: 0.5rem;
}

.desk .q {
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}

.desk button {
  font: inherit;
  padding: 0.25rem 0.75rem;
  margin-right: 0.5rem;
  cursor: pointer;
  background: var(--ground);
  color: var(--ink);
  border: 1px solid var(--rule);
}

.desk .verdict {
  margin-top: 0.5rem;
  min-height: 1.5em;
}

.statements,
.roll {
  list-style: none;
}

.statements li + li,
.roll li + li {
  margin-top: 0.5rem;
}

/* Chain of review: each group inside the one that reviews it. No
   wrapping tricks: when the nesting runs out of screen, the chain (only
   the chain, not the page) scrolls sideways. */
.chain-scroll {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.chain-scroll > .chain {
  margin-top: 0;
}

.chain {
  overflow-wrap: normal;
  list-style: none;
  min-width: min-content;
  margin-top: 0.75rem;
  /* Left and bottom rules only: a right or top one costs every level
     its width again, and on phones pushed the chain sideways. */
  padding: 0 0 0.75rem 0.5rem;
  border-left: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Phones: our own name (32 characters) is wider than the screen. */
@media (max-width: 40rem) {
  .chain li > a {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 40rem) {
  .chain {
    padding-left: 0.75rem;
  }

  .chain li {
    min-width: 26ch;
  }
}

.chain .says {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
}

/* Narrow screens: affiliation sits under the name, indented. */
.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;
  }
}

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

  main {
    padding-top: 0;
  }
}
