:root {
  --paper: #f6f5f1;
  --paper-deep: #efede7;
  --ink: #171816;
  --muted: #62645f;
  --faint: #8a8c86;
  --rule: #cfcec8;
  --rule-strong: #a9aaa4;
  --accent: #d94f12;
  --accent-dark: #a9370a;
  --active: #247329;
  --research: #17678b;
  --paused: #b24716;
  --archived: #737570;
  --content-max: 1240px;
  --sans: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
}

a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.mono {
  font-family: var(--mono);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-180%);
}

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

.site-header {
  position: relative;
  z-index: 20;
  min-height: 68px;
  padding: 0 30px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: stretch;
  background: rgba(246, 245, 241, 0.96);
}

.site-brand,
.site-contact,
.site-nav a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-brand {
  width: max-content;
  font-size: 1.22rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.site-contact {
  justify-self: end;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  gap: 34px;
}

.site-nav a {
  position: relative;
  padding: 0 2px;
  font-size: 0.98rem;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--accent);
}

.catalog-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.catalog-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 68px);
  padding: 48px 30px 40px;
  border-right: 1px dotted var(--rule);
  overflow-y: auto;
  scrollbar-width: thin;
}

.rail-kicker,
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.rail-meta {
  margin: 34px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rail-meta div + div {
  margin-top: 0.8rem;
}

.rail-meta dt,
.rail-meta dd {
  margin: 0;
}

.rail-meta dd {
  margin-top: 0.24rem;
  color: var(--ink);
}

.rail-domains {
  margin-top: 48px;
}

.rail-domains > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rail-domains ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-domains li {
  display: grid;
  grid-template-columns: 43px 1fr;
  min-height: 40px;
  align-items: center;
  font-size: 0.82rem;
}

.rail-domains li span {
  font-family: var(--mono);
}

.rail-domains li[aria-current="true"] {
  color: var(--accent-dark);
  font-weight: 650;
}

.rail-process {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 28px;
  mix-blend-mode: multiply;
}

.page-main {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 70px 48px 86px;
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 720px) auto;
  justify-content: space-between;
  gap: 50px;
}

.page-intro h1,
.home-intro h1,
.record-header h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  font-weight: 560;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.compendium-main .page-intro h1 {
  font-size: clamp(2.7rem, 4.1vw, 3.75rem);
}

.page-intro .eyebrow,
.home-intro .eyebrow {
  margin-bottom: 18px;
}

