@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f2eddf;
  --sheet: #fcf9ef;
  --ink: #383a31;
  --secondary: #66685c;
  --muted: #747367;
  --rule: #d9d3c4;
  --edge: #cec7b6;
  --rust: #a8482f;
  --sage: #cbd4bd;
  --peach: #e8c99d;
  --lilac: #d5cadd;
  --inset: #f0ebdf;
  --selection: #e8ca8c;
  --focus: #71562b;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #262923;
  --sheet: #32372e;
  --ink: #e8e3d5;
  --secondary: #bebeb0;
  --muted: #aaa99a;
  --rule: #505447;
  --edge: #5a5f4d;
  --rust: #dda184;
  --sage: #4e5d43;
  --peach: #6a5039;
  --lilac: #5b4e61;
  --inset: #2d3229;
  --selection: #645d3d;
  --focus: #dfbd8f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #262923;
    --sheet: #32372e;
    --ink: #e8e3d5;
    --secondary: #bebeb0;
    --muted: #aaa99a;
    --rule: #505447;
    --edge: #5a5f4d;
    --rust: #dda184;
    --sage: #4e5d43;
    --peach: #6a5039;
    --lilac: #5b4e61;
    --inset: #2d3229;
    --selection: #645d3d;
    --focus: #dfbd8f;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 28px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 18px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' filter='url(%23n)' opacity='.8' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
::selection { background: var(--selection); }
a { color: var(--rust); text-underline-offset: 4px; touch-action: manipulation; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, select:focus-visible, video:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; }
hr { height: 1px; border: 0; background: var(--rule); margin: 27px 0; }
.site { width: min(100%, 1520px); margin: auto; padding: 0 34px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -100px; left: 18px; z-index: 10; padding: 10px; background: var(--sheet); }
.skip:focus { top: 10px; }
.notebook-bar { display: flex; align-items: center; justify-content: space-between; padding: 25px 0 39px; gap: 24px; }
.wordmark { display: flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; font-size: 29px; letter-spacing: -.9px; }
.wordmark img { width: 62px; height: 44px; object-fit: contain; }
.theme-control select { color: var(--secondary); background: transparent; border: 1px solid var(--rule); border-radius: 5px; padding: 6px 10px; font: 12px var(--ui); cursor: pointer; }
.theme-control option { color: var(--ink); background: var(--paper); }

.notebook { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.main-note, .note-preview, .reading-note { min-width: 0; }
.paper-tab { position: relative; z-index: 1; display: table; margin-left: 20px; margin-bottom: -1px; padding: 5px 17px 6px; color: var(--ink); font: 13px/1.4 var(--serif); border: 1px solid var(--edge); border-bottom: 0; border-radius: 5px 11px 0 0; }
.tab-sage { background: var(--sage); }
.tab-peach { background: var(--peach); }
.tab-lilac { background: var(--lilac); }
.note-sheet, .preview-sheet { background: var(--sheet); border: 1px solid var(--edge); border-radius: 7px; box-shadow: 0 3px 5px #302b2010; }
.note-sheet { padding: 31px; }
.note-sheet h1 { font-size: 36px; letter-spacing: -.7px; margin-bottom: 24px; }
.note-intro { color: var(--secondary); margin-bottom: 24px; }
.video-block video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--rule); border-radius: 4px; background: var(--inset); }
.download-card { padding: 19px 21px 16px; border: 1px solid var(--edge); border-radius: 4px; background: var(--inset); }
.download-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.download-heading h2 { font-size: 22px; }
.download-heading > span { color: var(--muted); font-size: 24px; }
.download-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 17px; }
.download-links a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border: 1px solid var(--edge); background: var(--sheet); color: var(--ink); border-radius: 3px; text-decoration: none; font-size: 16px; }
.download-links a:hover { border-color: var(--rust); color: var(--rust); }
.download-links a span { color: var(--rust); }
.download-card > p { margin-top: 13px; color: var(--muted); font: 11px/1.5 var(--ui); }

