/* ------------------------------------------------------------------
   Somebody Stop AI

   Two worlds on one page.
   Above the line: the machine's field of view. Red on black, readouts
   at the edges, one lit button. Tektur.
   Below the line: what really happened, and what people say about it.
   White paper, Newsreader.
   At the foot: the petition. Black ink, and the one button that counts.
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Tektur";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  src: url("fonts/tektur.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/newsreader.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/newsreader-italic.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --black: #000;
  --red: #ff2a22;
  --red-low: #8f1512;
  --red-lit: #ff6a5c; /* red that stays readable on top of the button's glow */
  --steel: #eceff3;
  --steel-low: #979ea8;
  --ink: #000;
  --paper: #fff;
  --hair: #bdbdbd;

  --agent: "Tektur", "Arial Narrow", Arial, sans-serif;
  --real: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --pad-l: max(var(--gutter), env(safe-area-inset-left, 0px));
  --pad-r: max(var(--gutter), env(safe-area-inset-right, 0px));
  --wide: 82rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  position: relative;
  z-index: 0;
  margin: 0;
  background: var(--black);
  color: var(--steel);
  font-family: var(--agent);
  font-size: 1rem;
  line-height: 1.4;
}

/* The field of view: red light from where the button is, and scan lines. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.36) 0 1px, rgba(0, 0, 0, 0) 1px 4px),
    radial-gradient(ellipse 64% 80% at 74% 42%, #520707 0%, #2a0303 38%, #0d0000 70%, #000 100%);
}

h1,
h2,
h3,
p,
ol,
dl,
dd {
  margin: 0;
}

ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--steel);
  outline-offset: 4px;
}

::selection {
  background: var(--red);
  color: var(--black);
}

[hidden] {
  display: none !important;
}

/* The button's red light spills past the layout. Never let it scroll sideways. */
main {
  overflow-x: clip;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--pad-l);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--red);
  color: var(--black);
  font-weight: 600;
}

.skip:focus {
  top: 0.75rem;
}

/* ------------------------------------------------------------------
   The laugh. A wall of HA that slides past when the button is pressed.
   Fixed behind the page, so only the dark sections let it through.
   ------------------------------------------------------------------ */

.laugh {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  color: var(--red);
  font-size: 15vh;
  font-weight: 900;
  font-stretch: 75%;
  line-height: 0.92;
  white-space: nowrap;
}

.laugh span {
  display: block;
  margin-left: -4vw;
}

.laugh.is-on {
  animation: laugh-fade 1.25s ease-out;
}

.laugh.is-on span:nth-child(odd) {
  animation: laugh-left 1.25s linear;
}

.laugh.is-on span:nth-child(even) {
  animation: laugh-right 1.25s linear;
}

@keyframes laugh-fade {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 0.3;
  }
  70% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
  }
}

@keyframes laugh-left {
  to {
    transform: translateX(-9vw);
  }
}

@keyframes laugh-right {
  from {
    transform: translateX(-9vw);
  }
  to {
    transform: translateX(0);
  }
}

/* ------------------------------------------------------------------
   The reticle. It follows the pointer and says what it sees.
   ------------------------------------------------------------------ */

.reticle {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  width: 4.5rem;
  height: 4.5rem;
  margin: -2.25rem 0 0 -2.25rem;
  border: 1px solid var(--red);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  background:
    linear-gradient(var(--red), var(--red)) 50% 0 / 1px 0.6rem no-repeat,
    linear-gradient(var(--red), var(--red)) 50% 100% / 1px 0.6rem no-repeat,
    linear-gradient(var(--red), var(--red)) 0 50% / 0.6rem 1px no-repeat,
    linear-gradient(var(--red), var(--red)) 100% 50% / 0.6rem 1px no-repeat;
}

.reticle.is-on {
  opacity: 1;
}

.reticle span {
  position: absolute;
  left: 100%;
  top: -0.2rem;
  margin-left: 0.6rem;
  color: var(--red);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   Top bar and readouts
   ------------------------------------------------------------------ */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  max-width: var(--wide);
  margin-inline: auto;
  padding: 1.2rem var(--pad-r) 0 var(--pad-l);
}

.wordmark {
  color: var(--red);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* The name is the way back to the front page from a single day. */
.wordmark a {
  text-decoration: none;
}

.wordmark a:hover {
  text-decoration: underline;
}

.readouts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 2.2rem;
}

