:root {
  color-scheme: dark;
  --black: #090a08;
  --black-soft: #10110e;
  --paper: #f1eee2;
  --paper-dim: #c4bfae;
  --muted: #88877d;
  --line: #3b3d36;
  --line-soft: #252721;
  --signal: #b7f526;
  --orange: #ff6b24;
  --cyan: #75d9e7;
  --red: #ff5a52;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--paper);
  font-family: var(--mono);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  content: "";
  opacity: 0.045;
  background-image:
    repeating-linear-gradient(17deg, transparent 0 3px, rgba(255, 255, 255, 0.3) 4px),
    repeating-linear-gradient(103deg, transparent 0 7px, rgba(255, 255, 255, 0.18) 8px);
  background-size: 11px 13px, 17px 19px;
  mix-blend-mode: screen;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.65rem 0.8rem;
  background: var(--signal);
  color: var(--black);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.masthead {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 4.25rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 8, 0.94);
}

.wordmark {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  min-height: 2.75rem;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
}

.wordmark span:nth-child(2) {
  color: var(--signal);
}

.edition {
  margin: 0 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.sync-chip {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.sync-chip strong {
  color: var(--signal);
  font-weight: 500;
}

.pulse {
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(183, 245, 38, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(183, 245, 38, 0.5); }
  55%, 100% { box-shadow: 0 0 0 0.48rem rgba(183, 245, 38, 0); }
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(44rem, calc(100svh - 8.75rem));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.08) saturate(0.9);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(9, 10, 8, 0.96) 0%, rgba(9, 10, 8, 0.74) 38%, rgba(9, 10, 8, 0.08) 73%),
    linear-gradient(0deg, rgba(9, 10, 8, 0.93) 0%, rgba(9, 10, 8, 0) 48%);
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(241, 238, 226, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 238, 226, 0.05) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(to right, black, transparent 80%);
}

.hero-content {
  width: min(78rem, 100%);
  margin: 0 auto;
  padding: 3rem 2rem 2.25rem;
}

.eyebrow {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin: 0 0 1.4rem;
  color: var(--signal);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 2.5rem;
  height: 1px;
  content: "";
  background: currentColor;
}

h1 {
  max-width: 9ch;
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", var(--sans);
  font-size: 8.5rem;
  font-weight: 900;
  line-height: 0.76;
  text-transform: uppercase;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 2px var(--paper);
}

.hero-deck {
  max-width: 42rem;
  margin: 1.6rem 0 0;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(9rem, 12rem));
  width: fit-content;
  margin-top: 2rem;
  border-top: 1px solid rgba(241, 238, 226, 0.35);
  border-bottom: 1px solid rgba(241, 238, 226, 0.35);
}

.hero-meta div {
  display: grid;
  gap: 0.35rem;
  min-height: 4.5rem;
  padding: 0.75rem 1rem 0.65rem 0;
}

.hero-meta div + div {
  padding-left: 1rem;
  border-left: 1px solid rgba(241, 238, 226, 0.35);
}