.lede {
  max-width: 720px;
  margin: 28px 0 0;
  color: #353733;
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.catalog-number {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.045em;
  line-height: 1.8;
  text-transform: uppercase;
  white-space: nowrap;
}

.compendium-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(4, minmax(126px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 40px 0 0;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--rule-strong);
}

.compendium-controls label {
  display: block;
}

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

.compendium-controls input,
.compendium-controls select {
  width: 100%;
  height: 54px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  padding: 0 15px;
}

.compendium-controls input::placeholder {
  color: var(--faint);
}

.project-count {
  min-width: 90px;
  padding: 0 0 15px 14px;
  color: var(--research);
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: nowrap;
}

.project-table-heading,
.project-row {
  display: grid;
  grid-template-columns:
    64px minmax(280px, 1fr) 75px 105px
    85px 55px 92px;
  column-gap: 12px;
  align-items: center;
}

.project-table-heading {
  min-width: 850px;
  min-height: 58px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.project-list {
  min-width: 850px;
}

.project-row {
  position: relative;
  min-height: 81px;
  border-top: 1px solid var(--rule);
}

.project-row:last-child {
  border-bottom: 1px solid var(--rule);
}

.project-row:hover {
  background: var(--paper-deep);
}

.project-index,
.project-domain,
.project-year {
  font-size: 0.78rem;
}

.project-index {
  color: var(--ink);
}

.project-identity {
  min-width: 0;
  padding: 13px 0;
}

.project-identity h2 {
  display: inline;
  margin: 0;
  font-size: 1rem;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.project-identity h2 a {
  text-decoration: none;
}

.project-identity h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-identity p {
  display: inline;
  margin: 0 0 0 0.38em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-style: italic;
}

.project-domain span {
  display: inline-block;
}

.project-domain small {
  display: none;
}

.project-type,
.project-status {
  font-size: 0.82rem;
}

.status {
  font-size: 0.78rem;
  font-weight: 620;
}

.status--active {
  color: var(--active);
}

.status--research {
  color: var(--research);
}

.status--shipped {
  color: var(--research);
}

.status--paused {
  color: var(--paused);
}

.status--archived {
  color: var(--archived);
}

.project-year {
  color: var(--muted);
}

.project-open {
  position: relative;
  z-index: 2;
  justify-self: end;
  color: var(--accent-dark);
  font-size: 0.8rem;
  text-decoration: underline;
  text-decoration-color: transparent;
}

.project-open:hover {
  text-decoration-color: currentColor;
}

.empty-state {
  margin-top: 28px;
  padding: 42px;
  border: 1px solid var(--rule);
  text-align: center;
}

.empty-state p {
  margin: 0 0 16px;
}

.empty-state button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-dark);
  text-decoration: underline;
  cursor: pointer;
}

.home-main {
  padding-top: 80px;
}

.home-intro {
  max-width: 1000px;
  padding-bottom: 84px;
}

.home-intro h1 {
  max-width: 930px;
  font-size: clamp(3.1rem, 6.5vw, 6.3rem);
  line-height: 0.98;
}

.home-intro .lede {
  max-width: 760px;
}

.home-actions {
  display: flex;
  gap: 28px;
  margin-top: 34px;
  align-items: center;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 650;
}

.quiet-link {
  color: var(--muted);
}

.featured-work {
  padding-top: 46px;
  border-top: 1px solid var(--rule-strong);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 440px);
  gap: 60px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 560;
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0 0 6px;
  color: var(--muted);
}

.project-list--featured {
  min-width: 0;
}

.project-row--featured {
  grid-template-columns: 78px minmax(360px, 1fr) 110px 130px;
  min-height: 132px;
}

.project-row--featured .project-type,
.project-row--featured .project-status,
.project-row--featured .project-year {
  display: none;
}

.project-row--featured .project-domain small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
}

.project-row--featured .project-identity h2 {
  display: block;
  font-size: 1.25rem;
}

.project-row--featured .project-identity p {
  display: block;
  max-width: 660px;
  margin: 8px 0 0;
  font-family: var(--sans);
  font-size: 0.96rem;
  font-style: normal;
  line-height: 1.5;
}

.home-thesis {
  display: grid;
  grid-template-columns: 180px minmax(0, 700px);
  gap: 60px;
  margin-top: 88px;
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}

.home-thesis > p:last-child {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.55;
}

.record-main {
  max-width: 1240px;
}

.article-breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 58px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-breadcrumb a {
  color: var(--accent-dark);
  text-decoration-color: transparent;
}

.article-header {
  max-width: 960px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule-strong);
}

.article-header h1 {
  margin-top: 18px;
  max-width: 940px;
  font-size: clamp(3rem, 6vw, 5.6rem);
  font-weight: 560;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.article-deck {
  max-width: 820px;
  margin: 30px 0 0;
  color: #343632;
  font-size: clamp(1.2rem, 2vw, 1.48rem);
  line-height: 1.55;
}

.article-edition {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.article-frame {
  display: grid;
  grid-template-columns: minmax(0, 730px) minmax(240px, 292px);
  gap: clamp(48px, 7vw, 96px);
  align-items: start;
  margin-top: 44px;
}

.article-content {
  min-width: 0;
}

.article-lead {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--rule);
}

.article-lead p {
  margin: 0;
  color: #242622;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.19rem;
  line-height: 1.78;
}

.article-lead p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.09em 0 0;
  color: var(--accent-dark);
  font-family: var(--sans);
  font-size: 3.55em;
  font-weight: 590;
  line-height: 0.78;
}

