/* Shared finishing layer. Keep the jade identity and the entrance scene intact. */
:root{--muted:#606f66;--radius:14px;--shadow:0 3px 16px rgb(32 52 44 / 3%)}
html[data-theme=dark]{--shadow:0 3px 16px rgb(0 0 0 / 8%)}
.main-content{padding-bottom:24px}
.main-content :is(h1,h2,h3){text-wrap:pretty;overflow-wrap:break-word}
.main-content :is(button,.btn,a,input,select,textarea,summary){scroll-margin-block:24px}
.main-content :is(button,.btn){transition:background-color 160ms ease,border-color 160ms ease,color 160ms ease}
.main-content :is(input,select,textarea){line-height:1.65}
.main-content :is(.page-head,.account-page-heading){padding-top:36px;margin-bottom:20px}
.main-content .page-head h1,.account-page-heading h1,.account-admin .account-page-heading h1{font-size:32px;line-height:1.35;letter-spacing:-.7px}
.main-content .page-head p,.account-page-heading .account-lead{font-size:14px;line-height:1.8;max-width:700px}
.section-title{gap:16px}
.section-title>div{min-width:0}
.section-title h2{line-height:1.45}
.site-header .nav-link{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.site-footer{background:var(--paper);padding-block:22px}
.site-footer .footer-inner{gap:16px}
.library-page{padding-bottom:48px}
.library-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:28px;padding-block:40px 26px;border-bottom:1px solid var(--line);margin-bottom:22px}
.library-heading h1{font-size:36px;letter-spacing:-1px;line-height:1.35;margin:0 0 10px}
.library-heading p{margin:0;color:var(--muted);max-width:640px;font-size:14px}
.library-heading .search-form{margin:0;min-width:260px}
.library-page .collection{border-top:0;padding-top:0}
.project-grid{gap:22px}
.project-card{border-radius:13px;box-shadow:none}
.project-card:hover{box-shadow:var(--shadow)}
.card-content{padding:19px 20px 17px}
.card-content h3{font-size:18px;line-height:1.5}
.card-summary{font-size:13px;line-height:1.8}
.project-empty,.empty{padding:48px 24px;border:1px solid var(--line);background:var(--paper);border-radius:12px}
.project-empty{text-align:center}
.empty h3,.project-empty h2{font-size:22px;margin:0 0 9px;line-height:1.5}
.empty p,.project-empty p{max-width:540px;margin:0 auto 20px;color:var(--muted);line-height:1.8}
.empty .row{justify-content:center}

/* Work belongs in one reading column; browser storage is a secondary disclosure. */
.desk-layout:not(:has(>.desk-sidebar)){display:block}
.workspace-head{padding-bottom:22px}
.workspace-summary{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin:0 0 24px;padding:16px 0;border-block:1px solid var(--line);color:var(--muted);font-size:13px}
.workspace-summary strong{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
.workspace-section{padding:24px;border-radius:13px;box-shadow:none}
.workspace-section h2,.cloud-workspace h2{font-size:22px}
.workspace-section .project-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.cloud-workspace{border-top:0;margin-top:0;padding-top:8px}
.workspace-local{border:1px solid var(--line);border-radius:12px;margin:28px 0 40px;background:var(--paper)}
.workspace-local>summary{cursor:pointer;padding:20px 24px;font-size:15px;font-weight:600;line-height:1.7;min-height:64px}
.workspace-local>summary::marker{color:var(--muted)}
.workspace-local[open]>summary{border-bottom:1px solid var(--line)}
.workspace-local>div,.workspace-local>.workspace-local-content{padding:24px}
.workspace-local .workspace-section{padding:0;border:0;border-radius:0;background:transparent}
.workspace-local .workspace-section+.workspace-section{padding-top:24px;border-top:1px solid var(--line)}
.workspace-local .workspace-section:last-child{margin-bottom:0}
.workspace-local .empty{background:var(--bg);padding:26px 20px}
.workspace-local .library-note{margin-top:12px}
.workspace-local .backup-actions{display:flex;gap:10px;flex-wrap:wrap}
.account-workspace-note{padding:16px 20px;margin:0 0 24px;background:transparent;border-radius:11px}
.remote-project-list{gap:18px}
.remote-project{border-radius:12px;padding:20px;display:flex;flex-direction:column}
.remote-project>a{gap:15px;align-items:center;min-height:76px}
.remote-project img{width:104px;height:76px;border:1px solid var(--line);border-radius:7px;background:var(--soft)}
.remote-project strong{font-size:17px;line-height:1.5}
.remote-project small{font-size:12px;line-height:1.65}
.remote-project .version-state{padding:12px 0;margin:14px 0 0;border-top:1px solid var(--line);color:var(--muted);font-size:12px}
.remote-project-actions,.public-project-actions{gap:8px;margin-top:10px}
.remote-project-actions button,.public-project-actions :is(button,.btn){font-size:12px;min-height:44px;padding-inline:12px}
.remote-project .management-details{margin:16px 0 0}
.remote-project .management-details form{padding-bottom:0}
.public-project-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.public-project-grid .remote-project{padding:0;overflow:hidden;transition:border-color 160ms ease}
.public-project-grid .remote-project:hover{border-color:var(--border-strong)}
.public-project-grid .remote-project-link{display:grid;grid-template-columns:minmax(0,1fr) 22px;gap:0 8px;height:100%;align-items:center}
.public-project-grid .remote-project-link>img{grid-column:1/-1;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border:0;border-bottom:1px solid var(--line);border-radius:0}
.public-project-grid .remote-project-link>span:nth-last-child(2){padding:18px 0 20px 20px}
.public-project-grid .remote-project-link>span:last-child{align-self:center;margin-right:20px;color:var(--brand)}
.public-project-grid .remote-project strong{margin-block:7px;font-size:19px}
.remote-project>.version-snapshot{margin-top:17px;padding-top:14px;border-top:1px solid var(--line);font-size:12px;gap:9px 16px}
.remote-project>.version-snapshot strong{font-size:14px}
.workspace-backup-actions{display:flex;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line)}
.workspace-local>.desk-layout{margin-bottom:0;padding-top:0}
.workspace-local>.desk-overview{gap:12px;margin-bottom:0}

/* Versions are described where an author decides whether to save or publish. */
.editor-version-context{margin:22px 0;padding:18px 20px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.editor-version-context h2,.editor-version-context h3{margin:0 0 12px;font-size:15px}
.editor-version-context p{margin:8px 0 0;font-size:13px;line-height:1.8;color:var(--muted)}
.version-snapshot{display:flex;align-items:center;flex-wrap:wrap;gap:10px 24px;font-size:13px}
.version-snapshot>span{display:inline-flex;gap:8px;align-items:baseline}
.version-snapshot strong{color:var(--brand);font-variant-numeric:tabular-nums;font-size:16px}
.version-badge{display:inline-flex;align-items:center;padding:3px 8px;border-radius:5px;background:var(--soft);color:var(--brand);font-size:11px;font-weight:600;line-height:1.6}
.version-update-note{margin-top:22px}
.version-update-note textarea{min-height:80px}
.version-update-steps{display:flex;flex-wrap:wrap;gap:8px 24px;padding:0;list-style:none;counter-reset:version-step;margin:16px 0 0;color:var(--muted);font-size:12px}
.version-update-steps li{counter-increment:version-step;display:flex;gap:7px;align-items:center}
.version-update-steps li:before{content:counter(version-step);display:grid;place-items:center;width:20px;height:20px;border:1px solid var(--line);border-radius:50%;color:var(--brand);font-size:10px}
.version-release-note{padding:18px 20px;border-left:2px solid var(--brand);border-radius:0 8px 8px 0;background:var(--soft);margin-bottom:24px}
.version-release-note h2{font-size:15px;margin:0 0 8px}
.version-release-note p{margin:0;font-size:13px}
.version-history{margin-block:24px;padding-inline:20px;border-radius:10px}
.version-history summary{min-height:56px}
.version-row{align-items:flex-start;gap:16px;padding-block:18px}
.version-row>div{min-width:0}
.version-row .row{gap:8px}
.version-row p{overflow-wrap:anywhere}
.version-row button{min-height:44px;flex-shrink:0}
.project-lifecycle{margin-top:20px}
.project-lifecycle>.row{gap:10px}
.remote-detail,.detail-layout{gap:28px}
.side-panel{border-radius:12px;padding:24px}
.side-panel h2{font-size:18px}
.remote-cover{border:1px solid var(--line);border-radius:12px}
.detail-section h2{font-size:22px}
.remote-detail .detail-section:first-child{padding-top:0;border-top:0}

/* Forms and account management share one restrained surface treatment. */
.upload-layout{gap:28px;grid-template-columns:minmax(0,1fr) 300px}
.upload-editor{padding:30px;border-radius:13px;box-shadow:none}
.upload-editor h1{font-size:29px}
.upload-editor .step-nav{margin-top:14px;padding-top:10px}
.upload-section-heading{margin-bottom:22px}
.upload-section-heading h2,.upload-editor .upload-section-heading h2{margin-bottom:6px;font-size:21px}
.upload-section-heading>span{border-radius:8px;background:var(--soft);border-color:transparent;font-weight:600}
.upload-editor .field{margin-bottom:22px}
.upload-editor .field>span{font-size:14px}
.file-drop{background:var(--bg);border-radius:10px;border-color:var(--line)}
.file-drop .field:last-child{margin-bottom:0}
.upload-editor .optional-fields{border-radius:9px}
.upload-side{padding-top:8px}
.upload-side .section-title h2{font-size:16px}
.upload-hint{padding:18px 0;background:transparent;border:0;border-top:1px solid var(--line);border-radius:0}
.upload-hint h3{font-size:15px}
.upload-hint p,.upload-hint small{font-size:12px;line-height:1.85}
.draft-card{box-shadow:none;border-radius:11px}
.publication-choice{padding:17px;gap:12px;border-radius:10px}
.publication-choice:has(input:checked){border-color:var(--brand);background:var(--soft)}
.publication-choice strong{font-size:14px}
.publication-choice small{font-size:12px;line-height:1.85}
.upload-next{gap:10px;padding-top:24px}
.account-surface{padding-top:0}
.account-card,.account-ai-editor{border-radius:13px;box-shadow:none}
.account-page .account-card,.account-admin .account-card{padding:26px}
.account-page-heading{padding-bottom:2px}
.account-admin .account-page-heading{margin-bottom:24px}
.account-admin .account-tabs{gap:24px}
.account-profile-grid{gap:22px}
.account-editor-empty{background:var(--paper);border-style:solid}
.account-editor-empty p{max-width:320px}
.account-admin .account-people-table td{padding-block:16px}
.account-admin .account-editor-heading h2{font-size:20px}
.account-field input,.account-field select{background:var(--paper);border-color:var(--border-strong)}
.account-facts>div{padding-block:13px}
.account-ai-editor textarea{background:var(--bg)}
.management-layout{grid-template-columns:180px minmax(0,1fr);gap:32px;margin-bottom:48px}
.management-sidebar{gap:4px;padding-block:4px}
.management-sidebar a{min-height:46px;font-size:14px;border:1px solid transparent}
.management-sidebar [aria-current]{border-color:var(--line);background:var(--paper);box-shadow:inset 3px 0 var(--brand)}
.management-main>.page-head{padding-top:0}
.management-main .project-query{padding-top:0}
.admin-project{padding-block:24px}
.admin-project h3{font-size:19px;line-height:1.5}
.management-details .field{margin:0}
.cloud-draft-controls{border-radius:10px;background:var(--bg)}
.cloud-draft-controls>summary{cursor:pointer;min-height:44px;margin:-8px 0;padding-block:10px;font-size:12px;color:var(--muted)}
.cloud-draft-controls[open]>summary{margin-bottom:12px}
.cloud-draft-controls .library-note{font-size:12px;margin:10px 0 14px}
.project-activity{font-size:13px}

@media(max-width:1050px){
 .upload-layout{grid-template-columns:minmax(0,1fr) 260px;gap:22px}
 .library-heading{align-items:flex-start;flex-wrap:wrap}
 .library-heading .search-form{flex-basis:100%;max-width:560px}
 .workspace-section .project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .public-project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:850px){
 .upload-layout{grid-template-columns:1fr}
 .upload-side{position:static;order:1;display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
 .upload-side>.section-title{grid-column:1/-1;margin:0}
 .upload-hint{margin-top:0}
 .management-layout{grid-template-columns:1fr;gap:20px}
 .management-sidebar{flex-direction:row;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:16px}
 .remote-detail,.detail-layout{grid-template-columns:1fr}
 .remote-detail .side-panel{order:0}
}
@media(max-width:640px){
 .wrap{padding-inline:20px}
 .main-content{padding-bottom:8px}
 .main-content :is(.page-head,.account-page-heading){padding-top:26px;margin-bottom:16px}
 .main-content .page-head h1,.account-page-heading h1,.account-admin .account-page-heading h1{font-size:28px;letter-spacing:-.5px}
 .main-content .page-head p,.account-page-heading .account-lead{font-size:13px}
 .library-heading{padding-block:28px 22px;gap:20px}
 .library-heading h1{font-size:30px}
 .library-heading .search-form{min-width:0;width:100%}
 .workspace-head{flex-wrap:wrap;gap:10px}
 .workspace-head .primary{margin:0;min-height:44px;font-size:13px}
 .workspace-section{padding:19px}
 .workspace-section .project-grid,.remote-project-list{grid-template-columns:1fr}
 .public-project-grid .remote-project{padding:0}
 .workspace-local>summary{padding:17px 18px;font-size:14px}
 .workspace-local>div,.workspace-local>.workspace-local-content{padding:18px}
 .account-workspace-note{flex-wrap:wrap;gap:10px;padding:15px}
 .account-workspace-note>a{margin-left:32px;min-height:44px}
 .remote-project{padding:18px}
 .remote-project img{width:78px;height:64px}
 .remote-project strong{font-size:16px}
 .remote-project-actions>button,.public-project-actions>:is(button,.btn){flex:1 1 auto}
 .remote-project .version-state{line-height:1.9}
 .upload-editor{padding:20px}
 .upload-side{display:block;padding-top:0}
 .upload-side>.section-title{margin-bottom:14px}
 .upload-hint{margin-top:22px}
 .upload-section-heading h2,.upload-editor .upload-section-heading h2{font-size:19px}
 .upload-editor .field>span{font-size:13px}
 .upload-editor :is(input:not([type=checkbox],[type=radio],[type=file]),select,textarea){font-size:16px}
 .editor-version-context{padding:15px}
 .version-snapshot{gap:10px 18px}
 .version-row{flex-wrap:wrap}
 .upload-next{flex-wrap:wrap}
 .upload-next>button{flex:1 1 100%;white-space:normal}
 .upload-next>button.primary{order:-1}
 .account-page .account-card,.account-admin .account-card{padding:21px 18px}
 .account-admin .account-tabs{gap:12px;flex-wrap:wrap}
 .account-admin .account-tabs button{padding-inline:9px}
 .account-admin .account-people-table td{padding-block:4px}
 .account-admin .account-search{gap:8px}
 .account-admin .account-search button{padding-inline:11px}
 .management-sidebar a{padding-inline:12px}
 .management-details form{grid-template-columns:1fr}
 .empty,.project-empty{padding:35px 20px}
 .side-panel{padding:20px}
 .footer-inner{align-items:flex-start;flex-direction:column}
 .site-footer .footer-inner p{line-height:1.9}
}
@media(prefers-reduced-motion:reduce){.main-content :is(button,.btn){transition:none}}
