/* 骨架：全站一致，方案只改变量 */
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font:var(--t2)/var(--lh) var(--font);
  min-height:100vh;display:flex;flex-direction:column}
:root{--u:12px;--g:clamp(16px,6vw,96px);--t1:40px;--t2:18px;--t3:14px;--lh:1.85;--measure:36em;--indent:2em;--pgap:0}

a{color:inherit;text-underline-offset:.2em}
a:hover{background:var(--fg);color:var(--bg);text-decoration:none}
a[aria-current]{text-decoration:none}

header,main,footer{padding:0 var(--g)}
header{display:flex;flex-wrap:wrap;gap:0 calc(var(--u)*2);padding-top:calc(var(--u)*2);font-size:var(--t3)}
header nav{display:flex;gap:0 calc(var(--u)*2)}
main{flex:1;max-width:calc(var(--measure) + var(--g)*2);padding-bottom:calc(var(--u)*6)}
footer{display:flex;flex-wrap:wrap;gap:0 calc(var(--u)*2);padding-top:calc(var(--u)*2);padding-bottom:calc(var(--u)*2);font-size:var(--t3);color:var(--mute)}

h1{font-size:var(--t1);line-height:1.2;font-weight:700;margin:calc(var(--u)*4) 0 calc(var(--u)*3)}
h2{font-size:var(--t2);font-weight:700;margin:calc(var(--u)*4) 0 var(--u)}
p{margin:0 0 calc(var(--u)*2)}
.meta{font-size:var(--t3);color:var(--mute);margin-top:calc(var(--u)*-2)}
ul,ol{margin:0;padding-left:1.2em}
li{margin:0 0 calc(var(--u)/2)}

figure{margin:calc(var(--u)*3) 0}
img,iframe{display:block;width:100%;height:auto;border:1px solid var(--fg)}
iframe{height:380px}
figcaption{font-size:var(--t3);color:var(--mute);margin-top:var(--u)}
.refs{font-size:var(--t3)}

.story p{text-indent:var(--indent);margin-bottom:var(--pgap)}
.story .date{text-indent:0;margin-top:calc(var(--u)*2);font-size:var(--t3);color:var(--mute)}

.home header{display:none}

/* sketch/v2 方案 g：保留骨架，只固定房间变量与自托管字体。 */
@font-face{font-family:"Noto Serif SC";font-style:normal;font-weight:200 900;font-display:swap;src:url("/assets/fonts/noto-serif-sc-01f5ebe1625b.woff2") format("woff2")}
:root{--font:"Noto Serif SC","Songti SC",serif}
.home{--bg:#FFFFFF;--fg:#222222;--mute:#6A6A6A}
.lib{--bg:#E2E7E0;--fg:#1F2420;--mute:#5D655E}
.cat{--bg:#2A2420;--fg:#E6DCCF;--mute:#A0937F;--lh:2}
/* 容纳来源中的表格与长 URL，沿用草图字号、边距与图片规则。 */
main{width:100%;min-width:0}
.prose{overflow-wrap:anywhere}
table{display:block;overflow-x:auto;border-collapse:collapse;max-width:100%}
th,td{text-align:left;vertical-align:top;padding:var(--u);border:1px solid var(--mute)}
pre{overflow-x:auto;max-width:100%}
/* Only opted-in notes use the right margin; other rooms keep the sketch layout. */
.story .section-break{height:1em;text-indent:0}
.story .epigraph{text-indent:0;margin-bottom:calc(var(--u)*2)}
.publication-note{font-size:var(--t3);color:var(--mute);margin-top:calc(var(--u)*3)}
.with-sidenotes{position:relative}
.with-sidenotes .note-ref{font-size:.7em;line-height:0;vertical-align:super;text-indent:0}
.with-sidenotes .endnotes{margin-top:calc(var(--u)*4);font-size:var(--t3);color:var(--mute)}
.with-sidenotes .endnotes p{text-indent:0;margin:0}
.with-sidenotes .endnotes li{padding-left:.3em;margin-bottom:var(--u);scroll-margin-top:2em}
.with-sidenotes :target{outline:1px solid var(--mute);outline-offset:3px}
@media(min-width:1200px){
  .with-sidenotes.sidenotes-ready .endnotes{margin:0}
  .with-sidenotes.sidenotes-ready .endnotes li{position:absolute;left:calc(100% + 48px);width:min(240px,calc(100vw - 100% - var(--g)*2 - 64px));margin:0}
}