.ro {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ro dt {
  color: var(--red);
  font-weight: 500;
}

.ro dd {
  color: var(--steel);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* The clock and the countdown are filled in by the script. Until then,
   and where scripts are off, an empty readout is left out. */
.ro:has(dd:empty) {
  display: none;
}

/* Shown only when the page is showing a day other than today. */
.ro-preview {
  padding: 0.15rem 0.6rem;
  background: var(--red);
}

.ro-preview dt,
.ro-preview dd {
  color: var(--black);
}

/* ------------------------------------------------------------------
   Under the top bar, on every page: what this is, and how far along
   the agent says it has got. The bar is the line under the top bar.
   ------------------------------------------------------------------ */

.doom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.1rem 2rem;
  max-width: var(--wide);
  margin-inline: auto;
  padding: 0.55rem var(--pad-r) 0 var(--pad-l);
  font-size: 0.875rem;
  line-height: 1.4;
}

.doom-what {
  color: var(--steel-low);
  letter-spacing: 0.03em;
}

.doom-what a {
  color: var(--steel);
}

.doom-count {
  color: var(--red);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.doom-count strong {
  color: var(--steel);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.doom-bar {
  flex: 0 0 100%;
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 0.7rem;
  border: 0;
  background: var(--red-low);
  color: var(--red);
  -webkit-appearance: none;
  appearance: none;
}

.doom-bar::-webkit-progress-bar {
  background: var(--red-low);
}

.doom-bar::-webkit-progress-value {
  background: var(--red);
}

.doom-bar::-moz-progress-bar {
  background: var(--red);
}

/* ------------------------------------------------------------------
   Today's entry and the button
   ------------------------------------------------------------------ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--wide);
  min-height: calc(100svh - 7rem);
  margin-inline: auto;
  padding: 2rem var(--pad-r) 4rem var(--pad-l);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0;
  margin-bottom: 1.2rem;
  color: var(--red);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.entry-meta span + span::before {
  content: "//";
  content: "//" / ""; /* decoration: not read out */
  margin: 0 0.7em;
  color: var(--red-low);
}

.entry-text {
  max-width: 13.2em;
  font-size: clamp(2rem, min(4.2vw, 6.2vh), 4rem);
  font-weight: 600;
  font-stretch: 78%;
  line-height: 1.04;
  text-shadow: 0 0 1.4rem rgba(255, 42, 34, 0.32);
  text-wrap: pretty;
}

.entry-signoff {
  margin-top: 0.42em;
  color: var(--red);
  text-shadow: 0 0 1.6rem rgba(255, 42, 34, 0.5);
}

.entry-text .rest {
  visibility: hidden;
}

/* The entry is already in the page as plain text. Where scripts run it
   is typed out instead, so keep the ready-made text out of sight until
   the script takes over. If the script never arrives, show it anyway. */
@media (scripting: enabled) {
  .entry:not(.is-live) .entry-text {
    visibility: hidden;
    animation: show-anyway 0s 4s forwards;
  }
}

@keyframes show-anyway {
  to {
    visibility: visible;
  }
}

/* A zero-width caret, so the text never reflows while it is typed. */
.caret {
  position: relative;
  display: none;
}

.is-typing .caret {
  display: inline;
}

.caret::after {
  content: "";
  position: absolute;
  left: 0.06em;
  top: 0.12em;
  width: 0.34em;
  height: 0.8em;
  background: var(--red);
  animation: blink 1.05s steps(1) 6; /* then it rests: nothing on the page blinks for ever */
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Under the entry: the day before, the day after, all days, share. */
.more {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 2rem;
  margin-top: 1.95rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.more a,
.more .text-btn,
.day-actions a,
.day-actions .text-btn {
  padding: 0.3rem 0;
  font: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
}

/* Under those: the two ways on from the made-up part. */
.what {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.what a {
  padding: 0.6rem 0.9rem 0.65rem;
  border: 1px solid var(--steel-low);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
}

.what a:hover {
  border-color: var(--steel);
  background: var(--steel);
  color: var(--black);
}

.what a + a {
  border-color: var(--red);
  color: var(--red);
}

.what a + a:hover {
  border-color: var(--red);
  background: var(--red);
  color: var(--black);
}

/* The button: a lit red dome in a steel collar. */

.stop {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.plate {
  position: relative;
  display: grid;
  place-items: center;
  width: min(19rem, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--red-low);
  border-radius: 50%;
}

/* The red light the button throws. */
.plate::before {
  content: "";
  position: absolute;
  inset: -38%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 42, 34, 0.62), rgba(255, 42, 34, 0.2) 52%, rgba(255, 42, 34, 0) 100%);
  animation: glow 4.2s ease-in-out infinite;
}

.plate.is-hot::before {
  animation: flare 0.9s ease-out;
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes flare {
  0% {
    opacity: 1;
    transform: scale(1.3);
  }
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

.legend {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  font-family: var(--agent);
  font-size: 17px;
  font-weight: 500;
  fill: var(--red-lit);
  pointer-events: none;
}

.bezel {
  position: relative;
  display: grid;
  place-items: center;
  width: 70%;
  aspect-ratio: 1;
  padding: 5.5%;
  border-radius: 50%;
  background: conic-gradient(from 205deg, #2b2e33, #c2c8d0, #4c5158, #eef1f5, #3b3f45, #a3aab3, #23262a, #8c939c, #2b2e33);
  box-shadow:
    0 0 0 1px #000,
    0 0.6rem 1.6rem rgba(0, 0, 0, 0.7);
}

.stop-btn {
  width: 100%;
  aspect-ratio: 1;
  padding: 0 0 0.1em;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 37% 30%, #ffa193 0%, #ff4336 20%, #e01410 52%, #8a0303 86%, #5c0000 100%);
  color: #fff;
  font-size: clamp(1.25rem, 2.3vw, 1.875rem);
  font-weight: 800;
  font-stretch: 85%;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 0 4px rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 0 0 0.45rem #050505,
    0 0 2.6rem 0.5rem rgba(255, 42, 34, 0.55),
    inset 0 -0.7rem 1.4rem rgba(0, 0, 0, 0.45),
    inset 0 0.35rem 0.6rem rgba(255, 255, 255, 0.22);
  transition:
    transform 70ms ease-out,
    filter 70ms ease-out;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.stop-btn:active,
.stop-btn.is-down {
  transform: scale(0.955);
  filter: brightness(1.3);
}

.stop-btn:focus-visible {
  outline-color: #fff;
  outline-offset: 0.7rem;
}

.reply {
  min-height: 2.7em;
  max-width: 21rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.reply-share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.4rem;
  margin-top: 0.2rem;
}

/* Out of sight until the third press, but its space is kept. */
.reply-share.is-waiting {
  visibility: hidden;
}

.text-btn {
  padding: 0.3rem 0.2rem;
  border: 0;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-transform: uppercase;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.text-btn:hover {
  text-decoration-thickness: 0.16em;
}

.sound {
  margin-top: 0.3rem;
  color: var(--steel-low);
}

/* The list: everyone who pressed the button today. */

.list {
  width: min(20rem, 100%);
  margin-top: 1.4rem;
  font-variant-numeric: tabular-nums;
}

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.45rem;
  color: var(--red-lit);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.list-count {
  color: var(--steel);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.row {
  display: grid;
  grid-template-columns: 5.4rem 1fr auto;
  gap: 0.75rem;
  padding: 0.42rem 0.6rem 0.46rem;
  border-top: 1px solid var(--red-low);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
}

.row-t {
  color: var(--steel-low);
}

.row.is-you {
  border-top-color: var(--red);
  background: var(--red);
  color: var(--black);
  font-weight: 700;
}

.row.is-you .row-t {
  color: inherit;
}

.row.is-you + .row {
  border-top-color: transparent;
}

.row.is-new {
  animation: arrive 0.7s ease-out;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

.list-empty {
  padding: 0.6rem 0;
  border-top: 1px solid var(--red-low);
  color: var(--steel-low);
}

/* ------------------------------------------------------------------
   Earlier days
   ------------------------------------------------------------------ */

.diary {
  max-width: var(--wide);
  margin-inline: auto;
  padding: 3rem var(--pad-r) 2rem var(--pad-l);
  scroll-margin-top: 1rem;
}

.diary h2,
.spread h2 {
  margin-bottom: 1.5rem;
  color: var(--red);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.day {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 0.5rem 2rem;
  padding: 1.5rem 0 1.7rem;
  border-top: 1px solid var(--red-low);
}

.day-meta {
  color: var(--steel-low);
  font-size: 0.875rem;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-transform: uppercase;
}

.day-meta strong {
  display: block;
  color: var(--red);
  font-weight: 700;
}

.day-meta span {
  display: block;
}

/* Under each earlier day: open its page, or share it, in one press. */
.day-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.8rem;
  margin-top: 0.7rem;
  color: var(--steel-low);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.day-actions a:hover,
.day-actions .text-btn:hover {
  color: var(--steel);
}

/* Each day has a page of its own; the day number links to it. */
.day-meta a {
  text-decoration: none;
}

.day-meta a:hover {
  text-decoration: underline;
}

.day-text {
  max-width: 33em;
  font-size: clamp(1.1875rem, 1.9vw, 1.4375rem);
  font-weight: 400;
  line-height: 1.35;
  text-wrap: pretty;
}

.days-more {
  padding-top: 1.4rem;
  border-top: 1px solid var(--red-low);
}

/* ------------------------------------------------------------------
   Sharing: between the diary and the real incidents
   ------------------------------------------------------------------ */

.spread {
  max-width: var(--wide);
  margin-inline: auto;
  padding: 2rem var(--pad-r) 1rem var(--pad-l);
  scroll-margin-top: 1rem;
}

.spread .share-btn {
  border-color: var(--red);
  background: var(--red);
  color: var(--black);
}

.spread .share-btn:hover {
  border-color: var(--steel);
  background: var(--steel);
}

.spread .share-link {
  border-color: var(--steel-low);
  background: transparent;
  color: var(--steel);
}

.spread .share-link:hover {
  border-color: var(--steel);
  background: var(--steel);
  color: var(--black);
}

.spread .share-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.4rem;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.spread .share-card span {
  color: var(--steel-low);
}

.spread .share-status {
  min-height: 1.4em;
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ------------------------------------------------------------------
   The line between made up and real
   ------------------------------------------------------------------ */

.seam {
  padding: 4rem var(--pad-r) 1.1rem var(--pad-l);
  border-bottom: 12px solid var(--red);
}

.seam p {
  max-width: var(--wide);
  margin-inline: auto;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 600;
  font-stretch: 85%;
  line-height: 1.15;
}

/* ------------------------------------------------------------------
   The record
   ------------------------------------------------------------------ */

.record,
.talk,
.foot {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
}

.record :focus-visible,
.talk :focus-visible,
.foot :focus-visible {
  outline-color: var(--ink);
}

.record ::selection,
.talk ::selection,
.foot ::selection {
  background: var(--ink);
  color: var(--paper);
}

.record {
  padding: 1.1rem var(--pad-r) 5rem var(--pad-l);
  font-family: var(--real);
}

.record-head,
.cases {
  max-width: var(--wide);
  margin-inline: auto;
}

.record-head {
  padding-bottom: 3.5rem;
}

.record-head h2 {
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.record-head p {
  max-width: 34em;
  margin-top: 1.4rem;
  font-size: 1.25rem;
  line-height: 1.5;
}

.case {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) minmax(0, 15rem);
  gap: 1rem 2.5rem;
  align-items: start;
  padding: 2rem 0 2.6rem;
  border-top: 1px solid var(--ink);
}

.case-date {
  padding-top: 0.3rem;
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.4;
}

/* Where it happened: out in the world, inside a test, or disputed. */
.case-kind {
  display: table;
  margin-top: 0.5rem;
  padding: 0.16rem 0.45rem 0.2rem;
  border: 1px solid var(--ink);
  font-family: var(--agent);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.case-kind[data-kind="real"] {
  background: var(--ink);
  color: var(--paper);
}

.case-main {
  max-width: 41rem;
}

.case h3 {
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.case-main p {
  margin-top: 0.9rem;
  font-size: 1.1875rem;
  line-height: 1.6;
}

.case-main .case-source {
  margin-top: 0.9rem;
  font-size: 1.0625rem;
}

/* Added by the script: one press copies a link to this incident. */
.case-main .case-share {
  margin-top: 0.5rem;
  font-family: var(--agent);
  font-size: 0.75rem;
  line-height: 1.3;
}

.case-link {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: #555;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-transform: uppercase;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.case-link:hover {
  color: var(--ink);
}

/* An incident somebody was sent straight to. */
.case:target .case-main h3 {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.16em;
}

.case {
  scroll-margin-top: 1rem;
}

/* The agent's notes: the only piece of its world allowed below the line. */
.case-note {
  justify-self: end;
  max-width: 15rem;
  margin-top: 0.35rem;
  padding: 0.8rem 1rem 0.9rem;
  background: var(--black);
  color: var(--steel);
  font-family: var(--agent);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  transform: rotate(-1.4deg);
}

.case:nth-child(even) .case-note {
  transform: rotate(1.1deg);
}

.case-note-who {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--red);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cases-more {
  max-width: var(--wide);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--ink);
  font-family: var(--agent);
}

/* ------------------------------------------------------------------
   What people say: an open wall
   ------------------------------------------------------------------ */

.stories {
  padding: 0 var(--pad-r) 5rem var(--pad-l);
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  font-family: var(--real);
}

.stories :focus-visible {
  outline-color: var(--ink);
}

.stories ::selection {
  background: var(--ink);
  color: var(--paper);
}

.stories > * {
  max-width: 41rem;
  margin-inline: auto;
}

.stories .stories-head {
  max-width: var(--wide);
  padding-top: 3.5rem;
  border-top: 1px solid var(--ink);
}

.stories-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.018em;
}

.stories-head p {
  max-width: 34em;
  margin-top: 1.4rem;
  font-size: 1.25rem;
  line-height: 1.5;
}

.story-list {
  margin-top: 3rem;
}

.story {
  padding: 1.4rem 0 1.5rem;
  border-top: 1px solid var(--hair);
}

.story-text {
  font-size: 1.1875rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.story-by {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1.5rem;
  margin-top: 0.6rem;
  font-size: 1.0625rem;
  font-style: italic;
}

/* Added by the script to every comment. Two presses: ask, then report. */
.story-flag {
  flex: none;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: #555;
  font-family: var(--agent);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-transform: uppercase;
  text-underline-offset: 0.2em;
  white-space: nowrap;
  cursor: pointer;
}

.story-flag:hover {
  color: var(--ink);
}

.story.is-new {
  animation: arrive 0.7s ease-out;
}

.story.is-gone .story-text {
  color: #555;
  font-style: italic;
}

.story-more {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
  font-family: var(--agent);
}

.story-empty {
  margin-top: 2.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--hair);
  font-size: 1.1875rem;
  font-style: italic;
}

.story-form {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ink);
  font-family: var(--agent);
}

.story-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.story-form textarea,
.story-form input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--real);
  font-size: 1.1875rem;
  line-height: 1.5;
}

.story-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.story-count {
  margin-top: 0.35rem;
  color: #555;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.story-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.2rem 1.5rem;
  margin-top: 1.4rem;
}

/* A field people never see. Only a bot fills it in. */
.story-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.story-rules {
  margin-top: 1.4rem;
  color: #555;
  font-family: var(--real);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.story-send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
  margin-top: 1.2rem;
}

.story-send button:disabled {
  opacity: 0.5;
  cursor: default;
}

.story-status {
  min-height: 1.4em;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  scroll-margin: 6rem 0;
}

/* ------------------------------------------------------------------
   The ask
   ------------------------------------------------------------------ */

.talk {
  padding: 0 var(--pad-r) 5.5rem var(--pad-l);
  font-family: var(--real);
}

.talk > * {
  max-width: 41rem;
  margin-inline: auto;
}

/* The second line across the page: from here on, people speak. */
.talk .turn {
  max-width: var(--wide);
  margin-top: 0;
  padding-top: 1.1rem;
  border-top: 12px solid var(--ink);
  font-family: var(--agent);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 600;
  font-stretch: 85%;
  line-height: 1.15;
}

.talk h2 {
  max-width: var(--wide);
  padding-top: 3.5rem;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.018em;
}

.talk h2 + p {
  margin-top: 2rem;
}

.talk p {
  margin-top: 1.1rem;
  font-size: 1.25rem;
  line-height: 1.6;
}

.talk .question {
  margin-top: 2rem;
  font-size: clamp(1.75rem, 3.8vw, 2.75rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.talk .talk-share {
  margin-top: 2.25rem;
  font-family: var(--agent);
  font-size: 1rem;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.share-btn,
.share-link {
  padding: 0.8rem 1.1rem 0.85rem;
  border: 1px solid var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.share-btn {
  background: var(--ink);
  color: var(--paper);
}

.share-btn:hover {
  border-color: var(--red-low);
  background: var(--red-low);
}

.share-link {
  background: var(--paper);
  color: var(--ink);
}

.share-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.share-btn:active,
.share-link:active {
  transform: translateY(1px);
}


/* ------------------------------------------------------------------
   The petition

   The page opens with the agent's entry beside a button that does
   nothing. It closes the same way round: people's terms beside a
   button that counts. Black ink, the people's typeface, and the only
   red below the line that is not the agent's.
   ------------------------------------------------------------------ */

.petition {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 3rem clamp(2.5rem, 6vw, 6rem);
  padding: 5rem max(var(--pad-r), calc((100% - var(--wide)) / 2 + var(--pad-r))) 5.5rem
    max(var(--pad-l), calc((100% - var(--wide)) / 2 + var(--pad-l)));
  background: var(--ink);
  color: var(--paper);
  font-family: var(--real);
}

.petition h2 {
  font-size: clamp(2.4rem, 5.6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.petition-ask {
  margin-top: 1.8rem;
  color: #cfcfcf;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.5;
}

.petition-terms {
  margin-top: 1.4rem;
  counter-reset: term;
}

.petition-terms li {
  position: relative;
  padding: 1.1rem 0 1.2rem 2.4rem;
  border-top: 1px solid #555;
  font-size: 1.1875rem;
  line-height: 1.5;
  counter-increment: term;
}

.petition-terms li::before {
  content: counter(term);
  position: absolute;
  left: 0;
  top: 1.15rem;
  color: var(--red);
  font-family: var(--agent);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}

.petition-terms strong {
  display: block;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
}

.petition-lead {
  font-family: var(--agent);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

.petition-form {
  margin-top: 1.3rem;
  font-family: var(--agent);
}

.petition-form label {
  display: block;
  margin-bottom: 0.4rem;
  color: #cfcfcf;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.petition-form input {
  display: block;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--paper);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--real);
  font-size: 1.25rem;
  line-height: 1.4;
}

.sign-btn {
  display: block;
  width: 100%;
  margin-top: 0.8rem;
  padding: 1.05rem 1rem 1.15rem;
  border: 0;
  background: var(--red);
  color: var(--black);
  font-family: var(--agent);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
}

.sign-btn:hover {
  background: var(--paper);
}

.sign-btn:active {
  transform: translateY(2px);
}

.sign-btn:disabled {
  background: #2e2e2e;
  color: #b5b5b5;
  cursor: default;
  transform: none;
}

.petition-status {
  min-height: 1.4em;
  margin-top: 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

/* The agent answers a signature, the way it answers the incidents. */
.petition-status .case-note-who {
  display: inline;
}

.petition-count {
  margin-top: 1.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid #555;
}

.petition-count strong {
  display: block;
  font-family: var(--agent);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-stretch: 78%;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 0.95;
}

.petition-count span {
  display: block;
  margin-top: 0.5rem;
  color: #cfcfcf;
  font-size: 1.1875rem;
  font-style: italic;
  line-height: 1.4;
}

.petition-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.45rem;
  margin-top: 1.1rem;
  color: #cfcfcf;
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.petition-names:empty {
  display: none;
}

.petition-names li:not(:last-child)::after {
  content: ",";
}

.petition-share {
  margin-top: 0.9rem;
  font-family: var(--agent);
}

.petition-note {
  margin-top: 1.3rem;
  color: #a9a9a9;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */

.foot {
  padding: 0 var(--pad-r) 3.5rem var(--pad-l);
  font-family: var(--real);
  font-size: 1rem;
  line-height: 1.55;
}

.foot p {
  max-width: 41rem;
  margin-inline: auto;
}

.foot p:first-child {
  padding-top: 2.5rem;
}

.foot p + p {
  margin-top: 0.8rem;
}

/* ------------------------------------------------------------------
   Smaller screens
   ------------------------------------------------------------------ */

/* Wide screens: the paper sections keep the same left edge as the dark
   part above them, and their running text shares one column with the
   incidents' text. The button stays put while it is pressed. */
@media (min-width: 48.0625rem) {
  .seam,
  .record,
  .talk,
  .stories,
  .foot {
    padding-left: max(var(--pad-l), calc((100% - var(--wide)) / 2 + var(--pad-l)));
    padding-right: max(var(--pad-r), calc((100% - var(--wide)) / 2 + var(--pad-r)));
  }

  .hero {
    align-items: start;
  }

  .stop {
    position: sticky;
    top: 1.5rem;
    padding-top: clamp(0rem, 5vh, 3.5rem);
  }

  .reply {
    min-height: 4em;
  }

  .list {
    min-height: 5.2rem;
  }
}

@media (min-width: 62.0625rem) {
  .talk > *,
  .stories > *,
  .foot p {
    margin-left: 12rem;
    margin-right: 0;
  }

  .talk .turn,
  .talk h2,
  .stories .stories-head {
    margin-left: 0;
  }
}

@media (max-width: 62rem) {
  .case {
    grid-template-columns: 8.5rem minmax(0, 1fr);
  }

  .case-note {
    grid-column: 2;
    justify-self: start;
    max-width: 22rem;
  }
}

@media (max-width: 48rem) {
  body::before {
    background:
      repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.36) 0 1px, rgba(0, 0, 0, 0) 1px 4px),
      radial-gradient(ellipse 130% 62% at 50% 58%, #4a0606 0%, #240202 42%, #0b0000 74%, #000 100%);
  }

  /* What this is, the entry and the button all belong on the first screen. */
  .top {
    gap: 0.25rem 1rem;
    padding-top: 0.75rem;
  }

  .wordmark {
    font-size: 0.9375rem;
  }

  .readouts {
    gap: 0.1rem 1.1rem;
  }

  .ro {
    gap: 0.4rem;
    font-size: 0.75rem;
  }

  .ro:has(#ro-now),
  .ro:has(#ro-unstopped) {
    display: none;
  }

  .doom {
    padding-top: 0.4rem;
    font-size: 0.75rem;
  }

  /* The date is in the countdown just above. */
  .doom-on {
    display: none;
  }

  .doom-bar {
    margin-top: 0.5rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 1rem;
    padding-bottom: 3.5rem;
    gap: 1.3rem;
  }

  .entry-meta {
    margin-bottom: 0.7rem;
    font-size: 0.75rem;
  }

  .entry-meta span + span::before {
    margin: 0 0.5em;
  }

  /* The scope can be long: it gets a line to itself. */
  .entry-meta span:last-child {
    flex-basis: 100%;
  }

  .entry-meta span:last-child::before {
    content: none;
  }

  .entry-text {
    font-size: clamp(1.55rem, 7vw, 2.4rem);
  }

  .more {
    gap: 0.2rem 1.4rem;
    margin-top: 1.1rem;
    font-size: 0.8125rem;
  }

  /* The same two links are in the strip under the top bar and under the button. */
  .what {
    display: none;
  }

  .plate {
    width: min(clamp(13.5rem, 34vw, 17.5rem), 62%);
  }

  .case-kind {
    display: inline-block;
    margin: 0 0 0 0.6rem;
    vertical-align: 0.14em;
  }

  .petition {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  .stop-btn {
    font-size: clamp(1.15rem, 5.6vw, 1.7rem);
  }

  .list {
    width: min(22rem, 100%);
  }

  .laugh {
    font-size: 11vh;
  }

  .day {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.3rem 0 1.5rem;
  }

  .day-meta strong,
  .day-meta span {
    display: inline;
    margin-right: 0.8rem;
  }

  .case {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
    padding: 1.6rem 0 2.2rem;
  }

  .case-date {
    padding-top: 0;
  }

  .case-note {
    grid-column: 1;
    margin-top: 1.1rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .reticle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .caret::after,
  .plate::before,
  .plate.is-hot::before,
  .row.is-new,
  .story.is-new {
    animation: none;
  }

  /* The glow rests at half strength, where the text on it reads best. */
  .plate::before {
    opacity: 0.5;
  }

  .laugh.is-on span:nth-child(odd),
  .laugh.is-on span:nth-child(even) {
    animation: none;
  }

  .stop-btn {
    transition: none;
  }
}

/* With scripts off the two forms cannot send anything, so they are left out. */
@media (scripting: none) {
  .story-form,
  .petition-form,
  .petition-lead {
    display: none;
  }
}