.article-lead p + p {
  margin-top: 18px;
}

.article-lead strong {
  font-family: var(--sans);
  font-size: 0.86em;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.article-contents {
  margin: 38px 0 12px;
  padding: 24px 26px 20px;
  border: 1px solid var(--rule);
  background: rgba(239, 237, 231, 0.45);
}

.article-contents > p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-contents ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-contents a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.84rem;
  line-height: 1.4;
  text-decoration-color: transparent;
}

.article-contents a:hover {
  text-decoration-color: var(--accent);
}

.article-contents a span {
  color: var(--accent-dark);
  font-size: 0.68rem;
}

.article-section {
  padding: 56px 0 52px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 24px;
}

.article-section h2 {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: baseline;
  margin: 0 0 22px;
  font-size: clamp(1.45rem, 2.2vw, 1.86rem);
  font-weight: 610;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.article-section-number {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.article-section > p {
  margin: 0;
  color: #32342f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.055rem;
  line-height: 1.82;
}

.article-section > p + p {
  margin-top: 18px;
}

.article-infobox {
  position: sticky;
  top: 24px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
}

.article-infobox-title {
  padding: 22px 20px 20px;
  border-bottom: 4px solid var(--accent);
  background: var(--paper-deep);
}

.article-infobox-title p,
.article-infobox-links p {
  margin: 0;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.article-infobox-title h2 {
  margin: 8px 0 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.article-infobox dl {
  margin: 0;
}

.article-infobox dl div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.75rem;
  line-height: 1.45;
}

.article-infobox dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.article-infobox dd {
  margin: 0;
}

.article-infobox-links {
  padding: 18px 16px 20px;
}

.article-infobox-links a {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
}

.related-records {
  display: grid;
  grid-template-columns: minmax(190px, 0.5fr) minmax(0, 1.5fr);
  gap: 54px;
  margin-top: 86px;
  padding-top: 42px;
  border-top: 1px solid var(--rule-strong);
}

.related-records h2 {
  margin: 9px 0 0;
  font-size: 1.6rem;
  font-weight: 590;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.related-record-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.related-record-list a {
  display: flex;
  min-height: 178px;
  padding: 18px;
  border: 1px solid var(--rule);
  flex-direction: column;
  text-decoration: none;
}

.related-record-list a:hover {
  border-color: var(--accent);
  background: var(--paper-deep);
}

.related-record-list span {
  color: var(--accent-dark);
  font-size: 0.66rem;
}

.related-record-list strong {
  margin-top: 22px;
  font-size: 1rem;
  line-height: 1.25;
}

.related-record-list small {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.record-pagination {
  margin-top: 38px;
  text-align: right;
}

.page-intro--single {
  display: block;
  max-width: 850px;
}

.prose-stack {
  max-width: 760px;
  margin-top: 70px;
}

.prose-stack section {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 44px;
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}

.prose-stack h2 {
  margin: 0;
  font-size: 1rem;
}

.prose-stack p {
  margin: 0;
  color: #393b36;
  font-size: 1.03rem;
  line-height: 1.75;
}

.empty-ledger {
  max-width: 760px;
  margin-top: 66px;
  padding: 38px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
}

.empty-ledger > span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.empty-ledger p {
  margin: 14px 0 20px;
  font-size: 1.2rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1180px) {
  .compendium-main {
    overflow-x: auto;
  }

  .compendium-controls {
    min-width: 1010px;
  }
}

@media (max-width: 840px) {
  .site-header {
    min-height: auto;
    padding: 18px 20px 0;
    grid-template-columns: 1fr auto;
  }

  .site-brand {
    align-self: center;
  }

  .site-contact {
    align-self: center;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    order: 3;
    gap: 24px;
    margin-top: 12px;
    overflow-x: auto;
  }

  .site-nav a {
    min-height: 42px;
    white-space: nowrap;
  }

  .catalog-shell {
    display: block;
  }

  .catalog-rail {
    display: none;
  }

  .page-main {
    padding: 48px 22px 68px;
  }

  .page-intro {
    display: block;
  }

  .catalog-number {
    margin-top: 24px;
  }

  .compendium-main {
    overflow: visible;
  }

  .compendium-controls {
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }

  .search-control {
    grid-column: 1 / -1;
  }

  .project-count {
    align-self: center;
    padding: 0;
  }

  .project-table-heading {
    display: none;
  }

  .project-list {
    min-width: 0;
    margin-top: 28px;
  }

  .project-row,
  .project-row--featured {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px 12px;
    min-height: auto;
    padding: 22px 0;
  }

  .project-index {
    grid-row: 1 / 4;
    align-self: start;
    padding-top: 3px;
  }

  .project-identity {
    padding: 0;
  }

  .project-identity h2,
  .project-row--featured .project-identity h2 {
    font-size: 1.08rem;
  }

  .project-identity p,
  .project-row--featured .project-identity p {
    display: block;
    margin: 7px 0 0;
    font-family: var(--sans);
    font-size: 0.88rem;
    font-style: normal;
    line-height: 1.5;
  }

  .project-domain {
    grid-column: 2;
    color: var(--muted);
  }

  .project-domain small {
    display: inline;
    margin-left: 8px;
    font-family: var(--sans);
  }

  .project-type,
  .project-status,
  .project-year {
    display: none;
  }

  .project-open {
    grid-column: 3;
    grid-row: 1 / 4;
    align-self: center;
  }

  .home-intro {
    padding-bottom: 62px;
  }

  .home-intro h1 {
    font-size: clamp(3rem, 14vw, 5.4rem);
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 18px;
  }

  .home-thesis {
    display: block;
  }

  .home-thesis > p:last-child {
    margin-top: 18px;
  }

  .article-breadcrumb {
    margin-bottom: 38px;
  }

  .article-header h1 {
    font-size: clamp(3rem, 13vw, 4.8rem);
  }

  .article-frame {
    display: flex;
    gap: 0;
    margin-top: 34px;
    flex-direction: column;
  }

  .article-infobox {
    position: static;
    order: -1;
    margin-bottom: 38px;
  }

  .article-infobox dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .article-infobox dl div {
    grid-template-columns: 86px 1fr;
  }

  .article-contents ol {
    grid-template-columns: 1fr;
  }

  .related-records {
    display: block;
    margin-top: 62px;
  }

  .related-record-list {
    margin-top: 26px;
  }

  .prose-stack section {
    display: block;
  }

  .prose-stack p {
    margin-top: 14px;
  }

  .site-footer {
    display: block;
    padding: 30px 22px;
  }

  .site-footer p + p {
    margin-top: 10px;
  }
}

@media (max-width: 540px) {
  .site-brand {
    font-size: 1.08rem;
  }

  .site-contact {
    font-size: 0.86rem;
  }

  .site-nav {
    gap: 20px;
  }

  .page-intro h1,
  .article-header h1 {
    font-size: 2.75rem;
  }

  .project-count {
    grid-column: 1 / -1;
    padding-top: 8px;
  }

  .project-row,
  .project-row--featured {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .project-open {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
  }

  .home-actions {
    display: grid;
  }

  .article-edition {
    display: grid;
  }

  .article-infobox dl {
    display: block;
  }

  .article-lead p {
    font-size: 1.08rem;
  }

  .article-section h2 {
    grid-template-columns: 34px 1fr;
    gap: 8px;
  }

  .article-section > p {
    font-size: 1rem;
  }

  .related-record-list {
    grid-template-columns: 1fr;
  }
}

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