/* Archive reading room. Scoped to the catalogue; account and game shells are unchanged. */
html body main.archive-workspace{background:#faf8ec;color:#293e32;padding:24px 28px 32px;font-family:var(--library-text);border-color:#c6b685}
html body .archive-workspace :is(.archive-breadcrumb,.catalogue-introduction p,.archive-category-description,.source-description){font-family:var(--library-text)}
html body .archive-workspace .archive-breadcrumb{margin:0 0 14px}
html body .archive-workspace .archive-breadcrumb ol{display:flex;flex-direction:row;flex-wrap:wrap;gap:4px 9px;margin:0;padding:0}
html body .archive-workspace .archive-breadcrumb li{display:flex;width:auto;flex:0 1 auto;padding:0;margin:0;font:400 .8125rem/1.5 var(--library-text)}
html body .archive-workspace .archive-explorer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;margin-bottom:26px}
html body .archive-workspace .explorer-heading{order:2;margin:0;min-width:0}
.archive-workspace .explorer-heading>span{display:none}
html body .archive-workspace .explorer-tabs{order:1;border:0;border-bottom:1px solid #c9c1a0;border-radius:0;background:transparent;padding:0;gap:5px;box-shadow:none}
html body .archive-workspace .explorer-tabs>a{min-height:48px;padding:10px 12px;gap:8px;flex:0 1 auto;font-size:.875rem;border-radius:4px 4px 0 0}
html body .archive-workspace .explorer-tabs>a small{display:none}
html body .archive-workspace .explorer-tabs>a svg{width:18px;height:18px}
html body .archive-workspace .explorer-games>summary{font-size:.875rem;background:#f1f1e2;min-height:44px}
html body .archive-workspace .catalogue-introduction{margin:0 0 22px;padding:0}
html body .archive-workspace .catalogue-introduction h1{font-size:clamp(1.85rem,3vw,2.7rem);margin:6px 0 10px}
html body .archive-workspace .catalogue-introduction p{font-size:1rem;line-height:1.65;max-width:85ch;margin:0}
html body .archive-workspace .catalogue-introduction .library-game-label{font:700 .75rem/1.5 var(--library-text);color:#786c43;letter-spacing:.03em}
html body .archive-workspace :is(a,button,summary,input,select):focus-visible{outline:3px solid #916c25;outline-offset:4px}
/* Category directory: subjects, not a stream mixing media and stories. */
html body .archive-workspace .archive-directory{font-family:var(--library-text);margin:0 0 24px}
html body .archive-workspace .directory-return{display:inline-flex;align-items:center;gap:9px;min-height:44px;margin:0 0 10px;color:#36503b;font-size:.94rem;font-weight:700;text-decoration:none;text-underline-offset:4px}
html body .archive-workspace .directory-return:hover{text-decoration:underline}
html body .archive-workspace .article-recovery{display:inline-flex;align-items:center;min-height:44px;padding:8px 0}
.directory-search{padding:0 0 24px;max-width:780px}
.directory-search label{display:block;font-size:.875rem;font-weight:700;margin:0 0 8px;color:#42543c}
.directory-search>div{display:flex;gap:8px;align-items:stretch}
html body .archive-workspace .directory-search input{width:100%;min-width:0;min-height:48px;padding:10px 14px;border:1px solid #aeb796;border-radius:5px;background:#fffef9;font:1rem/1.5 var(--library-text);color:#263f30}
html body .archive-workspace .directory-search button{min-height:48px;border:1px solid #254f3a;background:#254f3a;color:#fff5d9;border-radius:5px;padding:10px 20px;font:700 .9375rem/1.5 var(--library-text);white-space:nowrap;cursor:pointer}
.directory-search button:hover{background:#386b4a!important}
.directory-heading{display:flex;align-items:baseline;justify-content:space-between;gap:14px;padding:20px 0 16px;border-top:1px solid #c9c1a0}
html body .archive-workspace .directory-heading h2{font:400 1.65rem/1.3 Georgia,serif;color:#274d38;margin:0}
.directory-heading>a{font-size:.875rem;font-weight:700;color:#3a593e;text-decoration:none;min-height:44px;display:inline-flex;align-items:center;gap:12px}
.directory-heading>a span{font-size:.75rem;font-weight:400;color:#676f58}
.directory-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
html body .archive-workspace .directory-group{min-width:0;background:#fffef7;border:1px solid #c7bea0;border-top:3px solid #62836b;border-radius:5px;padding:18px 18px 8px;box-shadow:0 2px 0 #d5cead40}
html body .archive-workspace .directory-group:nth-child(3n+2){border-top-color:#b49248}
html body .archive-workspace .directory-group:nth-child(3n){border-top-color:#71939c}
html body .archive-workspace .directory-group :is(h2,h3){font:700 .8125rem/1.4 var(--library-text);letter-spacing:.035em;color:#737052;text-transform:uppercase;margin:0 0 10px}
.directory-group ul{list-style:none;padding:0;margin:0}
.directory-group li{margin:0;padding:0;border-top:1px solid #e5e1cc}
.directory-group li:first-child{border-top:0}
html body .archive-workspace .directory-group li>a{display:grid;grid-template-columns:minmax(0,1fr) auto 16px;align-items:center;gap:10px;min-height:56px;padding:10px 0;color:#294d37;text-decoration:none;font:700 1rem/1.45 var(--library-text)}
.directory-group li>a small{font:400 .8125rem/1.5 var(--library-text);color:#6f745e;font-variant-numeric:tabular-nums}
.directory-count-label{display:none}
.directory-group li>a b{color:#7b8868;font-size:1rem;font-weight:400}
.directory-group li>a:hover span:first-child{text-decoration:underline;text-underline-offset:4px}
.directory-group li>a[aria-current]{background:#e9eddb;box-shadow:0 0 0 6px #e9eddb;border-radius:2px}
html body .archive-workspace .directory-footnote{font:.8125rem/1.65 var(--library-text);color:#6e735e;margin:18px 0 0;padding:0;max-width:100ch}
.directory-footnote a{color:#365d43;margin-left:6px}
html body .archive-workspace .directory-switch{border:1px solid #b9b895;background:#f0f1e3;border-radius:5px;box-shadow:none;margin:0;padding:0}
.directory-switch>summary{display:flex;align-items:center;gap:12px;min-height:48px;list-style:none;padding:12px 16px;cursor:pointer;color:#3c5940;font:.875rem/1.5 var(--library-text)}
.directory-switch>summary::-webkit-details-marker{display:none}
.directory-switch>summary>span:last-child{margin-left:auto}
.directory-switch>summary>strong{font-weight:700}
.directory-switch[open]>.directory-groups{padding:10px 16px 16px}
.directory-switch .directory-group{box-shadow:none}
.directory-all{display:inline-block;padding:6px 16px 18px;color:#345c42;font:.875rem/1.5 var(--library-text)}
html body .archive-workspace .archive-category-description{font-size:.9375rem;line-height:1.65;border-left:3px solid #9bb184;padding:4px 16px;margin:18px 0 24px;max-width:90ch}
/* Result cards show a readable excerpt; details retain the complete document. */
html body .archive-workspace .source-results:not(.source-single){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}
html body .archive-workspace .source-results:not(.source-single) .source-entry{display:flex;flex-direction:column;padding:0;gap:0;background:#fffef7;border:1px solid #c5bea1;border-radius:5px;overflow:hidden;box-shadow:0 2px 0 #cec5a740;align-self:stretch}
html body .archive-workspace .source-results:not(.source-single) .source-entry-copy{padding:18px;min-width:0}
html body .archive-workspace .source-results:not(.source-single) .source-visual{height:195px;min-height:0;background:#eeeddd;border:0;border-bottom:1px solid #d4cbb0;border-radius:0;display:flex;align-items:center;justify-content:center;padding:12px}
html body .archive-workspace .source-results:not(.source-single) .source-visual img{width:100%;height:100%;max-height:170px;object-fit:contain}
html body .archive-workspace .source-results:not(.source-single) .source-description{font:400 .9375rem/1.65 var(--library-text);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:10px 0}
html body .archive-workspace .source-results:not(.source-single) h3{font:400 1.3rem/1.35 Georgia,serif;margin:8px 0;color:#294e3b}
html body .archive-workspace .source-results:not(.source-single) :is(.source-kind,.source-dating){font:.75rem/1.6 var(--library-text);color:#71735d;margin:7px 0}
html body .archive-workspace .source-results:not(.source-single) .archive-card-action a{font:700 .8125rem/1.5 var(--library-text);min-height:44px;display:inline-flex;align-items:center}
html body .archive-workspace .ch-list:not(.ch-single){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:stretch}
html body .archive-workspace .ch-preview{border:1px solid #c5bea1;background:#fffef7;border-radius:5px;box-shadow:0 2px 0 #cec5a740;overflow:hidden}
html body .archive-workspace .ch-preview-copy{padding:20px}
html body .archive-workspace .ch-preview-copy>p:not(.archive-card-meta):not(.archive-card-action){font:.9375rem/1.7 var(--library-text)}
html body .archive-workspace .ch-preview h2{font:400 1.4rem/1.35 Georgia,serif}
/* Detail pages keep navigation available without putting a catalogue above the story. */
html body .archive-workspace .archive-section-switch{margin:0 0 20px;padding:0;border:0;border-bottom:1px solid #d2caab;background:transparent;box-shadow:none;border-radius:0}
.archive-section-switch>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;min-height:44px;padding:4px 0 10px;font:700 .8125rem/1.5 var(--library-text);color:#466446;cursor:pointer}
.archive-section-switch>summary::-webkit-details-marker{display:none}
html body .archive-workspace .archive-section-switch .archive-explorer{margin:6px 0 18px}
html body .archive-workspace.archive-detail .explorer-reading-nav{border:0;border-bottom:1px solid #d2caab;border-radius:0;box-shadow:none;background:transparent;margin:0 0 18px;padding:0 0 10px;flex-direction:row;align-items:center}
html body .archive-workspace.archive-detail .explorer-reading-nav p{display:none}
html body .archive-workspace.archive-detail .explorer-reading-nav .explorer-permanent{font-size:.75rem;margin-left:0}
html body .archive-workspace.archive-detail .catalogue-introduction{max-width:1050px;margin-bottom:12px}
html body .archive-workspace.archive-detail .catalogue-introduction p:not(.library-game-label){font-size:.875rem;color:#6b715c}
html body .archive-workspace.archive-detail>.source-dating{font:.75rem/1.5 var(--library-text);color:#72745d;margin:8px 0}
/* A document leads to its actual editorial context, not a mixed recommendation feed. */
html body .archive-workspace .source-article-context{margin:24px 0 0;padding:18px 0 0;border:0;border-top:2px solid #b7b58e;background:transparent;box-shadow:none}
html body .archive-workspace .source-article-context h2{font:400 1.35rem/1.35 Georgia,serif;color:#2e543c;margin:0 0 14px}
.source-article-context ul{margin:0;padding:0;list-style:none}
.source-article-context li{padding:12px 0;border-top:1px solid #d9d4b9}
.source-article-context li:first-child{border-top:0;padding-top:0}
html body .archive-workspace .source-article-context li>a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;font:700 1rem/1.55 var(--library-text);color:#2c543c;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;padding:5px 0;overflow-wrap:anywhere}
.source-article-context li>a:hover{color:#7b591d}
.source-article-context .source-article-relation{font:700 .6875rem/1.5 var(--library-text);letter-spacing:.06em;text-transform:uppercase;color:#797048}
.source-article-context small{display:block;font:.8125rem/1.6 var(--library-text);color:#686e59}
html body .archive-workspace .source-dossier-context{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:4px 0 22px;padding:14px 18px;border:1px solid #c7bea0;border-left:3px solid #62836b;border-radius:4px;background:#f2f2e4;box-shadow:none}
.source-dossier-context>div{min-width:0}
.source-dossier-context>nav{display:flex;flex-wrap:wrap;align-items:center;gap:6px 22px}
html body .archive-workspace .source-dossier-context h2{font:400 1.35rem/1.4 Georgia,serif;margin:6px 0;color:#294e3b}
.source-dossier-context>div>span{font:.75rem/1.6 var(--library-text);color:#69725b}
.source-dossier-context a{display:inline-flex;align-items:center;min-height:44px;color:#365b3f;font:700 .8125rem/1.5 var(--library-text);text-underline-offset:3px}
.source-dossier-context .dossier-leave{font-weight:400;white-space:nowrap}
html body .archive-workspace .source-empty .source-recovery{display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:6px 0;font-weight:700;color:#315c40;text-underline-offset:4px}
.source-empty .source-recovery>span{flex-shrink:0}
@media(max-width:540px){html body .archive-workspace .source-dossier-context{display:block;padding:12px 14px 8px;margin-bottom:16px}.source-dossier-context .dossier-leave{font-size:.75rem}html body .archive-workspace .source-dossier-context h2{font-size:1.2rem}html body .archive-dossier-page .catalogue-introduction{margin-bottom:16px}}
html body .archive-workspace :is(.source-entry,.ch-preview,.ee-entry,.bank-toolbar,.ch-toolbar,.ee-result-line){scroll-margin-top:24px}
@media(max-width:1150px){html body .archive-workspace .archive-explorer{grid-template-columns:1fr}.archive-workspace .explorer-heading{order:0!important;justify-content:flex-end}.directory-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){html body main.archive-workspace{padding:18px}.directory-heading{flex-wrap:wrap;gap:6px}.directory-groups{gap:14px}html body .archive-workspace .source-results:not(.source-single){grid-template-columns:repeat(2,minmax(0,1fr))}html body .archive-workspace .ch-list:not(.ch-single){grid-template-columns:1fr}}
@media(max-width:540px){
 html body main.archive-workspace{padding:12px 12px 24px}
 html body .archive-workspace .archive-breadcrumb{margin:0 0 6px}
 html body .archive-workspace .archive-breadcrumb li{font-size:.75rem}
 html body .archive-workspace .archive-breadcrumb a{min-height:32px}
 html body .archive-workspace .archive-explorer{gap:8px;margin-bottom:18px}
 html body .archive-workspace .explorer-heading{width:100%}
 html body .archive-workspace .explorer-tabs{flex-wrap:wrap;overflow:visible;gap:2px;padding:0}
 html body .archive-workspace .explorer-tabs>a{flex:1 1 auto;justify-content:center;min-height:44px;font-size:.8125rem;padding:8px 7px;white-space:normal}
 html body .archive-workspace .explorer-tabs>a svg{display:none}
 html body .archive-workspace .catalogue-introduction h1{font-size:1.85rem;line-height:1.2}
 html body .archive-workspace .catalogue-introduction p{font-size:.9375rem}
 .directory-groups{grid-template-columns:1fr;gap:14px}
 .directory-search{padding-bottom:18px}
 html body .archive-workspace .directory-search button{padding:10px 12px;font-size:.8125rem}
 .directory-search button span{display:none}
 .directory-heading{padding:16px 0 10px}
 .directory-heading>a{font-size:.8125rem;gap:8px}
 html body .archive-workspace .directory-group{padding:14px 16px 4px}
 html body .archive-workspace .directory-group li>a{min-height:50px;font-size:.9375rem}
 .directory-switch>summary{gap:8px;padding:10px 12px;font-size:.8125rem}
 .directory-switch[open]>.directory-groups{padding:2px 10px 12px}
 html body .archive-workspace .source-results:not(.source-single){grid-template-columns:1fr}
 html body .archive-workspace .explorer-search .archive-search-row{grid-template-columns:minmax(0,1fr) auto;gap:10px}
 html body .archive-workspace .explorer-search .archive-search-row>label:first-child{grid-column:1/-1}
 html body .archive-workspace .explorer-search .archive-search-row>button{font-size:.8125rem;padding:10px 12px;gap:6px}
 html body .archive-workspace .explorer-search #explorer-search-help{display:none}
 html body .archive-workspace.archive-detail .explorer-reading-nav{gap:10px}
 html body .archive-workspace.archive-detail .explorer-reading-nav a{font-size:.8125rem;gap:7px}
 html body .archive-workspace.archive-detail .explorer-reading-nav .explorer-permanent{font-size:.6875rem}
 .archive-section-switch>summary{min-height:36px}
 html body .archive-workspace .archive-section-switch{margin-bottom:16px}
}

/* Narrow phones: keep the selected filter readable and the action easy to tap. */
@media (max-width:400px){html body .archive-workspace .explorer-search .archive-search-row{grid-template-columns:minmax(0,1fr)}html body .archive-workspace .explorer-search .archive-search-row>button{width:100%}}
