.wrap{max-width:1060px;margin:0 auto;padding:0 24px}
.essay-head,.essay-body{max-width:680px}
.essay-head{padding:4rem 0 2rem;border-bottom:1px solid var(--rule);margin-bottom:2.2rem}
.essay-cats{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}
.essay-cat{font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:var(--accent);font-weight:600;
  padding:.2rem 0;margin-right:.8rem}
.essay-title{font-size:clamp(2.3rem,4.2vw,3.3rem);line-height:1.12;letter-spacing:-.015em;font-weight:500;margin-bottom:1rem}
.essay-meta{font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted-light);font-weight:500}
.essay-summary{font-family:'Source Serif 4',Georgia,serif;font-style:italic;font-size:1.1rem;color:var(--muted);margin-top:.9rem;line-height:1.5}
.pdf-btn{display:inline-flex;align-items:center;gap:.5rem;margin-top:1.3rem;padding:.55rem 1.1rem;
  border:1px solid var(--accent);color:var(--accent);border-radius:4px;font-size:.68rem;letter-spacing:.1em;
  text-transform:uppercase;font-weight:600;transition:all .2s}
.pdf-btn:hover{background:var(--accent);color:var(--cream)}
.pdf-btn svg{width:14px;height:14px}

.essay-body{font-family:'Source Serif 4',Georgia,serif;font-size:1.2rem;line-height:1.82;color:var(--ink-soft)}
.essay-body p{margin:0 0 1.3rem}
.essay-body h2{font-size:1.55rem;margin:2.4rem 0 .9rem;line-height:1.25}
.essay-body h3{font-size:1.22rem;margin:1.8rem 0 .7rem}
.essay-body strong{color:var(--ink);font-weight:700}
.essay-body a{color:var(--accent);text-decoration:none;border-bottom:1px solid var(--accent-soft)}
.essay-body a:hover{color:var(--accent-hover);border-bottom-color:var(--accent-hover)}
.essay-body img{max-width:100%;height:auto;display:block;margin:1.8rem auto;border-radius:0}
.essay-body blockquote{border-left:3px solid var(--accent-soft);padding:.2rem 0 .2rem 1.3rem;margin:1.4rem 0;
  font-style:italic;color:var(--muted)}
.essay-body ul,.essay-body ol{margin:0 0 1.3rem 1.4rem}
.essay-body li{margin-bottom:.4rem}
.essay-body hr{border:none;height:1px;background:var(--rule);margin:2rem 0}
.essay-body .lost-figure{font-family:'IBM Plex Sans',sans-serif;font-size:.8rem;color:var(--muted-light);
  background:var(--accent-wash);border:1px dashed var(--accent-soft);border-radius:4px;padding:.7rem 1rem;
  text-align:center;font-style:italic;margin:1.6rem 0;max-width:100%}
.essay-body .biblio{margin:1.2rem 0 2rem}
.essay-body .biblio p{padding-left:1.6em;text-indent:-1.6em;font-size:.9rem;line-height:1.55;
  margin:0 0 .55rem;color:var(--ink)}
.essay-body .biblio a{color:var(--accent);word-break:break-word}
.essay-body .biblio .ref-n{color:var(--accent);font-weight:600;margin-right:.25em}

/* SIDENOTES (footnotes shown in the margin, not at the bottom) */
.sn-num{font-family:'IBM Plex Sans',sans-serif;color:var(--accent);font-weight:600;font-size:.72em;
  vertical-align:super;line-height:0;cursor:pointer;padding:0 .2em;border-radius:3px;
  transition:color .15s,background .15s}
