:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --paper-deep: #e8e0d4;
  --white: #fffdf9;
  --ink: #17211e;
  --muted: #66706b;
  --line: #cfc7ba;
  --green: #173d34;
  --green-light: #2c5a4e;
  --red: #a8432f;
  --gold: #b1833d;
  --blue: #b9d4dc;
  --shadow: 0 18px 48px rgb(28 38 34 / 14%);
  --content: 1240px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  min-height: 74px;
  padding: 0 max(24px, calc((100vw - var(--content)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
}

.brand small {
  margin-top: -2px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-header nav a {
  color: #39443f;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--red);
}

.site-header nav .login-link {
  min-height: 36px;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  color: var(--green);
  border: 1px solid #aebbb6;
  border-radius: 3px;
}

.site-header nav .login-link:hover,
.site-header nav .login-link:focus-visible {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

main {
  overflow: clip;
}

.profile-intro,
.archive-section,
.archive-note,
footer {
  padding-left: max(24px, calc((100vw - var(--content)) / 2));
  padding-right: max(24px, calc((100vw - var(--content)) / 2));
}

.profile-intro {
  min-height: 460px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.72fr);
  gap: clamp(44px, 8vw, 112px);
  align-items: stretch;
  background: var(--green);
  color: var(--white);
}

.profile-copy {
  align-self: center;
  max-width: 790px;
  padding: 66px 0 60px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-copy .eyebrow {
  color: #dfab86;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(43px, 5vw, 70px);
  line-height: 1.02;
}

.intro-text {
  max-width: 700px;
  margin: 24px 0 0;
  color: #dbe7e2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
}

.profile-portrait {
  position: relative;
  margin: 0;
  min-height: 420px;
  overflow: hidden;
  background: #29453d;
}

.profile-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 47% 50%;
}

.profile-portrait figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 16px 18px;
  background: rgb(18 35 30 / 88%);
  color: #d8e1dd;
  font-size: 11px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 27px;
}

.section-heading h2,
.archive-note h2 {
  margin: 0;
  font-size: clamp(31px, 3vw, 43px);
  line-height: 1.1;
}

.section-heading > p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

.record-card {
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.record-card:hover {
  border-color: #948c80;
  box-shadow: 0 11px 28px rgb(26 37 33 / 11%);
  transform: translateY(-2px);
}

.record-card:focus-visible,
.category-tab:focus-visible,
.dialog-close:focus-visible,
.empty-state button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #d8d3cb;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.record-card:hover .card-image img {
  transform: scale(1.018);
}

.duration {
  position: absolute;
  right: 9px;
  bottom: 9px;
  min-width: 46px;
  padding: 4px 7px;
  background: rgb(19 29 26 / 88%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.card-copy {
  flex: 1;
  padding: 18px 19px 20px;
  display: flex;
  flex-direction: column;
}

.card-kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.card-kicker > span {
  color: var(--red);
}

.card-copy > strong {
  margin-top: 11px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.24;
}

.card-summary {
  margin-top: 10px;
  display: -webkit-box;
  overflow: hidden;
  color: #58615d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-source {
  margin-top: auto;
  padding-top: 18px;
  color: #3e4944;
  font-size: 11px;
  font-weight: 700;
}

.archive-section {
  padding-top: 78px;
  padding-bottom: 92px;
  background: var(--paper);
}

.archive-heading {
  margin-bottom: 29px;
}

.archive-tools {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 190px;
  gap: 12px;
}

.search-field,
.select-field {
  min-width: 0;
  padding: 10px 13px 8px;
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
}

.search-field > span,
.select-field > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 30px;
  padding: 2px 0 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  outline: 0;
  font-size: 14px;
}

.search-field:focus-within,
.select-field:focus-within {
  border-color: var(--green-light);
  box-shadow: 0 0 0 2px rgb(44 90 78 / 13%);
}

.category-tabs {
  margin: 17px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.category-tab {
  min-height: 43px;
  padding: 0 18px;
  background: transparent;
  color: #59625e;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.category-tab span {
  margin-left: 6px;
  color: #8c938f;
  font-size: 10px;
}

.category-tab:hover,
.category-tab.active {
  color: var(--ink);
}

.category-tab.active {
  border-bottom-color: var(--red);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.archive-grid .record-card {
  min-height: 486px;
}

.empty-state {
  padding: 70px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
}

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

.empty-state button {
  padding: 9px 14px;
  background: var(--green);
  color: var(--white);
  border: 0;
  cursor: pointer;
}

.archive-note {
  padding-top: 70px;
  padding-bottom: 74px;
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1.75fr);
  gap: clamp(28px, 4vw, 60px);
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
}

.archive-note-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.archive-note-copy p {
  margin: 0;
  color: #4b5550;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.7;
}

footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--ink);
  color: #c9d2ce;
  font-size: 11px;
}

.record-dialog {
  width: min(1120px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  border: 0;
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.record-dialog::backdrop {
  background: rgb(13 25 21 / 78%);
}

.dialog-shell {
  position: relative;
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  overflow: auto;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  padding: 0 0 3px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
}

.dialog-media {
  min-height: 580px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #101815;
}

.dialog-media video,
.dialog-media .document-viewer {
  width: 100%;
  height: 100%;
  min-height: 580px;
  border: 0;
}

.image-viewer {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 40px);
  align-self: start;
  overflow: auto;
  background: #d7d7d4;
}

.image-viewer img {
  width: 100%;
  height: auto;
}

.audio-viewer,
.document-placeholder {
  width: min(520px, 86%);
  color: var(--white);
}

.audio-viewer img,
.document-placeholder img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  opacity: 0.62;
}

.audio-viewer > div,
.document-placeholder > div {
  padding: 18px 0;
}

.audio-viewer span,
.document-placeholder span {
  display: block;
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.audio-viewer audio {
  width: 100%;
}

.document-placeholder p {
  color: #b9c5c0;
}

.dialog-content {
  min-width: 0;
  padding: 74px 38px 38px;
  align-self: start;
}

.dialog-meta {
  margin: 0;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.dialog-content h2 {
  margin: 14px 0 0;
  font-size: clamp(29px, 3vw, 41px);
  line-height: 1.07;
}

.dialog-subtitle {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dialog-summary {
  margin: 23px 0 0;
  color: #4a544f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.68;
}

.tag-list {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 5px 8px;
  background: var(--paper);
  color: #4f5954;
  border: 1px solid #ded7cb;
  font-size: 10px;
  font-weight: 700;
}

.translation-panel {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.translation-heading {
  margin-bottom: 13px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.translation-heading .eyebrow {
  margin-bottom: 5px;
}

.translation-heading h3 {
  margin: 0;
  font-size: 15px;
}

.translation-languages {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
}

.translation-languages button {
  min-height: 32px;
  padding: 6px 9px;
  color: #59625e;
  background: var(--white);
  border: 0;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.translation-languages button + button {
  border-left: 1px solid var(--line);
}

.translation-languages button[aria-pressed="true"] {
  color: var(--white);
  background: var(--green);
}

.translation-panel pre {
  width: 100%;
  max-height: 270px;
  margin: 0;
  padding: 15px;
  overflow: auto;
  color: #37423d;
  background: #f3f5f4;
  border-left: 3px solid var(--green-bright);
  font: 12px/1.65 Inter, ui-sans-serif, system-ui, sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.source-files {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.source-translation {
  color: var(--green-bright) !important;
  font-weight: 800;
}

.source-files-heading {
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.source-files-heading h3 {
  margin: 0;
  font-size: 13px;
}

.source-files-heading span {
  color: var(--muted);
  font-size: 10px;
}

.source-file {
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #e7e1d8;
  text-decoration: none;
}

.source-file > span:first-child {
  min-width: 0;
}

.source-file strong,
.source-file small {
  display: block;
}

.source-file strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-file small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.source-action {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 960px) {
  .profile-intro {
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
    gap: 36px;
  }

  .profile-copy {
    padding: 54px 0;
  }

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

  .archive-tools {
    grid-template-columns: 1fr 150px 160px;
  }

  .dialog-shell {
    grid-template-columns: 1fr;
  }

  .dialog-media,
  .dialog-media video,
  .dialog-media .document-viewer {
    min-height: min(58vh, 600px);
  }

  .image-viewer {
    max-height: 58vh;
  }
}

@media (max-width: 700px) {
  .site-header {
    min-height: 66px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header nav {
    display: flex;
  }

  .site-header nav a:not(.login-link) {
    display: none;
  }

  .profile-intro,
  .archive-section,
  .archive-note,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .profile-intro {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .profile-copy {
    padding: 45px 0 39px;
  }

  h1 {
    font-size: 41px;
  }

  .intro-text {
    font-size: 16px;
  }

  .profile-portrait {
    min-height: 310px;
    margin-left: -18px;
    margin-right: -18px;
  }

  .profile-portrait img {
    object-position: 48% 49%;
  }

  .archive-section {
    padding-top: 55px;
    padding-bottom: 62px;
  }

  .section-heading {
    align-items: start;
  }

  .section-heading > p {
    display: none;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

  .archive-tools {
    grid-template-columns: 1fr 1fr;
  }

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

  .category-tabs {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .category-tab {
    flex: 0 0 auto;
  }

  .archive-grid .record-card {
    min-height: 0;
  }

  .archive-note {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .archive-note-copy {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  footer {
    min-height: 90px;
    align-items: start;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
  }

  .record-dialog {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .dialog-shell {
    max-height: 100vh;
  }

  .dialog-media,
  .dialog-media video,
  .dialog-media .document-viewer {
    min-height: 42vh;
    max-height: 48vh;
  }

  .image-viewer {
    max-height: 48vh;
  }

  .dialog-content {
    padding: 36px 22px 30px;
  }

  .translation-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .translation-languages {
    width: 100%;
  }

  .translation-languages button {
    flex: 1;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