.hero-meta span {
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.hero-meta strong {
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
}

.hero-stamp {
  position: absolute;
  right: 1.5rem;
  bottom: 1.3rem;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(241, 238, 226, 0.45);
  color: var(--paper-dim);
  font-size: 0.6rem;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.ticker {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  min-height: 4.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--signal);
  color: var(--black);
}

.ticker-label {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-right: 1px solid rgba(9, 10, 8, 0.38);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ticker-label .pulse {
  background: var(--black);
  animation: none;
}

.ticker-window {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0 2rem;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ticker-item time {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
}

.ticker-item::after {
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 1rem;
  content: "";
  background: var(--black);
  transform: rotate(45deg);
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

.source-bar {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  max-width: 82rem;
  margin: 0 auto;
  padding: 0 2rem;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.source-bar p,
.source-bar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  margin: 0;
  padding: 0 1rem;
  border-right: 1px solid var(--line);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.source-bar p {
  color: var(--muted);
}

.source-bar a {
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease;
}

.source-bar a:last-child {
  border-right: 0;
}

.source-bar a span {
  color: var(--muted);
  font-size: 0.58rem;
}

.source-bar a:hover {
  background: var(--paper);
  color: var(--black);
}

.ledger {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  gap: 3rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
}

.ledger-aside {
  align-self: start;
}

.section-number {
  margin-bottom: 1.1rem;
  color: var(--signal);
  font-size: 0.68rem;
}

.ledger-aside h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", var(--sans);
  font-size: 4.25rem;
  font-weight: 900;
  line-height: 0.83;
  text-transform: uppercase;
}

.aside-copy {
  margin: 1.5rem 0 2.5rem;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.55;
}

.status-readout {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.readout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.status-readout > strong {
  display: block;
  margin-top: 0.8rem;
  color: var(--signal);
  font-family: var(--sans);
  font-size: 1.35rem;
  text-transform: uppercase;
}

.status-readout dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin: 1.25rem 0;
  font-size: 0.7rem;
}

.status-readout dt,
.status-readout dd {
  margin: 0;
}

.status-readout dt {
  color: var(--muted);
}

.status-readout dd {
  color: var(--paper-dim);
}

.status-readout a {
  display: inline-block;
  color: var(--paper);
  font-size: 0.65rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
  text-transform: uppercase;
}

.ledger-main {
  min-width: 0;
}

.controls {
  border-top: 1px solid var(--paper);
  border-bottom: 1px solid var(--line);
}

.control-topline,
.feed-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.control-topline {
  min-height: 3rem;
  color: var(--muted);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.control-topline p,
.feed-heading p {
  margin: 0;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0 1rem;
}

.filter-button,
#sortButton {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--paper-dim);
  cursor: pointer;
  text-transform: uppercase;
}

.filter-button {
  padding: 0.4rem 0.65rem;
  font-size: 0.64rem;
}

.filter-button:hover,
#sortButton:hover {
  border-color: var(--paper);
  color: var(--paper);
}

.filter-button[aria-pressed="true"] {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--black);
}

.search-row {
  display: grid;
  grid-template-columns: auto minmax(10rem, 1fr) auto;
  align-items: center;
  border-top: 1px solid var(--line);
}

.search-row label {
  padding-right: 1rem;
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

#searchInput {
  width: 100%;
  min-width: 0;
  min-height: 3.4rem;
  padding: 0 1rem;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  font-size: 0.78rem;
}

#searchInput::placeholder {
  color: #686a62;
}

#searchInput:focus {
  background: var(--black-soft);
  box-shadow: inset 0 -2px 0 var(--signal);
}

