:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #516071;
  --line: #d8dee7;
  --paper: #ffffff;
  --soft: #f5f7fa;
  --accent: #245a70;
  --accent-strong: #173e4e;
  --warm: #b06a3c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

body.artifact-document {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px;
  overflow-wrap: anywhere;
}

.artifact-document h1 {
  font-size: 2rem;
  line-height: 1.2;
}

.artifact-document h2 {
  font-size: 1.5rem;
}

.artifact-document h3 {
  font-size: 1.2rem;
}

.artifact-document table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.artifact-document col {
  width: auto !important;
}

.artifact-document th,
.artifact-document td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.artifact-document th:first-child,
.artifact-document td:first-child {
  min-width: 10rem;
}

.artifact-document pre {
  overflow-x: auto;
  padding: 12px;
  background: var(--soft);
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

code {
  padding: 0.08rem 0.24rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  font-size: 0.92em;
}

.site-header {
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(
      0deg,
      rgba(36, 90, 112, 0.08) 0,
      rgba(36, 90, 112, 0.08) 1px,
      transparent 1px,
      transparent 38px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(176, 106, 60, 0.08) 0,
      rgba(176, 106, 60, 0.08) 1px,
      transparent 1px,
      transparent 38px
    );
  border-bottom: 1px solid var(--line);
}

.nav,
.hero,
.band,
.footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  color: var(--ink);
  text-decoration: none;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-variant: small-caps;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  flex-shrink: 0;
  font-size: 0.92rem;
}

.hero {
  min-height: 360px;
  display: grid;
  align-content: center;
  padding: 56px 0 72px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 20px;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.18rem;
}

.project-vision {
  max-width: 760px;
  color: var(--ink);
  font-size: 1.04rem;
}

.actions,
.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.project-summary {
  max-width: 860px;
  margin-top: 22px;
  color: var(--muted);
}

.project-summary li + li {
  margin-top: 10px;
}

.project-stats {
  max-width: 860px;
  margin-top: -2px;
  color: var(--ink);
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  color: #ffffff;
  background: var(--accent);
}

.button:focus-visible,
a:focus-visible,
input:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid rgba(36, 90, 112, 0.28);
  outline-offset: 3px;
}

.band {
  padding: 48px 0;
}

.band + .band {
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.section-heading h2.eyebrow {
  margin-bottom: 10px;
  font-size: 0.78rem;
  line-height: 1.55;
  letter-spacing: 0.08em;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

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

.more-link {
  margin-top: 22px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.paper-table-wrap {
  max-height: min(72vh, 52rem);
  overflow: auto;
  scrollbar-gutter: stable;
  scroll-padding-top: 6rem;
}

.paper-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px var(--line);
}

.paper-search {
  margin-bottom: 18px;
}

.paper-search:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.paper-search label {
  font-weight: 600;
}

.search-controls {
  display: flex;
  gap: 10px;
  flex: 1 1 300px;
  min-width: 0;
}

.search-controls input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
}

.search-controls button {
  cursor: pointer;
  font: inherit;
  background: var(--paper);
}

#paper-search-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.library-table {
  table-layout: fixed;
  min-width: 760px;
}

.library-table th:nth-child(1),
.library-table td:nth-child(1) {
  width: 24%;
}

.library-table th:nth-child(2),
.library-table td:nth-child(2) {
  width: 62%;
  overflow-wrap: anywhere;
}

.library-table th:nth-child(3),
.library-table td:nth-child(3) {
  width: 14%;
  white-space: nowrap;
}

.paper-table {
  table-layout: fixed;
  min-width: 920px;
}

.paper-table .paper-col {
  width: 32%;
}

.paper-table .status-col {
  width: 13%;
}

.paper-table .loc-col {
  width: 8%;
}

.paper-table .note-col {
  width: 37%;
}

.paper-table .human-col {
  width: 10%;
}

.status-table th,
.status-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

.status-table th {
  color: var(--accent-strong);
  background: #eef4f6;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
}

.status-table tr:last-child td {
  border-bottom: 0;
}

.status-table td a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.status-table td a:hover {
  color: var(--accent-strong);
}

.status-table cite {
  color: inherit;
  font-style: italic;
}

.artifact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}

.artifact-links a {
  white-space: normal;
}

.paper-note {
  margin: 8px 0 0;
}

.paper-table td:nth-child(1),
.paper-table td:nth-child(5) {
  overflow-wrap: anywhere;
}

.paper-table th:nth-child(4),
.paper-table th:nth-child(5),
.paper-table td:nth-child(3),
.paper-table td:nth-child(4),
.paper-table td:nth-child(5) {
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.contact {
  background: var(--soft);
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100% - 1120px) / 2));
  padding-right: max(20px, calc((100% - 1120px) / 2));
}

.contact .section-heading,
.contact p {
  max-width: 780px;
}

.footer {
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .hero {
    min-height: 0;
    padding: 48px 0 64px;
  }
}

@media print {
  .table-wrap {
    max-height: none;
    overflow: visible;
  }

  .status-table {
    min-width: 0;
  }

  .paper-table-wrap thead th {
    position: static;
  }

  .paper-search:not([hidden]) {
    display: none;
  }

  .paper-table tbody tr[hidden] {
    display: table-row;
  }
}
