.notebook-heading {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:32px;
}
.notebook-heading p { max-width:47ch; margin:0; line-height:1.55; }
.notebook-tabs {
  display:flex; flex-wrap:wrap; gap:4px; align-items:end; margin:0 14px;
}
.notebook-tabs a {
  padding:9px 15px; color:#533845; background:#e1c6c7;
  border:1px solid #bca9a6; border-radius:6px 6px 0 0;
  text-decoration:none; font:600 14px var(--headline);
}
.notebook-tabs a:nth-child(2) { background:#c5d7c5; }
.notebook-tabs a:nth-child(3) { background:#ecdbb7; }
.notebook-tabs a:nth-child(4) { background:#cec8e2; }
.notebook-tabs a:is(:hover,[aria-current]) { text-decoration:underline; text-underline-offset:3px; color:#372936; }
.notebook-tabs [aria-current] { border-top:3px solid currentColor; }
.notebook-spread {
  border:5px solid #765769;
  border-radius:5px 9px 9px 5px;
  background:#f7edda;
  box-shadow:2px 3px 0 #cec0aa,3px 5px 0 #f7edd9,4px 7px 0 #896e7e,0 12px 22px #573c461f;
}
.notebook-spread .notebook-page {
  display:grid; grid-template-columns:.93fr 1.07fr;
  color:#44343b; background:#fff8e8; padding:0; margin:0;
  transform:none; border-radius:0; box-shadow:none; max-width:none;
}
.notebook-spread .notebook-page[hidden] { display:none; }
.notebook-spread .notebook-page::before { content:none; }
.leaf-art {
  display:grid; align-items:center; padding:clamp(18px,2.6vw,39px);
  border-right:1px solid #c9b79f;
  background:linear-gradient(to right,#f4ead6 94%,#e1d2bc);
}
.leaf-art img {
  display:block; width:100%; height:auto; border:7px solid #fff9ea;
  transform:rotate(-2deg); box-shadow:1px 4px 8px #4d3c322e;
}
.notebook-physics .leaf-art img,.notebook-favorites .leaf-art img { transform:rotate(1deg); }
.leaf-writing { align-content:center; min-width:0; padding:clamp(22px,3.2vw,47px); }
.leaf-writing h3 { margin:0 0 14px; font:650 clamp(26px,3vw,42px)/1.04 var(--headline); letter-spacing:-.04em; }
.leaf-writing h3 br {display:none;}
.leaf-writing p { font-size:15px; line-height:1.62; margin:0 0 13px; }
.leaf-writing a { text-underline-offset:3px; }
.notebook-code,.notebook-abstract {
  margin:18px 0; padding:14px 17px; background:#f2e7d4;
  border-left:2px solid #b5a18c;
}
.notebook-code figcaption,.notebook-abstract figcaption { font:12px var(--mono); color:#614c54; }
.notebook-code pre { font:12px/1.45 var(--mono); white-space:pre-wrap; overflow-wrap:anywhere; margin:10px 0; }
.code-keyword { color:#85364f; }
.notebook-code a,.notebook-abstract a,.leaf-writing .notebook-season { font-size:13px; }
.notebook-abstract h4 {font:600 22px/1.18 var(--headline); letter-spacing:-.025em; margin:12px 0;}
.notebook-abstract .abstract-authors,.notebook-abstract .abstract-venue {font-size:13px; margin-bottom:6px;}
.notebook-favorites .leaf-writing ul { margin:0; padding:0; list-style:none; }
.notebook-favorites .leaf-writing li { border-bottom:1px solid #cbbb9e; }
.notebook-favorites .leaf-writing a { padding:7px 0; display:block; font-size:15px; }
.leaf-pager { justify-content:end; margin-top:18px; }
@media(max-width:720px) {
  .notebook-heading {display:block;}
  .notebook-heading p { margin-top:9px; font-size:15px; }
  .notebook-tabs {margin:0 2px;gap:2px;}
  .notebook-tabs a {padding:8px 6px;font-size:12px;}
  .notebook-spread .notebook-page { display:block; }
  .leaf-art { display:block; border:0; padding:0; background:#f4ead6; }
  .leaf-art img { height:clamp(135px,45vw,245px); object-fit:cover; width:100%; transform:none!important; border:0; box-shadow:none; }
  .leaf-writing {padding:20px;}
  .leaf-writing p {font-size:15px;}
}
@media print {
  .notebook-spread { box-shadow:none; border:0; }
  .notebook-spread .notebook-page { break-inside:avoid; }
}