.sn-toggle{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.sidenote{float:right;clear:right;width:42%;margin-right:-48%;margin-top:.15rem;margin-bottom:1.1rem;
  padding:.1rem .5rem;font-family:'IBM Plex Sans',sans-serif;font-size:.8rem;line-height:1.55;
  color:var(--muted);text-align:left;border-radius:5px;transition:background .15s,color .15s}
.sidenote .sn-mark{color:var(--accent);font-weight:600;margin-right:.3em;padding:0 .12em;border-radius:3px;
  transition:color .15s,background .15s}
.sidenote a{color:var(--accent);word-break:break-word;border-bottom:1px solid var(--accent-soft)}
.sidenote p{margin:0 0 .5rem;font-size:inherit;line-height:inherit}
/* linked highlight: hovering a reference lights up its margin note, and the reverse */
.sn-num:hover,
.sn-num:has(+ .sn-toggle + .sidenote:hover){color:var(--cream);background:var(--accent)}
.sn-num:hover + .sn-toggle + .sidenote,
.sidenote:hover{color:var(--ink-soft);background:var(--accent-wash)}
.sn-num:hover + .sn-toggle + .sidenote .sn-mark,
.sidenote:hover .sn-mark{color:var(--cream);background:var(--accent)}
.footnote{display:none}  /* original bottom notes block removed */
@media(max-width:1180px){
  .essay-head,.essay-body{max-width:680px}
  .sidenote{display:none;float:none;width:auto;margin:.7rem 0;padding:.7rem .95rem;
    background:var(--accent-wash);border-left:3px solid var(--accent-soft);border-radius:0 4px 4px 0}
  .sn-toggle:checked + .sidenote{display:block}
  .sn-num{background:var(--accent-wash)}
}

/* reading progress + in-essay table of contents (scroll-spy) */
.progress{position:fixed;top:0;left:0;height:2px;width:0;background:var(--accent);z-index:40;transition:width .08s linear}
.essay-toc{position:fixed;top:50%;transform:translateY(-50%);left:max(24px,calc((100vw - 1400px)/2));
  width:145px;max-height:72vh;overflow-y:auto;font-family:'IBM Plex Sans',sans-serif;z-index:15}
.essay-toc .toc-label{font-size:.58rem;letter-spacing:.18em;text-transform:uppercase;color:var(--muted-light);
  font-weight:600;margin-bottom:.7rem;padding-left:.9rem}
.essay-toc ul{list-style:none;margin:0;padding:0;border-left:1px solid var(--rule)}
.essay-toc a{display:block;padding:.28rem 0 .28rem .9rem;margin-left:-1px;font-size:.73rem;line-height:1.35;
  color:var(--muted);border-left:2px solid transparent;transition:color .15s,border-color .15s}
.essay-toc a:hover{color:var(--accent)}
.essay-toc a.active{color:var(--accent);border-left-color:var(--accent);font-weight:600}
@media(max-width:1399px){.essay-toc{display:none}}

.essay-foot{max-width:680px;margin:3.5rem auto 0;padding:2.6rem 1.5rem 4rem;text-align:center}
.foot-orn{color:var(--accent-soft);font-size:.9rem;letter-spacing:.5em;margin-bottom:.7rem}
.foot-note{font-size:.72rem;color:var(--muted-light);font-style:italic;font-family:'Source Serif 4',Georgia,serif}


/* Reading layout: reserve separate space for text, contents, and notes. */
.essay-body { overflow-wrap: break-word; }
.essay-body h2, .essay-body h3 { scroll-margin-top: 110px; }
.essay-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font: 14px/1.6 var(--sans); margin-block: 24px; }
.essay-body td, .essay-body th { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rule); }
.essay-body th { color: var(--ink); }
.essay-body pre { max-width: 100%; overflow-x: auto; }
.essay-summary { line-height: 1.7; }
.pdf-btn { font-size: 12px; min-height: 44px; border-radius: 0; }
.essay-foot a { text-decoration: underline; color: var(--accent); }
@media (max-width:1180px) {
  .wrap { max-width: 740px; }
}
@media (max-width:640px) {
  .wrap { padding-inline: 22px; }
  .essay-head { padding-top: 36px; }
  .essay-body { font-size: 18px; }
  .essay-title { font-size: 37px; overflow-wrap: break-word; }
  .essay-meta { font-size: 11px; }
  .essay-summary { font-size: 18px; }
}

/* Archive */
.idx-hero, .idx-feature, .archive-tools, .idx-list, .idx-empty { width: min(1000px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.idx-hero { padding-block: 62px 40px; }
.idx-overline { font: 11px/1.6 var(--mono); text-transform: uppercase; color: var(--accent); letter-spacing: .12em; margin-bottom: 15px; }
.idx-hero h1 { font: 400 clamp(44px, 5.5vw, 68px)/1.1 var(--serif); letter-spacing: -.05em; margin-bottom: 22px; }
.idx-hero p { max-width: 670px; font-size: 17px; color: var(--muted); line-height: 1.8; }
.idx-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.feat-card { border-top: 2px solid var(--ink); padding-top: 20px; }
.feat-tag { font: 10px/1.7 var(--mono); text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.feat-card h3 { font: 500 29px/1.25 var(--serif); letter-spacing: -.03em; margin-bottom: 12px; }
.feat-card p { font-size: 15px; color: var(--muted); line-height: 1.75; }
.feat-badges { display: flex; gap: 15px; margin-top: 18px; color: var(--accent); font: 11px/1.6 var(--mono); }
.archive-tools { border-top: 1px solid var(--rule); padding-top: 25px; }
.archive-search { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 15px; }
.archive-search label { font-size: 13px; color: var(--muted); }
.archive-search input { min-width: 0; width: min(100%, 360px); padding: 12px 14px; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 0; }
.archive-search input::placeholder { color: var(--muted); }
.idx-filters { display: flex; flex-wrap: wrap; gap: 0 22px; padding-bottom: 15px; }
.idx-filter { min-height: 44px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0; font: 13px/1.5 var(--sans); }
.idx-filter:hover, .idx-filter.active { color: var(--accent); border-bottom-color: var(--accent); }
.idx-count { font: 11px/1.6 var(--mono); color: var(--muted); padding-block: 10px; }
.idx-list { margin-bottom: 60px; }
.idx-year { font: 400 31px/1.3 var(--serif); color: var(--muted); padding: 24px 0 17px; }
.idx-row { display: grid; grid-template-columns: 135px minmax(0, 1fr) 145px; gap: 28px; padding: 23px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.r-date { font: 11px/1.7 var(--mono); color: var(--muted); }
.r-title { font: 500 23px/1.35 var(--serif); letter-spacing: -.025em; }
.r-sub { display: block; font: 14px/1.75 var(--sans); color: var(--muted); letter-spacing: normal; margin-top: 7px; }
.r-cat { font: 10px/1.7 var(--mono); text-transform: uppercase; color: var(--muted); text-align: right; }
.idx-empty { padding-block: 30px; color: var(--muted); }
@media (max-width:760px) {
  .idx-hero { padding-block: 40px 30px; }
  .idx-feature { grid-template-columns: 1fr; gap: 30px; margin-bottom: 35px; }
  .archive-search { flex-direction: column; align-items: stretch; gap: 10px; }
  .archive-search input { width: 100%; }
  .idx-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; }
  .r-date { grid-column: 1; grid-row: 1; }
  .r-cat { grid-column: 2; grid-row: 1; max-width: 140px; }
  .r-title { grid-column: 1 / -1; font-size: 23px; }
}