#sortButton {
  min-height: 3.4rem;
  padding: 0 0.9rem;
  border: 0;
  font-size: 0.62rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.feed-heading {
  min-height: 4rem;
  color: var(--muted);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.update-feed {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: update;
}

.update-card {
  counter-increment: update;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 8rem;
  gap: 1.2rem;
  min-height: 16rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  transition: border-color 160ms ease, background 160ms ease;
}

.update-card:last-child {
  border-bottom: 1px solid var(--line);
}

.update-card:hover {
  border-color: var(--paper-dim);
  background: linear-gradient(90deg, rgba(241, 238, 226, 0.045), transparent 72%);
}

.update-index {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 800;
}

.update-index::before {
  content: counter(update, decimal-leading-zero);
}

.update-index::after {
  display: block;
  width: 1.5rem;
  height: 0.18rem;
  margin-top: 0.8rem;
  content: "";
  background: var(--entry-color, var(--signal));
}

.update-card[data-type="patch"] { --entry-color: var(--cyan); }
.update-card[data-type="deprecation"] { --entry-color: var(--orange); }
.update-card[data-type="security"] { --entry-color: var(--red); }

.update-body {
  min-width: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.15rem;
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.pill {
  padding: 0.25rem 0.42rem;
  border: 1px solid var(--line);
  color: var(--paper-dim);
}

.pill.release { border-color: var(--signal); color: var(--signal); }
.pill.patch { border-color: var(--cyan); color: var(--cyan); }
.pill.deprecation { border-color: var(--orange); color: var(--orange); }
.pill.security { border-color: var(--red); color: var(--red); }

.update-card h3 {
  max-width: 21ch;
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.02;
}

.summary {
  max-width: 64ch;
  margin: 1rem 0 0;
  color: var(--paper-dim);
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.source-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 100%;
}

.source-links a {
  color: var(--paper);
  font-size: 0.62rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28rem;
  text-transform: uppercase;
}

.source-links a:hover {
  color: var(--signal);
}

.source-count {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 2.3rem;
  font-weight: 900;
}

.empty-state {
  margin: 0;
  padding: 4rem 0;
  border-top: 1px solid var(--line);
  color: var(--orange);
  font-family: var(--serif);
  font-size: 1.3rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 3rem;
  align-items: end;
  min-height: 15rem;
  padding: 3rem max(2rem, calc((100vw - 78rem) / 2));
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--black);
}

.footer-mark {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", var(--sans);
  font-size: 2.4rem;
  text-decoration: none;
}

.site-footer p {
  max-width: 34rem;
  margin: 0.6rem 0 0;
  font-size: 0.68rem;
  line-height: 1.5;
}

.site-footer > a {
  font-size: 0.68rem;
  text-transform: uppercase;
}

@media (max-width: 1020px) {
  h1 {
    font-size: 6.5rem;
  }

  .source-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-bar p {
    grid-column: 1 / -1;
    min-height: 3.5rem;
    border-bottom: 1px solid var(--line);
  }

  .source-bar a:nth-child(3) {
    border-right: 0;
  }

  .source-bar a:nth-child(4),
  .source-bar a:nth-child(5) {
    border-top: 1px solid var(--line);
  }

  .ledger {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 2rem;
  }

  .ledger-aside h2 {
    font-size: 3.4rem;
  }

  .update-card {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }

  .source-links {
    grid-column: 2;
    flex-direction: row;
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .masthead {
    grid-template-columns: 1fr auto;
    padding: 0 1rem;
  }

  .edition {
    display: none;
  }

  .sync-chip span:nth-child(2) {
    display: none;
  }

  .hero {
    min-height: 40rem;
  }

  .hero-art {
    object-position: 64% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(9, 10, 8, 0.94), rgba(9, 10, 8, 0.22)),
      linear-gradient(0deg, rgba(9, 10, 8, 0.98), rgba(9, 10, 8, 0.05) 62%);
  }

  .hero-content {
    padding: 4rem 1rem 2rem;
  }

  h1 {
    font-size: 4.6rem;
  }

  .hero-deck {
    max-width: 27rem;
    font-size: 1rem;
  }

  .hero-meta {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .hero-meta div:nth-child(3) {
    display: none;
  }

  .hero-stamp {
    display: none;
  }

  .ticker {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }

  .source-bar {
    padding: 0 1rem;
  }

  .source-bar a {
    min-height: 4rem;
    padding: 0 0.7rem;
    font-size: 0.6rem;
  }

  .ledger {
    grid-template-columns: 1fr;
    padding: 4rem 1rem 5rem;
  }

  .ledger-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .section-number {
    grid-column: 1 / -1;
    margin: 0;
  }

  .ledger-aside h2 {
    font-size: 3.2rem;
  }

  .aside-copy {
    margin: 0;
  }

  .status-readout {
    grid-column: 1 / -1;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    min-height: 0;
    padding: 3rem 1rem;
  }
}

@media (max-width: 520px) {
  .sync-chip {
    padding: 0 0.5rem;
  }

  h1 {
    font-size: 4.1rem;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .hero-meta div:nth-child(2) {
    display: none;
  }

  .ticker-item {
    padding: 0 1.2rem;
    font-size: 0.74rem;
  }

  .source-bar {
    grid-template-columns: 1fr;
  }

  .source-bar a {
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .source-bar a:first-of-type {
    border-top: 0;
  }

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

  .section-number,
  .status-readout {
    grid-column: auto;
  }

  .search-row {
    grid-template-columns: 1fr auto;
  }

  .search-row label {
    grid-column: 1 / -1;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }

  #searchInput {
    border-left: 0;
  }

  .feed-heading p:last-child {
    display: none;
  }

  .update-card {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.7rem;
    min-height: 0;
  }

  .update-index {
    font-size: 1rem;
  }

  .update-card h3 {
    font-size: 1.55rem;
  }

  .summary {
    font-size: 0.82rem;
  }

  .source-links {
    grid-column: 2;
  }
}

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

  .pulse,
  .ticker-track {
    animation: none;
  }

  .ticker-track {
    flex-wrap: wrap;
  }
}
