@font-face {
  font-family: "Telka Extended";
  src: url("/assets/fonts/telka-extended-medium.woff2") format("woff2"), url("/assets/fonts/telka-extended-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #737373;
  --line: #e9e9e9;
  --placeholder: #f0f0f0;
  --display: "Telka Extended", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; min-height: 100svh; }
body:has(dialog[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
[hidden] { display: none !important; }
.page-shell { width: min(1440px, calc(100% - 64px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 32px; }
.logo { display: block; width: 142px; height: auto; filter: brightness(0); }
.site-title { margin: 0; font: 400 12px/1.5 var(--mono); letter-spacing: .04em; }
.chapters { margin-top: 32px; }
.chapter { border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.chapter:last-child { border-bottom: 1px solid var(--line); }
.chapter-heading { margin: 0; }
.chapter-trigger { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; min-height: 76px; padding: 20px 0; border: 0; background: transparent; text-align: left; }
.chapter-title { color: var(--muted); font: 500 clamp(20px, 2.2vw, 30px)/1.2 var(--display); letter-spacing: -.04em; transition: color 160ms ease; }
.chapter-trigger:hover .chapter-title, .chapter-trigger[aria-expanded="true"] .chapter-title { color: var(--ink); }
.chapter-meta { display: flex; align-items: center; gap: 28px; flex-shrink: 0; color: var(--muted); }
.chapter-count { font: 11px/1.4 var(--mono); }
.chapter-toggle { width: 16px; height: 16px; position: relative; }
.chapter-toggle::before, .chapter-toggle::after { position: absolute; content: ""; background: currentColor; inset: 7px 1px auto; height: 1px; }
.chapter-toggle::after { transform: rotate(90deg); transition: transform 160ms ease; }
.chapter-trigger[aria-expanded="true"] .chapter-toggle::after { transform: rotate(0); }
.chapter-panel { padding-bottom: 24px; }
.slide { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--placeholder); }
.slide-label, .slide-number { position: absolute; bottom: clamp(16px, 2.2vw, 32px); color: #777; font: 11px/1.4 var(--mono); }
.slide-label { left: clamp(16px, 2.2vw, 32px); }
.slide-number { right: clamp(16px, 2.2vw, 32px); }
.slide-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 56px; padding-top: 12px; }
.pagination, .viewer-actions { display: flex; align-items: center; gap: 4px; }
.page-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; }
.page-button { color: var(--muted); font: 11px/1 var(--mono); }
.page-button[aria-current="true"] { color: var(--ink); background: #f1f1f1; }
.page-button:hover, .icon-button:hover:not(:disabled) { background: #f5f5f5; }
.icon-button:disabled { color: #c9c9c9; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: square; stroke-linejoin: miter; }
.control-divider { height: 18px; width: 1px; margin-inline: 10px; background: var(--line); }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding-block: 32px; color: var(--muted); font: 11px/1.5 var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 12px 16px; color: #fff; background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.slide-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; color: #fff; background: transparent; }
.slide-dialog::backdrop { background: rgb(0 0 0 / 88%); }
.dialog-shell { height: 100%; display: grid; place-items: center; padding: 32px 32px 96px; }
.dialog-canvas { display: grid; width: 100%; min-height: 0; place-items: center; }
.dialog-canvas .slide { width: min(100%, calc((100dvh - 128px) * 16 / 9)); }
.viewer-close { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 72px; min-height: 40px; padding: 8px 12px; border: 0; background: transparent; color: rgb(255 255 255 / 60%); font: 11px/1 var(--mono); }
.viewer-close .icon { width: 14px; height: 14px; }
.viewer-close:hover { color: #fff; }
.viewer-close:focus-visible { outline: 1px solid rgb(255 255 255 / 40%); outline-offset: 2px; }
.error-page { padding-block: 100px; }
.error-page h1 { font: 500 clamp(32px, 5vw, 64px)/1.1 var(--display); letter-spacing: -.04em; }
.error-page p { color: var(--muted); line-height: 1.6; }
.back-link { display: inline-block; margin-top: 24px; color: var(--ink); text-underline-offset: 5px; }
@media (max-width: 600px) {
  .page-shell { width: calc(100% - 40px); }
  .site-header { padding-block: 24px; }
  .logo { width: 118px; }
  .site-title { font-size: 10px; }
  .chapters { margin-top: 20px; }
  .chapter-trigger { min-height: 68px; gap: 12px; padding-block: 18px; }
  .chapter-meta { gap: 14px; }
  .chapter-count { font-size: 10px; }
  .chapter-panel { padding-bottom: 12px; }
  .slide-label, .slide-number { font-size: 10px; }
  .viewer-controls { gap: 12px; }
  .control-divider { margin-inline: 4px; }
  .site-footer { font-size: 10px; }
  .dialog-shell { padding: 16px 16px 80px; }
  .dialog-canvas .slide { width: min(100%, calc((100dvh - 96px) * 16 / 9)); }
  .viewer-close { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
