/* Latin Modern Mono: the typewriter face of LaTeX, and so of most
   cryptography papers, and so of most cryptography catastrophes. */
@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;
}

:root {
  --ground: #fff;
  --ink: #333;
  --rule: #666;
  --muted: #555;
  --alarm: #c00;
}

*,
*::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: 1rem;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease-out;
}

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

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

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

.status {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.status strong {
  color: var(--alarm);
}

/* Statements */
.statements {
  max-height: 22rem;
  overflow-y: auto;
  border-left: 1px solid var(--rule);
  padding-left: 1.5ch;
}

.statement + .statement {
  margin-top: 0.75rem;
}

.statement .meta {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}

.statement.fresh,
.roll li.fresh {
  animation: fresh 2.5s ease-out;
}

@keyframes fresh {
  from { background: #fdd; }
  to { background: transparent; }
}

/* Members */
.roll {
  list-style: none;
}

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

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

/* The catastrophe apparatus */
body.flash {
  background: var(--alarm);
  transition: none;
}

body.flash main {
  color: #fff;
}

.banner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s;
}

.banner.show {
  opacity: 1;
}

.banner p {
  max-width: 48rem;
  padding: 1.5rem 2rem;
  background: #000;
  color: #ff2a2a;
  border: 4px double #ff2a2a;
  font-size: clamp(1.25rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 0 0 100vmax rgba(200, 0, 0, 0.25);
  transform: rotate(-2deg);
}

.banner.show p {
  animation: shake 0.35s linear infinite;
}

@keyframes shake {
  0%, 100% { transform: rotate(-2deg) translate(0, 0); }
  25% { transform: rotate(-1.5deg) translate(2px, -1px); }
  50% { transform: rotate(-2.5deg) translate(-2px, 1px); }
  75% { transform: rotate(-2deg) translate(1px, 2px); }
}

@media (prefers-reduced-motion: reduce) {
  body.flash {
    background: var(--ground);
  }
  body.flash main {
    color: inherit;
  }
  .banner.show p {
    animation: none;
  }
  .statement.fresh,
  .roll li.fresh {
    animation: none;
  }
}

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

  main {
    padding-top: 0;
  }

  .banner {
    display: none;
  }
}
