.diwan{max-width:1380px;margin:auto;padding-block:20px 50px;color:#173640}.diwan-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.diwan-heading h1{font-size:1.8rem;margin:.25rem 0 1rem}.diwan-tabs{display:flex;gap:4px;flex-wrap:wrap;border-bottom:1px solid #d5e0df;margin-bottom:24px}.diwan-tabs a{padding:12px 16px;color:#5a7077;border-bottom:3px solid transparent}.diwan-tabs a.active{color:#146c62;border-color:#146c62;background:#edf5f1}.diwan-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;background:linear-gradient(110deg,#edf4ef,#f9f8f1);border:1px solid #dbe4db;border-radius:14px;margin-bottom:20px}.diwan-intro h2{font-size:1.25rem;margin:0 0 8px}.diwan-intro p{margin:0;max-width:660px;line-height:1.7;color:#607477}.diwan-counts{display:flex;gap:24px;flex-shrink:0}.diwan-counts span{font-size:.8rem;display:flex;flex-direction:column;gap:4px}.diwan-counts strong{font-size:1.8rem;font-variant-numeric:tabular-nums}.diwan-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:20px 0}.diwan label{display:block;font-size:.85rem;font-weight:600;margin-bottom:12px}.diwan label input:not([type=checkbox]),.diwan label select,.diwan label textarea{display:block;width:100%;margin-top:6px;padding:9px 10px;border:1px solid #cad7d7;border-radius:7px;background:#fff;font:inherit;color:inherit;box-sizing:border-box}.diwan-filters label{margin:0;min-width:140px}.diwan-search{flex:1}.diwan-table{border:1px solid #dce5e3;border-radius:12px;overflow-x:auto;background:#fff}.diwan table{width:100%;border-collapse:collapse;font-size:.9rem}.diwan th{background:#f1f5f3;color:#5a7277;font-size:.78rem;padding:12px;text-align:start;white-space:nowrap}.diwan td{padding:13px 12px;border-top:1px solid #edf0ef;vertical-align:middle}.diwan td small{display:block;color:#80908f;font-size:.75rem;margin-top:4px}.diwan tbody tr:hover{background:#fbfcf8}.diwan a:not(.button):hover{text-decoration:underline}.diwan-pill{display:inline-block;background:#eef2f1;color:#607373;border:1px solid #e0e7e4;border-radius:6px;padding:4px 8px;font-size:.75rem;white-space:nowrap}.diwan-pill.reviewed{background:#e2f1e8;color:#17643f}.diwan-pill.disputed{background:#fff0e8;color:#9a4515}.diwan-hint{font-size:.85rem;color:#7b7565;line-height:1.7}.diwan-empty{padding:28px;color:#6d8083;text-align:center}.diwan-pagination,.diwan-viewer-nav{display:flex;align-items:center;gap:16px;justify-content:space-between;padding:14px 0;font-size:.85rem}.diwan-breadcrumb{font-size:.85rem;color:#758786}.diwan-review{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr);gap:22px;align-items:start}.diwan-panel{padding:22px;background:#fff;border:1px solid #dce4e1;border-radius:12px;margin-bottom:20px;min-width:0}.diwan-panel h3{margin:0 0 16px;font-size:1.1rem}.diwan-panel summary{font-weight:700;cursor:pointer;color:#176e65;line-height:1.6}.diwan-panel[open]>summary{margin-bottom:18px}.diwan-viewer{background:#e9edeb;border:1px solid #d5ded9;border-radius:12px;padding:16px;min-width:0}.diwan-viewer-nav{padding:0 0 12px;flex-wrap:wrap}.diwan-scan{display:block;width:100%;max-height:850px;object-fit:contain;background:#dce2de;border-radius:4px}.diwan-file-name{font-size:.75rem;color:#5f7274;overflow-wrap:anywhere}.diwan-hash{display:block;font-size:.7rem;overflow-wrap:anywhere;margin:12px 0}.diwan-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.diwan-parts{list-style:none;padding:0;margin:0;max-height:330px;overflow:auto}.diwan-parts li{padding:10px 0;border-top:1px solid #edf0ee;font-size:.8rem;overflow-wrap:anywhere}.diwan-parts small{display:block;padding-top:4px;color:#7c8c8b}.diwan-parts a.active{font-weight:700;color:#136459}.diwan-tools{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:22px;align-items:start}.diwan-checks{max-height:250px;overflow:auto;padding:12px;background:#f5f7f4;border-radius:8px;margin-bottom:16px}.diwan-checks label{font-weight:400;font-size:.8rem;display:flex;gap:10px;align-items:center}.diwan-change,.diwan-link{border-bottom:1px solid #e5ebe8;padding:12px 0}.diwan-change pre{white-space:pre-wrap;overflow-wrap:anywhere;direction:ltr;font-size:.75rem;background:#f5f7f5;padding:12px;max-height:250px;overflow:auto}.diwan-link h4{margin:12px 0}.diwan-link p{line-height:1.6;font-size:.9rem}.diwan hr{border:0;border-top:1px solid #e5ebe8;margin:22px 0}.diwan input:focus-visible,.diwan select:focus-visible,.diwan textarea:focus-visible,.diwan a:focus-visible,.diwan summary:focus-visible{outline:3px solid #f5a85a;outline-offset:3px}@media(max-width:1000px){.diwan-intro{display:block}.diwan-counts{margin-top:20px}.diwan-review{grid-template-columns:minmax(0,1fr) minmax(280px,1fr)}}@media(max-width:740px){.diwan-review,.diwan-tools{grid-template-columns:1fr}.diwan-heading{align-items:start}.diwan-heading>.diwan-pill{display:none}.diwan-tabs a{padding:10px;font-size:.85rem}.diwan-form-grid{grid-template-columns:1fr}.diwan-filters label{flex:1;min-width:130px}.diwan-panel{padding:16px}.diwan-counts{gap:18px}.diwan-scan{max-height:70vh}}@media print{.diwan-filters,.diwan-tools,.diwan-tabs,.diwan-pagination{display:none}.diwan-review{display:block}.diwan-scan{width:100%;height:auto;max-height:none}}

.diwan-receipt{margin-top:20px}

/* The shared shell stays compact; readers retain their own scroll/navigation. */
.diwan-shell-navigation,.diwan-menu-wide{display:flex;align-items:center;gap:3px;min-width:0}
.diwan-menu-wide{display:none}
.diwan-toolbar .nav-link{font-size:.78rem;padding:6px 9px}
.diwan-toolbar summary{list-style:none;cursor:pointer}
.diwan-toolbar summary::-webkit-details-marker{display:none}
.diwan-toolbar [aria-current=page],.diwan-toolbar .is-active{background:#eaf3ef;color:#146c62;font-weight:700}
.diwan-toolbar .nav-flyout{max-height:calc(100dvh - var(--shell-header-height,48px) - 120px);overflow:auto;overscroll-behavior:contain}
.diwan-navigation-flyout{min-width:240px;max-width:min(320px,calc(100vw - 24px))}
.diwan-navigation-flyout section{border-block-start:1px solid #dae4df;padding-block:7px}
.diwan-navigation-flyout strong{display:block;padding:5px 12px;color:#6a7c7c;font-size:.7rem}
.diwan-case-trail{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:.77rem;color:#657c7e;margin-block:0 14px}
.diwan-case-trail a{color:#355d60}.diwan-case-private{margin-inline-start:auto;font-size:.68rem;color:#708380}
.diwan .diwan-result-count{margin-block:10px 16px;font-variant-numeric:tabular-nums}
.diwan [data-page-section]{scroll-margin-top:var(--page-navigation-offset,100px)}
@media(min-width:1280px){.diwan-menu-wide{display:flex}.diwan-menu-compact{display:none}}
@media(max-width:640px){.diwan-case-private{display:none}.diwan{padding-block-start:8px}.diwan-toolbar .nav-link{padding-inline:7px}}
@media print{.diwan-case-trail{display:none}.diwan [data-page-section]{outline:none!important;box-shadow:none!important}}

.diwan-extraction { padding-block: .8rem; border-block-end: 1px solid #e2e8e5; }
.diwan-extraction-text { max-height: 22rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .9rem; padding: 1rem; background: #f5f7f6; }

.diwan-people-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:22px;align-items:start}
.diwan-role-chips {display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.diwan-person-role,.diwan-person-mention {border-block-end:1px solid #e1e8e5;padding-block:16px;font-size:.9rem;overflow-wrap:anywhere}
.diwan-person-role p,.diwan-person-mention p {line-height:1.65;margin:.6rem 0}
.diwan-person-role.withdrawn {background:#f6f5f2;border-inline-start:3px solid #c1b5a1;padding-inline:12px}
.diwan-person-add {margin-top:20px}.diwan-person-add[open]>summary {margin-bottom:16px}
.diwan-pill.provisional {background:#fff4df;color:#79581a}.diwan-pill.corroborated {background:#e2f1e8;color:#17643f}
@media(max-width:850px){.diwan-people-grid{grid-template-columns:1fr}}

/* Keep a populated person profile useful as an evidence index. */
.diwan-person-context > summary, .diwan-person-notes > summary { font-size: .87rem; color: var(--diwan-muted, #687f85); }
.diwan-person-context > p { margin-block: .65rem; }
.diwan-person-notes { margin-block: .8rem 1.2rem; }
.diwan-person-mention > p, .diwan-person-role > p { margin-block: .5rem; }
.diwan-people-grid { align-items: start; }

/* Investigation: a readable story first, source registers and editing on demand. */
.diwan-story-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:22px 0}.diwan-story-intro h2{font-size:clamp(1.4rem,2vw,2rem);line-height:1.45;margin:.4rem 0}.diwan-story-intro p{line-height:1.8;color:#536c72;max-width:850px;margin:.5rem 0}.diwan-stat-strip{display:flex;gap:28px;flex-wrap:wrap;padding:15px 0 20px;border-block-end:1px solid #dce4e1;margin-block-end:28px;font-size:.82rem;color:#536a70}.diwan-stat-strip strong{font-size:1.15rem;color:#183a42;font-variant-numeric:tabular-nums;margin-inline-end:5px}.diwan-investigation-grid{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(285px,1fr);gap:28px;align-items:start}.diwan-section-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-block:0 16px}.diwan-section-head h2{font-size:1.15rem;margin:0}.diwan-section-head>span,.diwan-section-head>a{font-size:.8rem;color:#61767b}.diwan-topic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-block-end:24px}.diwan-topic-card{display:flex;flex-direction:column;background:#fff;border:1px solid #dce5e0;border-block-start:3px solid #81aaa0;border-radius:12px;padding:20px;min-width:0;transition:border-color .15s}.diwan-topic-card:hover{border-color:#6f9992}.diwan-topic-card h3{font-size:1.08rem;margin:.6rem 0;line-height:1.55}.diwan-topic-card p{font-size:.85rem;line-height:1.75;color:#526c72;margin:0 0 18px}.diwan-topic-card footer{margin-top:auto;display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:.73rem;color:#687d81}.diwan-subtle-link{color:#176d62;margin-inline-start:auto}.diwan-focus-panel{border-inline-start:1px solid #dce5df;padding-inline-start:24px;min-width:0}.diwan-focus-panel h2{font-size:1.15rem;margin:.5rem 0}.diwan-focus-panel h3{font-size:1rem}.diwan-focus-panel p{font-size:.86rem;line-height:1.8}.diwan-issue{background:#fff;border:1px solid #eadfd0;border-inline-start:3px solid #c58a3f;border-radius:10px;padding:17px;margin-block:14px}.diwan-issue.high{border-inline-start-color:#b65a40}.diwan-issue.low{border-inline-start-color:#78949a}.diwan-issue h3{font-size:.95rem;line-height:1.6;margin:.65rem 0}.diwan-issue p{font-size:.85rem;line-height:1.75;margin:.6rem 0;overflow-wrap:anywhere}.diwan-row-meta{display:flex;gap:10px;flex-wrap:wrap;align-items:center;color:#667d80;font-size:.77rem}.diwan-severity{font-size:.7rem;font-weight:700;color:#92632a}.diwan-severity.high{color:#a14f38}.diwan-severity.low{color:#607b82}.diwan-next-step{padding-block-start:9px;border-block-start:1px solid #eee8df;margin-block-start:10px}.diwan-next-step>strong{font-size:.75rem;color:#8b6c43}.diwan-exception-count{color:#9b5c32;font-size:.75rem}.diwan-understanding{margin-block-start:28px;background:#f3f6f3}.diwan-three-notes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px;font-size:.85rem;line-height:1.8}.diwan-story-row{position:relative;display:grid;grid-template-columns:100px minmax(0,1fr) auto;gap:18px;padding:20px 0;border-block-end:1px solid #dce4e1;align-items:start}.diwan-story-date{font-size:.78rem;color:#647d80;direction:ltr;text-align:start;font-variant-numeric:tabular-nums;border-inline-start:3px solid #b5cbc1;padding-inline-start:12px;line-height:1.6}.diwan-story-date small{display:block;font-size:.68rem;direction:inherit}.diwan-story-content h3{font-size:.95rem;line-height:1.7;margin:0 0 8px;overflow-wrap:anywhere}.diwan-story-amount{font-size:.88rem;white-space:nowrap;font-variant-numeric:tabular-nums;color:#395d61}.diwan-confidence{display:inline-block;font-size:.7rem;padding:3px 7px;border-radius:5px;background:#eef1f2;color:#677d84}.diwan-confidence.clear{color:#246357;background:#e8f2ec}.diwan-confidence.qualified{color:#8a642a;background:#fbf1df}.diwan-confidence.uncertain{color:#994b3a;background:#faeae4}.diwan-confidence.stale{color:#705079;background:#f1eaf5}.diwan-reading-strip{display:grid;grid-template-columns:1.3fr 1.5fr .65fr;gap:20px;border:1px solid #dce5df;background:#f0f5f1;border-radius:12px;padding:18px 22px;margin-block:18px 25px}.diwan-reading-strip>div{display:flex;flex-direction:column;align-items:start;gap:6px;font-size:.85rem}.diwan-reading-strip small{font-size:.72rem;color:#687e80}.diwan-record-amount{font-size:1.6rem;white-space:nowrap;font-variant-numeric:tabular-nums}.diwan-record-amount small{display:block;font-size:.7rem;font-weight:400;color:#6b7b7c}.diwan-statement{font-size:.95rem;line-height:1.95;overflow-wrap:anywhere}.diwan-source-link{border-block-end:1px solid #e2e9e3;padding:12px 0}.diwan-source-link summary{display:flex;align-items:baseline;gap:10px;font-size:.86rem;line-height:1.7}.diwan-source-link>p{font-size:.85rem;line-height:1.8}.diwan-source-link>details{margin-block-start:15px}.diwan-issue-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.diwan-source-menu{position:relative;align-self:center;padding:12px 16px;font-size:.85rem;color:#5a7077;margin-inline-start:auto}.diwan-source-menu summary{cursor:pointer}.diwan-source-menu>div{position:absolute;z-index:4;inset-inline-end:0;top:100%;min-width:230px;display:grid;background:#fff;border:1px solid #d6e1dc;border-radius:10px;box-shadow:0 8px 24px #183b3420;padding:6px}.diwan-source-menu a{border:0;padding:9px 12px}.diwan-connection-form{border-block-end:1px solid #dce4df;padding-block:14px}.diwan-issue-edit{margin-block-start:15px}.diwan-focus-panel>.diwan-panel{padding:15px;margin-block-start:20px}
@media(max-width:1050px){.diwan-investigation-grid{grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr)}.diwan-topic-grid{grid-template-columns:1fr}.diwan-story-row{grid-template-columns:80px minmax(0,1fr)}.diwan-story-amount{grid-column:2}.diwan-focus-panel{padding-inline-start:18px}}
@media(max-width:740px){.diwan-investigation-grid,.diwan-three-notes,.diwan-issue-grid{grid-template-columns:1fr}.diwan-focus-panel{border-inline-start:0;border-block-start:1px solid #dce5df;padding:20px 0 0}.diwan-story-intro{display:block}.diwan-story-intro>.button{margin-top:14px}.diwan-stat-strip{gap:12px 20px}.diwan-source-menu{margin-inline-start:0;padding-inline:10px}.diwan-reading-strip{grid-template-columns:1fr 1fr;padding:15px;gap:14px}.diwan-reading-strip>div:last-child{grid-column:1/-1}.diwan-topic-grid{grid-template-columns:1fr}.diwan-story-row{gap:12px;grid-template-columns:74px minmax(0,1fr)}.diwan-record-amount{display:block;margin-top:12px}.diwan-source-link summary{flex-wrap:wrap}}
@media print{.diwan-source-menu,.diwan-issue-edit,.diwan-connection-form{display:none}.diwan-investigation-grid{display:block}.diwan-topic-card,.diwan-issue{break-inside:avoid}.diwan-focus-panel{border:0;padding:0}}

.diwan-related-topics{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-block:0 24px}.diwan-related-topics>span{font-size:.76rem;color:#688084;margin-inline-end:5px}.diwan-legacy-note{margin-block-start:16px;border-block-start:1px solid #e4ebe4;padding-block-start:12px;font-size:.78rem;color:#718580}.diwan-legacy-note summary{font-size:.78rem}.diwan-legacy-note p{font-size:.8rem;line-height:1.7}

/* Business workspace: stable levels, bounded lists, reading before editing. */
.bi-workspace{max-width:1380px;margin-inline:auto}
.bi-heading{margin-bottom:8px}
.bi-heading h1{font-size:1.45rem}
.bi-heading h1 a{color:inherit;text-decoration:none}
.bi-tabs{margin-bottom:28px}
.bi-tabs>a{font-size:.83rem;padding:12px 14px;white-space:nowrap}
.bi-intro{margin:24px 0}
.bi-intro h2{font-size:1.65rem;line-height:1.5;margin:6px 0 8px}
.bi-intro p{max-width:850px;color:#63787b;line-height:1.8;font-size:.94rem}
.bi-entry-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-block:24px 30px}
.bi-entry{display:block;border:1px solid #d5e0da;border-radius:14px;background:#fff;padding:22px;color:#1e4147;text-decoration:none!important;transition:border-color .15s,background .15s}
.bi-entry:hover,.bi-entry:focus-visible{border-color:#50887e;background:#f6faf6}
.bi-entry h3{font-size:1.05rem;margin:12px 0 8px}
.bi-entry p{font-size:.84rem;color:#697e80;line-height:1.7;margin:0 0 18px}
.bi-entry strong{font-size:.8rem;color:#216c62}
.bi-step{font-size:.72rem;letter-spacing:.1em;color:#9b774c}
.bi-entry.selected{border:2px solid #30796d;background:#f0f7f2}
.bi-subject-groups{display:grid;grid-template-columns:1.7fr 1.1fr 1fr;gap:28px}
.bi-subject-groups h3{font-size:.8rem;color:#7b6c59;margin:0 0 10px}
.bi-subject-line{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e0e6df;font-size:.85rem;line-height:1.55;text-decoration:none!important}
.bi-subject-line:hover>span:first-child{text-decoration:underline}
.bi-count{flex-shrink:0;color:#738581;font-size:.72rem}
.bi-map{padding-block:12px 30px}
.bi-bottom-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:22px}
.bi-bottom-grid .diwan-panel{padding:22px}
.bi-bottom-grid h3{font-size:1rem}
.bi-source-status{display:flex;gap:15px;justify-content:space-between;align-items:center;padding:11px 0;border-bottom:1px solid #e6ebe5;font-size:.82rem;text-decoration:none!important}
.bi-source-status strong{font-size:.74rem;color:#69817d;font-weight:500}
.bi-source-status:hover>span{text-decoration:underline}
.bi-disclosure{margin-block-start:20px}
.bi-disclosure summary,.bi-context summary{font-size:.82rem;font-weight:600;cursor:pointer}
.bi-disclosure p{font-size:.83rem;line-height:1.8}
.bi-topic-section{max-width:1000px;margin:24px 0 35px}
.bi-topic-section>h3{font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:#7e6f5c}
.bi-subject-summary{display:grid;grid-template-columns:minmax(200px,1fr) minmax(250px,1.5fr) auto;gap:20px;padding:17px 0;border-bottom:1px solid #dbe3dd;align-items:start}
.bi-subject-summary h4{font-size:.95rem;margin:0;line-height:1.7}
.bi-subject-summary p{font-size:.82rem;color:#70827e;line-height:1.7;margin:0}
.bi-subject-summary>span{font-size:.72rem;white-space:nowrap;color:#6a807c}
.bi-trail{display:flex;flex-wrap:wrap;gap:7px;align-items:baseline;font-size:.75rem;margin:12px 0;color:#73857f}
.bi-trail a{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bi-view-switch{display:flex;gap:5px;flex-wrap:wrap;border-bottom:1px solid #d5e0d8;margin-block:14px 18px}
.bi-view-switch a{padding:12px 17px;font-size:.85rem;color:#67817f;text-decoration:none!important;border-bottom:2px solid transparent}
.bi-view-switch a.active{border-color:#27796c;color:#225f56;font-weight:700}
.bi-filters{gap:12px;align-items:end}
.bi-filters label{font-size:.75rem;min-width:125px;flex:1}
.bi-filters input,.bi-filters select{font-size:.82rem;min-width:0;width:100%;max-width:100%}
.bi-reset{padding:11px 2px;font-size:.78rem}
.bi-subject-overview{display:grid;grid-template-columns:minmax(0,2.5fr) minmax(220px,1fr);gap:35px;margin-block:24px}
.bi-subject-overview h3{font-size:.95rem}
.bi-summary{line-height:1.9;font-size:.94rem;max-width:850px}
.bi-scope-stats{display:flex;gap:20px;font-size:.82rem;margin-block:22px}
.bi-context{border-inline-start:1px solid #dce5dd;padding-inline-start:25px;min-width:0}
.bi-context h3{font-size:.9rem}
.bi-context p{font-size:.82rem;line-height:1.8;overflow-wrap:anywhere}
.bi-context details{margin-block:20px}
.bi-observation-row{padding:15px 0;gap:15px;grid-template-columns:104px minmax(0,1fr) auto}
.bi-observation-row .diwan-story-content h3{font-size:.9rem;margin:3px 0 6px}
.bi-observation-row .diwan-row-meta{font-size:.72rem}
.bi-kind{font-size:.66rem;color:#94794f;letter-spacing:.025em}
.bi-observation-row .diwan-story-amount small{display:block;color:#80918a;font-size:.62rem;font-weight:400;text-align:end;margin-top:4px}
.bi-month{margin-block:27px}
.bi-month>h3{font-size:.85rem;border-bottom:2px solid #d1dfd6;padding-bottom:9px;color:#506e65}
.bi-pagination{display:flex;align-items:center;gap:12px;margin-block:18px;font-size:.77rem;color:#6e827c;flex-wrap:wrap}
.bi-pagination>span{margin-inline-end:auto}
.bi-document-row{display:flex;gap:20px;justify-content:space-between;padding:16px 0;border-bottom:1px solid #dce4de;font-size:.86rem;align-items:start}
.bi-document-row>div{min-width:0}
.bi-document-row a{overflow-wrap:anywhere}
.bi-document-row small{display:block;font-size:.72rem;color:#778881;overflow-wrap:anywhere;margin-top:6px}
.bi-document-row time,.bi-document-row>span{font-size:.72rem;color:#70867c;flex-shrink:0}
.bi-source-tools{display:flex;gap:10px;flex-wrap:wrap}
.bi-reading-layout{display:grid;grid-template-columns:minmax(0,2.6fr) minmax(240px,1fr);gap:28px;margin-block:24px}
.bi-reading-layout>section{min-width:0}
.bi-reader{border:1px solid #d1dcd7;background:#fff;border-radius:12px;overflow:hidden;min-width:0}
.bi-reader-tools{display:flex;align-items:center;gap:7px;padding:10px 13px;background:#eef3ef;flex-wrap:wrap;font-size:.75rem}
.bi-reader-tools>span{margin-inline-end:auto}
.bi-reader-target{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;padding:9px 13px;font-size:.78rem;border-bottom:1px solid #d8e1dc;background:#f4f7f4}
.bi-reader-target a{text-underline-offset:3px}
@media print{.bi-reader-target a{display:none}}
.bi-reader-tools .button{font-size:.7rem;padding:7px 10px;min-width:32px}
.bi-reader-canvas{overflow:auto;max-height:76vh;min-height:160px;background:#e6eae7;direction:ltr}
.bi-reader-image{display:block;width:100%;max-width:none!important;height:auto;margin-inline:auto}
.bi-reader.zoom-1 .bi-reader-image{width:150%}
.bi-reader.zoom-2 .bi-reader-image{width:200%}
.bi-reader.zoom-3 .bi-reader-image{width:300%}
.bi-reader.zoom-4 .bi-reader-image{width:400%}
.bi-reader-pdf{width:100%;height:72vh;min-height:480px;border:0;display:block}
.bi-reader-caption{padding:8px 14px;margin:0!important;overflow-wrap:anywhere;font-size:.68rem!important}
.bi-block{display:block;color:#73867e}
.bi-back{font-size:.8rem}
.bi-workspace summary{cursor:pointer}
.bi-workspace :focus-visible{outline:3px solid #d58c37;outline-offset:3px}
.bi-workspace .diwan-panel{min-width:0}
.bi-workspace .diwan-story-date{direction:ltr}
.bi-workspace .diwan-story-date small{direction:inherit}

@media(max-width:1050px){.bi-subject-groups{grid-template-columns:1.5fr 1fr}
.bi-subject-groups>section:last-child{grid-column:1/-1}
.bi-subject-summary{grid-template-columns:1fr 1fr}
.bi-subject-summary>span{grid-column:1/-1}
.bi-reading-layout{grid-template-columns:minmax(0,2fr) minmax(230px,1fr)}
}

@media(max-width:760px){.bi-entry-grid,.bi-bottom-grid,.bi-subject-groups,.bi-subject-overview,.bi-reading-layout{grid-template-columns:1fr}
.bi-entry{padding:18px}
.bi-entry h3{margin-top:5px}
.bi-entry p{margin-bottom:10px}
.bi-step{float:inline-end}
.bi-heading .diwan-pill{display:none}
.bi-intro h2{font-size:1.35rem}
.bi-tabs{gap:0}
.bi-tabs>a{padding:10px 9px;font-size:.74rem}
.bi-tabs .diwan-source-menu{padding:10px 9px;font-size:.74rem}
.bi-subject-summary{grid-template-columns:1fr;gap:5px}
.bi-context{border-inline-start:0;border-block-start:1px solid #dce5dd;padding:20px 0}
.bi-view-switch a{font-size:.78rem;padding:10px}
.bi-observation-row{grid-template-columns:79px minmax(0,1fr)}
.bi-observation-row .diwan-story-amount{grid-column:2}
.bi-observation-row .diwan-story-amount small{text-align:start}
.bi-document-row{flex-wrap:wrap;gap:5px}
.bi-trail a{max-width:270px}
.bi-reader-pdf{height:65vh;min-height:400px}
.bi-filters label{min-width:135px}
.bi-filters .diwan-search{min-width:100%}
.bi-subject-groups>section:last-child{grid-column:auto}
}

@media print{.bi-tabs,.bi-filters,.bi-reader-tools,.bi-pagination,.bi-view-switch,.bi-back{display:none}
.bi-reading-layout,.bi-subject-overview{display:block}
.bi-reader-canvas{overflow:visible;max-height:none}
.bi-reader-image{width:100%!important}
.bi-reader,.bi-subject-summary,.diwan-story-row{break-inside:avoid}
.bi-context{border:0;padding:0}
}

.diwan .diwan-filters > input[type="submit"] { width:auto; flex:0 0 auto; min-width:80px; align-self:end; }

/* Identity directory: distinct types, overlapping role groups, one sortable register. */
.diwan-role-facets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 0}
.diwan-role-facets a{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #d5e1dc;border-radius:9px;padding:13px 15px;font-size:.8rem;background:#fafcf9;text-decoration:none!important}
.diwan-role-facets a:hover,.diwan-role-facets a.active{background:#eaf4ed;border-color:#548e7c}
.diwan-role-facets strong{font-size:1.05rem;font-variant-numeric:tabular-nums}
.diwan-table-caption{text-align:start;padding:12px 15px;font-size:.82rem;color:#607571;background:#fafbf8}
.diwan-table .diwan-table-group th{background:#e9f0ec;border-block-start:2px solid #d0ddd6;padding:10px 14px;color:#38594d;font-size:.83rem}
.diwan-table-group small{font-size:.7rem;font-weight:400;margin-inline-start:10px}
.diwan-entity-type{display:inline-block;white-space:nowrap;font-size:.72rem;padding:4px 8px;border-radius:5px;background:#e8edf8;color:#3c6080}
.diwan-entity-type.vendor{background:#f3eae1;color:#815831}
.diwan-directory-table td:first-child{min-width:190px;max-width:300px}.diwan-directory-table td:nth-child(3){min-width:230px}.diwan-directory-table td{overflow-wrap:anywhere}
.diwan th a{display:inline-block;padding:3px 0}.diwan th[aria-sort=ascending],.diwan th[aria-sort=descending]{color:#156c5f}
@media(max-width:740px){.diwan-role-facets{grid-template-columns:repeat(2,minmax(0,1fr))}.diwan-role-facets a{padding:10px;font-size:.73rem}.diwan-directory-table{min-width:700px}}

/* Source reading workspace: fixed left index / right preview, local text direction. */
.diwan-library-toolbar {display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:1rem 0}
.diwan-library-toolbar .bi-source-tools {margin:0;gap:1rem}
.diwan-library-split {display:grid;grid-template-columns:minmax(270px,.75fr) minmax(0,1.65fr);gap:1rem;align-items:start}
.diwan-source-index {background:#fff;border:1px solid #dce5e5;border-radius:14px;overflow:hidden;position:sticky;top:1rem}
.diwan-source-list-heading {padding:1rem;display:flex;gap:.5rem;justify-content:space-between;flex-wrap:wrap;border-bottom:1px solid #e3e9e9;font-size:.85rem}
.diwan-source-list-heading span {color:#63777c}
.diwan-source-scroll {max-height:68vh;overflow:auto;overscroll-behavior:contain}
.diwan .diwan-source-item {display:grid;grid-template-columns:2.1rem minmax(0,1fr);gap:.65rem;padding:.85rem 1rem;margin:0;border:0;border-bottom:1px solid #edf0f0;border-radius:0;text-decoration:none;color:#25424b}
.diwan-source-item:hover {background:#f7faf9}
.diwan-source-item.selected {background:#eaf3f1;box-shadow:inset 4px 0 #176b62}
.diwan-source-item strong {font-size:.9rem;line-height:1.55;display:block;overflow-wrap:anywhere}
.diwan-source-item small {font-size:.75rem;color:#60767c;display:block;overflow-wrap:anywhere;margin-top:.18rem}
.diwan-source-filetype {font-size:.62rem;color:#647f89;letter-spacing:.04em;padding:.35rem .2rem;border:1px solid #d6e0e4;border-radius:5px;align-self:start;text-align:center;margin-top:.2rem}
.diwan-source-index .bi-pagination {padding:.75rem;font-size:.8rem;margin:0;border-top:1px solid #e3e9e9;flex-wrap:wrap}
.diwan-source-preview {min-width:0;border:1px solid #dce5e5;background:#fff;border-radius:14px;padding:1rem}
.diwan-preview-top {display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.8rem;color:#5e737c}
.diwan-preview-top nav,.diwan-preview-links {display:flex;align-items:center;flex-wrap:wrap;gap:.6rem}
.diwan-preview-top [aria-disabled] {opacity:.45;cursor:default}
.diwan-preview-content h3 {font-size:1.05rem;margin:.8rem 0 .5rem;line-height:1.5}
.diwan-preview-links {font-size:.8rem;margin-bottom:.8rem}
.diwan-source-preview .bi-reader {border-radius:8px;margin:0}
.diwan-source-preview .bi-reader-canvas {max-height:70vh;min-height:220px}
.diwan-source-preview .bi-reader-image {max-height:none}
.diwan-source-preview .bi-reader-pdf {height:66vh}
.diwan-preview-status {margin:0;font-size:.8rem}
.diwan-preview-status:empty {display:none}
.diwan-preview-connections {padding-top:.75rem;font-size:.85rem}
.diwan-preview-connections summary {cursor:pointer;color:#176b62}
.diwan-preview-connections p {margin:.5rem 0}
.diwan-mobile-list-link {display:none}
.diwan-table tr.bi-document-row {display:table-row}
.diwan-table th a {display:inline-block;padding:.35rem 0;white-space:nowrap}
.diwan-table th[aria-sort='ascending'],.diwan-table th[aria-sort='descending'] {background:#eef5f3}
@media(max-width:850px){.diwan-library-split{grid-template-columns:1fr}.diwan-source-index{position:static}.diwan-source-scroll{max-height:32vh}.diwan-mobile-list-link{display:inline}.diwan-source-preview .bi-reader-canvas{max-height:60vh}}
@media print{.diwan-source-scroll{max-height:none}.diwan-library-split{display:block}.diwan-source-index{position:static}.diwan-source-preview .bi-reader-canvas{max-height:none}.diwan-preview-top nav{display:none}}

[data-source-library] .bi-intro {margin:16px 0}
[data-source-library] .bi-intro p {margin-bottom:10px}
[data-source-library] .bi-view-switch {margin-block:8px 10px}
[data-source-library] .bi-view-switch a {padding:9px 12px}
[data-source-library] .diwan-library-toolbar {margin:8px 0}
[data-source-library] .diwan-filters {margin:12px 0}
.diwan-observations-table td:first-child {min-width:240px;max-width:480px}
.diwan-observations-table td:not(:first-child) {font-variant-numeric:tabular-nums}

/* Subject accounts reuse the existing narrative and evidence chain. */
.diwan-subject-account{border:1px solid #d5e2df;border-inline-start:4px solid #287b6e;border-radius:10px;padding:18px 20px;margin:22px 0;background:#f4f8f5}
.diwan-subject-account h3{font-size:1rem;line-height:1.6;margin:7px 0}
.diwan-subject-account .diwan-hint{font-size:.78rem;margin:8px 0 14px;line-height:1.65}
.diwan-account-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-size:.78rem}
@media print{.diwan-subject-account{break-inside:avoid}.diwan-account-actions{display:none}}

.diwan-account-trail{border-block:1px solid #dce5e5;padding:14px 0;margin:16px 0 24px}
#account-followups,#account-sources{scroll-margin-top:20px}

/* Role trails: compact browsing first; explanations and editing on demand. */
.diwan-person-navigation{margin:20px 0 30px}
.diwan-person-navigation .diwan-filters{margin-bottom:10px}
.diwan-connections-table td:first-child{min-width:160px}
.diwan-connections-table td:nth-child(2){min-width:220px}
.diwan-person-observations td:first-child{white-space:nowrap;font-variant-numeric:tabular-nums}
.diwan-person-observations td:nth-child(2){min-width:210px;max-width:420px}
.diwan-person-observations td:nth-child(3){min-width:230px;max-width:480px}
.diwan-role-route{padding:8px 0;border-block-end:1px solid #e8eeeb}
.diwan-role-route:last-child{border:0}
.diwan-role-route small{display:block;margin-top:4px}
.diwan-role-route summary{color:#176b62;font-size:.78rem;margin-top:7px;cursor:pointer}
.diwan-role-route details p{font-size:.82rem;line-height:1.7}
.diwan-role-source{font-weight:600}
.diwan-person-source-row{display:flex;align-items:start;justify-content:space-between;gap:20px;padding:18px 0;border-bottom:1px solid #dce5df}
.diwan-person-source-row>div{min-width:0}
.diwan-person-source-row p{margin:8px 0;font-size:.85rem}
.diwan-person-source-row small{font-size:.75rem;color:#63777c}
.diwan-person-source-row details{margin-top:8px;font-size:.8rem}
.diwan-person-source-row .button{flex-shrink:0}
@media(max-width:700px){.diwan-person-source-row{flex-direction:column;gap:10px}.diwan-person-navigation .diwan-filters label{min-width:100%}}
.diwan-role-proof + .diwan-role-proof{border-top:1px solid #e0e8e4;margin-top:12px;padding-top:5px}
.diwan-person-scope{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:.78rem;margin:12px 0;color:#526c67}

/* Company accounts are a separate working surface; originals stay behind the entries. */
.accounting-intro{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:10px 0 22px}.accounting-intro h2{font-size:1.55rem;margin:7px 0}.accounting-intro p{font-size:.9rem;color:#657b80;max-width:770px;line-height:1.8;margin:0}
.accounting-book-bar{display:flex;gap:24px;align-items:center;flex-wrap:wrap;font-size:.85rem;padding:13px 18px;border:1px solid #d6e1e5;background:#eef3f6;border-radius:8px}.accounting-book-bar strong{font-size:1.1rem}.accounting-book-bar>span:last-of-type{margin-inline-start:auto;color:#647984;font-size:.75rem}.accounting-book-bar form{display:flex;gap:10px;align-items:end}.accounting-table-heading{display:flex;align-items:baseline;justify-content:space-between;gap:20px}.accounting-table-heading h3{margin:0}.accounting-table-heading p{font-size:.8rem;color:#6b7c81;margin:6px 0 14px}.accounting-table-heading>.diwan-hint{font-size:.7rem;max-width:285px}
.accounting-matrix th[scope=row]{background:#fff;font-weight:500;min-width:160px;max-width:260px;white-space:normal;line-height:1.6;font-size:.86rem}.accounting-matrix td{padding:8px 12px}.accounting-year-cell{display:block;padding:7px 12px;background:#edf3f8;border-radius:5px;text-align:center;min-width:40px;font-variant-numeric:tabular-nums;color:#355d7e}.accounting-year-cell:hover{background:#dce9f3}.accounting-zero{display:block;text-align:center;color:#9aabaa}.accounting-number{direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums;white-space:nowrap;font-size:.82rem}.accounting-note{border-block-end:1px solid #e1e7e6;padding:14px 0}.accounting-note summary{font-size:.85rem}.accounting-note>div{font-size:.85rem;line-height:1.9;margin-top:12px;white-space:normal;overflow-wrap:anywhere}
.accounting-entry-nav{display:flex;gap:12px;align-items:center;margin:18px 0;font-size:.8rem}.accounting-entry-nav>span{margin-inline-start:auto;color:#6b8285}.accounting-detail-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:22px;align-items:start}.accounting-primary-amount{font-size:2rem;font-weight:700;color:#315c79;font-variant-numeric:tabular-nums;margin:20px 0}.accounting-primary-amount small{display:block;color:#6b7e83;font-size:.75rem;font-weight:400}.accounting-facts{display:grid;grid-template-columns:1fr 1.1fr;gap:12px;font-size:.82rem}.accounting-facts dt{color:#6e8081}.accounting-facts dd{margin:0;overflow-wrap:anywhere}.accounting-source-note{border-inline-start:3px solid #d6a13a;background:#fff8e9;padding:14px;font-size:.85rem;margin-top:18px}.accounting-source-note p{margin-top:7px}.accounting-link-empty{padding:26px 14px;background:#f4f6f5;border:1px dashed #d6e0dc;border-radius:8px;text-align:center;font-size:.85rem;color:#647c7e}.accounting-link-empty p{margin:8px 0}.accounting-evidence-link{padding:15px 0;border-bottom:1px solid #e1e6e3;font-size:.85rem}.accounting-evidence-link h4{font-size:.95rem;margin:10px 0}.accounting-gateway{display:flex;gap:20px;justify-content:space-between;align-items:center;padding:22px;border:1px solid #c9d9e4;border-radius:12px;background:linear-gradient(110deg,#f6f9fc,#edf3f7);margin:0 0 28px;text-decoration:none!important}.accounting-gateway h3{font-size:1.12rem;margin:4px 0 9px;color:#244d69}.accounting-gateway p{font-size:.85rem;color:#627d8d;margin:0}.accounting-gateway>span{font-size:1.8rem;color:#547d9a}.accounting-filters select{max-width:230px}
@media(max-width:850px){.accounting-detail-grid{grid-template-columns:1fr}.accounting-intro,.accounting-table-heading{display:block}.accounting-intro>.button{margin-top:16px}.accounting-book-bar{gap:12px}.accounting-book-bar>span:last-of-type{margin-inline-start:0}.accounting-table-heading>.diwan-hint{max-width:none}.accounting-filters select{max-width:none}.accounting-matrix table{min-width:780px}}
@media print{.accounting-entry-nav,.accounting-filters{display:none}.accounting-detail-grid{display:block}}

/* Accounting entries lead to evidence; source provenance is secondary. */
.accounting-attachments{display:grid;gap:18px}.accounting-attachment{border:1px solid #dce5e5;border-radius:12px;padding:14px;background:#fff;min-width:0}.accounting-attachment>header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.accounting-attachment-preview{display:flex;align-items:center;justify-content:center;gap:12px;height:210px;overflow:hidden;border-radius:8px;border:1px solid #e1e6e8;background:#edf1f2}.accounting-attachment-preview img{height:100%;width:100%;object-fit:contain}.accounting-attachment-preview:hover{outline:2px solid #71948f;outline-offset:2px}.accounting-attachment h4{margin:14px 0 9px;font-size:.96rem}.accounting-attachment-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:.75rem;color:#536e74;margin:8px 0}.accounting-attachment .diwan-pill.supported{background:#e2f0e8;color:#235b45}.accounting-attachment .diwan-pill.candidate{background:#fff2dc;color:#815c1e}.accounting-attachment .diwan-pill.contradicted{background:#fbe8e7;color:#8c4139}.accounting-file-symbol{font-size:3rem}.accounting-link-detail{margin-top:12px;font-size:.8rem;line-height:1.85}.accounting-link-detail summary{font-size:.8rem}.accounting-link-detail p{overflow-wrap:anywhere}.folder-reference-details{font-size:.8rem;margin:12px 0}.folder-reference-observation{border-top:1px solid #e4e9e7;padding:10px 0}.folder-reference-observation bdi{font-weight:600}.folder-reference-observation small{margin-inline-start:12px;color:#61777b}.folder-reference-observation p{font-size:.75rem;overflow-wrap:anywhere}.accounting-attachment-chip{display:flex;gap:8px;align-items:center;background:#f0f5f5;border:1px solid #dce7e4;border-radius:7px;padding:7px 9px;margin:3px 0;max-width:280px;font-size:.75rem;line-height:1.5}.accounting-attachment-chip>span[aria-hidden]{font-size:1.4rem}.accounting-attachment-chip small{font-size:.65rem!important;margin:0!important}.accounting-evidence-more{font-size:.72rem;display:inline-block;margin-top:5px}.accounting-bank-next{display:flex;gap:16px;align-items:center;padding:18px 22px;border:1px dashed #cfdad9;border-radius:10px;margin:20px 0;color:#61797d;background:#f4f6f5}.accounting-bank-next>span{font-size:1.8rem}.accounting-bank-next h3{font-size:.9rem;margin:0 0 5px}.accounting-bank-next p{font-size:.8rem;margin:0;line-height:1.7}.accounting-attachment-preview:focus-visible,.accounting-attachment-chip:focus-visible{outline:3px solid #d58631;outline-offset:3px}
@media(max-width:600px){.accounting-attachment-preview{height:180px}.accounting-attachment-chip{max-width:200px}.accounting-bank-next{padding:14px}.accounting-attachment>header{flex-wrap:wrap}}
@media print{.accounting-attachment-preview{height:auto;max-height:none}.accounting-attachment-preview img{width:100%;height:auto;max-height:70vh;object-fit:contain}.accounting-attachment{break-inside:avoid}}

.folder-reference-pages{display:flex;flex-wrap:wrap;gap:8px;font-size:.75rem}.folder-reference-pages a{padding:4px 8px;background:#edf3f3;border-radius:4px}

/* Diwan navigation and the dated Tetra × PxI review. */
.diwan-project-nav{align-items:stretch;gap:5px;position:relative}
.diwan-project-nav>a,.diwan-project-nav summary{padding:12px 14px;font-size:.84rem;min-height:45px;box-sizing:border-box}
.diwan-nav-group>summary{cursor:pointer;color:#506a71;border-bottom:3px solid transparent}
.diwan-nav-group.has-current>summary{color:#146c62;background:#edf5f1;border-bottom-color:#146c62}
.diwan-nav-context{display:inline-block;font-size:.72rem;font-weight:400;padding-inline-start:5px;opacity:.85}
.diwan-project-nav .nav-flyout a{padding:10px 12px;border:0;font-size:.85rem}
.diwan-project-nav .nav-flyout a[aria-current=page]{background:#eaf3ef;color:#146c62;font-weight:700}
.diwan-project-nav .nav-disclosure:last-child .nav-flyout{inset-inline-start:auto;inset-inline-end:0}
.diwan-progress-entry{display:flex;justify-content:space-between;gap:20px;padding:19px 22px;background:#edf1f8;border-radius:10px;border-inline-start:4px solid #5976a1;color:#254364;margin-block:20px}
.diwan-progress-entry small{display:block;margin-block-start:5px;color:#5f7187}
.diwan-progress h2{font-size:clamp(1.5rem,3vw,2.1rem);margin:6px 0 13px;line-height:1.4;letter-spacing:-.02em}
.progress-intro{display:flex;justify-content:space-between;gap:35px;align-items:start;margin:26px 0}
.progress-intro p{max-width:810px;font-size:1rem;line-height:1.9;margin:0;color:#536b72}
.progress-review-date{flex:0 0 210px;font-size:.78rem;color:#5b7077;padding-block-start:12px;text-align:end}
.progress-review-date time{display:block;color:#183e49;font-weight:700;margin:6px 0}
.progress-review-date small{display:block;line-height:1.7}
.progress-source-chain{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-block:24px 38px}
.progress-source{display:block;padding:18px 22px;border-block-start:3px solid #358377;background:#f0f5f2;color:#1d454c;border-radius:0 0 10px 10px}
.progress-source.accounts{background:#edf2f9;border-color:#5378b4}
.progress-source.bank{background:#f1f0ed;border-color:#919791}
.progress-source small{font-size:.83rem;font-weight:600}
.progress-source strong{display:block;font-size:2rem;margin-block:10px 4px;font-variant-numeric:tabular-nums;line-height:1.4}
.progress-source strong span{font-size:.85rem;font-weight:400}
.progress-source p{font-size:.81rem;line-height:1.7;margin:0;color:#566b72}
.progress-map{background:#fff;border:1px solid #dbe4e4;border-radius:14px;padding:24px}
.progress-map h3{font-size:1.3rem;margin:0 0 5px}
.progress-map .diwan-section-head{align-items:start;gap:15px}
.progress-map .diwan-section-head p{font-size:.85rem;line-height:1.6;margin:0;color:#5c7077}
.progress-no-percent{font-size:.75rem;background:#f3f1eb;color:#76623c;border-radius:5px;padding:6px 10px;white-space:nowrap}
.progress-legend{display:flex;flex-wrap:wrap;gap:16px;padding:18px 0;font-size:.75rem}
.progress-level{display:inline-flex;align-items:center;gap:6px;color:#556b73}
.progress-level i{width:9px;height:9px;border-radius:2px;background:#e2e5e5}
.progress-level.level-1 i{background:#c6cfdb}.progress-level.level-2 i{background:#d5a34c}.progress-level.level-3 i{background:#3c8a80}
.progress-matrix-scroll{overflow-x:auto}
.diwan .progress-matrix{border-collapse:separate;border-spacing:7px;table-layout:fixed;min-width:640px}
.diwan .progress-matrix th{background:none;white-space:normal;font-size:.9rem;color:#234953;vertical-align:middle;padding:7px 4px;text-transform:none;letter-spacing:normal}
.diwan .progress-matrix th:first-child{width:135px}
.diwan .progress-matrix th small{display:block;font-size:.72rem;font-weight:400;line-height:1.6;color:#647880;margin-block-start:5px}
.diwan .progress-matrix td{border:0;padding:0;vertical-align:top}
.diwan .progress-matrix tr:hover{background:none}
.progress-cell{display:flex;flex-direction:column;justify-content:space-between;gap:8px;min-height:119px;padding:14px;color:#394f61;border-radius:9px;background:#eef2f5;position:relative;box-sizing:border-box;transition:box-shadow .15s ease}
.progress-cell.level-2{background:#faf1df;color:#71521c}.progress-cell.level-3{background:#e6f3ee;color:#245c52}
.progress-cell strong{font-size:.85rem;line-height:1.55}
.progress-cell>span{font-size:.7rem}
.diwan .progress-cell:hover{text-decoration:none;box-shadow:inset 0 0 0 2px #aac0c0}
.progress-cell[aria-current=true]{box-shadow:inset 0 0 0 2px #224958}
.progress-steps{display:flex;gap:4px;max-width:54px}
.progress-steps b{height:3px;flex:1;background:currentColor;opacity:.15}.progress-steps b.filled{opacity:.8}
.progress-detail-region{margin-top:20px;padding:20px 8px 0;border-top:1px solid #e2e9e7}
.progress-detail[hidden]{display:none!important}
.progress-detail>h3{margin:8px 0 14px;font-size:1.15rem}
.progress-detail-columns{display:grid;grid-template-columns:1.1fr 1fr;gap:30px}
.progress-detail h4{font-size:.8rem;margin:0 0 8px;color:#506974}
.progress-detail p{font-size:.9rem;line-height:1.9;margin:0 0 12px}
.progress-detail a{font-size:.82rem;font-weight:600}
.progress-coverage{display:grid;grid-template-columns:1fr 1.3fr;gap:45px;padding:35px 10px;border-bottom:1px solid #dce5e2}
.progress-coverage h3{margin:6px 0 12px;font-size:1.2rem}
.progress-coverage p{font-size:.85rem;line-height:1.85;margin:5px 0}
.progress-coverage-bars{display:grid;gap:18px}
.progress-coverage-row>div{display:flex;justify-content:space-between;gap:18px;font-size:.82rem;align-items:baseline}
.progress-coverage-row bdi{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:700}
.progress-coverage-row meter{display:block;width:100%;height:12px;margin-block-start:7px;border:0;background:none}
.progress-coverage-row meter::-webkit-meter-bar{background:#e2e9e8;border:0;border-radius:4px;height:7px}
.progress-coverage-row meter::-webkit-meter-optimum-value{background:#567c95;border-radius:4px}
.progress-coverage-row meter::-moz-meter-bar{background:#567c95;border:0;border-radius:4px}
.progress-route{padding-block:28px}
.progress-route>h3{margin:0 0 22px;font-size:1.2rem}
.progress-route ol{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:0;margin:0;gap:24px}
.progress-route li{border-block-start:3px solid #ccd7d5;padding:17px 0 0}
.progress-route li.now{border-color:#e28c3b}
.progress-route li>span{font-size:.75rem;font-weight:700;color:#6b777b}
.progress-route li.now>span{color:#9a591f}
.progress-route h4{font-size:1rem;line-height:1.6;margin:10px 0}
.progress-route p{font-size:.85rem;line-height:1.9;margin:0;color:#506973}
.progress-route .progress-stop{margin-top:25px;padding:16px 20px;background:#f5eee3;border-radius:8px;color:#695635;font-size:.82rem}
.progress-method{font-size:.85rem;line-height:1.9;padding:16px 0;border-top:1px solid #dce4e1}
.progress-method summary{cursor:pointer;font-weight:600;color:#456a71}
.progress-method p{max-width:950px}
@media(max-width:900px){.progress-intro{display:block}.progress-review-date{display:flex;gap:10px;flex-wrap:wrap;text-align:start;align-items:center}.progress-review-date time{margin:0}.progress-review-date small{flex-basis:100%}.progress-source-chain{gap:9px}.progress-source{padding:15px}.progress-map{padding:16px}.progress-no-percent{white-space:normal}.progress-coverage{grid-template-columns:1fr;gap:20px}.diwan-nav-context{display:none}}
@media(max-width:600px){.progress-source-chain,.progress-route ol,.progress-detail-columns{grid-template-columns:1fr}.progress-source-chain{gap:8px;margin-bottom:25px}.progress-source strong{font-size:1.5rem;margin:4px 0}.progress-source p{font-size:.78rem}.progress-source{padding:12px 16px}.progress-intro{margin-block:20px}.progress-intro p{font-size:.9rem}.progress-map{padding:12px}.progress-legend{gap:9px 13px}.progress-map .diwan-section-head{display:block}.progress-no-percent{display:inline-block;margin-top:12px}.progress-detail-columns{gap:15px}.diwan-project-nav{gap:0}.diwan-project-nav>a,.diwan-project-nav summary{font-size:.78rem;padding:10px}.diwan-project-nav .nav-disclosure{position:static}.diwan-project-nav .nav-flyout{inset-inline:0!important;max-inline-size:none;min-inline-size:0;inset-block-start:100%}.progress-coverage{padding-inline:0}.progress-route ol{gap:18px}.progress-coverage-row>div{font-size:.78rem}}
@media(prefers-reduced-motion:reduce){.progress-cell{transition:none}}
@media print{.diwan-project-nav{display:none}.progress-map{border:0;padding:0}.progress-cell,.progress-source{print-color-adjust:exact;-webkit-print-color-adjust:exact}.progress-detail[hidden]{display:block!important}.progress-detail{break-inside:avoid;margin-block:18px}.progress-matrix-scroll{overflow:visible}.progress-matrix{min-width:0!important}.progress-coverage,.progress-route{break-inside:avoid}.progress-method{display:none}.progress-intro p{max-width:none}.progress-review-date{flex-basis:auto}}

/* Cell journals: bounded streams; source details open on request. */
.progress-cell-counts { font-size:.73rem; opacity:.82; font-weight:400; }
.development-journals { margin-top:1.6rem; }
.development-streams { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; align-items:start; }
.development-stream { min-width:0; background:#fff; border:1px solid #dce5e5; border-radius:14px; overflow:hidden; }
.development-stream > header { padding:1rem 1.25rem; background:#f0f5f8; border-bottom:1px solid #dce5e5; }
.development-stream.direction > header { background:#fff5e9; }
.development-stream h4 { margin:0; font-size:1.08rem; }
.development-stream h4 span { font-size:.8rem; padding:.15rem .45rem; border-radius:12px; background:#fff; }
.development-stream > header p { font-size:.85rem; margin:.35rem 0 0; color:#576d75; }
.journal-entry { margin:0 1.25rem; padding:1.2rem 0; border-bottom:1px solid #e7eded; scroll-margin-top:2rem; }
.journal-entry:last-of-type { border-bottom:0; }
.journal-entry h5 { font-size:1.05rem; line-height:1.5; margin:.5rem 0 .2rem; }
.journal-entry-meta { display:flex; flex-wrap:wrap; gap:.5rem; font-size:.73rem; color:#58727a; }
.journal-entry-meta span:first-child { background:#eef3f7; border-radius:4px; padding:0 .35rem; }
.journal-time { font-size:.75rem; color:#61767c; line-height:1.6; }
.journal-body { font-size:.92rem; line-height:1.85; overflow-wrap:anywhere; }
.journal-body p { margin:.7rem 0; }
.journal-entry footer { display:flex; flex-wrap:wrap; gap:1rem; font-size:.77rem; color:#61767c; align-items:baseline; }
.journal-entry footer details { min-width:0; }
.journal-entry footer details[open] { flex-basis:100%; overflow-wrap:anywhere; }
.journal-entry summary,.journal-method summary,.journal-compose summary { cursor:pointer; }
.journal-compose { margin:1rem 1.25rem; padding:.85rem; border:1px dashed #d0b38e; border-radius:8px; background:#fffaf4; }
.journal-compose form { display:grid; gap:.5rem; margin-top:1rem; }
.journal-compose input:not([type=hidden]),.journal-compose select,.journal-compose textarea { width:100%; box-sizing:border-box; font:inherit; padding:.6rem; border:1px solid #c5d1d4; border-radius:6px; }
.journal-compose textarea { resize:vertical; }
.journal-compose small { color:#5f7076; line-height:1.6; }
.journal-compose input[type=submit] { margin-top:.6rem; cursor:pointer; width:auto; justify-self:start; }
.journal-compose label { font-size:.85rem; font-weight:600; }
.journal-empty { margin:1.25rem; color:#637a81; }
.journal-pagination { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:1rem 1.25rem; font-size:.85rem; background:#fafcfc; }
.journal-method { margin-top:1rem; font-size:.85rem; color:#5c7279; }
.journal-error { color:#a93226; }
.journal-reply { font-size:.8rem; border-inline-start:2px solid #95aeb7; padding-inline-start:.6rem; }
@media(max-width:800px) { .development-streams { grid-template-columns:1fr; } }
@media print { .development-streams { display:block; } .journal-compose,.journal-entry footer > a,.journal-pagination { display:none; } .journal-entry { break-inside:avoid; } }

.journal-cell-nav { display:flex; justify-content:space-between; gap:1rem; margin:1rem 0 1.75rem; font-size:.88rem; }
.journal-cell-nav div { display:flex; gap:1rem; }
.journal-cell-heading h2 { margin:.5rem 0; font-size:1.9rem; }
.journal-cell-heading h2 span { color:#a3b2b7; font-weight:400; }
.journal-cell-heading p { color:#58717b; }
.journal-cell-assessment { padding:.85rem 1rem; border:1px solid #dce5e5; border-radius:8px; background:#fff; font-size:.88rem; }
.journal-cell-assessment summary { cursor:pointer; }
.journal-structure h6 { margin:.8rem 0 .15rem; font-size:.76rem; color:#487585; font-weight:700; }
.journal-structure .journal-body p { margin:.2rem 0 .6rem; }

.journal-filter { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; margin:1rem 0; font-size:.88rem; }
.journal-filter select { padding:.5rem; border:1px solid #c5d1d4; border-radius:6px; background:white; }
.journal-tags { display:flex; gap:.3rem; flex-wrap:wrap; margin:.45rem 0; font-size:.7rem; }
.journal-tags a { color:#4c6974; background:#f0f4f5; padding:.1rem .35rem; border-radius:4px; }
.journal-tag-picker { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.journal-tag-picker fieldset { border:1px solid #dfd8ce; border-radius:6px; padding:.7rem; }
.journal-tag-picker legend { font-size:.8rem; }
.journal-tag-picker label { display:flex; gap:.45rem; align-items:center; font-weight:400; margin:.4rem 0; }
.journal-compose .journal-tag-picker input { width:1rem; }
.journal-translation-form { display:grid; gap:.55rem; max-width:850px; margin:1.5rem auto; }
.journal-translation-form input:not([type=hidden]),.journal-translation-form textarea { padding:.7rem; border:1px solid #c5d1d4; border-radius:6px; font:inherit; }
.journal-language-switch { display:flex; gap:1rem; margin:1rem 0; }
.journal-language-switch [aria-current] { font-weight:700; text-decoration:underline; }
.journal-language-note { font-size:.75rem; color:#916029; }

/* Private source-agent controls: one compact grant row, reasons stay legible. */
.diwan-agent-access .panel{padding:18px 20px;margin-block:16px}
.diwan-agent-access .diwan-filters{margin:0 0 12px;display:flex;flex-wrap:wrap;gap:12px;align-items:end}
.diwan-agent-access .diwan-filters label{flex:1 1 260px;min-width:0;display:grid;gap:6px}
.diwan-agent-access select,.diwan-agent-access input[type=text]{width:100%;min-width:0;padding:9px 12px;border:1px solid var(--line);border-radius:6px;background:white}
.diwan-agent-access td form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.diwan-agent-access td form input[type=text]{flex:1 1 180px}
.diwan-agent-access summary{font-weight:650}
.diwan-agent-access details[open] summary{margin-bottom:12px}
.diwan-agent-access code{overflow-wrap:anywhere;white-space:normal}
@media(max-width:650px){.diwan-agent-access .panel{padding:14px}.diwan-agent-access .diwan-filters label{flex-basis:100%}.diwan-agent-access .diwan-filters input[type=submit]{width:100%}}

.matrix-objectives { padding-block: 12px 24px; }
.matrix-objectives ol { grid-template-columns: repeat(2,minmax(0,1fr)); }
.matrix-objectives h4 { margin-block-start: 0; }
.matrix-objectives a { text-decoration: underline; text-underline-offset: .18em; }
.matrix-objectives .matrix-review-link { margin-block-start: 12px; }
@media (max-width: 640px) { .matrix-objectives ol { grid-template-columns: 1fr; } }

/* One authenticated PDF page, rendered independently of the browser PDF plug-in. */
.diwan-pdf-reader{min-width:0;direction:inherit}
.diwan-pdf-controls{border:0;margin:0;padding:10px 13px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;background:#f4f7f4;min-width:0;direction:inherit}
.diwan-pdf-controls label{display:flex;align-items:center;gap:5px;margin:0;font-size:.78rem}
.diwan-pdf-controls input{width:5rem;margin:0;padding:6px;direction:ltr;text-align:center}
.diwan-pdf-controls .button{font-size:.72rem;min-height:34px;padding:6px 10px}
.diwan-pdf-zoom{display:flex;gap:5px;margin-inline-start:auto}
.diwan-pdf-status{font-size:.8rem;margin:0!important;padding:9px 13px;direction:inherit}
.diwan-pdf-status[role=alert]{color:#9c3028;background:#fff1ee}
.diwan-pdf-retry{margin:8px 13px}
.diwan-pdf-retry[hidden]{display:none}
.diwan-pdf-viewport{overflow:auto;max-height:72vh;min-height:160px;direction:ltr}
.diwan-pdf-viewport canvas{display:block;width:100%;height:auto;background:#fff;margin-inline:auto;max-width:none}
.diwan-pdf-viewport canvas[hidden]{display:none}
.diwan-pdf-viewport.pdf-zoom-1 canvas{width:150%}
.diwan-pdf-viewport.pdf-zoom-2 canvas{width:200%}
@media(max-width:600px){.diwan-pdf-controls{gap:5px}.diwan-pdf-controls input{width:3.5rem}.diwan-pdf-controls .button{padding-inline:8px}}
@media print{.diwan-pdf-controls,.diwan-pdf-retry{display:none}.diwan-pdf-viewport{max-height:none;overflow:visible}}

.bi-reader-canvas.has-pdf-reader,.diwan-source-preview .bi-reader-canvas.has-pdf-reader{max-height:none;overflow:visible}
.diwan-source-preview .diwan-pdf-viewport{max-height:60vh}
