/* The article is a document; the surrounding cabinet stays quiet. */
.article-active .workarea { margin-top:24px; }
.article-workspace { margin-top:22px; color:#302733; }
.article-heading { margin-bottom:22px; }
.article-heading h1 { font:600 23px/1.35 "Avenir Next","Segoe UI",sans-serif; letter-spacing:0; margin:0 0 7px; overflow-wrap:anywhere; }
.article-heading p { margin:0; font-size:13px; }
.article-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-top:18px; }
.article-actions #article-save-state { font-size:12px; color:var(--muted); margin-right:auto; }
.article-actions button { min-height:44px; white-space:nowrap; }
.article-workspace button { border-radius:6px; }
.article-tabs { display:flex; align-items:center; gap:28px; border-bottom:1px solid var(--line); margin-bottom:20px; }
.article-tabs .article-tab { background:none; color:var(--muted); border:0; border-radius:0; padding:13px 0; }
.article-tabs .article-tab[aria-selected=true] { color:var(--plum); border-bottom:3px solid var(--plum); }
.article-tab span { background:#e5e3e9; padding:2px 7px; font-size:12px; margin-left:5px; border-radius:4px; }
.article-toolbar { background:#fff; border:1px solid var(--line); border-radius:7px; display:flex; flex-wrap:wrap; gap:3px; align-items:center; padding:6px 12px; position:sticky; top:0; z-index:2; }
.article-toolbar button { background:none; color:#302733; border:0; padding:7px 10px; min-width:32px; }
.article-toolbar button:hover { background:#eee7ec; }
.article-toolbar select { --control-padding-y:6px; --control-padding-x:8px; width:146px; border:0; margin:0; background-color:transparent; }
.format-divider { width:1px; height:23px; background:var(--line); margin:0 6px; }
.article-paper { width:min(820px,100%); min-height:850px; padding:60px 76px 76px; background:#fff; border:1px solid #e3e1e6; margin:24px auto 0; box-shadow:0 3px 18px #3027330b; }
#article-title { font:700 32px/1.25 Georgia,serif; letter-spacing:0; color:#302733; width:100%; padding:0; border:0; background:#fff; margin:0 0 22px; resize:none; overflow:hidden; min-height:84px; }
.article-toolbar button[aria-pressed=true] { background:#eee7ec; color:var(--plum); }
.article-body { min-height:500px; font:17px/1.76 Georgia,serif; overflow-wrap:anywhere; color:#302733; }
.article-body:focus-visible { outline:2px solid #c9b4c6; outline-offset:10px; }
.article-body h1 { font:700 30px/1.3 Georgia,serif; letter-spacing:0; }
.article-body h2 { font:700 24px/1.35 Georgia,serif; margin:30px 0 13px; letter-spacing:0; }
.article-body h3 { font:700 20px/1.4 Georgia,serif; margin:25px 0 12px; }
.article-body p { line-height:inherit; margin:12px 0; }
.article-body > p:first-child { font-size:19px; line-height:1.6; color:#59505c; margin-top:0; margin-bottom:24px; }
.article-body blockquote { border-left:3px solid #a98ca0; padding:10px 20px; margin:25px 0; background:#faf8fa; color:#655169; }
.article-body ul,.article-body ol { padding-left:25px; }
.article-body img { max-width:100%; height:auto; }
.article-body table { border-collapse:collapse; display:block; overflow:auto; max-width:100%; font-size:15px; }
.article-body th,.article-body td { border:1px solid var(--line); padding:9px 12px; }
.article-body pre { white-space:pre-wrap; background:#f4f3f6; padding:12px; }
.article-foot { width:min(820px,100%); margin:12px auto; color:var(--muted); font-size:12px; }
.article-versions { padding:22px; border:1px solid var(--line); background:white; border-radius:7px; margin-top:26px; }
.article-version-row:first-child { border-top:0; }
.article-version-row { display:flex; align-items:center; gap:12px; border-top:1px solid var(--line); padding:17px 0; font-size:14px; }
.article-version-row span { flex:1; }
.article-version-row small { display:block; margin-top:6px; color:var(--muted); }
#images-panel { margin-top:26px; }
.image-list-heading h2 { margin-bottom:7px; }
.image-list-heading p { font-size:13px; margin:0 0 20px; }
.article-image-list { border:1px solid var(--line); background:#fff; border-radius:8px; overflow:hidden; margin:0 0 20px; }
.article-image-list > p { padding:20px; }
.article-image-row { display:grid; grid-template-columns:106px minmax(0,1fr) 140px 95px 35px; align-items:center; gap:20px; padding:17px 24px; border-bottom:1px solid #ece9ee; }
.article-image-row:last-child { border-bottom:0; }
.article-image-row:hover { background:#faf8fb; }
.article-image-row .image-thumb { width:106px; height:73px; padding:0; border:1px solid #e2dbe5; background:#f1eff4; overflow:hidden; color:var(--muted); font-size:11px; }
.image-thumb img { display:block; width:100%; height:100%; object-fit:cover; }
.article-image-row .image-row-name { text-align:left; border:0; padding:8px 0; background:none; color:#302733; font-weight:400; min-width:0; }
.image-row-name strong { display:block; font-size:15px; }
.image-row-name span { display:block; color:var(--muted); margin-top:7px; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.image-placement { font-size:13px; color:var(--muted); }
.image-status { font-size:12px; color:#486354; background:#eef5f0; padding:5px 9px; border-radius:4px; text-align:center; }
.article-image-row .image-open { border:0; background:none; color:var(--muted); font-size:24px; padding:8px; }
.article-back { background:none; border:0; color:var(--muted); padding:0; font-size:13px; }
.article-back:hover { background:none; color:var(--plum); }
.image-card-title { margin:18px 0 20px; font-size:22px; }
.article-image-card { display:grid; grid-template-columns:minmax(240px,370px) minmax(0,1fr); gap:32px; background:white; border:1px solid var(--line); border-radius:8px; padding:28px; }
.image-card-fields label:first-child { margin-top:0; }
.image-card-preview .image-preview { width:100%; height:242px; padding:0; overflow:hidden; background:#f1eff4; color:var(--muted); border:0; font-weight:400; }
.image-preview img { display:block; width:100%; height:100%; object-fit:contain; }
.image-card-preview > p { font-size:12px; }
.image-download { display:inline-flex; align-items:center; padding:10px 15px; border:1px solid #a899a6; color:var(--plum); border-radius:6px; text-decoration:none; font-size:13px; font-weight:600; }
.image-history-row { display:flex; flex-wrap:wrap; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); font-size:12px; }
#image-confirmation { grid-column:1/-1; }
.article-image-dialog { width:min(960px,92vw); max-width:960px; padding:0; border:0; border-radius:9px; }
.image-modal-heading,.image-modal-footer { display:flex; align-items:center; justify-content:space-between; padding:18px 24px; gap:16px; }
.image-modal-heading h2 { margin:0; font-size:19px; }
#article-large-image { display:block; width:100%; max-height:65vh; object-fit:contain; background:#e9eaf0; }
.image-modal-footer { font-size:12px; }
.image-modal-footer .toolbar { margin:0; }
.article-image-dialog .dialog-error { padding:0 24px 20px; }
@media(max-width:1050px) { .article-image-row { grid-template-columns:90px minmax(0,1fr) 110px 35px; gap:14px; } .image-placement { display:none; } .article-image-row .image-thumb { width:90px; } }
@media(max-width:700px) { .article-actions { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; } .article-actions button { width:100%; } .article-actions #article-save-state { margin:0; } .article-heading h1 { font-size:20px; } .article-tabs { gap:15px; flex-wrap:wrap; } .article-tabs .article-tab { font-size:13px; } .article-toolbar { padding:6px; } .article-toolbar button { padding:6px 8px; } .format-divider { margin:0 3px; } .article-paper { padding:28px 23px; margin-top:18px; } #article-title { font-size:27px; min-height:105px; } .article-body { font-size:16px; } .article-body h2 { font-size:22px; } .article-image-row { grid-template-columns:75px minmax(0,1fr) 25px; padding:15px 12px; gap:12px; } .article-image-row .image-thumb { width:75px; height:58px; } .image-status { display:none; } .article-image-card { grid-template-columns:minmax(0,1fr); padding:20px; gap:22px; } .article-version-row { flex-wrap:wrap; } .article-version-row span { flex-basis:100%; } .image-modal-footer { flex-wrap:wrap; } }

/* Materials: one topic, six focused sections. */
.material-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin:22px 0; }
.material-heading>div { min-width:0; }
.material-heading h1 { margin:8px 0 0; overflow-wrap:anywhere; }
.material-heading p { margin:0; font-size:13px; }
.material-heading .status { flex:none; margin-top:6px; }
.material-list-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:24px; align-items:center; border-top:1px solid var(--line); padding:18px 0; }
.material-list-row p { margin:6px 0 0; }
.material-list-row .topic-link { text-align:left; overflow-wrap:anywhere; }
.material-list-row .status { white-space:nowrap; }
#topic-pagination { border-top:1px solid var(--line); margin-top:12px; }
#topic-pagination>p { font-size:12px; }
#topic-editor-view .article-tabs { gap:0; margin:20px 0; }
#topic-editor-view .article-tab { padding:12px 16px; }
#topic-editor-view .article-tab[aria-selected=true] { background:#e8e3ea; color:var(--plum); }
.material-mobile-section { display:none; }
#topic-settings,#topic-sources,#topic-adaptations { margin-top:0; min-height:0; }
#topic-detail .page-heading { margin-bottom:16px; align-items:center; }
#topic-detail h2 { margin:0; }
.material-plain-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.material-detail-row { display:grid; grid-template-columns:150px minmax(0,1fr) auto; gap:20px; align-items:center; border-top:1px solid var(--line); padding:16px 0; }
.material-detail-row>span { font-size:13px; color:var(--muted); }
.material-detail-row p { margin:0; }
.material-detail-row button { text-align:left; }
.material-parameters { display:grid; grid-template-columns:150px minmax(0,1fr); gap:12px 20px; }
.material-parameters dt { color:var(--muted); }
.material-parameters dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.material-source-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:center; border-top:1px solid var(--line); padding:16px 0; }
.material-source-row p { margin:6px 0 0; overflow-wrap:anywhere; }
.material-source-check { display:flex; align-items:center; gap:10px; margin:0; overflow-wrap:anywhere; }
.material-source-check input { width:auto; flex:none; margin:0; }
#source-mode { max-width:480px; }
#topic-editor-view .article-workspace { margin-top:0; }
#article-name { margin:0; font-size:22px; }
#article-document .article-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
#article-document .article-actions { margin:0; }
#article-document .article-paper { min-height:550px; padding:36px 52px; }
#article-document .article-body { min-height:300px; }
#material-task-dialog,#material-requirements-dialog,#material-prepare-dialog,#material-source-dialog { width:min(680px,calc(100vw - 32px)); }
#material-version-dialog { width:min(820px,calc(100vw - 32px)); }
#material-version-body { font:16px/1.7 Georgia,serif; }
#material-task-content .pane { border:0; padding:0; margin:0; }
#topic-adaptations .preparation-warning { border-left:3px solid var(--plum); padding-left:14px; }
#topic-adaptations .image-download { color:var(--plum); }
@media(max-width:760px) {
  #topic-editor-view .article-tabs { display:none; }
  .material-mobile-section { display:block; margin:18px 0; }
  .material-list-row { grid-template-columns:minmax(0,1fr) auto; gap:12px; }
  .material-list-row>div { grid-column:1/-1; }
  .material-detail-row { grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; }
  .material-detail-row>span { grid-column:1/-1; }
  .material-parameters { grid-template-columns:minmax(0,1fr); gap:6px; }
  .material-parameters dd { margin-bottom:12px; }
  .material-source-row { grid-template-columns:minmax(0,1fr); gap:10px; }
  #article-document .article-heading { display:block; }
  #article-document .article-actions { margin-top:12px; }
  #article-document .article-paper { padding:24px 20px; }
  #topic-editor-view input,#topic-editor-view textarea,#topic-editor-view select { min-width:0; }
}

/* Independent platform text and image sets. */
.adaptation-platforms,.adaptation-parts { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; }
.adaptation-platforms button[aria-pressed=true],.adaptation-parts button[aria-pressed=true] { background:#e8e3ea; border-color:var(--plum); color:var(--plum); }
.adaptation-paper { background:var(--paper); border:1px solid var(--line); padding:26px; }
.adaptation-paper .page-heading { align-items:flex-start; margin-bottom:16px; }
.adaptation-paper .page-heading h2 { margin:0 0 8px; }
.adaptation-states { display:flex; flex-wrap:wrap; gap:8px 20px; color:var(--muted); font-size:12px; margin:12px 0 22px; }
.adaptation-states strong { color:var(--ink); }
.adaptation-content-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; padding:20px 0; border-top:1px solid var(--line); align-items:start; }
.adaptation-content-row h3,.adaptation-image-heading h3 { margin:0 0 8px; }
.adaptation-content-row p { max-width:72ch; margin:7px 0 0; overflow-wrap:anywhere; }
.adaptation-image-heading { border-top:1px solid var(--line); padding-top:22px; margin-top:24px; }
.adaptation-empty { padding:12px 0; }
.adaptation-empty h3 { margin:0 0 8px; }
.adaptation-empty>p { max-width:70ch; }
.adaptation-image-row,.adaptation-picker-row,.article-shared-asset { display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:16px; align-items:center; border-top:1px solid var(--line); padding:16px 0; }
.adaptation-image-row strong { overflow-wrap:anywhere; }
.adaptation-image-row p,.adaptation-picker-row p { margin:5px 0 0; }
.adaptation-thumb { display:block; width:64px; height:50px; object-fit:cover; background:#e8e3ea; }
.adaptation-foot { border-top:1px solid var(--line); margin:24px 0 0; padding-top:16px; font-size:12px; color:var(--muted); }
.adaptation-warning { border-left:3px solid var(--plum); padding-left:14px; color:var(--muted); }
#adaptation-dialog { width:min(760px,calc(100vw - 32px)); }
#adaptation-dialog .adaptation-preview { display:block; max-width:100%; max-height:320px; object-fit:contain; margin:14px auto; }
.adaptation-check { display:flex; align-items:center; gap:10px; margin:0; overflow-wrap:anywhere; }
.adaptation-check input { width:auto; flex:none; margin:0; }
.adaptation-role { max-width:180px; }
#adaptation-edit-form textarea { min-height:180px; }
@media(max-width:760px) {
 .adaptation-paper { padding:20px 16px; }
 .adaptation-content-row { grid-template-columns:minmax(0,1fr); gap:12px; }
 .adaptation-content-row>button { justify-self:start; }
 .adaptation-image-row,.adaptation-picker-row,.article-shared-asset { grid-template-columns:48px minmax(0,1fr); gap:12px; }
 .adaptation-image-row>button,.adaptation-picker-row>.adaptation-role,.adaptation-picker-row>a,.article-shared-asset>a { grid-column:2; justify-self:start; }
 .adaptation-thumb { width:48px; height:44px; }
 .adaptation-role { max-width:100%; }
}
