:root {
  color-scheme: light;
  --paper: oklch(96.8% 0.008 120);
  --surface: oklch(93.8% 0.012 118);
  --ink: oklch(20% 0.012 155);
  --muted: oklch(47% 0.018 145);
  --line: oklch(80% 0.014 125);
  --red: oklch(57% 0.18 33);
  --green: oklch(43% 0.07 145);
  --focus: oklch(55% 0.17 245);
  --content: 1180px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--sans);
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.site-header,
.site-footer,
main {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  display: block;
}

.header-meta {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 650;
  text-transform: uppercase;
}

.intro {
  min-height: clamp(310px, 48vh, 510px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 48px;
  align-items: end;
  padding: clamp(64px, 10vh, 124px) 0 42px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-number {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 810px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 7vw, 6.9rem);
  font-weight: 500;
  line-height: 0.96;
}

.title-line {
  display: block;
}

.intro-note {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.issue-mark {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background: var(--ink);
  color: var(--paper);
}

.issue-mark > span {
  font-family: var(--serif);
  font-size: 4.5rem;
  line-height: 0.8;
}

.issue-mark small {
  align-self: flex-end;
  color: oklch(83% 0.07 65);
  font-size: 0.67rem;
  line-height: 1.45;
  text-align: right;
}

.directory {
  padding: 52px 0 70px;
}

.directory-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 36px;
  align-items: end;
}

.directory-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 500;
}

.section-number {
  margin-bottom: 8px;
}

.search-field {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--ink);
}

.search-symbol {
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-field:focus-within {
  box-shadow: 0 2px 0 var(--focus);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  min-height: 44px;
  margin-top: 34px;
  border-bottom: 1px solid var(--line);
}

.category-list:empty {
  display: none;
}

.category-button {
  position: relative;
  min-height: 43px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 650;
}

.category-button[aria-pressed="true"] {
  color: var(--ink);
}

.category-button[aria-pressed="true"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--red);
  content: "";
}

.category-button:focus-visible,
.link-row:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.link-list {
  margin-top: 12px;
}

.link-row {
  display: grid;
  grid-template-columns: 52px 140px minmax(0, 1fr) 190px 24px;
  gap: 20px;
  align-items: center;
  min-height: 112px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.link-row:hover {
  background: var(--surface);
  transform: translateX(4px);
}

.link-index,
.link-category,
.link-host {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.link-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
}

.link-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.link-arrow {
  color: var(--red);
  font-size: 1.15rem;
}

.empty-state {
  min-height: 250px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.empty-state[hidden] {
  display: none;
}

.empty-number {
  color: var(--line);
  font-family: var(--serif);
  font-size: 6rem;
  line-height: 1;
}

.empty-state h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.empty-state p {
  margin: 10px 0 0;
  color: var(--muted);
}

.site-footer {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 650;
}

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

@media (max-width: 760px) {
  .site-header,
  .site-footer,
  main {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-header {
    min-height: 66px;
  }

  .header-meta span:last-child {
    display: none;
  }

  .intro {
    min-height: 430px;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 18px;
    padding: 54px 0 28px;
  }

  h1 {
    font-size: clamp(2.75rem, 15vw, 4.8rem);
  }

  .issue-mark {
    padding: 10px;
  }

  .issue-mark > span {
    font-size: 2.3rem;
  }

  .directory {
    padding: 38px 0 52px;
  }

  .directory-heading {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .link-row {
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    gap: 12px;
    min-height: 126px;
    padding: 16px 0;
  }

  .link-category,
  .link-host {
    grid-column: 2;
  }

  .link-main {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .link-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .link-category,
  .link-host {
    display: none;
  }

  .empty-state {
    min-height: 230px;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 16px;
  }

  .empty-number {
    font-size: 4rem;
  }

  .empty-state h3 {
    font-size: 1.6rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }
}

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

  .link-row {
    transition: none;
  }
}
