@font-face {
  font-family: "Cinzel";
  src: url("/assets/fonts/cinzel-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pinyon Script";
  src: url("/assets/fonts/pinyon-script-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #F4EFE6;
  --plum: #371618;
  --gold: #C8A273;
  --quiet-ink: #7B6060;
  --pale-gold: #DECBB2;
  background: var(--paper);
  color: var(--plum);
  font-family: "Source Sans 3", sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-width: 240px; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: var(--pale-gold); color: var(--plum); }

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 6px;
}

.page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  height: 100vh;
  height: 100svh;
  min-height: 100svh;
  padding: 14px 16px clamp(16px, 2.4svh, 26px);
}

.identity {
  position: relative;
  z-index: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 119px;
  text-align: center;
  view-transition-name: sansinena-identity;
}

.identity-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-decoration: none;
}

.emblem {
  display: block;
  width: 119px;
  height: auto;
  margin-bottom: 3px;
}

.wordmark {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .02em;
  text-indent: .02em;
}

.scene {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  margin: 0;
  pointer-events: none;
}

.scene__artwork {
  position: relative;
  width: min(100%, 177.7778vh, 1680px);
  width: min(100%, 177.7778svh, 1680px);
  aspect-ratio: 16 / 9;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
}

.scene__still,
.scene__film {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.scene__still {
  position: relative;
  color: var(--quiet-ink);
  font-size: 13px;
}

.painting-pending .scene__still,
.scene--revealing .scene__still { opacity: 0; }

.scene__film {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.scene--frame-visible .scene__film { opacity: 1; }

.footer {
  position: relative;
  z-index: 1;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1120px;
  gap: 4px clamp(12px, 2vw, 28px);
}

.contact {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 12px 8px;
  border: 0;
  background: transparent;
  color: var(--quiet-ink);
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .065em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: normal;
  transition: color 180ms ease;
}

.contact::after {
  position: absolute;
  content: "";
  right: 8px;
  bottom: 5px;
  left: 8px;
  height: 1px;
  background: var(--gold);
  opacity: 0;
  transform: scaleX(.7);
  transition: opacity 180ms ease, transform 180ms ease;
}

.contact:hover,
.contact[aria-current="page"] { color: var(--plum); }
.contact:hover::after,
.contact[aria-current="page"]::after { opacity: 1; transform: scaleX(1); }

@media (max-width: 900px) {
  .footer-nav { max-width: 680px; }
  .contact { font-size: 11px; }
  .contact--ombudsman { text-wrap: balance; }
  .contact--ombudsman .menu-subline { display: inline; }
}

@media (max-width: 600px) {
  .page { padding: 14px 12px max(20px, env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .footer-nav { gap: 2px 10px; }
  .contact { font-size: 10px; }
}

@media (max-height: 480px) {
  .page { padding-top: 10px; padding-bottom: 10px; }
  .identity, .emblem { width: 88px; }
  .wordmark { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .page { height: auto; min-height: 0; gap: 28px; padding: 24px; }
  .scene { position: relative; grid-row: 2; }
  .scene__artwork { width: 100%; max-width: 720px; -webkit-mask-image: none; mask-image: none; }
  .scene__film { display: none !important; }
  .scene__still { opacity: 1 !important; }
}


/* Interior pages: institutional correspondence in a shared editorial grid. */
.page--interior {
  height: auto;
  grid-template-rows: auto 1fr auto;
  padding: 14px clamp(24px, 5vw, 80px) max(24px, env(safe-area-inset-bottom));
}

.interior {
  --editorial-columns: minmax(220px, .78fr) minmax(0, 1.22fr);
  --editorial-gap: clamp(48px, 7vw, 104px);
  grid-row: 2;
  align-self: start;
  width: 100%;
  max-width: 1080px;
  padding-block: 88px 80px;
  text-align: left;
}

.editorial-grid,
.editorial-section {
  display: grid;
  grid-template-columns: var(--editorial-columns);
  column-gap: var(--editorial-gap);
  align-items: start;
}

.editorial-grid { row-gap: 48px; }
.editorial-heading { min-width: 0; }

.interior-title {
  margin: 0;
  color: var(--plum);
  font-family: "Cinzel", serif;
  font-size: clamp(36px, 3.75vw, 48px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: .02em;
}

.interior-title--long { font-size: clamp(32px, 3.25vw, 42px); }

.editorial-copy {
  min-width: 0;
  max-width: 52ch;
  color: var(--plum);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  text-wrap: pretty;
}

.editorial-copy p { margin: 0; }
.editorial-copy p + p { margin-top: 28px; }
.editorial-copy .editorial-lead {
  max-width: 42ch;
  color: var(--quiet-ink);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.65;
}
.ethos-statement .editorial-lead { font-size: 22px; }

.ethos-artwork {
  width: min(100%, 280px);
  aspect-ratio: 4 / 3;
  margin: 32px 0 0;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 73%);
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 73%);
}

.ethos-artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 26% 54%;
}

.page--governance .editorial-copy { max-width: 52ch; }
.page--governance .editorial-section .copy-paragraph { text-wrap: pretty; }

.editorial-section {
  grid-column: 1 / -1;
  width: 100%;
}

.editorial-label {
  margin: 3px 0 0;
  max-width: 28ch;
  color: var(--plum);
  font-family: "Cinzel", serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.editorial-section--conduct {
  margin-top: 4px;
  padding-top: 40px;
  border-top: 1px solid var(--pale-gold);
}

.editorial-copy a {
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 180ms ease;
}

.editorial-copy a:hover { text-decoration-color: var(--plum); }

.contact-channel { margin-top: 40px; }
.contact-channel + .contact-context { margin-top: 28px; }
.editorial-copy .channel-label {
  margin: 0 0 8px;
  color: var(--quiet-ink);
  font-family: "Cinzel", serif;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .12em;
}

.interior-email {
  display: inline-block;
  min-height: 44px;
  max-width: 100%;
  padding-block: 6px;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.page--contact .interior-email { font-size: clamp(20px, 2.1vw, 28px); }
.page--contact .contact-channel { margin-top: 40px; }
.page--contact .contact-context { max-width: 45ch; color: var(--quiet-ink); }

.copy-paragraph + .interior-email { margin-top: 28px; }
.editorial-copy .editorial-note {
  max-width: 100%;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--pale-gold);
  color: var(--quiet-ink);
  font-size: 16px;
  line-height: 1.625;
}

.page--interior .footer { width: 100%; }

@view-transition { navigation: auto; }
@keyframes page-fade-out { to { opacity: 0; } }
@keyframes page-fade-in { from { opacity: 0; } }
::view-transition-old(root) { animation: page-fade-out 180ms ease-out both; }
::view-transition-new(root) { animation: page-fade-in 220ms ease-out both; }
::view-transition-group(sansinena-identity),
::view-transition-old(sansinena-identity),
::view-transition-new(sansinena-identity) { animation: none; }

.page-is-leaving .interior,
.page-is-leaving .scene,
.page-is-leaving .archive-cover { opacity: 0; transition: opacity 180ms ease-out; }
.page-fade-arrival .interior,
.page-fade-arrival .scene,
.page-fade-arrival .archive-cover { animation: page-fade-in 220ms ease-out both; }

@media (max-width: 900px) {
  .interior { --editorial-columns: minmax(0, 1fr); max-width: 620px; padding-block: 60px; }
  .editorial-grid { row-gap: 32px; }
  .editorial-section { row-gap: 14px; }
  .interior-title { font-size: clamp(32px, 5vw, 42px); }
  .interior-title--long { font-size: clamp(30px, 4.6vw, 38px); }
  .editorial-label { margin-top: 0; }
  .editorial-section--conduct { margin-top: 8px; padding-top: 36px; }
  .page--ethos .editorial-heading { display: contents; }
  .page--ethos .interior-title { order: 0; }
  .ethos-statement { order: 1; }
  .ethos-artwork { order: 2; margin-top: 0; }
  .editorial-section--conduct { order: 3; }
}

@media (max-width: 600px) {
  .interior { padding-block: 48px 56px; }
  .editorial-copy { font-size: 17px; line-height: 1.75; }
  .editorial-copy .editorial-lead { font-size: 19px; line-height: 1.65; }
  .ethos-statement .editorial-lead { font-size: 20px; }
  .editorial-label { font-size: 14px; }
  .contact-channel, .page--contact .contact-channel { margin-top: 28px; }
  .page--contact .editorial-copy .editorial-lead { font-size: 19px; }
  .ethos-artwork { width: min(100%, 240px); }
  .footer-nav { gap: 2px 12px; }
}

@media (max-height: 480px) {
  .page--interior { padding-top: 10px; }
  .interior { padding-block: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .page-is-leaving .interior, .page-is-leaving .scene, .page-is-leaving .archive-cover { opacity: 1; }
  .page-fade-arrival .interior, .page-fade-arrival .scene, .page-fade-arrival .archive-cover { animation: none; }
  .contact,
  .contact::after,
  .editorial-copy a { transition: none; }
}

@media print {
  .page--interior { padding: 24px; }
  .interior { padding-block: 24px; }
  .page--interior .footer { display: none; }
}

/* Archive cover: the pen writes once; paper and shadows move quietly behind it. */
.page--archive { height: auto; padding-inline: clamp(24px, 5vw, 80px); }
.archive-atmosphere { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.archive-atmosphere img, .archive-atmosphere video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.archive-atmosphere video { opacity: 0; transition: opacity 220ms ease; }
.archive-atmosphere video.is-playing { opacity: 1; }
.archive-cover { grid-row: 2; align-self: center; width: 100%; max-width: 680px; padding-block: 56px 64px; text-align: center; }
.archive-title { margin: 0; font-weight: 400; }
.archive-title__name { display: block; color: var(--plum); font-family: "Cinzel", serif; font-size: clamp(36px, 5.5vw, 76px); line-height: 1.2; letter-spacing: .075em; text-indent: .075em; text-shadow: 1px 1px 0 rgba(255,255,255,.7), -1px -1px 0 rgba(55,22,24,.12); }
.archive-title__script { position: relative; display: block; margin-top: -4px; color: var(--plum); font-family: "Pinyon Script", cursive; font-size: clamp(76px, 8.8vw, 124px); line-height: 1.2; }
.archive-handwriting { display: none; position: absolute; top: 50%; left: 50%; width: 2.85498046875em; height: 1.24755859375em; overflow: visible; transform: translate(-50%, -50%); pointer-events: none; }
.archive-title__script.has-handwriting .archive-handwriting { display: block; }
.archive-title__script.has-handwriting .archive-title__text { opacity: 0; }
.archive-handwriting .ink-stroke { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.archive-title__script.is-written .ink-stroke { stroke-dashoffset: 0; opacity: 1; }
.archive-title__script.is-written .archive-handwriting [data-letter] { mask: none; }
.archive-introduction { margin: 32px 0 24px; color: var(--quiet-ink); font-size: 17px; line-height: 1.6; }
.archive-access { width: min(100%, 330px); margin: 0 auto; text-align: left; }
.archive-access label { display: block; margin-bottom: 8px; color: var(--quiet-ink); font-family: "Cinzel", serif; font-size: 11px; letter-spacing: .1em; }
.archive-access__entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--gold); }
.archive-access input { width: 100%; min-width: 0; min-height: 48px; padding: 8px 4px; border: 0; border-radius: 0; background: transparent; color: var(--plum); font-family: "Source Sans 3", sans-serif; font-size: 18px; }
.archive-access button { min-width: 64px; min-height: 48px; padding: 8px 10px; border: 0; background: transparent; color: var(--plum); font-family: "Cinzel", serif; font-size: 12px; cursor: pointer; }
.archive-access button:hover { color: var(--quiet-ink); }
.archive-feedback { max-width: 360px; margin: 16px auto 0; color: var(--plum); font-size: 16px; line-height: 1.5; }
.archive-access button:disabled { cursor: wait; color: var(--quiet-ink); }
.page--archive .footer { width: 100%; }

@media (max-width: 600px) {
  .footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(54px, auto); align-items: stretch; gap: 2px 10px; }
  .contact { min-width: 0; padding-inline: 6px; font-size: 10px; text-wrap: balance; }
  .archive-cover { padding-block: 48px; }
  .archive-title__name { font-size: clamp(31px, 7.7vw, 42px); letter-spacing: .055em; text-indent: .055em; }
  .archive-title__script { font-size: 82px; }
  .archive-introduction { font-size: 16px; }
  .archive-atmosphere img, .archive-atmosphere video { object-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .archive-atmosphere video { display: none !important; }
  .archive-handwriting { display: none !important; }
  .archive-title__text { opacity: 1 !important; }
}

@media print {
  .archive-atmosphere video, .archive-access { display: none !important; }
  .archive-handwriting { display: none !important; }
  .archive-title__text { opacity: 1 !important; }
}

/* The authenticated collection reads as a document catalogue. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.archive-library__heading {
  display: grid;
  grid-template-columns: var(--editorial-columns);
  column-gap: var(--editorial-gap);
  row-gap: 24px;
  align-items: start;
}

.archive-library__intro {
  max-width: 42ch;
  margin: 0;
  color: var(--quiet-ink);
  font-size: 21px;
  line-height: 1.65;
}

.archive-library__count {
  margin: 56px 0 16px;
  color: var(--quiet-ink);
  font-family: "Cinzel", serif;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.archive-documents {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  font-size: 17px;
  line-height: 1.6;
}

.archive-documents thead th {
  padding: 16px 16px 16px 0;
  border-block: 1px solid var(--pale-gold);
  color: var(--quiet-ink);
  font-family: "Cinzel", serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.archive-documents thead th:first-child { width: 42%; }
.archive-documents thead th:nth-child(2) { width: 23%; }
.archive-documents thead th:nth-child(3) { width: 20%; }
.archive-documents thead th:last-child { width: 15%; }

.archive-documents tbody th,
.archive-documents td {
  padding: 24px 16px 24px 0;
  border-bottom: 1px solid var(--pale-gold);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.archive-documents tbody th { color: var(--plum); font-weight: 400; }
.archive-documents thead th:last-child,
.archive-documents td:last-child { padding-right: 0; }

.archive-document-download {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: -8px;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.archive-document-download:hover { text-decoration-color: var(--plum); }

.archive-empty {
  padding: 48px 0;
  border-block: 1px solid var(--pale-gold);
}

.archive-empty h2 {
  margin: 0;
  color: var(--plum);
  font-family: "Cinzel", serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.5;
}

.archive-empty p {
  max-width: 52ch;
  margin: 16px 0 0;
  color: var(--quiet-ink);
  font-size: 17px;
  line-height: 1.75;
}

.archive-signout { margin: 24px 0 0; text-align: right; }
.archive-signout button {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 0 10px 16px;
  border: 0;
  background: transparent;
  color: var(--plum);
  font-family: "Cinzel", serif;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .05em;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
  cursor: pointer;
}
.archive-signout button:hover { text-decoration-color: var(--plum); }

@media (max-width: 900px) {
  .archive-library__count { margin-top: 40px; }
}

@media (max-width: 600px) {
  .archive-library__intro { font-size: 19px; }
  .archive-library__count { margin-top: 32px; }
  .archive-empty { padding-block: 36px; }
  .archive-empty h2 { font-size: 19px; }
  .archive-documents { font-size: 17px; table-layout: auto; }
  .archive-documents thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .archive-documents tbody,
  .archive-documents tr,
  .archive-documents tbody th,
  .archive-documents td { display: block; width: 100%; }
  .archive-documents tr { padding-block: 24px; border-block-end: 1px solid var(--pale-gold); }
  .archive-documents tr:first-child { border-block-start: 1px solid var(--pale-gold); }
  .archive-documents tbody th,
  .archive-documents td { padding: 10px 0; border: 0; }
  .archive-documents tbody th { padding-top: 0; }
  .archive-documents tbody th::before,
  .archive-documents td::before {
    display: block;
    margin-bottom: 4px;
    content: attr(data-label);
    color: var(--quiet-ink);
    font-family: "Cinzel", serif;
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .archive-documents td:last-child { padding-bottom: 0; }
  .archive-document-download { margin-top: 0; }
}

@media print {
  .archive-signout { display: none; }
  .archive-document-download::after { content: " (download)"; }
}
