
@font-face { font-family: "Shrikhand"; src: url("assets/fonts/Shrikhand-Regular.ttf"); font-display: block; }
@font-face { font-family: "Blue Cashews"; src: url("assets/fonts/Blue_Cashews.otf"); font-display: block; }
@font-face { font-family: "Marcellus"; src: url("assets/fonts/Marcellus-Regular.ttf"); font-display: block; }
@font-face { font-family: "Brandon"; src: url("assets/fonts/BrandonGrotesque-Medium.otf"); font-display: block; }
:root {
  --stage: #020202; --paper: #E9DDC0; --scrap: #F3ECD8; --print: #D9CBAA;
  --ink: #1b1613; --graphite: #4a403a; --blue: #0A4FC0; --orange: #FF4A00; --orange-text: #B23300; --mustard: #EDAA38; --wine: #9F182F;
  --display: "Shrikhand"; --head: "Blue Cashews", "Marcellus"; --body: "Marcellus"; --fine: "Brandon";
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--stage); }
body { font-family: var(--body); color: var(--ink); padding: 26px 0 60px; }
.sheet-note { width: min(96vw, 1366px); margin: 0 auto 8px; font-family: var(--fine); font-size: 13px; color: #a89c86; }
svg.defs { position: absolute; width: 0; height: 0; }

/* ---------- the open book on a black table ---------- */
.page { position: relative; width: min(96vw, 1366px); aspect-ratio: 4 / 3; margin: 0 auto 44px; background: var(--stage); }
.sheet { position: absolute; left: 2.4%; right: 4.6%; top: 2.6%; bottom: 2.6%; container-type: size; --b: calc(100cqh / 42); }
.sheet > .paper { position: absolute; inset: 0; background: var(--paper) url("assets/textures/paper_base.jpg") center / 100% 100%; filter: url(#deckle); }
.sheet > .age { position: absolute; inset: 0; mix-blend-mode: multiply; pointer-events: none; background: rgba(214,178,116,.2); box-shadow: inset 0 0 8cqw rgba(132,84,24,.36), inset 0 0 1.6cqw rgba(96,58,12,.34), inset 0 0 .4cqw rgba(70,40,6,.4); filter: url(#deckle); }
.sheet > .ruled { position: absolute; inset: .6cqw; pointer-events: none; mix-blend-mode: multiply; opacity: .62; filter: url(#rough);
  background-image: linear-gradient(90deg, transparent calc(7.4% - 1px), rgba(176,44,40,.42) 7.4%, transparent calc(7.4% + 1px)), linear-gradient(90deg, transparent calc(92.6% - 1px), rgba(176,44,40,.42) 92.6%, transparent calc(92.6% + 1px)), repeating-linear-gradient(180deg, transparent 0 calc(var(--b) - 1px), rgba(36,78,150,.36) calc(var(--b) - 1px) var(--b)), repeating-linear-gradient(90deg, transparent 0 calc(var(--b) - 1px), rgba(36,78,150,.16) calc(var(--b) - 1px) var(--b));
  -webkit-mask-image: linear-gradient(104deg, rgba(0,0,0,.95), rgba(0,0,0,.3) 34%, rgba(0,0,0,.8) 58%, rgba(0,0,0,.25) 82%, rgba(0,0,0,.7)); mask-image: linear-gradient(104deg, rgba(0,0,0,.95), rgba(0,0,0,.3) 34%, rgba(0,0,0,.8) 58%, rgba(0,0,0,.25) 82%, rgba(0,0,0,.7)); }
.sheet > svg.wear { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sheet > svg.tex { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; pointer-events: none; }
.sheet > .gutter { position: absolute; top: 0; bottom: 0; left: 46%; width: 8%; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(90deg, rgba(70,45,12,0), rgba(70,45,12,.1) 30%, rgba(60,36,8,.42) 49.4%, rgba(40,22,4,.6) 50%, rgba(60,36,8,.34) 50.6%, rgba(70,45,12,.08) 72%, rgba(70,45,12,0)); }
.sheet > .staples i { position: absolute; left: calc(50% - .16cqw); width: .32cqw; height: 2.6cqw; border-radius: .2cqw; background: linear-gradient(90deg, #5a564f, #cfcabd 45%, #6d6962); box-shadow: 0 0 .2cqw rgba(30,18,4,.5); }
.sheet > .staples i:nth-child(1) { top: 24%; } .sheet > .staples i:nth-child(2) { top: 72%; }

/* ---------- baseline grid: every text line and picture edge sits on a multiple of --b ---------- */
.at { position: absolute; }
.verso { left: 11.1%; width: 33.3%; } .recto { left: 55.6%; width: 33.3%; }
.inked { filter: url(#inkspread); }
h1 { font-family: var(--head); font-weight: normal; font-size: 2.88cqw; line-height: calc(var(--b) * 2); color: var(--ink); text-wrap: balance; }
p, li { font-size: 1.23cqw; line-height: var(--b); text-wrap: balance; }
.fine { font-family: var(--fine); font-size: 1.02cqw; line-height: var(--b); text-wrap: balance; }
.o { color: var(--orange-text); } .bl { color: var(--blue); }
.entry { font-family: var(--fine); font-size: 1.02cqw; line-height: var(--b); color: var(--orange-text); }
.entry b { font-family: var(--display); font-weight: normal; font-size: 2.2cqw; color: var(--ink); margin-right: .5cqw; vertical-align: -.22cqw; }
.label { font-family: var(--fine); font-size: 1.02cqw; line-height: var(--b); color: var(--blue); }
.method { list-style: none; counter-reset: m; }
.method li { counter-increment: m; padding-left: 2.2cqw; position: relative; }
.method li::before { content: counter(m); position: absolute; left: 0; top: 0; font-family: var(--display); font-size: 1.5cqw; color: var(--wine); line-height: var(--b); }
.rule { position: absolute; height: 0; border-top: .16cqw solid var(--ink); filter: url(#rough); }
.rule.double { border-top: .34cqw double var(--ink); }
.imprint { font-family: var(--fine); font-size: .82cqw; line-height: var(--b); color: var(--graphite); letter-spacing: .02em; }
.folio { font-family: var(--display); font-size: 1.5cqw; line-height: var(--b); color: var(--blue); }
.pencil { font-family: var(--fine); font-size: 1cqw; line-height: var(--b); color: var(--graphite); transform: rotate(-3deg); }
.pencil::after { content: ""; display: block; height: .5cqw; background: no-repeat left / 100% 100% url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M1 5 C30 2 50 7 80 4 S140 3 199 5' fill='none' stroke='%234a403a' stroke-width='1.2' stroke-linecap='round'/></svg>"); }
.kmark { position: absolute; right: 3.4%; bottom: calc(var(--b) * 1.6); font-family: var(--head); font-size: 1.2cqw; color: rgba(60,40,15,.15); text-shadow: 0 .1cqw 0 rgba(255,250,235,.7), 0 -.06cqw 0 rgba(60,40,15,.25); }

/* index tabs */
.tabs { position: absolute; left: 99.3%; top: calc(var(--b) * 5); display: flex; flex-direction: column; gap: .5cqw; }
.tabs b { position: relative; display: block; width: 2.9cqw; height: calc(var(--b) * 4); font-weight: normal; }
.tabs b::before { content: ""; position: absolute; inset: 0; background: var(--print); border-radius: 0 .8cqw .8cqw 0; filter: url(#rough); box-shadow: inset 0 0 1cqw rgba(140,96,30,.3); }
.tabs b.on { width: 3.8cqw; } .tabs b.on::before { background: var(--mustard); box-shadow: inset 0 0 1.1cqw rgba(160,90,10,.4); }
.tabs b span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; font-family: var(--fine); font-size: .92cqw; color: rgba(27,22,19,.82); }

/* pasted things */
.print { position: absolute; }
.print::before { content: ""; position: absolute; inset: 0; background: var(--scrap); filter: url(#deckle2); box-shadow: 0 .12cqw .35cqw rgba(40,25,5,.35); }
.print .img { position: absolute; inset: .65cqw; background: #cdbd97; filter: url(#rough); overflow: hidden; }
.print .img::before { content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: multiply; background-image: radial-gradient(rgba(10,79,192,.55) .11cqw, transparent .13cqw); background-size: .5cqw .5cqw; transform: rotate(12deg) scale(1.4); }
.print .img::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 3cqw rgba(120,80,30,.4); }
.print .lab { position: absolute; left: 1.2cqw; right: 1.2cqw; bottom: 1.1cqw; font-family: var(--fine); font-size: .95cqw; line-height: 1.3; color: var(--ink); }
.tape { position: absolute; width: 6.6cqw; height: 1.9cqw; background: rgba(226,190,120,.62); filter: url(#rough); box-shadow: inset 0 0 .5cqw rgba(140,90,10,.3); clip-path: polygon(0 12%, 3% 0, 97% 6%, 100% 20%, 98% 45%, 100% 70%, 97% 100%, 4% 94%, 0 78%, 2% 50%); }
.slip { position: absolute; padding: var(--b) 1.4cqw; }
.slip::before { content: ""; position: absolute; inset: 0; background: var(--scrap); filter: url(#deckle2); box-shadow: 0 .1cqw .3cqw rgba(40,25,5,.28); }
.slip > * { position: relative; }
.frame2 { position: absolute; }
.frame2::before { content: ""; position: absolute; inset: 0; border: .34cqw solid var(--wine); filter: url(#hand); opacity: .9; }
.frame2::after { content: ""; position: absolute; inset: .7cqw; border: .1cqw solid var(--wine); filter: url(#hand); opacity: .85; }
svg.motif { position: absolute; overflow: visible; }
.ln { fill: none; stroke: #0A4FC0; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: url(#hand); }
.ln.thin { stroke-width: 1.9; } .ln.red { stroke: #D63A00; }
.ink { mix-blend-mode: multiply; filter: url(#press); }
.fo { fill: #FF4A00; opacity: .72; } .fm { fill: #EDAA38; opacity: .8; } .fw { fill: #9F182F; opacity: .68; }

svg.grid { position: absolute; inset: 0; width: 100%; height: 100%; display: none; pointer-events: none; z-index: 9; }
.sheet > .baselines { position: absolute; inset: 0; display: none; pointer-events: none; z-index: 8; background: repeating-linear-gradient(180deg, transparent 0 calc(var(--b) - 1px), rgba(255,74,0,.35) calc(var(--b) - 1px) var(--b)); }
body.showgrid svg.grid, body.showgrid .baselines { display: block; }

/* ---------- frame A: page 19 ---------- */
.bigword { position: absolute; left: 52%; top: calc(var(--b) * 1.2); font-family: var(--display); font-size: 9cqw; line-height: calc(var(--b) * 5); color: var(--wine); opacity: .2; transform: rotate(-4deg); mix-blend-mode: multiply; }
.card p { font-size: 1.07cqw; }
.card dl { display: grid; grid-template-columns: auto 1fr; column-gap: 1cqw; }
.card dt { font-family: var(--fine); font-size: 1cqw; line-height: var(--b); color: var(--orange-text); }
.card dd { font-family: var(--fine); font-size: 1cqw; line-height: var(--b); }
.card .lesson { font-family: var(--head); font-size: 1.3cqw; color: var(--wine); text-wrap: balance; }

/* ---------- frame B: page 6 ---------- */
.recipe-title { font-family: var(--head); font-size: 4.85cqw; line-height: calc(var(--b) * 3); color: var(--ink); }
.serves { position: relative; display: inline-block; padding: 0 2.2cqw 0 1.4cqw; font-family: var(--fine); font-size: 1.1cqw; line-height: calc(var(--b) * 1.5); color: var(--scrap); }
.serves::before { content: ""; position: absolute; inset: 0; background: var(--wine); clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 2.5% 50%); filter: url(#wcbar); opacity: .92; }
.serves span { position: relative; }
.bignum { font-family: var(--display); font-size: 6.9cqw; line-height: calc(var(--b) * 4); color: var(--wine); }
.clip svg { position: absolute; inset: var(--b) 1.3cqw calc(var(--b) * .6); width: calc(100% - 2.6cqw); height: calc(100% - var(--b) * 1.6); overflow: visible; }
.legend { display: flex; gap: 1.6cqw; }
.legend i { display: inline-block; width: 1.4cqw; height: .85cqw; margin-right: .45cqw; filter: url(#rough); }

@media (prefers-reduced-motion: no-preference) {
  svg.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: grow .45s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes grow { from { transform: scaleY(0); } }
}
