:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-soft: #fbfbf8;
  --ink: #101010;
  --muted: #4b4b4b;
  --muted-2: #6d6d6d;
  --grid: rgba(0, 0, 0, 0.055);
  --grid-strong: rgba(0, 0, 0, 0.11);
  --line: rgba(0, 0, 0, 0.34);
  --line-soft: rgba(0, 0, 0, 0.16);
  --red: #8a1f1f;
  --blue: #1e405a;
  --green: #42533b;
  --shadow: 8px 10px 0 rgba(0, 0, 0, 0.08);
  --shadow-soft: 4px 5px 0 rgba(0, 0, 0, 0.06);
  --radius: 10px;
  --max: 1320px;
  --text-max: 820px;
  --aside-width: 340px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(0, 0, 0, 0.035), transparent 22rem),
    var(--paper);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px, auto, auto;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.45), transparent 42%),
    radial-gradient(circle at 70% 20%, rgba(0, 0, 0, 0.025), transparent 28rem);
  mix-blend-mode: multiply;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

code,
pre {
  font-family: var(--mono);
}

.page {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.skip,
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: #ffffff;
}

.skip:focus,
.skip-link:focus {
  top: 16px;
}

.hero {
  position: relative;
  z-index: 1;
  padding: clamp(42px, 8vw, 86px) 0 26px;
}

.hero .page {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 40px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero .page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 100% 31px;
}

.hero .page > * {
  position: relative;
  z-index: 1;
}

.kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.hero .title {
  max-width: 980px;
  margin: 18px 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(42px, 8.2vw, 88px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.subtitle {
  max-width: 860px;
  margin: 0 0 22px;
  color: #242424;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.45;
}

.canonical {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
}

.canonical a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
}

.canonical a::before {
  content: "■";
  font-size: 9px;
}

.canonical a:hover {
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
}

.page.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, var(--aside-width));
  gap: 24px;
  align-items: start;
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  padding: 22px 0 64px;
}

main#main {
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 4vw, 38px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

main#main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 100% 31px;
}

main#main > * {
  position: relative;
  z-index: 1;
}

section {
  scroll-margin-top: 92px;
}

main#main > section {
  max-width: var(--text-max);
  margin: 0;
  padding: 34px 0;
  border-top: 2px solid var(--ink);
}

main#main > section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

main#main h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.055em;
}

main#main h2::after {
  content: "  #" attr(id);
  display: inline-block;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  vertical-align: middle;
}

p {
  margin-top: 0;
}

main#main p {
  color: #242424;
  font-size: 17px;
  line-height: 1.62;
}

.lead,
p.lead {
  max-width: 820px;
  margin: 0 0 22px;
  color: #242424;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.45;
}

main#main p.lead {
  padding: 18px;
  border: 2px solid var(--ink);
  border-left-width: 6px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

em {
  color: var(--ink);
}

strong,
b {
  color: var(--ink);
  font-weight: 900;
}

.refmark {
  margin-left: 0.14em;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.64em;
  line-height: 0;
  vertical-align: super;
}

.refmark a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.38em;
  height: 1.38em;
  padding: 0 0.22em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.refmark a:hover {
  background: var(--ink);
  color: #ffffff;
}

aside {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

aside section {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

aside section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 100% 31px;
}

aside section > * {
  position: relative;
  z-index: 1;
}

aside h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

aside section:nth-of-type(2) h2 {
  font-size: 0;
}

aside section:nth-of-type(2) h2::before {
  content: "On the web";
  font-size: 13px;
}

.side-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
}

.side-list li {
  margin: 0;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
}

.side-list strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.identity-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-family: var(--mono);
}

.identity-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.identity-links a::after {
  content: "↗";
  margin-left: 10px;
  font-weight: 900;
}

.identity-links a:hover {
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
}

.facts {
  display: grid;
  gap: 10px;
  font-family: var(--mono);
}

.fact {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.fact strong {
  display: block;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
}

.fact span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.machine-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  font-family: var(--mono);
}

.machine-block::before {
  content: "Machine-readable files";
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.machine-block a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.machine-block a::before {
  content: "■";
  margin-right: 8px;
  font-size: 8px;
}

.machine-block a:hover {
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
}

.reference-list {
  max-width: none !important;
}

.reference-list h2 {
  max-width: var(--text-max);
}

.reference-list ol {
  counter-reset: ref;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.reference-list li {
  position: relative;
  counter-increment: ref;
  min-height: 72px;
  margin: 0;
  padding: 14px 14px 14px 62px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
}

.reference-list li::before {
  content: counter(ref, decimal-leading-zero);
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.reference-list li:target {
  background: #fff8d8;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12), var(--shadow-soft);
  scroll-margin-top: 24px;
}

.reference-list .authors {
  color: var(--ink);
  font-weight: 900;
}

.reference-list .title {
  display: inline;
  color: var(--ink);
  font-family: var(--mono);
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.reference-list .source {
  color: var(--blue);
  font-weight: 900;
}

.reference-list .year {
  color: var(--green);
  font-weight: 900;
}

.reference-list a {
  color: var(--red);
  font-weight: 900;
  word-break: break-word;
}

footer {
  position: relative;
  z-index: 1;
  padding: 0 0 44px;
  color: var(--muted);
  font-size: 14px;
}

footer .page {
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

ul,
ol {
  color: var(--muted);
}

li + li {
  margin-top: 0.35rem;
}

table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  font-size: 14px;
}

th,
td {
  padding: 12px;
  border-bottom: 2px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
}

td {
  color: var(--muted);
}

blockquote {
  margin: 22px 0;
  padding: 18px;
  border: 2px solid var(--ink);
  border-left-width: 8px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 1180px) {
  .reference-list ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .page.layout {
    grid-template-columns: 1fr;
  }

  aside {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 860px) {
  .page.layout {
    padding-top: 16px;
  }

  aside {
    grid-template-columns: 1fr;
  }

  main#main h2::after {
    display: block;
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .page,
  .page.layout {
    width: min(100% - 22px, var(--max));
  }

  .hero {
    padding-top: 22px;
  }

  .hero h1,
  .hero .title {
    font-size: clamp(40px, 15vw, 64px);
  }

  .canonical a,
  .machine-block a,
  .identity-links a {
    width: 100%;
    justify-content: center;
  }

  main#main,
  .hero .page,
  aside section,
  footer .page {
    border-radius: 8px;
  }

  .reference-list li {
    padding-left: 56px;
    font-size: 12px;
  }

  .reference-list li::before {
    left: 12px;
    width: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  :root {
    --paper: #ffffff;
    --paper-soft: #ffffff;
    --ink: #000000;
    --muted: #222222;
    --muted-2: #444444;
    --grid: transparent;
    --grid-strong: transparent;
    --line: #000000;
    --line-soft: #bbbbbb;
    --shadow: none;
    --shadow-soft: none;
  }

  html,
  body {
    background: #ffffff !important;
  }

  body::before {
    display: none !important;
  }

  .hero,
  .page.layout,
  footer {
    padding: 0;
  }

  .page,
  .page.layout {
    width: 100%;
  }

  .page.layout {
    display: block;
  }

  .hero .page,
  main#main,
  aside section,
  footer .page,
  .reference-list li,
  .machine-block,
  .side-list li,
  .identity-links a,
  .fact {
    box-shadow: none;
  }

  aside {
    position: static;
    display: block;
    margin-top: 24px;
  }

  aside section {
    margin-bottom: 16px;
    break-inside: avoid;
  }

  main#main > section,
  .reference-list li {
    break-inside: avoid;
  }

  .reference-list ol {
    grid-template-columns: 1fr;
  }
}
