:root {
  --paper: #f6f1e7;
  --ink: #070707;
  --muted: #77726a;
  --red: #cf1b1b;
  --blue: #1238ff;
  --green: #08a35a;
  --amber: #d08b00;
  --line: #101010;
  --soft: rgba(7, 7, 7, 0.08);
  --font-display: Impact, Haettenschweiler, "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  text-rendering: geometricPrecision;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(7, 7, 7, 0.04) 1px, transparent 1px) 0 0 / 31px 31px,
    linear-gradient(180deg, rgba(207, 27, 27, 0.05) 1px, transparent 1px) 0 0 / 100% 43px,
    var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  mix-blend-mode: multiply;
  background:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, 0.08) 3px),
    radial-gradient(circle at 20% 10%, rgba(18, 56, 255, 0.12), transparent 22%),
    radial-gradient(circle at 80% 30%, rgba(8, 163, 90, 0.12), transparent 18%),
    radial-gradient(circle at 44% 90%, rgba(207, 27, 27, 0.13), transparent 24%);
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.page-shell {
  width: min(1800px, 100%);
  margin: 0 auto;
  padding: 10px clamp(8px, 1.7vw, 28px) 28px;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 4;
  margin-bottom: 10px;
  border-bottom: 4px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 90%, white);
}

.ticker {
  display: flex;
  gap: 0;
  min-height: 24px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-bottom: 0;
  font: 700 clamp(0.62rem, 0.78vw, 0.86rem) / 1 var(--font-mono);
  white-space: nowrap;
}

.ticker span {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding: 5px 10px 4px;
  border-right: 2px solid var(--ink);
  background: var(--paper);
}

.ticker span:nth-child(3n) {
  color: var(--red);
}

.ticker span:nth-child(4n) {
  color: var(--blue);
}

.title-line {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(8px, 1.5vw, 24px);
  align-items: end;
  padding: clamp(6px, 1.2vw, 14px) 0 8px;
}

h1 {
  max-width: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.8vw, 8.2rem);
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.title-line p {
  max-width: 58ch;
  margin: 0 0 2px;
  font: 800 clamp(0.74rem, 1.05vw, 1.04rem) / 1.02 var(--font-body);
  text-transform: uppercase;
}

.category-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 4px solid var(--ink);
}

.category-button {
  min-height: 34px;
  padding: 6px 8px 5px;
  border: 0;
  border-right: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: 900 clamp(0.58rem, 0.88vw, 0.88rem) / 0.94 var(--font-body);
  text-align: left;
  text-transform: uppercase;
}

.category-button:last-child {
  border-right: 0;
}

.category-button:hover,
.category-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: 0;
}

.category-button.active {
  background: var(--red);
  color: white;
}

.signal-wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-items: stretch;
  border-left: 3px solid var(--ink);
  border-top: 3px solid var(--ink);
}

.entry {
  position: relative;
  display: flex;
  min-height: 186px;
  flex-direction: column;
  grid-column: span 3;
  isolation: isolate;
  overflow: hidden;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background:
    linear-gradient(135deg, transparent 0 54%, rgba(7, 7, 7, 0.06) 54% 56%, transparent 56%),
    var(--paper);
  transition: opacity 180ms ease, filter 180ms ease, background-color 180ms ease;
}

.entry-wide {
  grid-column: span 5;
}

.entry-tall {
  grid-column: span 3;
  min-height: 316px;
}

.entry-mega {
  grid-column: span 6;
  min-height: 330px;
}

.entry-quiet {
  grid-column: span 2;
}

.entry::before {
  position: absolute;
  inset: auto auto 10px calc((var(--shift) * 1%) - 20%);
  z-index: -1;
  width: 46%;
  aspect-ratio: 1.45;
  content: "";
  opacity: 0.82;
  border: 2px solid var(--ink);
  background:
    linear-gradient(136deg, var(--accent-a) 0 37%, var(--paper) 37% 55%, var(--accent-b) 55% 100%);
  transform: rotate(calc((var(--i) % 9 - 4) * 2.2deg));
}

.entry:nth-child(3n)::before {
  inset-block-start: 52px;
  inset-block-end: auto;
  width: 36%;
}

.entry:nth-child(5n)::before {
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-linear-gradient(45deg, var(--accent-a) 0 8px, var(--paper) 8px 14px, var(--accent-b) 14px 22px);
}

.entry:nth-child(7n)::before {
  width: 54%;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 8px, var(--paper) 8px 15px, var(--accent-a) 15px 27px);
}

.category-theory {
  --accent-a: var(--ink);
  --accent-b: #a9a9a9;
}

.category-progress {
  --accent-a: var(--red);
  --accent-b: var(--blue);
}

.category-frontier {
  --accent-a: var(--green);
  --accent-b: var(--blue);
}

.category-art {
  --accent-a: var(--amber);
  --accent-b: var(--red);
}

.category-crypto {
  --accent-a: var(--blue);
  --accent-b: var(--green);
}

.category-media {
  --accent-a: #8b8b8b;
  --accent-b: var(--amber);
}

.entry-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  width: clamp(34px, 5vw, 64px);
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  background: var(--paper);
}

.entry-mark::before,
.entry-mark::after {
  position: absolute;
  content: "";
  background: var(--ink);
}

.entry-mark::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 2px);
  width: 4px;
}

.entry-mark::after {
  top: calc(50% - 2px);
  right: 0;
  left: 0;
  height: 4px;
}

