/* The notebook: /notes/ and each note. Built by tools/notes.py. */
:root {
  --reading: "neue-haas-grotesk-text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rule: rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.22, .8, .24, 1);
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } * { transition: none !important; } }

/* ---------- index ---------- */
main.notebook { max-width: none; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.3; letter-spacing: 0; }
main.notebook > * + * { margin-top: 0; }
.notebook .intro { font-size: clamp(28px, 4.65vw, 64px); line-height: 1; letter-spacing: -0.01em; max-width: 14.5em; color: var(--muted); }
.bar {
  position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: .6em 2em;
  margin: clamp(32px, 5vw, 72px) calc(-1 * var(--gutter)) 0; padding: .7em var(--gutter); background: var(--bg);
}
.find {
  flex: 0 1 13em; min-width: 9em; font: inherit; color: var(--ink); background: transparent; border: 0;
  border-bottom: 2px solid var(--muted); border-radius: 0; padding: .05em 0 .1em; outline: none; -webkit-appearance: none; appearance: none;
}
.find:focus { border-bottom-color: var(--ink); }
.find::placeholder { color: var(--muted-small); opacity: 1; }
.opts { display: flex; flex-wrap: wrap; gap: .4em 2em; }
.group { display: inline-flex; flex-wrap: wrap; gap: .2em .7em; }
.label { color: var(--muted-small); }
.bar button {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline 2px transparent; text-underline-offset: .22em; transition: text-decoration-color .25s, color .2s;
}
.bar button:hover, .bar button:active { color: var(--hot); }
.bar button[aria-pressed="true"] { text-decoration-color: currentColor; }
.count { margin-left: auto; color: var(--muted-small); }

.entries { list-style: none; margin-top: .4em; }
.entry { border-top: 1px solid var(--rule); padding: clamp(24px, 3vw, 40px) 0; max-width: 46em; }
.entry .hit { display: grid; grid-template-columns: minmax(0, 1fr) clamp(84px, 9vw, 130px); grid-template-rows: auto 1fr; column-gap: clamp(20px, 2.6vw, 40px); color: var(--ink); }
.entry .thumb { grid-column: 2; grid-row: 1 / span 2; width: 100%; height: auto; box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 8px 24px -12px rgba(0,0,0,.3); transition: transform .45s var(--ease); }
.entry .hit:hover .thumb { transform: translateY(-3px) rotate(-.6deg); }
.entry .t { grid-column: 1; font-size: 1.5em; line-height: 1.05; letter-spacing: -0.01em; }
.entry .hit:hover .t, .entry .hit:active .t { color: var(--hot); }
.entry .x { grid-column: 1; margin-top: .6em; font-family: var(--reading); font-weight: 400; font-size: .86em; line-height: 1.5; color: #1b1b1b; }
.meta { margin-top: .8em; font-size: .8em; color: var(--muted-small); }
.meta a { color: var(--ink); }
.meta .kind { color: var(--ink); }
.empty { margin-top: 1.5em; color: var(--muted-small); }
.machine { margin-top: clamp(64px, 9vw, 128px) !important; color: var(--muted-small); font-size: .8em; }
.machine a { color: var(--ink); }

/* ---------- a note ---------- */
main.note { max-width: none; font-size: inherit; line-height: 1.2; letter-spacing: 0; }
main.note > * + * { margin-top: 0; }
.note > .meta { font-size: clamp(15px, 1.15vw, 17px); margin-top: 0; }
.note h1 { margin-top: .25em; font-weight: 500; color: var(--ink); font-size: clamp(34px, 5.4vw, 80px); line-height: .98; letter-spacing: -0.02em; max-width: 12em; }
.note .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 88px); align-items: start; margin-top: clamp(32px, 4.5vw, 72px); }
.note .cols:not(:has(.plate)) { grid-template-columns: minmax(0, 36em); }
.plate { position: sticky; top: var(--gutter); }
.plate img { display: block; width: 100%; height: auto; box-shadow: 0 2px 4px rgba(0,0,0,.1), 0 30px 60px -36px rgba(0,0,0,.45); cursor: zoom-in; }
.plate figcaption { margin-top: .7em; font-size: 15px; color: var(--muted-small); }
.note .text { max-width: 36em; font-family: var(--reading); font-weight: 400; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.55; color: #1b1b1b; }
.note .text > * + * { margin-top: .9em; }
.note .text blockquote {
  font-family: "neue-haas-grotesk-display", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 500;
  color: var(--ink); font-size: clamp(24px, 2.3vw, 34px); line-height: 1.12; letter-spacing: -0.01em;
  padding-left: .7em; border-left: 3px solid var(--ink);
}
.note .text blockquote + blockquote { margin-top: 1.1em; }
.note .text h2 { font-family: "neue-haas-grotesk-display", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 500; color: var(--muted-small); font-size: .8em; letter-spacing: .06em; text-transform: uppercase; margin-top: 2.2em; }
.note .text ul { list-style: none; }
.note .text li { position: relative; padding-left: 1.2em; margin-top: .4em; }
.note .text li::before { content: ""; position: absolute; left: 0; top: .78em; width: .5em; height: 2px; background: var(--ink); }
.note .text a { color: var(--ink); text-decoration: underline 1px; text-underline-offset: .18em; }
.note .from { color: var(--muted-small); font-size: .9em; margin-top: 1.6em !important; }
.note .tags { display: flex; flex-wrap: wrap; gap: .4em; font-size: .8em; }
.note .tags a { text-decoration: none; background: rgba(0,0,255,.06); padding: .1em .5em; border-radius: 3px; }
.turn {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.6em; align-items: end; margin-top: clamp(56px, 7vw, 112px);
  padding-top: 1em; border-top: 1px solid var(--rule); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.25;
}
.turn .label { display: block; font-size: .85em; color: var(--muted-small); }
.turn [rel="next"] { text-align: right; }

/* zoomed plate */
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(251,251,251,.97); display: grid; place-items: center; padding: 16px; cursor: zoom-out; opacity: 0; transition: opacity .3s var(--ease); }
.lightbox.on { opacity: 1; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: 0 30px 60px -36px rgba(0,0,0,.45); }

@media (max-width: 760px) {
  .count { margin-left: 0; }
  .note .cols { grid-template-columns: 1fr; }
  .plate { position: static; }
  .turn { grid-template-columns: 1fr 1fr; }
  .turn .all { grid-column: 1 / -1; grid-row: 2; }
}
