:root{--paper:#faf7ef;--ink:#292723;--muted:#6e6a61;--line:#d8d1c4;--red:#943d32;--yellow:#f0c55f;--green:#41634f;--cream:#eee8da;font-family:ui-sans-serif,system-ui,-apple-system,"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0}a{color:inherit;text-underline-offset:5px}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid var(--red);outline-offset:5px}::selection{background:#edcd86}p{line-height:1.85}.wrap{width:min(1240px,calc(100% - 80px));margin:auto}.skip{position:absolute;top:-100px;padding:15px;background:white;z-index:5}.skip:focus{top:10px}.masthead{height:100px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--ink);gap:20px}.brand{font-family:Georgia,serif;font-weight:bold;font-size:32px;letter-spacing:-1.7px;text-decoration:none;display:flex;align-items:center;gap:12px}.brand-mark{font-size:37px;color:var(--red);font-family:system-ui}.nav{display:flex;gap:30px;align-items:center;font-size:14px}.nav a{text-decoration:none}.nav a:hover{color:var(--red)}.nav .pill{border:1px solid var(--ink);border-radius:30px;padding:10px 19px}.eyebrow{font-size:12px;letter-spacing:2px;font-weight:700;text-transform:uppercase;display:flex;align-items:center;gap:12px}.eyebrow:before{content:'';width:7px;height:7px;background:var(--red);border-radius:50%}.hero{display:grid;grid-template-columns:1.1fr 1fr;gap:50px;padding:66px 0 58px;align-items:center}.hero h1{font-family:ui-serif,Georgia,"Noto Serif TC","Songti TC",serif;font-size:clamp(40px,4.5vw,64px);font-weight:600;letter-spacing:-2px;line-height:1.34;margin:24px 0}.hero h1 em{font-style:normal;color:var(--red)}.hero-copy{font-size:17px;color:var(--muted);max-width:460px}.text-link{display:inline-flex;gap:24px;align-items:center;font-weight:600;text-decoration:none;border-bottom:1px solid var(--ink);padding:8px 0}.hero-art{position:relative;min-width:0}.hero-art svg{width:100%;height:auto;display:block}.art-caption{display:flex;justify-content:space-between;font:11px ui-monospace,monospace;color:var(--muted);letter-spacing:1px;margin-top:12px}.section-line{border-top:1px solid var(--ink);display:flex;justify-content:space-between;align-items:center;padding-top:20px;gap:15px}.section-line h2{font-size:21px;margin:0}.section-line span{color:var(--muted);font-size:12px}.category{color:var(--red);font-size:12px;font-weight:600}.manifesto{padding:40px 0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 2fr;gap:50px}.manifesto h2{font-size:24px;line-height:1.6;margin:0}.manifesto p{font-size:15px;margin:0;color:var(--muted);max-width:690px}.footer{border-top:1px solid var(--ink);padding:25px 0 32px;margin-top:30px;display:flex;justify-content:space-between;gap:20px;font-size:12px;color:var(--muted)}.footer .links{display:flex;gap:20px}.breadcrumb{padding:28px 0;font-size:12px;color:var(--muted)}.article-head{max-width:870px;margin:12px auto 44px}.article-head h1{font:600 clamp(30px,4.2vw,51px)/1.45 ui-serif,Georgia,"Noto Serif TC","Songti TC",serif;letter-spacing:-.8px;margin:23px 0}.deck{font-size:19px;color:var(--muted)}.byline{font-size:12px;color:var(--muted);display:flex;gap:18px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:20px;margin-top:27px}.article-layout{display:grid;grid-template-columns:180px minmax(0,760px);gap:70px;justify-content:center}.article-toc{font-size:12px;line-height:1.7;position:sticky;top:25px;align-self:start}.article-toc p{font-weight:600;letter-spacing:1px}.article-toc a{display:block;margin:18px 0;text-decoration:none;color:var(--muted)}.article-body{min-width:0}.article-body h2{font-size:25px;line-height:1.5;margin:44px 0 20px}.article-body p{font-size:17px;line-height:2;letter-spacing:.2px}.article-body a{color:var(--red)}.article-body section{scroll-margin-top:30px}.article-body .sources{margin-top:45px;border-top:1px solid var(--line);padding-top:10px}.sources p,.sources li{font-size:13px;line-height:1.8;color:var(--muted)}.sources li{margin:12px 0}.action-button{border:1px solid var(--ink);border-radius:3px;background:transparent;color:var(--ink);padding:12px 17px;min-height:44px;font-size:14px;text-decoration:none;display:inline-block}.action-button{background:var(--ink);color:var(--paper)}.note-box{padding:24px;background:#e6e9df;border-left:3px solid var(--green);margin:30px 0}.note-box p{margin:0;font-size:15px}.next-reading{border-top:1px solid var(--ink);margin:55px 0 20px;padding-top:25px}.next-reading a{font-size:20px;line-height:1.6}.about-page{max-width:760px;margin:30px auto 70px}.about-page h1{font-size:45px;font-family:Georgia,serif}.about-page h2{font-size:25px;margin-top:35px}.about-page p{font-size:17px}.error-page{padding:90px 0 120px}.error-page h1{font-size:40px}@media(max-width:900px){.wrap{width:calc(100% - 44px)}.hero{gap:20px}.hero h1{font-size:42px}.hero-copy{font-size:15px}.article-layout{grid-template-columns:1fr;max-width:760px;margin:auto;gap:0}.article-toc{display:none}.article-head{max-width:760px}}@media(max-width:620px){.wrap{width:calc(100% - 36px)}.masthead{height:84px}.brand{font-size:26px;gap:6px}.brand-mark{font-size:29px}.nav{gap:15px;font-size:12px}.nav .pill{padding:8px 11px}.nav .nav-about{display:none}.hero{grid-template-columns:1fr;padding:39px 0 35px;gap:22px}.hero h1{font-size:43px;margin:21px 0}.hero-copy{font-size:16px}.hero-art{max-width:440px;width:100%;margin:auto}.hero-art svg{max-height:310px}.hero .eyebrow{font-size:10px}.category{font-size:11px}.manifesto{grid-template-columns:1fr;gap:15px;padding:28px 0}.manifesto h2{font-size:21px}.footer{flex-direction:column;margin-top:20px}.article-head{margin-top:5px;margin-bottom:28px}.article-head h1{font-size:33px}.deck{font-size:17px}.article-body p{font-size:16px}.article-body h2{font-size:23px}.section-line span{font-size:10px}.about-page h1{font-size:35px}}@media(prefers-reduced-motion:no-preference){a,button{transition:color .15s,background-color .15s}}
/* Paper reading pages and practical reading tools. */
.brand-dot{color:var(--red)}.hero h1{font-size:clamp(40px,4.2vw,61px);line-height:1.14;letter-spacing:-2px}.hero-copy{line-height:1.8}.notebook{padding:35px 32px 42px;background:#ebe7d9;border:1px solid #d6cebb;min-height:375px;position:relative;box-shadow:10px 10px 0 #f1eadb}.notebook-top{display:flex;justify-content:space-between;font:10px ui-monospace,monospace;letter-spacing:1px;color:#685f4d;border-bottom:1px solid #aa9e87;padding-bottom:16px}.notebook-title{font:italic 43px/1.12 Georgia,serif;margin:24px 0;color:#395944}.note-row{display:flex;gap:16px;padding:13px 0;border-bottom:1px solid #c9c0ac;align-items:center;font-size:12px}.note-row>span{font:11px ui-monospace,monospace;color:#85785f}.note-row i{height:4px;background:#ccc1aa;flex:1;max-width:80px;margin-left:auto}.note-stamp{position:absolute;right:24px;top:103px;transform:rotate(12deg);border:1px solid var(--red);border-radius:50%;height:90px;width:90px;display:grid;place-content:center;color:var(--red);font:11px/1.5 ui-monospace,monospace;text-align:center}.guide-feature{display:grid;grid-template-columns:1.6fr 1fr;gap:55px;padding:36px 0 40px;text-decoration:none}.guide-feature h2{font:34px/1.2 Georgia,serif;letter-spacing:-.6px;margin:16px 0}.guide-feature p{color:var(--muted);max-width:650px;font-size:15px}.guide-feature:hover h2{color:var(--red)}.guide-facts{border-left:1px solid var(--line);padding:8px 0 0 34px;align-self:center}.guide-facts>span{display:block;padding:13px 0;font:11px ui-monospace,monospace;color:var(--green)}.guide-facts p{font:10px ui-monospace,monospace;line-height:1.6;margin-top:24px}.tool-strip{background:#e5e9df;padding:28px 32px;margin:0 0 54px;display:flex;gap:30px;justify-content:space-between;align-items:center}.tool-strip h2{font:25px Georgia,serif;margin:13px 0}.tool-strip p{font-size:14px;max-width:680px;margin:0}.tool-strip .action-button{flex-shrink:0}.tool-strip .eyebrow{font-size:10px}.download-box{padding:25px 30px;background:#e5e9df;margin:12px 0 35px}.download-box h2{margin:13px 0!important}.download-box .action-button{color:var(--paper)}.download-box .micro{font-size:12px}.article-body .section-citations{font-size:13px;line-height:1.7}.article-head h1{line-height:1.2}.article-body p{line-height:1.85;letter-spacing:0}.nav{gap:24px}.article-body .micro{font-size:12px;color:var(--muted)}
@media(max-width:900px){.notebook{padding:25px 22px;min-height:330px}.notebook-title{font-size:34px}.note-stamp{width:70px;height:70px;right:15px;top:103px;font-size:9px}.hero h1{font-size:43px}.guide-feature{gap:25px}.guide-feature h2{font-size:30px}.guide-facts{padding-left:20px}}
@media(max-width:620px){.masthead{height:auto;min-height:96px;flex-wrap:wrap;padding:20px 0 16px;gap:16px}.nav{width:100%;justify-content:space-between;gap:14px}.nav .nav-about{display:block}.hero h1{font-size:43px}.notebook{min-height:325px}.notebook-title{font-size:39px}.guide-feature{grid-template-columns:1fr;gap:15px;padding-top:26px}.guide-facts{border-left:0;border-top:1px solid var(--line);padding:15px 0 0}.guide-facts>span{padding:7px 0}.guide-facts p{margin-top:15px}.tool-strip{flex-direction:column;align-items:flex-start;padding:24px;gap:20px;margin-bottom:40px}.tool-strip h2{font-size:24px}.section-line{align-items:flex-start;flex-direction:column;gap:9px}.section-line h2{font-size:21px}.download-box{padding:22px 18px}.download-box .action-button{font-size:13px}.article-head h1{font-size:35px}.art-caption{font-size:9px}}

/* A clear local starting point and an honest invited-account alternative. */
.shelf-entry>div{width:100%}.shelf-entry-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:20px}.shelf-entry-options>div{min-width:0}.shelf-entry-options>div+div{border-left:1px solid #a8b6a3;padding-left:24px}.shelf-entry-options h3{font-size:15px;margin:0 0 6px}.shelf-entry-options p{margin:0 0 14px}.shelf-entry-options a:not(.action-button){display:inline-block;padding:10px 0;font-size:14px;text-underline-offset:3px}.shelf-entry details{margin-top:16px;font-size:12px}.shelf-entry summary{cursor:pointer;text-decoration:underline;text-underline-offset:3px}.shelf-entry details p{margin-top:8px;font-size:12px}@media(max-width:620px){.shelf-entry-options{grid-template-columns:minmax(0,1fr);gap:20px}.shelf-entry-options>div+div{border-left:0;border-top:1px solid #a8b6a3;padding:16px 0 0}}

:root{--ink:#263d34;--muted:#626d62;--line:#dce0d5;--control-border:#7b8778;--focus:#a66b32;--paper:#f8f7f2;--green:#315d47}*{box-sizing:border-box}body{background:var(--paper);color:var(--ink);font-family:Arial,sans-serif;margin:0}button,input,select,textarea{font:inherit}button,a,input,textarea,select{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}a{color:inherit}button{border:0;background:none;color:inherit}.top{max-width:1100px;margin:auto;padding:28px 32px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.brand{font-size:21px;text-decoration:none;font-weight:700}.brand span{font-size:15px;color:var(--muted);font-weight:400}.prototype,.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:700}.prototype{border:1px solid var(--line);border-radius:4px;padding:7px;color:var(--muted)}main{max-width:1000px;margin:auto;padding:42px 32px}.intro{display:flex;align-items:center;justify-content:space-between;gap:20px}h1{font-family:Georgia,serif;font-size:48px;line-height:1.1;letter-spacing:-1.6px;margin:14px 0 22px;font-weight:400}h1 em{color:#6b806b;font-weight:400}h2{font-family:Georgia,serif;font-weight:400;font-size:27px;margin:8px 0 14px}h3{margin:10px 0;font-size:19px;line-height:1.4}.primary,.secondary{padding:12px 18px;border-radius:7px;font-size:13px;font-weight:600}.primary{background:var(--green);color:white}.secondary{background:transparent;border:1px solid #bfc9bd}.local-info{font-size:12px;color:var(--muted);margin:0 0 32px;line-height:1.8}.views{display:flex;gap:32px;border-bottom:1px solid var(--line)}.views button,.views a{display:flex;align-items:center;justify-content:center;padding:14px 0;font-size:14px;border-bottom:2px solid transparent;text-decoration:none;text-align:center}.views [aria-current]{border-color:var(--green);font-weight:700}.tiny{font-size:9px;padding:3px 5px;background:#e9eadd;border-radius:3px;margin-left:4px}.shelf-bar{display:flex;align-items:center;justify-content:space-between;margin:27px 0 22px;gap:10px}.filters{display:flex;gap:5px;background:#eceee6;padding:4px;border-radius:7px}.filters button{font-size:12px;padding:9px 14px;border-radius:5px}.filters [aria-pressed=true]{background:white;box-shadow:0 1px 3px #0001;color:var(--green)}.muted{color:var(--muted)}.small{font-size:12px;line-height:1.6}#count{font-size:12px}.records{display:grid;gap:14px}.record{background:#fffefa;border:1px solid var(--line);border-radius:9px;padding:24px;display:flex;gap:21px;align-items:flex-start}.paper-icon{height:60px;width:47px;flex:none;border:1px solid #ccd4c5;border-radius:3px;background:linear-gradient(135deg,#f1f3eb,#e5e9dc);padding:15px 9px}.paper-icon:before{content:'';display:block;height:19px;background:repeating-linear-gradient(to bottom,#9eaf94 0,#9eaf94 1px,transparent 1px,transparent 6px)}.record-body{min-width:0;flex:1}.record h3{font-family:Georgia,serif;font-size:23px;font-weight:400;margin:6px 0 7px;overflow-wrap:anywhere}.record a{text-decoration:none}.record a:hover{text-decoration:underline}.metadata{font-size:12px;color:var(--muted);line-height:1.6}.record-type{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--muted)}.sample{font-size:9px;letter-spacing:0;text-transform:none;border:1px solid var(--line);padding:2px 5px;margin-left:7px;border-radius:3px}.record-bottom{display:flex;align-items:center;gap:15px;margin-top:18px}.record-bottom select{font-size:12px;background:#eef1e8;border:1px solid var(--control-border);padding:6px 8px;border-radius:5px;color:var(--green)}.text-button{font-size:12px;text-decoration:underline;text-underline-offset:3px;padding:5px 0}.takeaway{font-size:14px;line-height:1.65;margin:15px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.sample-info{font-size:11px;line-height:1.8;color:var(--muted);margin:20px 0 42px}.sample-info button{margin-left:5px;font-size:11px}.empty{border:1px dashed #c9d1c1;padding:42px 24px;text-align:center;border-radius:9px;color:var(--muted);line-height:1.6}.empty strong{display:block;color:var(--ink);font-family:Georgia,serif;font-size:24px;font-weight:400;margin-bottom:8px}footer{border-top:1px solid var(--line);margin-top:42px;padding:26px 0;display:flex;gap:55px;justify-content:space-between}footer>div:first-child{max-width:530px}footer strong{font-size:13px}footer p{font-size:11px;color:var(--muted);line-height:1.8}footer>div:last-child{flex:none}.section-head{margin:30px 0}.section-head p,.profile-head p{font-size:13px;color:var(--muted);line-height:1.6}.people{display:grid;grid-template-columns:1fr 1fr;gap:15px}.person{border:1px solid var(--line);border-radius:8px;padding:20px;display:flex;align-items:center;gap:12px}.person .secondary{margin-left:auto;padding:9px 12px}.avatar{background:#dde6d5;border-radius:50%;width:40px;height:40px;display:grid;place-items:center;font-family:Georgia,serif;flex:none}.person p{font-size:10px;color:var(--muted);margin:7px 0 0}.feed-title{font-size:12px;text-transform:uppercase;letter-spacing:1px;margin:32px 0 18px}.feed-card{padding:22px 0;border-top:1px solid var(--line)}.feed-card p{font-size:14px;line-height:1.7}.profile-head{display:flex;gap:20px;align-items:center;margin:34px 0}.profile-head .avatar{width:60px;height:60px;font-size:24px}#export-public{margin-top:23px}.message:empty{display:none}.message{margin-top:18px;padding:12px 16px;border-radius:6px;background:#e9eee0;font-size:13px;line-height:1.5}.message button{margin-left:14px;text-decoration:underline;font-weight:700}dialog{border:1px solid var(--line);border-radius:12px;padding:26px;width:560px;max-width:calc(100% - 24px);max-height:90dvh;background:var(--paper);color:var(--ink)}dialog::backdrop{background:#15251db0}#confirm{width:430px}#confirm p{font-size:14px;line-height:1.6}.dialog-head{display:flex;align-items:center;justify-content:space-between}.dialog-head button{font-size:28px;padding:0 8px}.dialog-head h2{margin:0}label{display:block;font-size:12px;margin-top:17px;font-weight:600}input,select,textarea{display:block;width:100%;padding:10px 12px;border:1px solid #cbd2c4;border-radius:5px;background:#fffefa;color:var(--ink);margin-top:7px}textarea{resize:vertical}.field-row{display:flex;gap:14px}.field-row label{flex:1}.field-row .year{max-width:100px}.check{display:flex;align-items:flex-start;gap:9px;font-size:11px;line-height:1.7;font-weight:400}.check input{width:auto;margin:3px 0 0}details{margin:18px 0;font-size:12px}summary{cursor:pointer}details label{margin-top:8px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;align-items:center}.dialog-actions .danger{margin-right:auto;color:#914c3c}#form-error{color:#9e4030;font-size:12px}[hidden]{display:none!important}@media(max-width:640px){.top{padding:20px}.prototype{font-size:8px}main{padding:30px 20px}h1{font-size:37px}.intro{align-items:flex-end}.intro .primary{padding:12px;font-size:11px;margin-bottom:22px}.eyebrow{font-size:8px}.views{gap:23px}.views button,.views a{font-size:12px}.filters button{padding:9px 10px;font-size:11px}.record{padding:20px 16px;gap:14px}.record h3{font-size:21px}.paper-icon{width:33px;height:47px;padding:13px 6px}footer{display:block}footer>div:last-child{margin-top:22px}.people{grid-template-columns:1fr}.person p{font-size:11px}.record-bottom{gap:12px}dialog{padding:20px}.dialog-actions{gap:7px}.dialog-actions button{padding:11px}.profile-head{align-items:flex-start}.profile-head h2{font-size:24px}}
.record-bottom select{width:auto;max-width:160px;flex:none;margin:0}.record-bottom .text-button{white-space:nowrap}
/* Meaningful field boundaries have their own contrast token; decorative lines
   and native checkbox/radio/file controls retain their existing appearance. */
input:not([type]),input:is([type=text],[type=search],[type=url],[type=email],[type=tel],[type=password],[type=number]),select,textarea{border-color:var(--control-border)}
/* Comfortable editor targets also apply above the phone breakpoint. */
#editor #cancel,#editor button[type=submit],#editor #close{min-width:44px;min-height:44px}
.shelf-editor [data-editor-id="cancel"],.shelf-editor button[type=submit],.shelf-editor [data-editor-id="close"]{min-width:44px;min-height:44px}

/* Account discovery and deliberate sharing */
#workspace>.views{margin:18px 0 24px;overflow-x:auto}.buttons{display:flex;flex-wrap:wrap;gap:8px}.search-field{flex:3!important}#discovery-form button,#people-form button,#profile-form button{margin:14px 0 0}#discovery-results{margin-top:20px}.record .record-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.record p{white-space:pre-wrap;overflow-wrap:anywhere}.status-label{font-size:11px;border:1px solid var(--line);border-radius:20px;padding:4px 8px;display:inline-block}.public-preview{padding:16px;border:1px solid var(--line);background:#fffefa;border-radius:6px;white-space:pre-wrap;overflow-wrap:anywhere}.danger-zone{margin-top:36px;border-top:1px solid var(--line);padding-top:16px}.danger-zone button{color:#914c3c}#profile-form,#people-form{max-width:540px}.record button:disabled{opacity:.6;cursor:default}@media(max-width:640px){#discovery-form .field-row{display:block}.views{gap:20px;white-space:nowrap}}

.zotero-import{margin:1.25rem 0;padding:1rem;border:1px solid #d8d9ce;border-radius:12px;background:#fffdf8}
.zotero-import summary{cursor:pointer;font-weight:600}
#zotero-preview{max-height:24rem;overflow:auto;padding-left:1.5rem;overflow-wrap:anywhere}
#zotero-preview li{padding:.6rem .2rem;border-bottom:1px solid #e5e5dc}
#zotero-file{max-width:100%}

/* Capture and bibliographic preview stay usable on narrow screens. */
.capture{margin:1.5rem 0;padding:1.2rem;border:1px solid var(--line,#ddd);border-radius:14px}.capture h2{font-size:1.1rem;margin-top:0}.capture .field-row{align-items:end}.capture .search-field{flex:1}.import-row{padding:1rem 0;border-bottom:1px solid #ddd;overflow-wrap:anywhere}.import-row p{font-size:.85rem}.import-row .check{align-items:start}.import-row input[type=checkbox]{flex:none}.import-edit{display:grid;gap:.6rem;margin-top:.7rem}.import-edit button{justify-self:start}.import-row button{margin:.3rem .4rem .3rem 0}#zotero-preview{padding-left:1.5rem}.capture button{flex:none}@media(max-width:600px){.capture .field-row{display:block}.capture button{margin-top:.6rem}.import-row strong{overflow-wrap:anywhere}}

/* Private library controls: wrapping fields and explicit, reviewable batches. */
#shelf-management{margin:28px 0 18px;padding:20px;border:1px solid var(--line);border-radius:12px;background:#f0f2e9}
#shelf-management h2{font-size:23px}.library-filters{display:grid;grid-template-columns:2fr 1fr 1fr 1.3fr;gap:12px;align-items:end}.library-filters label{margin:0;min-width:0}.library-filters>label:first-child{grid-column:1/-1}.library-filters input,.library-filters select{min-width:0}.library-filters button{min-height:40px}.library-batch-controls{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.library-batch-controls label{margin:0;min-width:170px}.library-preview{border-top:1px solid #c6cebd;margin-top:20px;padding-top:12px;font-size:13px;line-height:1.6}.library-preview ol,.library-outcomes{max-height:18rem;overflow:auto;overflow-wrap:anywhere;padding-left:22px}.library-preview button{margin:4px 6px 4px 0}.library-outcomes{font-size:12px;line-height:1.8}.record-selection{margin:0 0 10px;align-items:center}.record-selection input{min-width:18px;min-height:18px}#bulk-result-summary{font-size:13px;line-height:1.6;overflow-wrap:anywhere}#shelf-management button:disabled{opacity:.55;cursor:default}@media(max-width:640px){#shelf-management{padding:16px}.library-filters{grid-template-columns:1fr 1fr}.library-batch-controls>*{flex:1 1 145px}.library-batch-controls button{padding:10px}.shelf-bar{flex-wrap:wrap}.filters{flex-wrap:wrap}}

/* Private organization is separate from public profile previews. */
.reflection-prompts{margin:16px 0;padding:12px 14px;border:1px solid var(--line);border-radius:7px;background:#fffefa}
.reflection-prompts details{margin:0}.reflection-prompts summary{font-weight:600}.reflection-prompts p{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.reflection-prompts pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12px;line-height:1.65;margin:12px 0;padding:12px;border-left:3px solid var(--line)}
.reflection-prompts button{max-width:100%;white-space:normal;text-align:left}.reflection-prompts button:disabled{opacity:.6;cursor:default}#reflection-error{color:#9e4030}#reflection-error:empty{display:none}
.private-library{margin:1.5rem 0;padding:1.25rem;border:1px solid var(--line,#deded3);border-radius:12px;background:#fffdf7}
.private-library h2{font-size:1.15rem;margin-top:0}.private-library>p{font-size:.9rem}
.private-collection-row{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:.75rem 0}
.private-collection-row input{flex:1;min-width:10rem}.private-collection-row span{font-size:.8rem;color:#696b5d}
.private-item-details{border-top:1px solid var(--line,#deded3);margin-top:.8rem;padding-top:.6rem}.private-item-details p{font-size:.85rem;overflow-wrap:anywhere}
#private-memberships{border:1px solid var(--line,#deded3);margin:1rem 0;max-height:40vh;overflow:auto}
#private-editor button{margin:.35rem .35rem .35rem 0}#private-error,#private-status{overflow-wrap:anywhere}
@media(max-width:520px){.private-collection-row input{flex-basis:100%}.private-library{padding:.85rem}.private-library .field-row{display:block}}

/* Read-only whole-library overview, with text counts instead of charts. */
.shelf-overview{margin:24px 0;padding:20px;border:1px solid var(--line);border-radius:9px;background:#fffefa}.shelf-overview h2{font-size:23px}.shelf-overview h3{font-size:15px}.overview-counts{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.overview-counts button{padding:9px 12px;text-align:left}.overview-counts button:disabled{opacity:.65;cursor:default}.overview-details{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.overview-details p{font-size:12px;line-height:1.6}.overview-distribution{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;font-size:11px}.overview-distribution dt{font-weight:600}.overview-distribution dd{margin:5px 0 0;color:var(--muted)}#overview-recent{padding-left:20px;font-size:12px;line-height:1.5}#overview-recent li{margin:0 0 10px;overflow-wrap:anywhere}#overview-recent time{display:block;color:var(--muted);font-size:11px}.shelf-overview details{margin-bottom:0}.shelf-overview summary{font-weight:600}#overview-availability:empty{display:none}@media(max-width:640px){.shelf-overview{padding:16px}.overview-details{grid-template-columns:minmax(0,1fr);gap:12px}.overview-counts button{font-size:12px}.overview-distribution{grid-template-columns:repeat(5,minmax(0,1fr))}}

.reading-brief{margin:18px 0 24px;padding:18px;border:1px solid var(--line);border-radius:12px;background:#fffefa}.reading-brief fieldset{border:1px solid var(--line);padding:12px}.reading-brief .check{margin:8px 0}.reading-brief pre{max-height:28rem;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid var(--line);background:#fff;padding:14px;font-size:12px;line-height:1.6;tab-size:4}.reading-brief button:disabled{opacity:.55;cursor:default}.reading-brief h3{font-size:16px}#brief-message,#brief-count{font-size:13px;line-height:1.6}

.reading-brief .reference-preview{min-width:0;max-width:100%;min-height:8rem;max-height:50dvh;font:12px/1.6 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;overscroll-behavior:contain}
.reading-brief #brief-references>summary{min-height:44px;padding:12px 0;font-weight:600}

/* Multiline single-reference capture, with a visible way to discard raw paste. */
.capture textarea{width:100%;min-height:6rem;resize:vertical;overflow-wrap:anywhere}.capture .search-field{min-width:0}.capture-actions{display:flex;flex-direction:column;gap:.35rem;align-items:stretch}.capture-actions .text-button{padding:.5rem}.capture #capture-status{overflow-wrap:anywhere}@media(max-width:600px){.capture-actions{flex-direction:row;flex-wrap:wrap;align-items:center}}

/* Shelf-first layout: secondary tools stay available without preceding every card. */
.library-tools{margin:16px 0;border:1px solid var(--line);border-radius:10px;padding:0 16px;background:#fffefa}
.library-tools>summary{min-height:44px;padding:14px 0;font-size:14px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.library-tools>section{margin:16px 0}
#library-batch-tools{padding:16px;border:1px solid var(--line);border-radius:9px;background:#f0f2e9}
#library-batch-tools h2{font-size:23px}
.library-selection{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;margin-top:14px}
.library-selection p{margin:0}
#library-active-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;border-left:3px solid var(--green);padding:0 12px;margin:12px 0}
#library-active-filters p{flex:1 1 220px;margin:0;overflow-wrap:anywhere}
#library-active-filters button{min-height:44px}
#library-feedback:empty,#private-status:empty,#bulk-result-summary:empty,#bulk-results:empty{display:none}
#library-feedback p{font-size:13px;line-height:1.6;overflow-wrap:anywhere}

/* Phone layouts: keep the reading surface wide and controls easy to reach.
   Deliberately scoped to shelf.css so the editorial pages and game keep their layout. */
.field-row > label,.dialog-head > h2{min-width:0}
.record h2,.dialog-head h2,.private-collection-row span{overflow-wrap:anywhere}
.reading-brief fieldset,#private-memberships{min-inline-size:0;max-width:100%}

@media (max-width:640px){
  .top{padding:12px 16px;gap:8px 16px;flex-wrap:wrap}
  .top .brand{min-width:0;max-width:100%;gap:6px;flex-wrap:wrap;letter-spacing:-.6px;font-size:20px;min-height:44px}
  .top .brand span{font-size:13px}
  .top > a:not(.brand){display:inline-flex;align-items:center;min-height:44px;font-size:13px}
  .prototype{font-size:9px;letter-spacing:1px;padding:7px}
  main{padding:24px 16px 32px}
  main,dialog,.top{overflow-wrap:anywhere}
  .intro{display:block}
  h1{font-size:clamp(30px,8.8vw,38px);line-height:1.13;letter-spacing:-1px;margin:12px 0 18px}
  .eyebrow{font-size:9px;letter-spacing:1px;gap:8px}
  .eyebrow:before{flex:none}
  .intro .primary{width:100%;min-height:44px;font-size:14px;margin:0 0 16px;padding:12px 16px}
  main > p,#signed-out p{font-size:14px;line-height:1.65}
  .local-info{font-size:13px;margin-bottom:20px;line-height:1.65}
  .small,.metadata,.section-head p,.profile-head p{font-size:13px;line-height:1.6}
  .primary,.secondary,.buttons button,.text-button{min-height:44px;max-width:100%;font-size:13px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
  .primary,.secondary,.buttons button{padding:11px 14px}
  input,select,textarea{min-width:0;max-width:100%;font-size:16px;line-height:1.4}
  input:not([type=checkbox]),select{min-height:44px}
  input[type=file]{width:100%;font-size:13px;padding:9px}
  label{font-size:13px;line-height:1.45}
  .check{min-height:44px;align-items:center;font-size:13px;line-height:1.5;gap:10px}
  .check input{flex:none;width:18px;height:18px;min-height:18px;margin:0}
  summary{min-height:44px;padding:12px 0;font-size:13px;line-height:1.5}
  .views,#workspace > .views{gap:4px 12px;flex-wrap:wrap;white-space:normal;overflow:visible}
  .views button,.views a{flex:1 1 80px;min-width:0;min-height:48px;padding:12px 4px;font-size:13px;line-height:1.35;white-space:normal}
  .tiny{display:inline-block;margin-left:2px}
  .buttons{gap:8px;margin:16px 0}
  #shelf-panel > .buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  #shelf-panel > .buttons #add{grid-column:1/-1}
  .capture,.private-library,.shelf-overview,#shelf-management,.reading-brief{margin:16px 0;padding:16px;border-radius:10px}
  .capture h2,.private-library h2{font-size:19px;line-height:1.3}
  .shelf-overview h2,#shelf-management h2{font-size:22px}
  .capture .field-row,#discovery-form .field-row{display:block}
  .capture .search-field{min-width:0}
  .capture .field-row > button{width:100%;margin:10px 0 0}
  .capture .capture-actions{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;margin-top:10px}
  .capture .capture-actions button{flex:1 1 120px;margin:0}
  .capture textarea{min-height:6rem;resize:vertical}
  #capture-status:empty{display:none}
  .zotero-import{margin:16px 0;padding:4px 16px;border-radius:10px}
  #zotero-preview{padding-left:20px;max-height:50dvh;overscroll-behavior:contain}
  .import-row{padding:12px 0}
  .import-row button{margin:4px 4px 4px 0}
  .overview-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .overview-counts button{min-width:0;min-height:44px;padding:10px;font-size:13px}
  .overview-distribution{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px 6px}
  .overview-details{gap:8px}
  .overview-details p{font-size:13px}
  .library-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .library-filters button{min-height:44px}
  .library-batch-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .library-batch-controls > *{min-width:0}
  .library-batch-controls label{grid-column:1/-1;min-width:0;margin-top:8px}
  .library-batch-controls #bulk-preview{grid-column:1/-1;padding:11px 14px}
  .field-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .field-row .year{max-width:none}
  .private-library .field-row{display:grid}
  .private-library > p{font-size:13px;line-height:1.6}
  .private-collection-row{gap:8px}
  .private-collection-row input{min-width:0;flex-basis:100%}
  .private-collection-row span{flex-basis:100%;font-size:12px}
  .private-collection-row button{flex:1 1 100px}
  .reading-brief fieldset{padding:10px}
  .reading-brief pre{padding:10px;max-height:50dvh;overscroll-behavior:contain}
  .reading-brief .reference-preview{font-size:16px}
  .shelf-bar{align-items:flex-start;gap:12px;margin:20px 0 14px}
  .filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:4px}
  .filters button{min-width:0;min-height:44px;font-size:13px;padding:10px 8px}
  #count{font-size:13px}
  .records{gap:12px}
  .record{padding:16px;display:block}
  .record .paper-icon{display:none}
  .record h2,.record h3{font-size:22px;line-height:1.3;margin:8px 0}
  .record p{font-size:14px;line-height:1.65}
  .record .metadata{font-size:13px}
  .record-bottom{flex-wrap:wrap;gap:8px 12px;margin-top:14px}
  .record-bottom select{min-height:44px;font-size:16px;max-width:100%;flex:1 1 140px}
  .record-bottom .text-button{white-space:normal;flex:1 1 120px;text-align:left}
  .record .record-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-top:14px}
  .record-actions > a,.record-actions > button{display:flex;align-items:center;justify-content:center;min-height:44px;text-align:center;white-space:normal}
  .private-item-details .secondary{width:100%}
  .record-selection{margin:8px 0 0}
  .empty{padding:28px 16px}
  .person{flex-wrap:wrap;padding:16px;gap:10px}
  .person > div:not(.avatar){min-width:0;flex:1}
  .person .secondary{min-height:44px;margin-left:0}
  .profile-head{gap:12px;margin:24px 0}
  .profile-head > div:last-child{min-width:0}
  .profile-head .avatar{width:44px;height:44px;font-size:20px}
  .message{padding:12px;font-size:13px}
  .message button{min-height:44px;margin:8px 0 0;display:block}
  footer{gap:20px;margin-top:28px;padding:20px 0}
  footer > div:last-child{min-width:0}
  footer p{font-size:12px;line-height:1.65}
  .sample-info{font-size:12px;margin:16px 0 28px}
  .sample-info button{font-size:12px;min-height:44px}
  dialog{width:calc(100% - 16px);max-width:560px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:16px;overflow:auto;overscroll-behavior:contain;scroll-padding:16px}
  #confirm{width:calc(100% - 16px);max-width:430px}
  .dialog-head{gap:12px;align-items:flex-start}
  .dialog-head h2{font-size:24px;line-height:1.25;align-self:center}
  .dialog-head button{flex:none;min-width:44px;min-height:44px;padding:8px;font-size:15px}
  #editor #close[aria-label]{font-size:28px;padding:0 8px}
  .shelf-editor [data-editor-id="close"][aria-label]{font-size:28px;padding:0 8px}
  .dialog-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
  .dialog-actions button{flex:1 1 100px;min-height:44px;padding:11px 12px}
  .dialog-actions .danger{flex-basis:100%;margin-right:0;text-align:left}
  #private-editor h2{font-size:24px;line-height:1.3;overflow-wrap:anywhere}
  #private-editor button{min-height:44px;max-width:100%;white-space:normal}
  #private-memberships{padding:10px;max-height:35dvh;overflow:auto;overscroll-behavior:contain}
}

@media (max-width:380px){
  main{padding:20px 12px 28px}
  .top{padding:8px 12px;gap:4px 10px}
  .capture,.private-library,.shelf-overview,#shelf-management,.reading-brief{padding:12px}
  .record{padding:14px}
  .record h2,.record h3{font-size:21px}
  .library-filters,.private-library .field-row,dialog .field-row{grid-template-columns:minmax(0,1fr)}
  .library-batch-controls{grid-template-columns:minmax(0,1fr)}
  .library-batch-controls label{margin-top:4px}
}

/* Optional native shortcut past organization tools, without changing filters. */
.mobile-library-jump{display:none}
/* Keep the local list's heading available to assistive technology without adding a visual row. */
#saved-items-heading{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.records[tabindex="-1"]{scroll-margin-top:16px}
.records[tabindex="-1"]:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
@media (max-width:640px){
  .mobile-library-jump{display:flex;align-items:center;justify-content:center;min-height:44px;margin:16px 0;text-align:center;text-decoration:none}
}

/* Account item actions stay visibly clickable without changing their behavior. */
.record .record-action{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:44px;min-height:44px;max-width:100%;
  margin:12px 8px 0 0;padding:10px 14px;
  border:1px solid #315d47;border-radius:7px;
  background:#eef3ec;color:#263d34;
  font-size:13px;font-weight:600;line-height:1.4;
  vertical-align:middle;text-align:center;white-space:normal;overflow-wrap:anywhere;
}
.record .record-action:hover:not(:disabled){background:#dfeadd}
.record .record-action:active:not(:disabled){background:#ccdcca}
.record .record-action-danger{border-color:#914c3c;background:#fff4ef;color:#7a382c}
.record .record-action-danger:hover:not(:disabled){background:#f8e3da}
.record .record-action-danger:active:not(:disabled){background:#f0d2c5}
.record .record-action:focus-visible{outline:3px solid #263d34;outline-offset:3px}
.record .record-action:disabled{
  opacity:1;cursor:not-allowed;border-style:dashed;border-color:#a7ada5;
  background:#f0f1ec;color:#62685f;
}
@media (max-width:640px){
  .record .record-action{width:100%;margin:8px 0 0}
}

/* Both storage routes share record hierarchy; the decorative icon is visually
   first without preceding the meaningful reading content in DOM order. */
.record>.paper-icon{order:-1}

/* Community reader cards keep long chosen names/bios inside the card. */
.person > div:not(.avatar){min-width:0;overflow-wrap:anywhere;flex:1}
.person .secondary{flex-shrink:0}

/* One continuous ten-point scale; the radio group stays intact when it wraps. */
.star-rating{min-inline-size:0;max-width:100%;margin:18px 0;padding:0;border:0}
.star-rating legend{font-size:13px;font-weight:600;margin-bottom:8px}
.star-rating-options{display:grid;grid-template-columns:repeat(10,minmax(44px,1fr));gap:4px}
.star-rating-option{position:relative;display:block;min-width:44px;min-height:44px;margin:0;cursor:pointer;touch-action:manipulation}
.star-rating-option input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}
.star-rating-icon{display:grid;place-items:center;min-height:44px;border:2px solid transparent;border-radius:7px;color:#805819;font-size:32px;line-height:1;pointer-events:none}
.star-rating-option input:checked + .star-rating-icon{border-color:var(--green);background:#e9efe3}
.star-rating-option input:focus-visible + .star-rating-icon,.star-rating button:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
.star-rating:disabled .star-rating-option{cursor:default;opacity:.55}
.star-rating-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:8px}
#private-rating-value{font-weight:700;font-size:16px;min-width:5ch}
#private-rating-clear{min-height:44px;margin:0}
#private-rating-help{margin:8px 0 0}
@media(max-width:559px){.star-rating-options{grid-template-columns:repeat(5,minmax(44px,1fr));max-width:280px}}
@media(forced-colors:active){.star-rating-icon{color:CanvasText}.star-rating-option input:checked + .star-rating-icon{border-color:Highlight}.star-rating-option input:focus-visible + .star-rating-icon,.star-rating button:focus-visible{outline-color:Highlight}}

/* A read-only view of explicitly shared snapshots, only in the account area. */
.shared-paper-dialog{width:min(720px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow-y:auto}
.shared-paper-dialog .dialog-head{align-items:flex-start;gap:16px}
.shared-paper-dialog .dialog-head h2{min-width:0;overflow-wrap:anywhere}
.shared-paper-dialog .dialog-head button{flex-shrink:0;min-height:44px}
.shared-paper-details{border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:18px}
.shared-paper-details p,.shared-paper-snapshot p,.shared-paper-snapshot h4,#shared-paper-status{overflow-wrap:anywhere;line-height:1.6}
.shared-paper-snapshot h3{font-family:Arial,sans-serif;font-size:16px;font-weight:700}
.shared-paper-snapshot h4{font-family:Georgia,serif;font-size:19px;font-weight:400;margin:10px 0}
.shared-paper-source{font-size:12px}.shared-paper-source a{text-decoration:underline}
.shared-paper-snapshot .takeaway{white-space:pre-wrap}
.shared-paper-open{margin-top:8px;max-width:100%;white-space:normal;text-align:left;min-height:44px}
@media(max-width:559px){.shared-paper-dialog{padding:18px}.shared-paper-dialog .dialog-head h2{font-size:23px}.shared-paper-snapshot{padding:16px}}

/* One explicit account-item sharing review, including small-screen actions. */
#sharing-fields{border:0;padding:0;margin:20px 0 0;display:flex;flex-wrap:wrap;gap:12px 24px}
#sharing-fields legend{font-size:12px;font-weight:600;margin-bottom:4px}
#sharing-fields .check{margin-top:8px;font-size:13px;min-height:44px;align-items:center}
#sharing-editor .dialog-head{gap:16px;align-items:flex-start}
#sharing-close{font-size:14px;min-height:44px;flex-shrink:0}
#sharing-state{font-size:12px;margin:18px 0 0}
#sharing-content p{line-height:1.6}
#sharing-content a{overflow-wrap:anywhere}
#sharing-error{font-size:13px;line-height:1.6;color:#9e4030}
#sharing-error:empty{display:none}
#sharing-editor button:disabled{opacity:.6;cursor:default}

/* First sharing reveals identity only until its separate explicit save succeeds. */
#sharing-identity h3{font-size:17px;margin-top:20px}
#sharing-identity label{display:block;margin-top:16px}
#sharing-identity input{width:100%;min-width:0;box-sizing:border-box}
#sharing-identity .sharing-field-error{color:#9e4030;font-size:13px;line-height:1.6}
#sharing-identity .sharing-field-error:empty{display:none}
#sharing-profile-notice{padding:12px;border-left:3px solid var(--line);overflow-wrap:anywhere}
#sharing-create{min-height:44px;white-space:normal}

/* Empty libraries share a short, visual next step across storage modes. */
.library-empty{display:grid;justify-items:center;gap:12px;padding:32px 20px;overflow-wrap:anywhere}
.library-empty .paper-icon{width:36px;height:45px;padding:12px 7px}
.library-empty h3{margin:0;color:var(--ink);font-family:Georgia,serif;font-size:24px;font-weight:400}
.library-empty p{max-width:42ch;margin:0;font-size:13px}
.library-empty button{min-width:44px;min-height:44px;max-width:100%;white-space:normal}

/* Reading-first workspace: collection controls share a compact toolbar, while
   import, backup and organization remain in the existing native disclosure. */
.shelf-workspace .top{padding-top:16px;padding-bottom:16px}
.shelf-workspace main{padding-top:24px}
.shelf-heading{margin-bottom:12px;flex-wrap:wrap}
.shelf-heading h1{font-size:34px;line-height:1.2;letter-spacing:-1px;margin:0}
.shelf-heading .primary{min-height:44px;flex:none;margin:0}
.shelf-workspace .storage-notice{font-size:12px;line-height:1.6;margin:0 0 16px;overflow-wrap:anywhere}
.shelf-workspace #account-status{font-size:13px;line-height:1.6;margin:0 0 12px;overflow-wrap:anywhere}
.shelf-workspace #workspace>.views{margin:12px 0 16px}
.shelf-panel-intro{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px}
.shelf-panel-intro>.storage-notice{flex:1 1 560px;min-width:0;margin:0}
.shelf-panel-intro>.primary{min-height:44px;max-width:100%;flex:none}
.account-capacity{flex:1 1 100%;min-width:0;overflow-wrap:anywhere}
.account-capacity p{margin:0 0 8px}
.account-capacity button{min-height:44px;max-width:100%;white-space:normal}
.signin-recovery ul{padding-left:20px;margin:12px 0 0}
.signin-recovery li+li{margin-top:8px}
.shelf-workspace #shelf-management{margin:16px 0 12px;padding:12px;border-radius:9px}
.shelf-workspace .library-filters{grid-template-columns:minmax(180px,2fr) minmax(135px,1.2fr) minmax(95px,.85fr) minmax(150px,1.3fr) auto;gap:10px}
.shelf-workspace .library-filters>label:first-child{grid-column:auto}
.shelf-workspace .library-filters input,.shelf-workspace .library-filters select,.shelf-workspace .library-filters button{min-height:44px}
.library-utility{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:0 0 12px}
.library-utility>.library-count{flex:1 1 100px;font-size:12px;line-height:1.6;margin:0}
.library-utility>button{min-height:44px;max-width:100%;white-space:normal}
.library-utility>.check{min-height:44px;align-items:center;margin:0}
.library-utility>.library-tools{min-width:0;margin:0;padding:0 12px}
.library-utility>.library-tools>summary{min-height:44px;padding:10px 0;font-size:12px;line-height:22px}
.library-utility>.library-tools[open]{flex:1 1 100%}
.library-transfer{min-width:0;max-width:100%;overflow-wrap:anywhere}
.library-transfer input[type=file]{min-width:0;max-width:100%}
.library-transfer button{min-height:44px;max-width:100%;white-space:normal}
.library-transfer summary{min-height:44px;padding:12px 0;line-height:1.6}
.library-transfer .zotero-import{margin:12px 0;padding:0 12px}
#library-feedback p{margin:8px 0}

/* Compact shared cards remove stacked control rows, not reading content.
   All private text stays full-length and grows the card when needed. */
.record{padding:16px;gap:16px}
.record-bottom{flex-wrap:wrap;gap:8px;margin-top:8px}
.record-bottom select{min-height:44px;max-width:100%;font-size:13px}
.record-bottom .record-action,.record-bottom>.secondary{width:auto;min-height:44px;margin:0}
.record-details-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-top:8px}
.record-details-row:empty,.record-details-row .private-item-details:empty{display:none}
.record-details-row .private-item-details{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;flex:1 1 320px;min-width:0;border:0;margin:0;padding:0}
.record-details-row .private-item-details p{flex:1 1 120px;min-width:0;font-size:13px;line-height:1.6;margin:0}
.record-details-row .private-item-details button{min-height:44px;max-width:100%;white-space:normal}
.record-details-row .record-selection{min-height:44px;align-items:center;margin:0}
.record-private-note{margin:8px 0 0}
.record-private-note summary{min-height:44px;padding:12px 0;line-height:20px}
.record-private-note p{margin:0 0 8px}

@media(max-width:900px){
  .shelf-workspace .library-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
  .shelf-workspace .library-filters>label:first-child{grid-column:1/-1}
  .shelf-workspace .library-filters>button{justify-self:start}
}
@media(max-width:640px){
  .shelf-workspace .top{padding-top:12px;padding-bottom:12px}
  .shelf-workspace main{padding-top:20px}
  .shelf-heading{display:flex;gap:12px}
  .shelf-heading h1{font-size:30px}
  .shelf-heading .primary{width:auto;margin:0}
  .shelf-workspace .storage-notice{font-size:13px}
  .shelf-panel-intro{gap:12px}
  .shelf-panel-intro>.primary{width:100%}
  .shelf-workspace #shelf-management{margin:12px 0;padding:12px}
  .shelf-workspace .library-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .shelf-workspace .library-filters>button{justify-self:stretch}
  .library-utility>.library-tools{flex:1 1 100%}
  .library-utility>.library-tools>summary{font-size:13px}
  .record-bottom select{font-size:16px;flex:0 1 auto}
  .record-bottom .record-action{width:auto;margin:0;flex:1 1 80px}
  .record-details-row .private-item-details{flex-basis:100%}
  .record-details-row .private-item-details .secondary{width:auto}
}
@media(max-width:380px){
  .shelf-workspace .library-filters{grid-template-columns:minmax(0,1fr)}
  .shelf-heading .primary{width:100%}
}

/* Selection is a temporary list mode with the real actions beside its count. */
#library-selection{margin:12px 0}
#library-selection .library-selection{margin:0;padding:8px 12px;border:1px solid var(--line);border-radius:9px;background:#f0f2e9;gap:8px}
#shelf-selection-summary{flex:1 1 130px;font-weight:600}
#library-selection button{min-height:44px;max-width:100%;white-space:normal}
#library-selection button:disabled{opacity:.55;cursor:default}
#library-batch-tools{margin:12px 0}
.record-body:has(>.record-selection:not([hidden])){position:relative;padding-inline-start:44px}
.record-body>.record-selection{position:absolute;inset-inline-start:-8px;top:0;margin:0;width:44px;min-height:44px;justify-content:center;cursor:pointer}
.record-body>.record-selection input{width:18px;block-size:18px;margin:0;accent-color:var(--green)}
.record:has(.record-selection:not([hidden]))>.paper-icon{display:none}
.record:has(.record-selection input:checked){border-color:var(--green);box-shadow:inset 3px 0 0 var(--green);background:#f0f2e9}
@media(max-width:640px){
 #library-selection .library-selection{padding:8px}
 #shelf-selection-summary{flex-basis:100%}
 #library-selection button{padding:10px 12px}
 .record-body:has(>.record-selection:not([hidden])){padding-inline-start:32px}
 .record-body>.record-selection{inset-inline-start:-12px}
}
@media(forced-colors:active){.record:has(.record-selection input:checked){border-color:Highlight;outline:2px solid Highlight}}

/* Discover stays in the reading workspace instead of restarting a landing page. */
.papers-workspace #paper-filter{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:16px 0 0}
.papers-workspace #paper-filter>label{flex:1 1 280px;min-width:0;margin:0}
.papers-workspace #paper-filter .buttons{margin:0;gap:8px}
.papers-workspace #paper-filter input,.papers-workspace #paper-filter button{min-height:44px}
.papers-workspace .paper-source-note{margin:12px 0;font-size:12px;line-height:1.6}
#paper-count{font-size:12px;line-height:1.6;margin:16px 0 12px}
#paper-results .record h2{font-size:23px;line-height:1.3;margin:6px 0 7px}
#paper-results .record-type,#paper-results .metadata{margin:0}
#paper-results .record-actions{margin-top:12px}
#paper-results .record-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;text-align:center}

/* One scroll area keeps review fields, including errors, clear of the actions.
   Header and footer reserve their own space rather than covering form content. */
#editor{width:660px;max-width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:0;overflow:hidden}
.shelf-editor{width:660px;max-width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:0;overflow:hidden}
#editor #item-form{display:flex;flex-direction:column;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);margin:0}
.shelf-editor [data-editor-id="item-form"]{display:flex;flex-direction:column;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);margin:0}
#editor .dialog-head{flex:none;padding:16px 24px 12px;gap:12px;border-bottom:1px solid var(--line)}
.shelf-editor .dialog-head{flex:none;padding:16px 24px 12px;gap:12px;border-bottom:1px solid var(--line)}
#editor .editor-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 24px 16px;scroll-padding-block:16px}
.shelf-editor .editor-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 24px 16px;scroll-padding-block:16px}
#editor .editor-body>label:first-child{margin-top:16px}
.shelf-editor .editor-body>label:first-child{margin-top:16px}
#editor .capture{margin:8px 0 12px;padding:0;border:0;border-radius:0;background:none}
.shelf-editor .capture{margin:8px 0 12px;padding:0;border:0;border-radius:0;background:none}
#editor .capture p{margin:8px 0;font-size:12px;line-height:1.6}
.shelf-editor .capture p{margin:8px 0;font-size:12px;line-height:1.6}
#editor .capture-feedback-actions{margin:8px 0;gap:8px}
.shelf-editor .capture-feedback-actions{margin:8px 0;gap:8px}
#editor #capture-status[data-state="manual"],#editor #capture-status[data-state="waiting"]{padding:8px 12px;border-inline-start:3px solid var(--green);background:var(--paper);color:var(--ink)}
.shelf-editor [data-editor-id="capture-status"][data-state="manual"],.shelf-editor [data-editor-id="capture-status"][data-state="waiting"]{padding:8px 12px;border-inline-start:3px solid var(--green);background:var(--paper);color:var(--ink)}
#editor .capture-feedback-actions:not(:has(button:not([hidden]))),#editor #capture-status:empty,#editor #capture-editor-info:empty,#editor #form-error:empty{display:none}
.shelf-editor .capture-feedback-actions:not(:has(button:not([hidden]))),.shelf-editor [data-editor-id="capture-status"]:empty,.shelf-editor [data-editor-id="capture-editor-info"]:empty,.shelf-editor [data-editor-id="form-error"]:empty{display:none}
#editor .editor-reading{margin-top:20px;border-top:1px solid var(--line)}
.shelf-editor .editor-reading{margin-top:20px;border-top:1px solid var(--line)}
#editor .editor-reading>label:first-child{margin-top:16px}
.shelf-editor .editor-reading>label:first-child{margin-top:16px}
#editor #form-error{line-height:1.6;overflow-wrap:anywhere;scroll-margin-block:16px}
.shelf-editor [data-editor-id="form-error"]{line-height:1.6;overflow-wrap:anywhere;scroll-margin-block:16px}
#editor .dialog-actions{flex:none;flex-wrap:wrap;margin:0;padding:12px 24px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper)}
.shelf-editor .dialog-actions{flex:none;flex-wrap:wrap;margin:0;padding:12px 24px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper)}
#editor .dialog-actions button{max-width:100%;white-space:normal}
.shelf-editor .dialog-actions button{max-width:100%;white-space:normal}
@media(max-width:640px){
 #editor .dialog-head{padding:12px 16px 8px}
 .shelf-editor .dialog-head{padding:12px 16px 8px}
 #editor .editor-body{padding:0 16px 16px}
 .shelf-editor .editor-body{padding:0 16px 16px}
 #editor .dialog-actions{padding:12px 16px max(12px,env(safe-area-inset-bottom))}
 .shelf-editor .dialog-actions{padding:12px 16px max(12px,env(safe-area-inset-bottom))}
 #editor .capture p{font-size:13px}
 .shelf-editor .capture p{font-size:13px}
 .papers-workspace .paper-source-note,#paper-count{font-size:13px}
}

/* At very short heights, use the dialog itself as the sole scroll area. */
@media(max-height:400px){
 #editor{overflow:auto;overscroll-behavior:contain}
 #editor #item-form{display:block;max-height:none}
 #editor .editor-body{overflow:visible}
 .shelf-editor{overflow:auto;overscroll-behavior:contain}
 .shelf-editor [data-editor-id="item-form"]{display:block;max-height:none}
 .shelf-editor .editor-body{overflow:visible}
}

/* Familiar location cues and short labels reduce the need to infer an action.
   Keep the existing primary action, focus order and privacy disclosures. */
.shelf-workspace .views{gap:8px}
.shelf-workspace .views button,.shelf-workspace .views a{padding-inline:12px;border-radius:6px 6px 0 0;min-height:44px}
.shelf-workspace .views [aria-current="page"]{background:#e9eee3;color:var(--ink);border-bottom:3px solid var(--green);font-weight:700}
.record .record-source-title{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.15em}
.record .record-source-cue{display:inline-block;margin-inline-start:.6em;font-family:Arial,sans-serif;font-size:12px;line-height:1.5;font-weight:600;white-space:nowrap;color:var(--green)}
.record .record-source-link:hover{text-decoration:none}
.record .record-source-link:hover .record-source-title{text-decoration-thickness:2px}
.record-bottom .record-status-control{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;max-width:100%;margin:0;font-size:12px;font-weight:600}
.record-bottom .record-status-control select{min-width:0;margin:0;flex:0 1 auto}
#editor .editor-details,#editor .editor-reading{min-inline-size:0;padding:0;border:0;margin:16px 0 0}
.shelf-editor .editor-details,.shelf-editor .editor-reading{min-inline-size:0;padding:0;border:0;margin:16px 0 0}
#editor .editor-details>legend,#editor .editor-reading>legend{padding:0;font-size:13px;line-height:1.4;font-weight:700;color:var(--ink)}
.shelf-editor .editor-details>legend,.shelf-editor .editor-reading>legend{padding:0;font-size:13px;line-height:1.4;font-weight:700;color:var(--ink)}
#editor .editor-details>label:first-of-type,#editor .editor-reading>label:first-of-type{margin-top:10px}
.shelf-editor .editor-details>label:first-of-type,.shelf-editor .editor-reading>label:first-of-type{margin-top:10px}
#editor .editor-reading{border-top:1px solid var(--line)}
.shelf-editor .editor-reading{border-top:1px solid var(--line)}
#editor .editor-reading>legend{padding-inline-end:10px}
.shelf-editor .editor-reading>legend{padding-inline-end:10px}
@media(max-width:640px){.shelf-workspace .views button,.shelf-workspace .views a{min-height:48px}}
@media(forced-colors:active){.shelf-workspace .views [aria-current="page"]{border-bottom-color:Highlight}}

/* First visit: show the storage boundary and invited community as distinct groups. */
.library-boundary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 24px;padding:12px 16px;margin:0 0 12px;border-left:3px solid var(--green);background:#eef1e8;font-size:12px;line-height:1.6}
.library-boundary strong{font-size:13px}
.library-boundary p{margin:3px 0 0;color:var(--muted)}
.library-boundary-links{display:flex;flex-wrap:wrap;gap:8px 16px}.library-boundary-links>a{padding-block:8px;white-space:nowrap;text-underline-offset:3px}
.entry-views{align-items:end}
.invited-views{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;margin-left:12px;padding-left:12px;border-left:1px solid var(--line)}
.view-access{grid-column:1/-1;padding:0 12px;font-size:11px;line-height:1.5;color:var(--muted)}
.entry-options{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:24px;margin-top:20px}
.entry-options>div{min-width:0;padding:20px;border:1px solid var(--line);border-radius:8px;background:#fffefa}
.entry-options h2{font-size:24px;margin:0 0 12px}
.entry-options p{font-size:14px;line-height:1.6;margin:0 0 16px;max-width:48ch}
.entry-options .small{font-size:12px}
.entry-options .secondary{display:inline-flex;align-items:center;min-height:44px;text-underline-offset:3px;margin-bottom:16px}
@media(max-width:640px){.shelf-workspace .entry-views{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}.shelf-workspace .entry-views a{padding-inline:6px}.entry-views>.invited-views{grid-column:span 2;margin-left:0;padding-left:4px}.view-access{padding-inline:8px}.entry-options{grid-template-columns:minmax(0,1fr);gap:12px}.entry-options>div{padding:16px}}

/* Optional app installation stays secondary to the reading workspace. */
.install-app{margin:24px 0;max-width:48rem;font-size:13px;line-height:1.65;overflow-wrap:anywhere}.install-app button{margin-bottom:8px;min-height:44px}.install-app summary{min-height:44px;padding:10px 0;cursor:pointer}.install-app li{margin:8px 0}.install-app p:empty{display:none}

/* Public author actions stay compact and wrap long chosen display names. */
.reader-profile-open{max-width:100%;min-height:44px;text-align:left;white-space:normal;overflow-wrap:anywhere}
#people-results:focus-visible,#following-people:focus-visible,#following-feed:focus-visible{outline:3px solid var(--focus);outline-offset:4px}

/* Paper community: paper identity, private reading, then shared conversation. */
.discussion-workspace{margin-block:1.5rem 2.5rem;padding:clamp(1rem,3vw,2rem);border:1px solid var(--line,#d9ddd7);border-radius:16px;background:var(--paper,#fff);min-width:0}
.discussion-header,.discussion-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.65rem}
.discussion-header h2{margin-right:auto}.discussion-screen{max-width:1120px;margin-inline:auto}
.discussion-paper{display:flex;align-items:flex-start;justify-content:space-between;gap:1.5rem;padding-block:1.25rem;border-bottom:1px solid var(--line,#d9ddd7)}
.discussion-paper h1{font-size:clamp(1.5rem,3vw,2.25rem);line-height:1.2;overflow-wrap:anywhere;margin:.35rem 0 .65rem;text-wrap:balance}
.discussion-private{grid-area:reading;align-self:start;padding:1rem;border:1px solid var(--line,#d9ddd7);border-radius:12px;background:#f5f7f3;min-width:0}
.discussion-private h2{font-size:1.05rem;margin-top:0}.discussion-card{display:block!important;margin-block:1rem;padding:1.2rem;min-width:0}
.discussion-author{font-weight:650}.discussion-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.discussion-composer{display:grid;gap:1rem;padding:1.2rem;margin-block:1rem;border:1px solid var(--line,#d9ddd7);border-radius:12px}
.discussion-composer label{display:grid;gap:.5rem}.discussion-composer textarea{min-height:9rem;resize:vertical}.discussion-composer input,.discussion-composer textarea,.discussion-composer select{width:100%;min-width:0;box-sizing:border-box;font:inherit}
.discussion-composer .discussion-confirm{display:flex;align-items:flex-start;gap:.65rem}.discussion-confirm input{width:1.2rem;flex-shrink:0;margin-top:.2rem}
.discussion-actions [aria-pressed=true]{background:#293d32;color:#fff;border-color:#293d32}.discussion-empty{padding:2rem 1rem;color:#536356}
.discussion-confirmation{padding:1rem;border:1px solid #976f3e;border-radius:10px}.discussion-workspace button{min-height:44px}
.discussion-workspace :focus-visible{outline:3px solid #357959;outline-offset:3px}
@media(max-width:600px){.discussion-workspace{padding:1rem .75rem}.discussion-header h2{flex-basis:100%}.discussion-composer,.discussion-card{padding:1rem .75rem}.discussion-header button{flex:1 1 auto}}

/* Paper hub: community is the main workspace; private controls remain explicit. */
.discussion-paper-identity{min-width:0;flex:1}.discussion-eyebrow{font-size:.7rem;letter-spacing:.1em;font-weight:700;color:#536356;margin:0}
.discussion-paper-byline{margin:0;overflow-wrap:anywhere}.discussion-paper-source{display:grid;gap:.45rem;flex:0 0 auto;max-width:100%}.discussion-paper-source a{display:inline-flex;align-items:center;min-height:44px;overflow-wrap:anywhere}
.discussion-hub-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;padding-block:1rem;border-bottom:1px solid var(--line,#d9ddd7);margin-bottom:1.25rem}
.discussion-hub-tabs{gap:.35rem}.discussion-primary{background:var(--green);color:#fff;border:1px solid var(--green)}.discussion-hub-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;grid-template-areas:"paper reading" "toolbar reading" "community reading";grid-template-rows:min-content min-content minmax(0,1fr);column-gap:1.5rem;row-gap:0;align-items:start}
.discussion-hub-layout>.discussion-paper{grid-area:paper;min-width:0;display:block}.discussion-hub-layout>.discussion-paper .discussion-paper-source{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem 1rem;margin-top:.6rem}.discussion-hub-layout>.discussion-hub-toolbar{grid-area:toolbar;min-width:0}
.discussion-hub-community{grid-area:community;min-width:0}.discussion-hub-list>.discussion-card:first-child{margin-top:0}.discussion-hub-list .discussion-empty{margin-top:0;padding:1.5rem 0}.discussion-compose-area:empty{display:none}
.discussion-private>p{margin:.4rem 0 .9rem}.discussion-private button{max-width:100%;white-space:normal;overflow-wrap:anywhere}.discussion-private>button{width:100%;margin-top:.75rem}
.discussion-private-help{font-size:.8rem;margin-top:.85rem}.discussion-private-help summary{cursor:pointer;line-height:1.5;padding-block:.3rem}.discussion-private .private-reading-controls{font-size:.85rem;overflow-wrap:anywhere}.discussion-private .private-reading-controls form{display:grid;gap:.75rem}.discussion-private .private-reading-controls label{display:grid;gap:.35rem}.discussion-private .private-reading-controls select{min-height:44px;width:100%;min-width:0;font:inherit}.discussion-private .private-reading-controls button{width:100%}
@media(max-width:800px){.discussion-paper{display:block}.discussion-paper-source{margin-top:.6rem}.discussion-hub-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"paper" "reading" "toolbar" "community";grid-template-rows:auto;gap:1rem}.discussion-private{padding:.85rem 1rem}.discussion-hub-toolbar{margin-bottom:0}.discussion-private .private-reading-controls form{grid-template-columns:repeat(2,minmax(0,1fr))}.discussion-private .private-reading-controls form>button{grid-column:1/-1}}
@media(max-width:420px){.discussion-hub-toolbar{align-items:stretch}.discussion-hub-tabs,.discussion-hub-toolbar>.discussion-primary{width:100%}.discussion-hub-tabs button{flex:1}.discussion-private .private-reading-controls form{grid-template-columns:minmax(0,1fr)}}

.discussion-workspace .discussion-text-link{background:none;border:0;border-radius:0;padding:0;color:#285d45;text-align:left;font:inherit;font-weight:inherit;text-decoration:underline;text-underline-offset:.18em;min-height:44px;overflow-wrap:anywhere;white-space:normal}
.discussion-card .discussion-feed-paper{margin:0 0 .5rem;font-size:1.1rem;line-height:1.35}.discussion-card h4{font-size:1rem;margin:.75rem 0}.discussion-legacy{margin-block:1.5rem;border-top:1px solid var(--line,#d9ddd7);padding-top:1rem}.discussion-legacy>summary{cursor:pointer;font-weight:650;min-height:44px;align-content:center}.discussion-legacy>summary:focus-visible{outline:3px solid #357959;outline-offset:3px}

/* Integrated collection shell: reading first, disclosure and tools on demand. */
.shelf-workspace main{max-width:1120px;padding-top:20px}
.shelf-workspace .top{max-width:1220px;padding-block:12px}
.shelf-workspace .shelf-heading{margin-bottom:4px}
.storage-space{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.5;color:var(--muted);margin:6px 0 0}
.privacy-label{display:inline-block;padding:2px 7px;border:1px solid var(--line);border-radius:12px;font-size:11px;color:var(--green)}
.storage-details{margin:0 0 8px;font-size:12px;line-height:1.6}
.storage-details>summary{display:list-item;min-height:44px;padding:12px 0;color:var(--muted);width:fit-content;max-width:100%}
.storage-details>p{margin:0 0 12px;max-width:86ch;overflow-wrap:anywhere}
.shelf-workspace .storage-details .storage-notice{margin-bottom:12px}
.shelf-workspace .entry-views,#workspace>.views{display:flex;align-items:center;gap:8px;margin:0 0 16px;overflow:visible;flex-wrap:wrap}
.shelf-workspace .entry-views>a,#workspace>.views>button{padding:12px 16px;min-height:44px;font-size:14px;white-space:normal}
.account-menu{margin:0 0 0 auto;position:relative;font-size:13px}
.account-menu>summary{min-height:44px;padding:12px 10px;line-height:20px;font-weight:600}
.account-menu-panel{position:absolute;z-index:20;right:0;top:100%;width:220px;max-width:calc(100vw - 40px);padding:6px;background:#fffefa;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px #263d3420}
.shelf-workspace .account-menu-panel>a,.shelf-workspace .account-menu-panel>button{display:flex;align-items:center;justify-content:flex-start;min-height:44px;width:100%;padding:10px 12px;font-size:13px;text-align:left;text-decoration:none;border:0;border-radius:4px;white-space:normal}
.account-menu-panel>a:hover,.account-menu-panel>button:hover{background:#eef1e8}
.account-workspace:has(#workspace:not([hidden])) #main>.shelf-heading,.account-workspace:has(#workspace:not([hidden])) #account-intro{display:none}
.shelf-panel-title{flex:1 1 auto;min-width:0}
.shelf-panel-title h2{font-size:34px;line-height:1.2;letter-spacing:-1px;margin:0}
.shelf-workspace .shelf-panel-intro{gap:8px 16px;margin:0 0 2px}
.shelf-workspace .shelf-panel-intro>.primary{width:auto;min-height:44px}
.account-capacity{font-size:12px}
.account-capacity p:empty{display:none}
.shelf-workspace #shelf-management{margin-top:8px;background:transparent;padding:0;border:0}
.shelf-workspace .library-utility{gap:4px 12px;margin-bottom:8px}
.shelf-workspace .library-utility>.library-tools{border:0;background:transparent;padding:0;flex:0 1 auto}
.shelf-workspace .library-utility>.library-tools[open]{flex:1 1 100%;padding:0 12px 12px;border:1px solid var(--line);background:#fffefa}
.shelf-workspace .library-tools>summary{min-height:44px;padding-block:10px}
.shelf-workspace .record{padding:14px 16px;gap:14px}
.shelf-workspace .record h3{font-size:21px;line-height:1.3;margin:2px 0 4px}
.shelf-workspace .records{gap:10px}
.shelf-workspace .record .paper-icon{width:34px;height:44px;padding:12px 6px}
@media(max-width:640px){
 .shelf-workspace main{padding-top:16px}
 .shelf-workspace .entry-views,#workspace>.views{gap:0;margin-bottom:12px}
 .shelf-workspace .entry-views>a,#workspace>.views>button{padding:12px 10px;font-size:13px}
 .account-menu{flex:0 1 auto}
 .account-menu>summary{font-size:12px;padding-inline:8px}
 .shelf-panel-title h2{font-size:30px}
 .shelf-workspace .library-utility>.library-tools{flex:0 1 auto}
 .shelf-workspace .library-utility>.library-tools[open]{flex-basis:100%}
 .shelf-workspace .shelf-heading .primary{width:auto}
 .shelf-workspace .record{padding:12px;gap:10px}
 .shelf-workspace .record h3{font-size:20px}
}
@media(max-width:380px){
 .shelf-workspace .entry-views>a,#workspace>.views>button{padding-inline:8px}
 .account-menu{flex-basis:100%;margin-left:0}
 .account-menu-panel{left:0;right:auto}
}

.discussion-workspace{padding:0;border:0;border-radius:0;background:transparent;margin-top:12px}
.discussion-header{gap:12px;align-items:center;margin-bottom:12px}.discussion-header h1{margin:0 auto 0 0;font-size:clamp(26px,4vw,36px)}
.unified-paper .discussion-paper{padding-top:12px}.unified-paper .discussion-paper h1{font-size:clamp(25px,3.6vw,38px);line-height:1.18}
.record-overflow{position:relative;margin-left:auto}.record-overflow>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;padding:8px 12px;border:1px solid var(--line);border-radius:8px}
.record-overflow[open]{display:flex;flex-wrap:wrap;gap:8px}.record .record-original{font-size:12px;float:right;margin-left:12px;min-height:44px;align-content:center}.record .record-source-cue:empty{display:none}
.paper-picker-row{padding:10px 0;border-bottom:1px solid var(--line)}.paper-picker-row p{margin:3px 0}.bibliography-preview{max-width:680px;margin:16px auto}.bibliography-warning{padding:12px;border:1px solid #805e25;border-radius:8px;color:#644715;background:#fff9e8}.discussion-composer{max-width:720px}.discussion-composer textarea{min-height:130px}.composer-paper-title{font-weight:700}
.unified-paper .discussion-text-link{min-height:44px;display:inline-flex;align-items:center;background:transparent;border:0;padding:4px 0;color:var(--green);text-decoration:underline}
@media(max-width:680px){.discussion-header{flex-wrap:wrap}.discussion-header h1{flex-basis:100%}.discussion-hub-layout{grid-template-columns:minmax(0,1fr)}.discussion-private{width:auto}.record-overflow{margin-left:0}.record .record-original{float:none;display:block;width:fit-content}.discussion-composer{padding:16px 12px}.unified-paper .discussion-paper{gap:10px}}

.paper-post-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--paper,#fbfbf7);color:var(--ink,#203d33)}.paper-post-dialog::backdrop{background:rgb(20 40 32 / .35)}@media(max-width:680px){.paper-post-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:20px 14px}}

/* Paper-first private intake and secondary library filters. */
.shelf-add-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.shelf-add-actions .text-button{min-height:48px}
.shelf-workspace .library-filters{grid-template-columns:minmax(180px,2fr) minmax(135px,1.2fr) minmax(150px,1.3fr) auto}
.library-secondary-filters{min-width:0;align-self:end}
.library-secondary-filters>summary{cursor:pointer;min-height:44px;align-content:center;padding:8px 12px;border:1px solid var(--line);border-radius:8px}
.library-secondary-filters[open]>label{display:block;margin:12px 0 8px}
.library-secondary-filters>button{width:100%}
@media(max-width:960px){.shelf-workspace .library-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.shelf-workspace .library-filters>label:first-child{grid-column:1/-1}}
@media(max-width:680px){.shelf-workspace .library-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.library-secondary-filters{grid-column:1/-1;justify-self:start;min-width:140px}.shelf-add-actions{justify-content:flex-start}}
@media(max-width:380px){.shelf-workspace .library-filters{grid-template-columns:minmax(0,1fr)}}

/* Community home: a quiet, single-column stream with explicit writing. */
.account-workspace .top{padding-block:12px;max-width:1120px}
.account-workspace #account-status{font-size:12px;line-height:1.5;margin-block:4px 8px}
.account-workspace #account-status:empty,.discussion-workspace>[role=status]:empty{display:none}
.community-entry #account-intro{margin-bottom:12px}
.community-entry #signed-out{max-width:680px;margin:12px auto 32px}
.community-entry .entry-options{grid-template-columns:minmax(0,1fr);gap:16px}
.community-entry .account-entry,.community-entry .local-entry{padding:18px 20px}
.community-entry .local-entry h2{font-size:20px}
.community-entry .local-entry p{margin-block:8px}
.community-privacy{margin:20px 0 0;color:var(--muted)}
.community-privacy>summary{min-height:44px;padding-block:12px}
.community-privacy .buttons{flex-wrap:wrap}
.community-resources{display:flex;gap:16px;flex-wrap:wrap;font-size:12px}
/* Audience navigation is a sibling of the entry tabs, so share their column. */
.community-entry #main>.shelf-heading,.community-entry #account-intro,.community-entry #entry-navigation,.community-entry #community-audience-navigation{max-width:680px;margin-inline:auto}
.community-entry #account-status,.community-view #account-status{max-width:680px;margin-inline:auto}
.account-workspace #workspace>.views,.account-workspace .entry-views{position:sticky;top:0;z-index:25;background:var(--paper);padding-top:4px;flex-wrap:nowrap;gap:4px}
.account-workspace #workspace>.views>button,.account-workspace .entry-views>a{flex:0 1 auto}
.account-workspace .account-menu{flex:0 0 auto;margin-left:auto}
.account-workspace .account-menu>summary{font-size:18px;min-width:44px;list-style:none;text-align:center;padding:10px 8px}
.account-workspace .account-menu>summary::-webkit-details-marker{display:none}
.account-workspace .account-menu-panel{left:auto;right:0}
.community-view #workspace>.views{max-width:680px;margin-inline:auto}
.discussion-workspace :is(h1,h2,h3,article,a,button){scroll-margin-top:76px}
.discussion-workspace:has(.discussion-feed){max-width:680px;margin:0 auto 28px}
.discussion-workspace:has(.discussion-feed) .discussion-header{margin:12px 0 4px;gap:8px}
.discussion-workspace:has(.discussion-feed) .discussion-header h1{font-size:26px;flex-basis:auto}
.discussion-workspace:has(.discussion-feed) .discussion-disclosure{margin:0 0 8px}
.discussion-feed-tabs{gap:24px;border-bottom:1px solid var(--line);margin:0 0 12px}
.discussion-feed-tab{display:inline-flex;align-items:center;min-height:44px;text-decoration:none;padding:8px 0;border-bottom:2px solid transparent;font-size:14px}
.discussion-feed-tab[aria-current=page]{border-color:var(--green);font-weight:700}
.discussion-compose-prompt{width:100%;display:block;min-height:48px;padding:12px 16px;text-align:center;font-size:14px;font-weight:700;color:#fff;background:var(--green);border:1px solid var(--green);border-radius:9px}
.discussion-feed .discussion-card{padding:18px 20px;margin-block:12px;gap:0}
.discussion-byline{display:flex;align-items:baseline;justify-content:space-between;gap:4px 12px;flex-wrap:wrap}
.discussion-byline p{margin:0}
.discussion-author{min-width:0;font-size:14px;overflow-wrap:anywhere}
.discussion-author .discussion-text-link{display:inline-flex;align-items:center;min-height:44px;text-decoration:none}
.discussion-time{font-size:11px;line-height:1.5;white-space:normal}
.discussion-feed .discussion-post-title{font-family:inherit;font-size:15px;font-weight:650;line-height:1.5;margin:10px 0 4px}
.discussion-feed .discussion-post-title a{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:0;text-decoration:none}
.discussion-feed .discussion-body{font-size:15px;line-height:1.6;margin:8px 0 0}
.discussion-body-preview[data-expanded=false]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
.discussion-body-link{color:var(--ink);text-decoration:none;display:block;min-height:44px}
.discussion-body-link:hover{text-decoration:none}
.discussion-feed .discussion-expand{font-size:12px;font-weight:600;min-height:36px;padding-block:8px}
.discussion-paper-preview{background:#f1f3ee;border:1px solid var(--line);border-radius:7px;padding:10px 12px;margin-top:10px}
.discussion-feed .discussion-feed-paper{margin:0;font-family:inherit;font-size:13px;line-height:1.5;font-weight:600}
.discussion-feed .discussion-feed-paper .discussion-text-link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:44px;text-decoration:none}
.discussion-source-version{margin:3px 0 0;font-size:11px}
.discussion-feed .discussion-actions:not(.discussion-feed-tabs){margin-top:6px;gap:8px}
.discussion-feed .discussion-comments{font-size:12px;font-weight:600;margin-right:auto;text-decoration:none}
.discussion-feed .discussion-actions>button{font-size:11px;padding:8px;min-height:44px}
.discussion-feed .discussion-empty{padding:28px 16px;text-align:center;border:1px dashed var(--line);border-radius:9px;margin-top:12px}
.discussion-feed .discussion-empty h2{font-size:23px}
.discussion-feed .discussion-empty p{font-size:14px;line-height:1.6}
.discussion-feed .discussion-empty>a,.discussion-feed .discussion-empty>button{display:inline-flex;align-items:center;min-height:44px;margin:4px}
@media(max-width:640px){
 .account-workspace main{padding-inline:16px;padding-top:8px}
 .account-workspace .top{padding:10px 16px}
 .account-workspace .top .brand span{display:none}
 .account-workspace #workspace>.views>button,.account-workspace .entry-views>a{padding-inline:10px;font-size:13px}
 .discussion-feed .discussion-card{padding:14px 14px}
 .discussion-workspace:has(.discussion-feed) .discussion-header h1{font-size:25px}
 .discussion-feed .discussion-body{font-size:14px}
 .discussion-feed .discussion-byline{display:block}
 .discussion-feed .discussion-time{display:block;margin-top:3px}
 .community-entry .account-entry,.community-entry .local-entry{padding:14px 16px}
}

/* Private account Trash: deliberate review, readable long titles and safe focus. */
.trash-purge-tools{border:1px solid #985043;border-radius:9px;padding:18px;margin:18px 0;background:#fff8f4;min-width:0}
.trash-purge-tools h3{font-size:17px;margin:0 0 8px}.trash-purge-tools p{line-height:1.6}
.trash-purge-tools button,.trash-purge-actions button{min-width:44px;min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.trash-danger{color:#803b30;border:1px solid #914c3c;background:#fff8f4;font-weight:700}
.trash-purge-tools .trash-danger:hover:not(:disabled),.trash-purge-dialog .trash-danger:hover:not(:disabled){background:#fce9e2}.trash-purge-tools .trash-danger:active:not(:disabled),.trash-purge-dialog .trash-danger:active:not(:disabled){background:#f6dace}
.trash-danger:focus-visible,.trash-purge-actions button:focus-visible,.trash-purge-items:focus-visible{outline:3px solid #263d34;outline-offset:3px}
.trash-danger:disabled{color:#62645e;border-style:dashed;background:#f0eee9;cursor:not-allowed;opacity:1}
.trash-purge-dialog{width:640px;max-height:90dvh;overflow-y:auto;overscroll-behavior:contain}
.trash-purge-dialog p{line-height:1.6;overflow-wrap:anywhere}.trash-purge-dialog h2{font-size:27px}
.trash-purge-warning{font-weight:600;border-left:4px solid #914c3c;padding-left:12px}
.trash-purge-items{max-height:30dvh;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--control-border);border-radius:6px;padding:12px 12px 12px 38px;background:#fffefa}
.trash-purge-items li{padding:5px 0;line-height:1.5;overflow-wrap:anywhere}
.trash-purge-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:20px}.trash-purge-actions button:first-child{margin-right:auto}
@media(max-width:640px){.trash-purge-dialog{padding:20px 16px}.trash-purge-dialog h2{font-size:24px}.trash-purge-actions button{flex:1 1 160px}.trash-purge-actions button:first-child{margin-right:0}.trash-purge-tools{padding:16px}}

/* The next deliberate action is prominent; navigation and recovery stay quiet.
   State copy remains real controller output, never inferred from button color. */
.unified-paper button{min-width:44px;min-height:44px}
.shelf-workspace .primary,.discussion-workspace .discussion-primary{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:48px;max-width:100%;padding:12px 18px;border:1px solid var(--green);border-radius:8px;font-size:14px;font-weight:700;line-height:1.4;white-space:normal;overflow-wrap:anywhere;text-align:center;text-decoration:none;background:var(--green);color:#fff}
.discussion-workspace .discussion-primary:focus-visible,.shelf-workspace .primary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
.discussion-hub-tabs [aria-pressed=true]{background:#e9eee3;color:var(--green);border-color:var(--green);box-shadow:inset 0 -2px 0 var(--green)}
.discussion-hub-toolbar>.discussion-primary{margin-left:auto}
.private-reading-fields:empty{display:none}.private-reading-fields>.primary{width:100%;margin-block:.25rem}
.private-reading-controls>p{line-height:1.6;margin:.65rem 0}
.private-reading-controls>[role=status]:not(:empty){padding:.65rem .75rem;border-left:3px solid #7b8778;background:#eef1e8;color:var(--ink)}
.private-reading-controls>.secondary{font-size:12px;background:transparent}
.discussion-composer>[role=alert]:not(:empty){margin:0;padding:.75rem;border:1px solid #976f3e;border-radius:6px;background:#fff9e8;color:var(--ink)}
.shelf-workspace button.primary:disabled,.discussion-workspace button.discussion-primary:disabled{opacity:1;background:#e0e5dc;color:#536153;border-color:#a5b09e;cursor:not-allowed;box-shadow:none}
.private-reading-controls[aria-busy=true] button:disabled,.discussion-composer[aria-busy=true] button:disabled{cursor:progress}
@media(hover:hover) and (pointer:fine){.discussion-workspace button.discussion-primary:enabled:hover{background:#254b38;border-color:#254b38;color:#fff}}
.discussion-workspace button.discussion-primary:enabled:active{background:#1e402e;border-color:#1e402e;color:#fff}
@media(max-width:420px){.discussion-hub-toolbar>.discussion-primary{margin-left:0;width:100%}}

.shelf-editor .paper-intake-duplicates{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:8px}.shelf-editor .paper-intake-duplicates button{min-height:48px}.shelf-editor .dialog-actions button[type="submit"]{min-height:48px}

/* Action hierarchy across shelf, discovery and the reviewed post flow.
   Filled actions advance the current task; outlined controls navigate or cancel. */
.shelf-workspace .primary,.discussion-workspace .discussion-primary{border-color:#254b38;box-shadow:0 2px 0 #193a29,0 3px 8px #263d341a}
.shelf-workspace .secondary{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;max-width:100%;padding:10px 15px;border-color:#7b8778;background:#fffefa;font-size:13px;font-weight:600;line-height:1.4;white-space:normal;overflow-wrap:anywhere;text-align:center;text-decoration:none}
.shelf-workspace .discussion-hub-tabs .secondary[aria-pressed=true]:not(:disabled):not([aria-disabled=true]){background:#e9eee3;color:var(--green);border-color:var(--green);box-shadow:inset 0 -2px 0 var(--green)}
.shelf-workspace :is(.primary,.secondary,.discussion-primary):focus-visible{outline:3px solid var(--focus);outline-offset:4px;box-shadow:0 0 0 2px #fffefa}
.shelf-workspace :is(.primary,.secondary,.discussion-primary):is(:disabled,[aria-disabled=true]){opacity:1;background:#e0e5dc;color:#536153;border-color:#a5b09e;cursor:not-allowed;box-shadow:none}
.shelf-workspace [aria-busy=true] :is(.primary,.secondary,.discussion-primary):disabled{cursor:progress}
.shelf-add-actions .text-button{padding:10px 12px;border:1px solid #7b8778;border-radius:8px;font-weight:600;text-decoration:none;background:#fffefa}
.shelf-add-actions .text-button:disabled{opacity:1;background:#e0e5dc;color:#536153;border-color:#a5b09e;cursor:not-allowed}
.shelf-workspace #discovery-results .record-body>.secondary:not(:disabled),.shelf-workspace :is(.return-paper-after-profile,.paper-intake-trigger):not(:disabled){border-color:var(--green);color:var(--green);font-weight:700}
.shelf-workspace .record-actions>a:not(.primary):not(.secondary){display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:10px 8px;color:var(--green);font-size:13px;font-weight:600;line-height:1.4;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
.shelf-workspace .discussion-return{gap:9px;margin-bottom:8px}
.discussion-return::before{content:'';inline-size:8px;block-size:8px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);flex:none}
.shelf-workspace .discussion-close{display:flex;margin-left:auto;margin-bottom:8px}
.composer-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;padding-top:16px;margin-top:8px;border-top:1px solid var(--line)}
.composer-actions>button{flex:0 1 auto;min-width:100px}
.discussion-screen:has(.discussion-composer) .discussion-hub-toolbar>.discussion-primary:enabled{background:#fffefa;color:var(--green);border-color:var(--green);box-shadow:none}
.bibliography-preview>form>button,.paper-post-dialog form>button{margin-block:10px 0}
.paper-post-dialog .discussion-actions{gap:10px;margin-block:12px}
.paper-picker-row{margin-top:12px;padding:0 14px 12px;border:1px solid var(--line);border-radius:10px;background:#fffefa}
.paper-picker-choice{display:block;width:100%;min-width:44px;min-height:48px;max-width:100%;padding:12px 28px 8px 0;position:relative;color:var(--green);font-size:15px;font-weight:700;line-height:1.5;text-align:left;white-space:normal;overflow-wrap:anywhere;border-radius:6px}
.paper-picker-choice::after{content:'';position:absolute;right:5px;top:21px;inline-size:8px;block-size:8px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg)}
.paper-picker-row:focus-within{border-color:var(--green)}
.private-reading-controls textarea+.primary,.private-reading-controls label+.primary{margin-top:12px}
@media(hover:hover) and (pointer:fine){
 .shelf-workspace a.primary:not([aria-disabled=true]):hover{background:#254b38;border-color:#254b38;color:#fff;text-decoration:none}
 .shelf-workspace a.secondary:not([aria-disabled=true]):hover,.shelf-add-actions .text-button:enabled:hover{background:#e9eee3;border-color:#536153;color:var(--ink);text-decoration:none}
 .paper-picker-choice:enabled:hover{text-decoration:underline;text-underline-offset:4px}
 .paper-picker-row:has(.paper-picker-choice:enabled:hover){border-color:#7b8778;background:#f0f2e9}
 .discussion-screen:has(.discussion-composer) .discussion-hub-toolbar>.discussion-primary:enabled:hover{background:#e9eee3;color:var(--green);border-color:var(--green)}
}
.shelf-workspace a.primary:not([aria-disabled=true]):active{background:#1e402e;border-color:#1e402e;box-shadow:none}
@media(max-width:640px){
 .shelf-add-actions{width:100%;gap:10px}
 .shelf-add-actions>#add{flex:1 1 160px}
 .shelf-add-actions .text-button{flex:1 1 140px;min-height:48px;font-size:13px}
 .composer-actions>button{flex:1 1 150px;min-width:0}
 .paper-post-dialog .discussion-actions>button{flex:1 1 140px}
 .paper-post-dialog input,.paper-post-dialog textarea{font-size:16px}
 .paper-picker-row{padding-inline:12px}
}
@media(forced-colors:active){
 .shelf-workspace :is(.primary,.secondary,.discussion-primary),.paper-picker-row{border-color:ButtonText;box-shadow:none}
 .shelf-workspace :is(.primary,.secondary,.discussion-primary):focus-visible{outline-color:Highlight}
 .shelf-workspace :is(.primary,.secondary,.discussion-primary):is(:disabled,[aria-disabled=true]){color:GrayText;border-color:GrayText}
}

/* Anonymous Public Community: one readable column, no account surfaces. */
.public-community-workspace main{max-width:760px}.public-community-workspace .shelf-heading{padding-block:30px 12px}.public-kicker{font-size:.85rem;color:#52695c}.public-community-workspace h1{margin-block:8px 12px}.community-audiences{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0 12px}.community-audiences a{display:inline-flex;align-items:center;min-height:44px;padding:8px 18px;border:1px solid #bccbbf;border-radius:24px;color:#234b3f;text-decoration:none}.community-audiences a[aria-current="page"]{background:#234b3f;color:#fff}.public-intro{margin-bottom:24px}.public-post{position:relative;margin-block:16px;padding:24px}.public-post .discussion-author{padding-right:68px}.public-post .discussion-time{display:block}.public-audience{position:absolute;right:24px;top:24px;border:1px solid #bacdbb;border-radius:20px;padding:2px 10px;font-size:.75rem;color:#385c44;background:#edf3ed}.public-post .discussion-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75}.public-post .discussion-paper-preview{margin-block:18px}.public-bibliography{padding:22px 0;border-bottom:1px solid #d2ddd2}.public-member-invitation{margin-top:32px;padding:24px;background:#edf2e9;border-radius:16px}.public-member-invitation h2{font-size:1.2rem}.public-consent-preview{padding:16px;border:1px solid #a3b9a6;border-radius:12px;background:#edf3ed;margin:16px 0}.public-consent-preview .discussion-body{white-space:pre-wrap;overflow-wrap:anywhere}.public-audience-choice{margin-block:16px}.public-audience-warning{line-height:1.6}@media(max-width:600px){.public-community-workspace main{padding-inline:16px}.public-post{padding:18px}.public-audience{right:18px;top:18px}.public-member-invitation{padding:18px}.public-community-workspace .top{gap:12px;flex-wrap:wrap}.community-audiences{width:100%}.public-consent-preview{padding:12px}}

/* Overall reading layout: shared rhythm, with widths suited to each task.
   Only presentation changes here. Audience, privacy and saved-state copy remain
   in their original DOM order; disclosures and action handlers keep ownership. */
.shelf-workspace .top{max-width:1040px;padding-inline:24px;gap:16px}
.shelf-workspace .top .brand{letter-spacing:-.6px;gap:8px;min-height:44px}
.shelf-workspace .top .brand span{letter-spacing:normal;font-size:13px}
.shelf-workspace .top>a:not(.brand){display:inline-flex;align-items:center;min-height:44px;font-size:13px}
.shelf-workspace main{max-width:960px;padding:28px 24px 40px}
.shelf-workspace main:has(.unified-paper){max-width:1040px}
.shelf-workspace .shelf-heading{align-items:center;gap:16px;margin-bottom:8px}
.shelf-workspace .shelf-heading h1{font-size:34px;line-height:1.2;letter-spacing:-.8px}
.shelf-workspace .entry-views,#workspace>.views{gap:4px;margin-bottom:16px}
.shelf-workspace .entry-views>a,#workspace>.views>button{padding-inline:16px;line-height:1.4}
.shelf-workspace .entry-views+p.small{margin:0 0 20px;line-height:1.6}
.shelf-workspace .storage-details{margin-bottom:8px}
.shelf-workspace #shelf-management{margin:16px 0 8px}
.shelf-workspace .library-utility{margin-bottom:4px}
.shelf-workspace .library-secondary-filters{margin:0}
.shelf-workspace .record{padding:18px 20px;border-radius:12px;gap:16px}
.shelf-workspace .records{gap:12px}
.shelf-workspace .record h3{font-size:22px;line-height:1.35;margin:3px 0 6px}
.shelf-workspace .record .metadata{font-size:13px;line-height:1.6}
.shelf-workspace .record .takeaway{max-width:70ch}
.shelf-workspace .record-bottom{gap:8px 12px;margin-top:14px}
.shelf-workspace .record-overflow{margin:0 0 0 auto}
.shelf-workspace .record-details-row{padding-top:10px;margin-top:10px;border-top:1px solid var(--line)}
.shelf-workspace .record-details-row:empty{display:none}
.shelf-workspace .record-original{margin-top:0}
/* The generic secondary action display must not expose this phone shortcut. */
.shelf-workspace .mobile-library-jump{display:none}
.shelf-workspace footer{gap:24px;margin-top:32px;padding-top:24px}
.shelf-workspace footer>div{min-width:0}
.shelf-workspace footer>div:first-child{max-width:68ch}
.shelf-workspace footer>div:last-child{flex:0 1 220px}
.shelf-workspace footer p{font-size:12px;line-height:1.7}
.shelf-workspace .install-app{margin-top:0}

/* Discover is a readable list; the selected paper is still its primary action. */
.papers-workspace main{max-width:920px}
.papers-workspace .storage-notice{max-width:76ch;font-size:13px;line-height:1.65;margin-top:8px;margin-bottom:20px}
.papers-workspace #paper-filter{gap:12px;margin-top:20px}
.papers-workspace #paper-count{margin:20px 0 12px}
.papers-workspace #paper-results .record{padding:20px 22px}
.papers-workspace #paper-results .record h2{font-size:24px;line-height:1.35;margin:8px 0}
.papers-workspace #paper-results .record-actions{gap:8px 12px;margin-top:16px}

/* Public reading starts at the stream, with one honest next step when empty. */
.public-community-workspace main{max-width:760px;padding-top:24px}
.public-community-workspace .top{max-width:760px}
.public-community-workspace .shelf-heading{padding:0;margin-bottom:20px}
.public-community-workspace .shelf-heading h1{margin:0 0 8px}
.public-community-workspace .shelf-heading p{margin:0;color:var(--muted);font-size:15px;line-height:1.6}
.public-community-workspace .community-audiences{margin:16px 0 10px;gap:8px}
.public-community-workspace .public-intro{font-size:13px;line-height:1.6;margin:0 0 24px}
.public-community-workspace #public-community>h2{font-size:23px;line-height:1.35;margin:0 0 16px;overflow-wrap:anywhere}
.public-community-workspace #public-community>[role=status]:empty{display:none}
.public-community-workspace #public-community>[role=status]:not(:empty){line-height:1.6;margin-block:16px}
.public-community-workspace #public-community>[role=status]>button{margin:8px}
.public-community-workspace .public-empty{display:grid;justify-items:start;gap:12px;padding:24px;margin:0;border:1px solid var(--line);border-radius:12px;background:#fffefa;text-align:left}
.public-community-workspace .public-empty h3{font:400 24px/1.3 Georgia,serif;margin:0;color:var(--ink)}
.public-community-workspace .public-empty p{font-size:14px;line-height:1.7;max-width:58ch;margin:0}
.public-community-workspace .public-empty>.primary{margin-top:4px}
.public-community-workspace .public-post{padding:20px 22px;margin:0 0 14px}
.public-community-workspace .public-post .discussion-author{font-size:14px;line-height:1.5;margin:0 0 4px;overflow-wrap:anywhere}
.public-community-workspace .public-post .discussion-time{font-size:12px;line-height:1.6}
.public-community-workspace .public-post h2{font-family:inherit;font-size:19px;font-weight:650;line-height:1.45;margin:14px 0 8px;overflow-wrap:anywhere}
.public-community-workspace .public-post .discussion-body{font-size:15px;line-height:1.75;margin:12px 0}
.public-community-workspace .public-post .discussion-paper-preview{padding:12px 14px;margin:16px 0 8px}
.public-community-workspace .public-post .discussion-paper-preview>a{font-size:14px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.public-community-workspace .public-post .discussion-paper-preview p{margin:6px 0 0}
.public-community-workspace .public-post>a{display:inline-flex;align-items:center;min-height:44px;font-size:13px;font-weight:600}
.public-community-workspace .public-post-detail h2{font:400 28px/1.35 Georgia,serif}
.public-community-workspace .public-audience{top:20px;right:22px}
.public-community-workspace .public-member-invitation{display:flex;align-items:center;gap:20px;padding:20px 0 0;margin-top:24px;border-top:1px solid var(--line);border-radius:0;background:transparent}
.public-community-workspace .public-member-invitation>div{min-width:0;flex:1}
.public-community-workspace .public-member-invitation h2{font-family:inherit;font-size:15px;font-weight:600;line-height:1.5;margin:0 0 6px}
.public-community-workspace .public-member-invitation p{font-size:13px;line-height:1.65;margin:0;color:var(--muted)}
.public-community-workspace .public-member-invitation>a{flex:none}
.public-community-workspace footer{display:block;margin-top:28px;padding:20px 0 8px}
.public-community-workspace footer p{margin:0 0 8px}

/* Keep the paper and its one private reading panel visually distinct. */
.unified-paper .discussion-hub-layout{column-gap:28px;grid-template-columns:minmax(0,1fr) 300px}
.unified-paper .discussion-paper{padding:8px 0 20px}
.unified-paper .discussion-paper h1{font-size:clamp(27px,3.2vw,38px);line-height:1.22;letter-spacing:-.7px;text-wrap:pretty}
.unified-paper .discussion-paper-byline{font-size:14px;line-height:1.65}
.unified-paper .discussion-private{padding:18px;border-radius:12px}
.unified-paper .discussion-private h2{font-size:19px;line-height:1.35}
.unified-paper .discussion-hub-toolbar{padding-block:16px;margin-bottom:20px}
.unified-paper .discussion-hub-community>h2{font-size:25px;line-height:1.35}
.unified-paper .discussion-hub-community>p{font-size:15px;line-height:1.75;max-width:68ch}
.shelf-workspace :is(#editor,.shelf-editor) .dialog-head h2{font-size:26px;line-height:1.3;letter-spacing:-.3px}
.shelf-workspace :is(#editor,.shelf-editor) .editor-body label{font-size:13px;line-height:1.5}
.shelf-workspace :is(#editor,.shelf-editor) .editor-reading{margin-top:24px}

@media(max-width:800px){
 .unified-paper .discussion-hub-layout{grid-template-columns:minmax(0,1fr);column-gap:0}
}
@media(max-width:640px){
 .shelf-workspace .top{padding:8px 16px;gap:8px 12px}
 .shelf-workspace main{padding:20px 16px 32px}
 .shelf-workspace .shelf-heading{gap:14px;margin-bottom:8px}
 .shelf-workspace .shelf-heading h1{font-size:30px}
 .shelf-workspace .entry-views>a,#workspace>.views>button{padding-inline:10px}
 .shelf-workspace .entry-views+p.small{font-size:12px;margin-bottom:16px}
 .shelf-workspace .mobile-library-jump{display:flex;margin:12px 0;min-height:44px}
 .shelf-workspace .record{padding:16px;border-radius:10px}
 .shelf-workspace .record h3{font-size:21px}
 .shelf-workspace .record-overflow{margin:0 0 0 auto}
 .shelf-workspace .record-details-row{gap:10px}
 .shelf-workspace .library-filters{grid-template-columns:minmax(0,1fr)}
 .shelf-workspace .library-filters>label:first-child{grid-column:auto}
 .shelf-workspace .library-secondary-filters{grid-column:auto;justify-self:stretch}
 .papers-workspace #paper-filter{display:block}
 .papers-workspace #paper-filter .buttons{display:flex;margin:12px 0 0}
 .papers-workspace #paper-filter .buttons>button{flex:1}
 .papers-workspace #paper-results .record{padding:18px 16px}
 .papers-workspace #paper-results .record h2{font-size:22px}
 .papers-workspace #paper-results .record-actions{display:grid;grid-template-columns:minmax(0,1fr)}
 .public-community-workspace .shelf-heading{margin-bottom:18px}
 .public-community-workspace .public-intro{font-size:13px;margin-bottom:20px}
 .public-community-workspace .public-empty{padding:20px;gap:12px}
 .public-community-workspace .public-empty h3{font-size:23px}
 .public-community-workspace .public-post{padding:18px 16px}
 .public-community-workspace .public-audience{top:18px;right:16px}
 .public-community-workspace .public-member-invitation{align-items:flex-start;flex-direction:column;gap:12px}
 .unified-paper .discussion-private{padding:16px}
 .unified-paper .discussion-paper h1{font-size:clamp(27px,7.5vw,34px)}
 .unified-paper .discussion-private .private-reading-controls form{grid-template-columns:minmax(0,1fr)}
 .shelf-workspace :is(#editor,.shelf-editor) .dialog-head h2{font-size:24px}
}
@media(max-width:380px){
 .shelf-workspace .top{padding-inline:12px}
 .shelf-workspace main{padding-inline:12px}
 .shelf-workspace .entry-views>a,#workspace>.views>button{padding-inline:8px}
 .public-community-workspace .public-empty{padding:18px 16px}
}

/* Public reading return: reserve feedback space so routine loading does not move cards. */
.public-community-workspace #public-community>[role=status]{min-block-size:26px;margin-block:12px}
.public-community-workspace #public-community>[role=status]:empty{display:block}
.public-community-workspace .public-return,.public-community-workspace .public-read-post{display:inline-flex;align-items:center;min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.public-community-workspace .public-return{margin-bottom:8px}
.public-community-workspace #public-community>h2:focus{outline:3px solid var(--focus);outline-offset:5px}
@media(max-width:640px){.public-community-workspace .public-read-post{display:flex;width:100%;justify-content:center}}

/* Native navigation feedback stays in normal flow, leaving controls usable.
   The empty live region reserves one line; longer text can wrap at any zoom. */
.document-navigation-status{min-block-size:1.5em;margin:0 0 8px;font-size:12px;line-height:1.5;color:var(--ink);overflow-wrap:anywhere}
a[data-navigation-pending],button[data-navigation-pending],nav a:active,.top a:active{background:#e9eee3;text-decoration:underline;text-underline-offset:4px}

/* Stable document navigation: the primary tabs stay in the same outer shell.
   Public reading keeps its shorter measure; route-specific explanations follow
   the tabs instead of changing their position on every document navigation. */
.shelf-workspace:not(.account-workspace) .top{max-width:1040px}
.shelf-workspace:not(.account-workspace) main{max-width:960px;padding-top:28px}
.shelf-workspace:not(.account-workspace) main:has(.unified-paper){max-width:1040px}
.shelf-workspace:not(.account-workspace) #main>.shelf-heading{min-block-size:84px;margin:0 0 8px;padding:0;align-items:flex-start}
.shelf-workspace:not(.account-workspace) #main>.shelf-heading h1{margin:0}
.public-community-workspace .shelf-heading p{margin-top:8px}
.public-community-workspace :is(#public-community,.public-member-invitation,footer,.install-app){max-width:712px;margin-inline:auto}
.public-community-workspace #public-community{min-block-size:290px}
.shelf-workspace:not(.account-workspace) #main>.entry-views{margin-top:0}
.shelf-workspace:not(.account-workspace) #main>.shelf-add-actions{margin-bottom:16px}
/* Decorative, static loading shapes. They cannot delay content, intercept a
   click, or retain data from the previous view. Existing live text stays visible. */
.route-initial-status{margin:0;font-size:13px;line-height:1.6;color:var(--muted)}
.route-initial-status::after,.public-posts[aria-busy=true]:empty::after{
 content:'';display:block;min-block-size:200px;margin-top:16px;border:1px solid var(--line);border-radius:12px;
 background:linear-gradient(#e4e9df,#e4e9df) 20px 22px / 40% 12px no-repeat,linear-gradient(#e4e9df,#e4e9df) 20px 52px / 72% 18px no-repeat,linear-gradient(#edf0e8,#edf0e8) 20px 88px / 84% 10px no-repeat,linear-gradient(#edf0e8,#edf0e8) 20px 112px / 58% 10px no-repeat,#fffefa;
}
@media(max-width:640px){
 .shelf-workspace:not(.account-workspace) .top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}
 .shelf-workspace:not(.account-workspace) .top .brand{display:block;line-height:1.2}
 .shelf-workspace:not(.account-workspace) .top .brand span{display:block;line-height:1.2}
 .shelf-workspace:not(.account-workspace) main{padding-top:20px}
 .shelf-workspace:not(.account-workspace) #main>.shelf-heading{min-block-size:112px}
}

/* Shared shelf motion is presentation only: no delayed actions or exit phases.
   Focus rings, saved-state text, disabled controls and tap targets stay immediate. */
:root{--shelf-motion-fast:120ms;--shelf-motion-enter:160ms;--shelf-motion-ease:cubic-bezier(.2,.7,.3,1)}
@media(hover:hover) and (pointer:fine){
  button.primary:enabled:hover{background:#254b38;border-color:#254b38}
  button.secondary:enabled:hover{background:#e9eee3;border-color:#80927c;color:var(--ink)}
  .text-button:enabled:hover,summary:hover{color:var(--green)}
  .views button:enabled:hover:not([aria-current]),.views a:hover:not([aria-current]){color:var(--green);border-bottom-color:#97ad90}
  .star-rating:not(:disabled) .star-rating-option input:enabled:hover + .star-rating-icon{background:#f0f2e9}
  .star-rating:not(:disabled) .star-rating-option input:checked:hover + .star-rating-icon{background:#e9efe3}
}
button.primary:enabled:active{background:#1e402e;border-color:#1e402e}
button.secondary:enabled:active{background:#dfe7d7;color:var(--ink)}
.star-rating:not(:disabled) .star-rating-option input:enabled:active + .star-rating-icon{background:#dfe7d7}
@media(prefers-reduced-motion:no-preference){
  a,button,summary,input,select,textarea,.star-rating-icon{
    transition-property:color,background-color,border-color;
    transition-duration:var(--shelf-motion-fast);
    transition-timing-function:var(--shelf-motion-ease);
  }
  /* A pending/unavailable state must never cross-fade from an enabled one. */
  :disabled,[aria-disabled="true"],.star-rating:disabled .star-rating-icon{transition:none;animation:none}
  .star-rating:not(:disabled) .star-rating-option input:checked + .star-rating-icon{
    animation:shelf-star-select var(--shelf-motion-fast) var(--shelf-motion-ease);
  }
  dialog[open]{animation:shelf-fade-in var(--shelf-motion-enter) var(--shelf-motion-ease)}
  dialog[open]::backdrop{animation:shelf-fade-in var(--shelf-motion-enter) var(--shelf-motion-ease)}
  :is(#shelf-view,#shelf-panel,#discover-panel,#community-panel,#profile-panel):not([hidden]),
  .library-tools[open] > section:not([hidden]){
    animation:shelf-fade-in var(--shelf-motion-enter) var(--shelf-motion-ease);
  }
  @keyframes shelf-fade-in{from{opacity:.7}to{opacity:1}}
  @keyframes shelf-star-select{from{transform:scale(.94)}to{transform:none}}
}
/* Follow the operating system automatically, including changes while open.
   No preference is stored and there is no extra setting to manage. */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