.entry:nth-child(4n) .entry-mark {
  width: clamp(52px, 7vw, 96px);
  aspect-ratio: 1.9;
  background:
    linear-gradient(90deg, var(--accent-a) 0 35%, var(--paper) 35% 58%, var(--accent-b) 58% 100%);
}

.entry:nth-child(4n) .entry-mark::before,
.entry:nth-child(4n) .entry-mark::after {
  display: none;
}

.entry-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 2px solid var(--ink);
  background: rgba(246, 241, 231, 0.86);
  font: 900 0.72rem / 1 var(--font-mono);
  text-transform: uppercase;
}

.entry-meta span {
  padding: 7px 8px 6px;
}

.entry-meta span + span {
  border-left: 2px solid var(--ink);
}

.entry-name {
  max-width: 100%;
  margin: 10px 8px 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 7.3rem);
  line-height: 0.77;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.entry-quiet .entry-name {
  font-size: clamp(1.75rem, 3.5vw, 4.4rem);
}

.entry-mega .entry-name {
  font-size: clamp(3.6rem, 8vw, 10rem);
}

.entry-description {
  position: relative;
  max-width: 58ch;
  margin: auto 8px 12px;
  padding-top: 16px;
  font: 900 clamp(0.88rem, 1.1vw, 1.16rem) / 1.01 var(--font-body);
  text-transform: uppercase;
}

.entry-description::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: min(140px, 52%);
  height: 4px;
  content: "";
  background: var(--accent-a);
}

.entry-link {
  display: block;
  border-top: 2px solid var(--ink);
  background: rgba(246, 241, 231, 0.92);
  padding: 9px 8px 8px;
  font: 950 clamp(1rem, 1.7vw, 1.55rem) / 0.95 var(--font-body);
  text-align: right;
  text-decoration: none;
}

.entry-link:hover,
.entry-link:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: 0;
}

.entry.redacted {
  filter: grayscale(1) contrast(0.95);
  opacity: 0.58;
  background: #e8e4dc;
}

.entry.redacted::before,
.entry.redacted .entry-mark {
  opacity: 0.08;
}

.entry.redacted .entry-name,
.entry.redacted .entry-description,
.entry.redacted .entry-link,
.entry.redacted .entry-meta span:last-child {
  color: transparent;
  text-shadow: none;
  background: var(--ink);
  user-select: none;
}

.entry.redacted .entry-name {
  width: min(92%, calc(38% + (var(--shift) * 0.45%)));
  min-height: 0.8em;
}

.entry.redacted .entry-description {
  width: min(86%, calc(44% + (var(--shift) * 0.38%)));
}

.entry.redacted .entry-description::before {
  display: none;
}

.entry.redacted .entry-link {
  width: 100%;
}

.footer-note {
  border: 3px solid var(--ink);
  border-top: 0;
  padding: 12px 10px;
  background: var(--paper);
  font: 900 clamp(0.74rem, 1.15vw, 1rem) / 1.08 var(--font-mono);
  text-transform: uppercase;
}

.footer-note a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.noscript-directory {
  border: 3px solid var(--ink);
  border-top: 0;
  padding: 12px;
  background: var(--paper);
}

.noscript-directory h2,
.legal-page h2 {
  margin: 0 0 10px;
  font: 900 clamp(1.6rem, 4vw, 4rem) / 0.85 var(--font-display);
  text-transform: uppercase;
}

.noscript-directory ol {
  columns: 3 260px;
  margin: 0;
  padding-left: 24px;
  font: 800 0.92rem / 1.25 var(--font-mono);
}

.noscript-directory li {
  break-inside: avoid;
  margin-bottom: 5px;
}

.legal-page {
  width: min(980px, calc(100% - 20px));
  margin: 0 auto;
  padding: 12px 0 38px;
}

.legal-page .back-link {
  display: inline-block;
  margin-bottom: 14px;
  border: 3px solid var(--ink);
  padding: 8px 10px 7px;
  background: var(--paper);
  font: 900 0.86rem / 1 var(--font-mono);
  text-decoration: none;
}

.legal-page .back-link:hover,
.legal-page .back-link:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: 0;
}

.legal-page h1 {
  margin-bottom: 18px;
  border-bottom: 5px solid var(--ink);
  padding-bottom: 8px;
  font-size: clamp(4rem, 18vw, 13rem);
}

.legal-page section {
  border-bottom: 3px solid var(--ink);
  padding: 18px 0;
}

.legal-page p {
  max-width: 74ch;
  margin: 0;
  font: 850 clamp(1rem, 1.6vw, 1.28rem) / 1.08 var(--font-body);
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .title-line {
    grid-template-columns: 1fr;
  }

  .category-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .signal-wall {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .entry,
  .entry-tall,
  .entry-wide,
  .entry-mega,
  .entry-quiet {
    grid-column: span 4;
  }
}

@media (max-width: 680px) {
  .page-shell {
    padding-inline: 6px;
  }

  .masthead {
    position: relative;
  }

  .title-line p {
    font-size: 0.9rem;
  }

  .category-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-button {
    min-height: 44px;
  }

  .signal-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry,
  .entry-tall,
  .entry-wide,
  .entry-mega,
  .entry-quiet {
    grid-column: span 2;
    min-height: 210px;
  }

  .entry-name,
  .entry-mega .entry-name,
  .entry-quiet .entry-name {
    font-size: clamp(2.3rem, 17vw, 4.8rem);
  }
}
