/* Tokens and rules are documented in docs/design-system.md */
:root {
  --paper: #f5f2ea;
  --ink: #141311;
  --muted: #5e594f;
  --red: #b92d17;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --ink: #f2efe7;
    --muted: #a8a397;
    --red: #ff6d4d;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
}

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

body {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding: 2rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Noto Serif", "Times New Roman", serif;
}

/* One vertical axis: the seam between the two parts of the title runs
   through the lines below, so "fuck" and "ts" meet on it */
main {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  width: 100%;
  max-width: 46rem;
  margin: auto;
}

h1,
ol,
li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
}

h1 {
  font-size: clamp(4.75rem, min(21vw, 36vh), 11rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}

ol {
  margin-top: 2.5rem;
  padding-left: 0;
  color: var(--muted);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  line-height: 1.3;
  list-style: none;
}

i {
  grid-column: 1 / -1;
  font-size: 0.6em;
  line-height: 1.5;
}

.before {
  text-align: right;
}

.after {
  white-space: pre;
}

.split {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.split i {
  line-height: inherit;
}

.fuck {
  color: var(--ink);
}

.ts {
  color: var(--red);
}

/* The layout splits words across cells, so assistive tech reads this instead */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Browsers without subgrid lose the axis but keep the page readable */
@supports not (grid-template-columns: subgrid) {
  main,
  h1,
  ol,
  li {
    display: block;
  }

  i {
    display: block;
  }

  .before,
  .after,
  .split {
    display: inline;
    text-align: left;
  }
}
