/* 独立杂志视觉层：仅公开页面加载，业务交互沿用现有脚本。 */
:root{--paper:#f7f6f0;--surface:#fffefa;--ink:#213b31;--dark:#213b31;--muted:#657167;--line:#d9ddd2;--accent:#b65332;--control-radius:10px;--panel-radius:16px;--focus-ring:#41684d;--display:Georgia,"Noto Serif SC","Songti SC",SimSun,serif}
body{background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI","Noto Sans SC",sans-serif}
::selection{background:#e9d8bd;color:#213b31}
.shell{max-width:1160px;padding-left:40px;padding-right:40px}
.topbar{height:82px;background:var(--paper);backdrop-filter:none;border-bottom:1px solid var(--line)}
.brand{font-size:27px;gap:10px;letter-spacing:-.06em}
.brandmark{width:31px;height:36px;border-radius:2px;background:transparent;color:var(--dark);border:1px solid var(--dark);font-size:28px}
.nav{gap:18px;font-size:13px}
.nav a{padding:10px 0;border-radius:0;position:relative}
.topbar .nav a[aria-current=page],.nav a:hover{background:transparent;color:var(--ink)}
.nav a[aria-current=page]:after{content:"";position:absolute;left:0;right:0;bottom:2px;height:2px;background:var(--accent)}
.nav a:hover:after{content:none}.nav a[aria-current=page]:hover:after{content:""}
.eyebrow{font-size:10px;letter-spacing:.16em;color:var(--accent);font-weight:650}
.eyebrow:before{width:16px}
.editorial-hero{grid-template-columns:minmax(0,1fr) 245px;gap:64px;padding-top:36px;padding-bottom:30px;align-items:center}
.editorial-hero h1{font-family:var(--display);font-size:clamp(38px,4.2vw,54px);font-weight:600;letter-spacing:-.05em;line-height:1.35;margin:21px 0}
.editorial-hero h1 em{font-style:normal;position:relative;color:var(--accent)}
.editorial-hero .lede{font-size:15px;line-height:1.9;max-width:510px;margin-bottom:24px}
.actions{gap:24px;align-items:center}
.button{border-radius:3px;min-height:46px;font-size:13px;padding:0 20px;box-shadow:none}
.button:hover{transform:none;background:#345346}
.hero-text-link{font-size:13px;border-bottom:1px solid #b5c0b4;padding:7px 0;color:var(--dark)}
.journal-mark{border-left:1px solid var(--line);padding-left:30px;align-self:stretch;display:flex;flex-direction:column;justify-content:center}
.journal-mark-label{font-size:9px;letter-spacing:.14em;color:var(--muted)}
.journal-mark-glyph{font:italic 118px/.95 Georgia,serif;letter-spacing:-.09em;color:var(--dark);margin:12px 0 15px}
.journal-mark-glyph>span{color:var(--accent)}
.journal-mark-topics{display:flex;gap:10px;font-size:11px;color:var(--dark)}
.journal-mark p{font-size:12px;line-height:1.8;color:var(--muted);margin:14px 0 0}
body[data-page=home] .divider{display:none}
.section,.collections-main{padding-top:46px;padding-bottom:64px}
.section-head{padding-bottom:18px;border-bottom:1px solid var(--line);margin-bottom:28px;align-items:flex-end}
.section-head h2{font:600 29px/1.4 var(--display);letter-spacing:-.03em;margin-top:8px}
.section-head .page-title,.collections-main .page-title{font:600 clamp(34px,4vw,48px)/1.3 var(--display);letter-spacing:-.045em;margin:16px 0 14px}
.section-head .muted,.collection-intro p{font-size:14px;color:var(--muted)}
.small-link{font-size:12px;color:var(--accent)}
.featured{border:0;border-radius:4px;box-shadow:none;grid-template-columns:210px minmax(0,1fr);min-height:280px;background:#e9ece2;margin-bottom:20px}
.featured-text{padding:30px 36px}
.featured .meta{font-size:11px;letter-spacing:.04em;color:#657265}
.featured h3{text-wrap:balance;font:600 29px/1.55 var(--display);letter-spacing:-.035em;margin:14px 0}
.featured h3 a:hover{color:var(--accent)}
.featured p{font-size:14px;line-height:1.85;color:#58655a;margin-bottom:24px}
.featured .read-link{font-size:12px}
.article-list{gap:0}
.article-row{background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:28px 0;grid-template-columns:110px minmax(0,1fr) 30px;gap:24px}
.article-row:hover{background:transparent;border-color:#a8b5a6}
.article-row time{font-size:12px;color:var(--muted)}
.article-row h3{font:600 24px/1.55 var(--display);letter-spacing:-.025em;margin:7px 0 10px}
.article-row p{font-size:14px;max-width:680px;color:var(--muted)}
.row-category{font-size:11px;color:var(--accent);letter-spacing:.04em}
.row-reads{font-size:11px;margin-top:12px}
.row-arrow{width:auto;height:auto;border:0;border-radius:0;font-size:22px;font-weight:400}
.article-controls{border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:transparent;border-radius:0;padding:18px 0;margin-top:28px}
.search-tools .search,.search-tools select,.collection-filter-label select{background:var(--surface);border-radius:3px;border-color:#ccd3c6}
.collection-filter-label{font-size:12px;gap:12px}
.collection-discovery,.results-note{font-size:12px}
.collection-discovery{margin:14px 0}.results-note{margin:26px 0 0}
.archive-section h1{font:600 clamp(32px,4vw,46px)/1.4 var(--display);letter-spacing:-.04em;max-width:720px}
.archive-month{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;padding:22px 0;margin:0}
.archive-month summary{font:600 22px/1.5 var(--display)}
.archive-month summary span{font:12px system-ui;color:var(--muted)}
.archive-month a{padding:14px 0;margin:10px 0 0;border:0;font-size:15px}
.about{background:var(--paper);color:var(--ink);border-bottom:1px solid var(--line)}
.about h1{font:600 clamp(34px,4vw,48px)/1.45 var(--display);letter-spacing:-.05em;margin:18px 0}
.about .eyebrow{color:var(--accent)}.about .eyebrow:before{background:var(--accent)}
.about p{color:var(--muted);font-size:15px}.about a{color:var(--dark);border-color:#b6c2b1}.about a:hover{color:var(--accent)}
.contact-intro h2{font:600 36px/1.4 var(--display);letter-spacing:-.04em}
.contact-form{border-radius:4px;border-color:var(--line);background:var(--surface);padding:30px}
.contact-form input,.contact-form textarea{border-radius:3px;background:var(--paper)}
.form-heading{padding-bottom:20px}.form-heading h3{font-family:var(--display);font-size:24px}
.footer{border-top:1px solid var(--line);padding-top:24px;padding-bottom:30px;font-size:12px}
/* 阅读画布：排版形成层级，代码和表格沿用原有独立滚动。 */
.post-page{background:var(--surface)}
.post-page .post-topbar{max-width:1160px;min-height:76px;padding:16px 40px;background:var(--surface);backdrop-filter:none;border-bottom:1px solid var(--line);font-size:13px}
.post-page .post-topbar>a:first-child{font-size:28px;letter-spacing:-.055em}
.post-page main{max-width:800px;margin:54px auto 64px;padding:0 40px;background:transparent;border:0;border-radius:0}
.post-page main>h1{text-wrap:balance;font:600 clamp(32px,4vw,46px)/1.45 var(--display);letter-spacing:-.04em;margin:18px 0 20px}
.post-page .meta{font-size:12px;line-height:1.9;letter-spacing:.02em;color:#6d766b;font-weight:400}
.post-page .summary{font-size:18px;line-height:1.85;color:#677166;margin-bottom:26px}
.post-page .reading-tools{padding:16px 20px;margin:20px 0 32px;background:#f2f4ee;border:1px solid var(--line);border-radius:12px}
.post-page .reading-tools summary{font-size:13px}.post-page .reading-tools button{font-size:12px}
.post-page main>article{font-size:18px;line-height:1.95;border:0;margin-top:0;padding-top:0;color:#303e35}
.post-page main>article p{color:#354239;margin-bottom:26px}
.post-page main>article h2{font:600 29px/1.5 var(--display);margin:46px 0 20px;letter-spacing:-.025em}
.post-page main>article h3{font:600 23px/1.55 var(--display);margin:36px 0 16px}
.post-page main>article img{border-radius:4px;box-shadow:none}
.post-page main>article blockquote{background:#f3f2eb;border-radius:0;border-left:2px solid #b65332;padding:16px 22px}
.post-page main>article blockquote p{margin-bottom:0;color:#657166;font-size:16px}
.post-page main>article pre{border:1px solid #d9ddd2;border-radius:10px;background:#f0f2eb;color:#233b30;font-size:14px;padding:20px;line-height:1.7}
.post-page main>article pre code{color:inherit;background:transparent;padding:0}
.post-page .reading-end{padding-top:24px;margin-top:40px;font-size:13px}
.post-page .comment-form{border-radius:4px;background:#f3f5ee}
.post-page .comment-form input,.post-page .comment-form textarea{border-radius:3px}
.post-page .article-comments h2{font-family:var(--display)}
.post-page footer{max-width:800px;margin:auto;padding-left:40px;padding-right:40px}
/* 合集页面由 Worker 生成，与静态页面使用同一视觉体系。 */
.collections-main .collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}
.collection-card{border:0;border-top:2px solid var(--dark);border-radius:0;background:transparent;box-shadow:none}
.collection-card:hover{box-shadow:none;transform:none;border-color:var(--accent)}
.collection-card img{height:180px;border-radius:0}
.collection-card .collection-cover{height:94px;background:transparent;display:flex;align-items:center;justify-content:flex-start;padding:20px 24px 0;font:italic 56px/1 var(--display);color:#8d9c85}
.collection-card-body{padding:20px 24px 24px}
.collection-card h2{font:600 28px/1.5 var(--display)}
.collection-card p{font-size:14px;min-height:0;color:var(--muted)}
.collection-directory-link{font-size:12px;color:var(--accent)}
.collection-start{border-top:1px solid var(--line);padding:18px 24px;background:#ecefe5}
.collection-start a{font:500 16px/1.7 var(--display)}
.collection-start small{font-size:11px}
.collection-guide{border:0;border-left:2px solid var(--dark);border-radius:0;background:#ecefe5;padding:20px 24px}
.collection-guide h2{font-family:var(--display);font-size:24px}
.collection-start-button{border-radius:3px}
.collection-search{background:transparent;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;padding:18px 0}
.collection-search input,.collection-search select,.collection-search button{border-radius:3px}
.collection-posts li{background:transparent;border-color:var(--line);padding:22px 10px}
.collection-posts h2{font:600 24px/1.6 var(--display)}
.collection-search-status:empty{display:none}
@media(max-width:900px){.editorial-hero{grid-template-columns:minmax(0,1fr) 190px;gap:32px}.journal-mark{padding-left:24px}.journal-mark-topics{flex-wrap:wrap;gap:6px 12px}.featured{grid-template-columns:165px minmax(0,1fr)}.featured-text{padding:26px}}
@media(max-width:700px){
 .shell{padding-left:22px;padding-right:22px}
 .topbar{height:auto;flex-wrap:nowrap;min-height:105px;padding-top:16px;padding-bottom:12px;gap:10px}
 .brand{font-size:25px}.brandmark{width:27px;height:30px;font-size:24px}
 .topbar .nav{gap:8px;font-size:13px}.nav a{padding:8px 0}
 .editorial-hero{grid-template-columns:1fr;padding-top:34px;padding-bottom:28px;gap:0}
 .editorial-hero h1{font-size:37px;line-height:1.4;margin:18px 0}
 .editorial-hero .lede{font-size:15px;margin-bottom:22px;max-width:35em}
 .journal-mark{display:none}.actions{gap:22px}.hero-text-link{font-size:12px}
 .section,.collections-main{padding-top:32px;padding-bottom:44px}
 .section-head{gap:10px;margin-bottom:22px;padding-bottom:16px}
 .section-head h2{font-size:25px}.section-head .page-title,.collections-main .page-title{font-size:34px}
 .featured{grid-template-columns:1fr;min-height:0;border-radius:3px}
 .featured-text{padding:24px}.featured h3{font-size:25px;line-height:1.6;margin:12px 0}
 .featured p{font-size:14px;margin-bottom:20px}
 .article-row{grid-template-columns:1fr;gap:8px;padding:24px 0}.article-row h3{font-size:22px}.article-row p{font-size:14px}
 .article-controls{padding:16px 0;gap:14px}.collection-filter-label{font-size:12px}
 .search-tools .search{font-size:16px}.search-tools select{font-size:13px}
 .archive-section h1{font-size:33px}.archive-month{padding:20px 0}
 .about-inner{padding-top:32px;padding-bottom:32px;gap:14px}.about h1{font-size:35px}
 .contact-intro h2{font-size:31px}.contact-form{padding:22px}.footer{gap:18px;line-height:1.8}.footer-links{gap:16px}
 .post-page .post-topbar{position:static;padding:15px 22px;gap:8px 18px;min-height:100px;font-size:13px}
 .post-page .post-topbar>a:first-child{font-size:26px}
 .post-page main{margin:32px auto 44px;padding:0 22px;border:0;border-radius:0}
 .post-page main>h1{font-size:32px;line-height:1.5;margin:15px 0 18px}
 .post-page .summary{font-size:16px}.post-page main>article{font-size:17px;line-height:1.95}
 .post-page main>article h2{font-size:25px;margin:36px 0 18px}.post-page main>article h3{font-size:21px}
 .post-page main>article pre{font-size:13px;padding:16px}.post-page main>article blockquote{padding:14px 18px}
 .post-page main>article blockquote p{font-size:15px}.post-page footer{padding-left:22px;padding-right:22px}
 .collections-main .collection-grid{grid-template-columns:1fr;gap:26px}
 .collection-card .collection-cover{height:75px;padding:16px 18px 0;font-size:45px}.collection-card-body{padding:18px}
 .collection-card h2{font-size:26px}.collection-start{padding:16px 18px}.collection-posts h2{font-size:21px}
}
@media(max-width:360px){.editorial-hero h1{font-size:32px}.shell{padding-left:18px;padding-right:18px}.featured-text{padding:20px}.post-page main{padding-left:18px;padding-right:18px}.post-page main>h1{font-size:29px}}

/* 创作空间：轻量原生图形与清晰入口，不依赖动画/3D运行库。 */
:root{--lime:#ddefab;--card:#fffefa}
.brandmark{border:0;border-radius:10px;background:var(--dark);color:var(--paper)}
.topbar .nav{gap:6px}.topbar .nav a{padding:9px 13px;min-height:42px;border-radius:24px}
.topbar .nav a[aria-current=page]{background:var(--dark);color:white}
.topbar .nav a:hover{background:#e7eadf}.topbar .nav a[aria-current=page]:hover{background:#345346;color:white}
.topbar .nav a:after{display:none}
.editorial-hero{grid-template-columns:1.15fr 1fr;gap:54px;padding-top:42px;padding-bottom:34px}
.hero-copy{min-width:0}.hero-copy .eyebrow{display:inline-flex;padding:6px 12px;border:1px solid #d7ddca;border-radius:24px;font-size:11px;letter-spacing:.04em;color:#536b48;gap:8px}
.hero-copy .eyebrow:before{display:none}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#63834b}
.editorial-hero h1{font-family:system-ui,"Noto Sans SC",sans-serif;font-size:clamp(38px,4.2vw,56px);line-height:1.38;letter-spacing:-.06em;font-weight:750;margin:24px 0 20px}
.editorial-hero h1 em{font-family:var(--display);font-weight:600;color:var(--accent);white-space:nowrap}
.editorial-hero .lede{font-size:15px;line-height:1.95;max-width:450px}
.button{border-radius:28px;padding:0 24px;min-height:48px;gap:24px}
.button span[aria-hidden]{transition:transform .18s ease}.button:hover span[aria-hidden]{transform:translate(2px,-2px)}
.hero-text-link{border:0;font-weight:550;display:inline-flex;gap:12px;min-height:44px;align-items:center}
.hero-text-link:hover{color:var(--accent)}
.notebook-scene{height:365px;position:relative;isolation:isolate;border-radius:24px;background:#e9eddf;overflow:hidden}
.scene-grid{position:absolute;inset:0;background-image:linear-gradient(#b9c5aa44 1px,transparent 1px),linear-gradient(90deg,#b9c5aa44 1px,transparent 1px);background-size:30px 30px;mask-image:linear-gradient(135deg,black,transparent)}
.scene-orbit{position:absolute;left:-20%;top:40%;width:140%;height:70%;border:1px solid #b3c0a1;border-radius:50%;transform:rotate(-25deg)}
.note-sheet{position:absolute;inset:38px 54px 39px 58px;display:flex;flex-direction:column;background:#fffefa;border:1px solid #d9dfcf;border-radius:8px;box-shadow:7px 10px 0 #d5dcc7,0 20px 35px #2b402111;transform:rotate(-6deg);padding:22px 23px}
.note-top{display:flex;justify-content:space-between;font:8px/1.5 system-ui;letter-spacing:.12em;color:#728067}
.note-symbol{font:italic 136px/1.05 Georgia,serif;letter-spacing:-.1em;color:#294333;flex:1;align-content:center;text-align:center;padding-right:12px}.note-symbol>span{color:var(--accent)}
.note-rule{height:1px;background:#dce2d1;margin-bottom:13px}
.note-bottom{font-size:12px;color:#3b5236}.note-bottom>span{display:block;font-size:7px;letter-spacing:.1em;color:#7a856e;margin-top:6px}
.scene-sticker{position:absolute;z-index:2;right:18px;top:18px;background:var(--lime);border:1px solid #bed186;color:#304327;font:750 14px/1.05 system-ui;padding:15px 13px;border-radius:50%;width:81px;height:81px;transform:rotate(12deg)}
.scene-sticker>span{position:absolute;right:13px;bottom:14px;font-size:18px}
.scene-tag{position:absolute;left:16px;bottom:22px;z-index:2;padding:11px 16px;border:1px solid #d0d9bf;border-radius:9px;background:#f9faef;box-shadow:0 6px 14px #3244260b;color:#48603b;transform:rotate(4deg);font-size:11px}
.scene-tag>span{color:var(--accent);padding-right:8px}.scene-cross{position:absolute;bottom:31px;right:27px;font:35px Georgia;color:#7c916a}
body[data-page=home] .section{padding-top:24px;padding-bottom:24px}
#latest-heading{scroll-margin-top:100px}
.featured{grid-template-columns:1fr;border-radius:12px;background:#fffefa;border:1px solid #dce1d2;border-left:3px solid #315146;min-height:0;box-shadow:0 4px 20px #30422a04}
.featured h3{font-size:27px;line-height:1.55}.featured .read-link{display:inline-flex;align-items:center;border-bottom:1px solid #8b9c7a;padding-bottom:4px;font-weight:650;color:#3e5a33}
.section-head .small-link:after{content:none}.small-link{min-height:38px;display:inline-flex;align-items:center}
.article-row{padding:27px 12px;border-radius:8px;transition:background .18s ease}.article-row:hover{background:#edf0e5;border-color:#d0d8c3}
.article-row h3{font-family:system-ui,"Noto Sans SC",sans-serif;font-size:22px;letter-spacing:-.035em;font-weight:650}
.row-category{display:inline-block;background:#e8edde;color:#526a3d;padding:3px 9px;border-radius:5px;font-size:10px}
.row-arrow{transition:transform .18s ease}.article-row:hover .row-arrow{transform:translate(3px,-3px)}
body[data-page=articles] .article-controls{padding:20px;border:1px solid #dce1d2;border-radius:14px;background:#fdfdf8;gap:16px;margin-top:0}
.search-tools .search{border-radius:24px;padding-left:18px;min-height:46px}.search-tools select,.collection-filter-label select{border-radius:8px;min-height:44px}
body[data-page=articles] .section-head{border:0;margin-bottom:24px}
body[data-page=articles] .collection-discovery{padding-left:4px}
@media(max-width:1000px){.editorial-hero{gap:30px}.notebook-scene{height:330px}.note-sheet{inset:35px 40px 38px}.featured-text{padding:28px}}
@media(max-width:700px){
 .topbar{align-items:flex-start;gap:11px;min-height:112px}.topbar .nav{width:100%;gap:0;justify-content:space-between;font-size:12px}.topbar .nav a{padding:9px 11px}
 .editorial-hero{grid-template-columns:1fr;padding-top:22px;padding-bottom:22px;gap:0}
 .editorial-hero h1{font-size:clamp(30px,9vw,38px);margin:14px 0 10px}.editorial-hero .lede{font-size:14px;margin-bottom:14px}
 .hero-copy .eyebrow{font-size:10px}.hero-text-link{font-size:12px}
 .notebook-scene{display:none}
 .note-symbol{font-size:83px}.note-top{font-size:6px}.note-bottom{font-size:9px}.note-bottom>span{font-size:5px;margin-top:2px}.note-rule{margin-bottom:6px}
 .scene-sticker{width:65px;height:65px;padding:12px 10px;font-size:11px;right:38px;top:12px}.scene-sticker>span{font-size:16px;bottom:8px}.scene-tag{font-size:10px;bottom:17px;left:32px;padding:8px 12px}.scene-cross{right:29px;bottom:20px;font-size:26px}
 body[data-page=home] .section{padding-top:10px}
 .featured{border-radius:10px}
 .featured h3{font-size:24px}.featured-text{padding:24px}.featured p{font-size:14px}.article-row{padding:23px 4px}
 .article-row h3{font-size:21px}.row-category{font-size:10px}
 body[data-page=articles] .article-controls{padding:16px}.search-tools{width:100%}.search-tools .search{min-width:0}
}
@media(max-width:360px){
 .editorial-hero h1{font-size:30px}
 .topbar .nav a{padding-left:8px;padding-right:8px}
 .actions{gap:15px}
 body[data-page=home] .section-head{padding-bottom:8px;margin-bottom:12px}
 body[data-page=home] .featured-text{padding:18px}
 body[data-page=home] .featured h3{font-size:20px;line-height:1.45}
}
@media(prefers-reduced-motion:reduce){.button span[aria-hidden],.article-row,.row-arrow{transition:none}.button:hover span[aria-hidden],.article-row:hover .row-arrow{transform:none}}

/* 返回入口对齐外层导航左边缘，不占用正文阅读列。 */
.post-page .article-return{max-width:1160px;margin:10px auto 0;padding:0 40px}
.post-page .article-return a{display:inline-flex;align-items:center;gap:8px;min-height:44px;color:var(--muted,#657167);font:500 14px/1.5 system-ui,sans-serif;text-decoration:none;text-underline-offset:6px;text-decoration-thickness:1px}
.post-page .article-return a:hover,.post-page .article-return a:focus-visible{color:var(--accent,#b65332);text-decoration:underline}
.post-page .article-return a:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.post-page .article-return+main{margin-top:26px}
@media(max-width:700px){.post-page .article-return{margin-top:8px;padding:0 22px}.post-page .article-return a{font-size:16px}.post-page .article-return+main{margin-top:20px}}
@media(max-width:360px){.post-page .article-return{padding:0 18px}}

.home-project { padding-block: clamp(24px, 5vw, 56px); }
.home-project-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 40px;
  padding: clamp(22px, 5vw, 54px);
  background: #e9ede2;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.home-project h2 {
  font: 600 clamp(24px, 4vw, 34px)/1.4 var(--display);
  margin: 8px 0;
}
.home-project p { margin: 0; max-width: 38em; line-height: 1.8; color: var(--muted); }
.home-project .button { justify-self: start; }

.article-results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.article-results-bar .results-note { margin: 0; }
.article-results-bar button {
  min-height: 44px;
  padding-inline: 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.article-results-bar button:hover,
.jump-to-comments:hover { text-decoration: underline; text-underline-offset: 4px; }

.archive-month summary { min-height: 44px; cursor: pointer; }
.archive-month summary:hover, .archive-month summary:focus-visible { color: var(--accent); }
.archive-month a { margin: 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.archive-month a:last-child { border-bottom: 0; }
.collection-card-main:hover h2, .collection-card-main:focus-visible h2 { text-decoration: underline; text-underline-offset: 5px; }
.about-inner a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 18px; }
#contact, #article-comments { scroll-margin-top: 32px; }
.jump-to-comments { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 14px; }

@media (max-width: 700px) {
  .home-project-panel { grid-template-columns: 1fr; }
  .collection-search input, .collection-search select,
  .contact-form input, .contact-form textarea { font-size: 16px; }
}


/* Public browsing and writing controls */
body[data-page=articles] .article-controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, .85fr);
  align-items: end;
}
.article-control {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.article-control .search, .article-control select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bfcab9;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.45 system-ui, sans-serif;
}
.public-picker { cursor: pointer; }
.public-picker:hover, .article-control .search:hover { border-color: #819477; }

@supports (appearance: base-select) and selector(::picker(select)) {
  .public-picker, .public-picker::picker(select) { appearance: base-select; }
  .public-picker::picker(select) {
    margin-block: 5px;
    padding: 5px;
    max-block-size: min(320px, 48vh);
    max-inline-size: min(28rem, calc(100vw - 32px));
    border: 1px solid #bfcab9;
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 10px 28px #233b2724;
  }
  .public-picker option {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 7px;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .public-picker option:checked { background: #e3ecdf; color: #204b37; font-weight: 650; }
  .public-picker option:is(:hover, :focus-visible) { background: #d6e5d1; }
  .public-picker::picker-icon { color: #41684d; }
}

.contact-section .contact-form {
  padding: clamp(20px, 4vw, 36px);
  border-radius: 18px;
  background: var(--surface);
}
.contact-private {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 24px;
  background: #e8efe3;
  color: #30563f;
  font-size: 13px;
}
.contact-form .form-heading { margin-bottom: 20px; }
.contact-form .form-heading h3 { margin-block: 10px 4px; }
.contact-form .form-heading p { font-size: 14px; }
.contact-form input:not([name=website]), .contact-form textarea {
  border-radius: 10px;
  background: var(--surface);
  font: 400 16px/1.55 system-ui, sans-serif;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #63716a; opacity: 1; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #41684d; background: #fff; }
#contact-notice:not(:empty) { padding: 10px 12px; border-inline-start: 3px solid currentColor; background: #edf2e9; }
#contact-notice.error { background: #fff0eb; }
.article-pagination button, .collection-pagination a { min-height: 44px; }
.collection-pagination a { display: inline-flex; align-items: center; }
.article-results-bar button:focus-visible,
.jump-to-comments:focus-visible { outline-offset: 3px; }

@media (max-width: 620px) {
  body[data-page=articles] .article-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .article-search-field { grid-column: 1 / -1; }
  .contact-submit { flex-wrap: wrap; gap: 10px; }
}

/* Shared public controls and reading hierarchy. */
:where(.nav, .post-topbar, .footer-links) a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
:where(.article-controls, .collection-search, .contact-form) :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}
:where(.article-controls, .collection-search, .contact-form) :is(input, select, textarea):disabled {
  opacity: .65;
  cursor: wait;
}
:where(.contact-form) :is(input, textarea):read-only { background: #eef1ea; }
:where(.article-results-bar, .collection-search) button,
.collection-search input, .collection-search select { border-radius: var(--control-radius); }
.collection-search input { min-height: 46px; font-size: 16px; }
.collection-search select { min-height: 46px; font-size: 16px; }
.collection-card-main:focus-visible,
.article-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 5px; }
.archive-month summary { padding-block: 8px; }
.archive-month summary span { font-variant-numeric: tabular-nums; }
.post-page main>article :is(h2,h3,h4) { scroll-margin-top: 100px; text-wrap: balance; }
.post-page main>article :is(ul,ol) { padding-inline-start: 1.5em; }
.post-page main>article li+li { margin-top: .5em; }
.post-page main>article a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.post-page main>article a:hover { color: var(--accent); text-decoration-thickness: 2px; }
.post-page main>article table { font-size: 15px; line-height: 1.7; }
.post-page main>article th { background: #edf1e8; text-align: start; }
.post-page main>article :is(td,th) { padding: 12px 16px; border-color: var(--line); }
.post-page main>article hr { margin-block: 36px; border: 0; border-top: 1px solid var(--line); }
.post-page .reading-tools summary { min-height: 44px; display: list-item; cursor: pointer; font-size: 15px; }
.post-page .reading-tools nav { display: grid; gap: 4px; padding-block: 8px; }
.post-page .reading-tools nav a {
  display: block;
  padding: 10px 12px 10px calc(12px + var(--toc-depth,0)*14px);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
.post-page .reading-tools nav a:is(:hover,[aria-current=location]) { background: #e1eadb; color: #244a35; }
.post-page .reading-tools>button, .post-page .code-copy { min-height: 44px; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.reading-toc-dialog nav a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.reading-toc-header strong { font-size: 17px; }
@media (max-width: 620px) {
  .post-page .reading-tools { padding: 12px 16px; }
  .post-page main>article { font-size: 17px; line-height: 1.9; }
  .post-page main>article pre { padding: 16px; }
  .post-page main>article :is(td,th) { padding: 10px 12px; }
}