.preview-sheet { display: block; padding: 27px 24px 20px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.preview-sheet:hover { border-color: var(--rust); box-shadow: 0 4px 10px #302b2018; }
.preview-sheet h2 { font-size: 25px; letter-spacing: -.4px; }
.note-date { color: var(--muted); font: 11px/1.5 var(--ui); margin: 10px 0 25px; }
.preview-sheet p, .preview-sheet blockquote { font-size: 16px; line-height: 1.65; }
.preview-sheet blockquote { color: var(--secondary); border-left: 3px solid var(--rule); padding-left: 15px; }
.preview-sheet hr { margin: 25px 0; }
.preview-sheet h3 { font-size: 18px; margin-bottom: 12px; }
.excerpt { color: var(--secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.open-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 17px; margin-top: 28px; font: 12px/1.5 var(--ui); }
.preview-sheet:hover .open-note { color: var(--rust); }
.preview-video { width: 100%; height: auto; display: block; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; margin-top: 22px; border: 1px solid var(--rule); }
.preview-sheet .preview-caption { margin-top: 14px; font-size: 14px; color: var(--muted); }
footer { display: flex; align-items: center; gap: 10px; padding: 25px 2px 35px; color: var(--muted); font: 11px/1.5 var(--ui); }
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--rust); text-decoration: underline; }

.notebook-reading { grid-template-columns: minmax(0, 1fr) 285px; gap: 30px; }
.other-notes { display: grid; gap: 28px; }
.legal-content { padding: 34px 48px 43px; overflow-wrap: anywhere; }
.note-back { display: inline-flex; align-items: baseline; gap: 7px; font-size: 14px; text-decoration: none; }
.note-back:hover { text-decoration: underline; }
.legal-content h1 { margin: 25px 0 13px; }
.legal-meta { color: var(--muted); font: 12px/1.6 var(--ui); margin-bottom: 30px; }
.legal-content h2 { font-size: 26px; margin: 37px 0 16px; }
.legal-content h3 { font-size: 21px; margin: 29px 0 13px; }
.legal-content p:not(.legal-meta), .legal-content li { font-size: 18px; line-height: 1.8; }
.legal-content p:not(.legal-meta) { margin-bottom: 18px; }
.legal-content ul, .legal-content ol { padding-left: 25px; margin: 0 0 24px; }
.legal-content li { padding-left: 3px; margin-bottom: 13px; }
.legal-content strong { font-weight: 600; }
.legal-content code { font: .82em/1.5 ui-monospace, monospace; padding: 2px 4px; border-radius: 2px; background: var(--inset); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.short-version { border-left: 3px solid var(--rule); padding-left: 21px; margin: 0 0 30px; color: var(--secondary); }
.short-version p:last-child { margin-bottom: 0; }

@media (max-width: 1190px) and (min-width: 761px) {
  .notebook:not(.notebook-reading) { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
  .notebook:not(.notebook-reading) .main-note { grid-row: span 2; }
}
@media (max-width: 1000px) {
  .site { padding: 0 24px; }
  .notebook-reading { grid-template-columns: minmax(0, 1fr); }
  .other-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site { padding: 0 17px; }
  .notebook-bar { padding: 17px 0 26px; }
  .wordmark { font-size: 26px; }
  .wordmark img { width: 53px; height: 38px; }
  .notebook { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 18px; }
  .main-note, .reading-note, .other-notes { grid-column: 1 / -1; }
  .note-sheet { padding: 23px; }
  .note-sheet h1 { font-size: 32px; margin-bottom: 21px; }
  .preview-sheet { padding: 23px 20px 19px; }
  .preview-sheet h2 { font-size: 23px; }
  .legal-content h1 { margin: 22px 0 13px; }
  .legal-content h2 { font-size: 24px; }
  .legal-content h3 { font-size: 20px; }
  .legal-content p:not(.legal-meta), .legal-content li { font-size: 17px; line-height: 1.75; }
  .legal-content ul, .legal-content ol { padding-left: 20px; }
  .short-version { padding-left: 16px; }
}
@media (max-width: 520px) {
  .notebook, .other-notes { grid-template-columns: minmax(0, 1fr); }
  .note-sheet { padding: 23px 18px; }
  .download-card { padding: 15px 16px; }
  .download-heading h2 { font-size: 21px; }
  .download-links { gap: 10px; }
  .download-links a { padding: 9px 12px; }
  .preview-sheet { padding: 25px 24px 20px; }
  .notebook-reading { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
