@font-face {
  font-family: "Charter Garamond";
  src: url("assets/fonts/EBGaramond-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Charter Garamond";
  src: url("assets/fonts/EBGaramond-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
.charter-reader {
  padding: 0;
  overflow: hidden;
  background: #181a17;
  color: #e9e6dc;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
}
.charter-reader[open] {
  display: grid;
  animation: reader-in .55s var(--ease) both;
}
.reader-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 90px;
  padding: 17px clamp(22px, 4vw, 64px);
  background: #181a17;
  border-bottom: 1px solid #ffffff13;
}
.reader-identity,
.reader-actions {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
}
.reader-identity { min-width: 0; }
.reader-actions { flex-shrink: 0; }
.download-short { display: none; }
.reader-identity .wordmark {
  font-size: 23px;
  color: #e9e6dc;
}
.reader-identity h1 {
  font: 400 13px var(--sans);
  color: #b6b7ad;
}
.reader-download {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  min-height: 44px;
  white-space: nowrap;
}
.reader-download:hover { color: #fff; }
.reader-download .ui-icon { transition: transform .25s ease; }
.reader-download:hover .ui-icon { transform: translateY(3px); }
.reader-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff25;
  border-radius: 50%;
  font: 300 27px/1 var(--sans);
  transition: background .25s ease;
}
.reader-close:hover { background: #ffffff0d; }
.reader-pages {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #64665e #181a17;
  padding: 42px 0 60px;
}
.reader-pages:focus-visible { outline: 1px solid #ffffff40; outline-offset: -4px; }
.charter-pages {
  --sheet-width: min(820px, calc(100vw - 64px));
  position: relative;
  width: var(--sheet-width);
  margin: auto;
  display: grid;
  gap: 30px;
}
.charter-sheet {
  min-width: 0;
  position: relative;
  isolation: isolate;
  min-height: calc(var(--sheet-width) * 1.414);
  padding: clamp(30px, 8vw, 88px) clamp(28px, 8vw, 88px) 95px;
  background: #fdfcf9;
  color: #302d28;
  font: 400 calc(18.3px * var(--reading-scale, 1))/1.49 "Charter Garamond", Garamond, Georgia, serif;
  box-shadow: 0 12px 36px #00000024, 0 1px 2px #00000030, inset 0 0 0 1px #ffffff90;
}
.charter-sheet::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' filter='url(%23paper)' opacity='.7' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
.charter-sheet ::selection { background: #d9d1bd; color: #302d28; }
.letter-heading { position: relative; margin-bottom: 40px; }
.letter-release {
  padding: 10px 80px 0 0;
  font-size: .69em;
  font-weight: 600;
  letter-spacing: .14em;
}
.letter-head-seal { position: absolute; right: 0; top: -16px; width: 62px; height: auto; }
.letter-heading h2 {
  margin: 37px 0 0;
  font: 600 1.33em/1.3 "Charter Garamond", Garamond, Georgia, serif;
}
.letter-continuation { font-size: .8em; color: #777164; }
.letter-body p + p { margin-top: 1.05em; }
.letter-body, .letter-heading h2, .letter-signoff p { overflow-wrap: break-word; }
.letter-signoff {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 34px;
}
.letter-signature { display: block; width: min(225px, 100%); height: auto; mix-blend-mode: multiply; }
.letter-signoff > div { min-width: 0; flex: 1; }
.letter-signoff p { margin-top: 17px; font-size: .93em; }
.letter-seal { width: 124px; height: auto; flex: 0 0 auto; }
.letter-page-number { position: absolute; bottom: 38px; left: 50%; font-size: 12px; color: #8f887b; }
.reader-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 58px;
  min-height: 66px;
  border-top: 1px solid #ffffff13;
  background: #181a17;
}
.reader-pagination,
.reader-zoom-controls { display: flex; align-items: center; gap: 10px; }
.reader-controls button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; font-size: 19px; border-radius: 4px; }
.reader-controls button:hover:not(:disabled) { background: #ffffff0a; }
.reader-controls button:disabled { opacity: .25; cursor: default; }
.reader-controls output { min-width: 44px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .reader-toolbar { min-height: 78px; padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); gap: 12px; }
  .reader-identity h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .reader-identity .wordmark { font-size: 19px; }
  .reader-actions { gap: 12px; }
  .reader-download { gap: 9px; }
  .reader-close { width: 44px; height: 44px; }
  .reader-pages { padding: 18px 0 30px; }
  .charter-pages { --sheet-width: calc(100vw - 24px); gap: 18px; }
  .charter-sheet { min-height: 0; padding: 38px 27px 78px; font-size: calc(18px * var(--reading-scale, 1)); }
  .letter-release { padding-top: 8px; font-size: .64em; }
  .letter-head-seal { width: 49px; top: -6px; }
  .letter-heading { margin-bottom: 28px; }
  .letter-heading h2 { margin-top: 36px; font-size: 1.24em; }
  .letter-seal { width: 84px; }
  .letter-signoff { gap: 18px; }
  .letter-signature { width: 180px; max-width: 100%; }
  .reader-controls { min-height: 60px; padding-bottom: env(safe-area-inset-bottom); gap: clamp(8px, 4vw, 18px); }
  .reader-pagination, .reader-zoom-controls { gap: 4px; }
}
@media (max-width: 480px) {
  .download-label { display: none; }
  .download-short { display: inline; }
}
@media (max-height: 500px) {
  .reader-toolbar { min-height: 62px; padding-block: max(8px, env(safe-area-inset-top)); }
  .reader-controls { min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .reader-download .ui-icon { transition: none; }
}
