/* VAEL 2.0.1 — archive hierarchy, global responsive layout, non-destructive */
:root{--v201-space:clamp(16px,2.3vw,38px);--v201-reading:#c4d1c9}
/* Root cause: the sealed precursor registry was an extra direct child of IDX grid;
   that silently displaced the record into the narrow last column. It now sits
   inside the index rail, leaving exactly 3 direct grid children. */
#idx.active{display:grid!important;grid-template-columns:clamp(222px,19vw,295px) minmax(0,1fr) clamp(190px,15vw,235px)!important;grid-auto-flow:row;align-items:start;overflow:visible!important;max-width:100%;}
#idx>.indexPane{grid-column:1;grid-row:1;min-width:0;height:calc(100dvh - 80px);min-height:470px;display:flex;flex-direction:column;position:sticky;top:68px;overflow:hidden;border-right:1px solid #28392f}
#idx>.record{grid-column:2;grid-row:1;min-width:0;min-height:calc(100dvh - 110px);padding:clamp(28px,3vw,52px) var(--v201-space) 125px!important;background:linear-gradient(180deg,rgba(13,25,18,.42),transparent 280px);overflow:visible;}
#idx>.meta{grid-column:3;grid-row:1;min-width:0;max-height:calc(100dvh - 81px);position:sticky;top:69px;overflow-y:auto;overflow-x:hidden;background:#050907;padding:22px 15px 100px;border-left:1px solid #203429}
#idx .recordHead{display:flex;flex-wrap:wrap;align-items:start;gap:10px 20px}
#idx .recordHead h1{font-size:clamp(24px,2.3vw,36px)!important;line-height:1.3!important;letter-spacing:.03em;overflow-wrap:anywhere;max-width:100%}
#idx .recordHead span{font-size:10px;line-height:1.7;color:#819889;overflow-wrap:anywhere}
#idx .record pre{font:clamp(13px,1.02vw,15px)/1.92 var(--mono)!important;color:var(--v201-reading)!important;white-space:pre-wrap;overflow-wrap:break-word;word-break:normal;max-width:78ch;margin:29px 0 35px;letter-spacing:.005em}
#idx .recordActions{display:flex;flex-wrap:wrap;gap:10px}
#idx .recordActions button{font-size:11px;min-height:38px}
#idx .indexPane .tools{flex:0 0 45px}
#idx .indexPane .index{min-height:0;height:auto!important;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain}
#idx .indexPane .row{grid-template-columns:36px minmax(0,1fr) minmax(44px,70px);font-size:10px;gap:8px;padding:10px 9px;}
#idx .indexPane .row b{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#idx .indexPane .row small{font-size:9px}
#idx .year{font-size:10px}
#idx .meta h3{font-size:10px;letter-spacing:.13em;color:#a4bba9}
#idx .meta .linkBtn{width:100%;font-size:10px;line-height:1.7;white-space:normal;text-align:left;overflow-wrap:anywhere}
#idx .meta .stateLine{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);font-size:10px}
#idx .meta .stateLine b{text-align:right;overflow-wrap:anywhere}
/* The puzzle keeps all its contents and its toggle, without becoming an extra grid column. */
#idx .genesisRegistry{flex:0 0 auto;margin:8px 9px 12px;padding:9px 10px;max-height:min(36dvh,270px);overflow-y:auto;overflow-x:hidden;min-width:0}
#idx .genesisRegistryHeader{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
#idx .genesisRegistryHeader span{font-size:8px;line-height:1.35;color:#6e8876}
#idx .genesisRegistryHeader button{font-size:9px;width:100%;padding:6px 8px;min-height:32px;text-align:center}
#idx .genesisBody{min-width:0;font-size:10px}
#idx .genesisDigest code,#idx .genesisSlot code{overflow-wrap:anywhere;word-break:break-word}
/* Fixed consoles belong out of the reading area until explicitly opened. */
#sysConsole{right:16px;bottom:51px;width:min(470px,calc(100vw - 110px));max-height:40dvh}
#sysConsole.collapsed{height:30px}
#sysConsole.collapsed #consoleLines{display:none}
#sysConsole header{cursor:default}
#sysConsole header button{min-width:36px;min-height:28px;cursor:pointer}
/* Keep contextual/status widgets below the top bar and avoid the reader's title. */
#idx.active ~ .worldConsistencyHud{pointer-events:none}
/* Shared layout safeguards for all investigation categories. */
.shell,.view,.view>*,.station,.workspaceGrid,.exploreShell,.dynamicShell,.f44Layout,.pccShell,.scannerShell,.caseShell,.kgShell,.intelGrid,.synthesisLayout,.patternLayout,.reconLayout,.relationLayout,.search2Layout{min-width:0;max-width:100%}
.view pre,.view code,.view .readout,.view .record,.view .inspector,.view .preview{overflow-wrap:anywhere}
.view pre{white-space:pre-wrap;max-width:100%}
.view img,.view svg,.view canvas{max-width:100%}
.view .sectionHead{min-width:0;gap:12px}
.view .sectionHead span,.view .sectionHead b{min-width:0;overflow-wrap:anywhere}
.readout,.exploreMain,.dynamicMain,.relationInspector,.search2Preview,.intelInspector,.scannerInspector,.caseInspector,.pccInspector,.f44RoomPanel,.kgInspector{overflow-wrap:anywhere}
.view button,.view input,.view select{max-width:100%}
/* Smaller laptops: preserve reading width by relocating metadata below the dossier. */
@media(max-width:1370px) and (min-width:901px){
 #idx.active{grid-template-columns:clamp(210px,22vw,270px) minmax(0,1fr)!important;}
 #idx>.record{grid-column:2;grid-row:1}
 #idx>.meta{grid-column:2;grid-row:2;position:static;max-height:none;border-left:0;border-top:1px solid #203429;padding:19px var(--v201-space) 100px;display:block!important}
 #idx>.meta #links{display:flex;flex-wrap:wrap;gap:7px}
 #idx>.meta .linkBtn{width:auto;max-width:100%;margin:0}
 #idx>.meta #state{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 15px}
}
@media(max-width:900px) and (min-width:701px){
 #idx.active{grid-template-columns:225px minmax(0,1fr)!important}
 #idx>.indexPane{grid-column:1;grid-row:1 / span 2}
 #idx>.record{grid-column:2;grid-row:1;padding:24px 24px 80px!important}
 #idx>.meta{grid-column:2;grid-row:2;position:static;display:block!important;max-height:none;padding:18px 24px 90px;border-top:1px solid #203429;border-left:0}
 #idx .meta #links{display:flex;flex-wrap:wrap;gap:8px}
 #idx .meta .linkBtn{width:auto}
 #idx .record pre{font-size:13px!important;line-height:1.82!important}
}
@media(max-width:700px){
 #idx.active{display:flex!important;flex-direction:column;gap:0;overflow:visible!important}
 #idx>.indexPane{position:relative;top:auto;width:100%;height:auto;min-height:0;max-height:none;overflow:visible;border-right:0;border-bottom:1px solid #27392e}
 #idx .indexPane .index{height:min(29dvh,230px)!important;min-height:130px;flex:0 0 auto;overflow:auto}
 #idx .genesisRegistry{margin:8px 12px;max-height:220px}
 #idx>.record{width:100%;min-height:46dvh;padding:22px 17px 60px!important}
 #idx .record pre{font-size:13px!important;line-height:1.82!important}
 #idx>.meta{width:100%;display:block!important;position:static;max-height:none;min-height:0;padding:18px 17px 110px;border-left:0;border-top:1px solid #27392e}
 #idx>.meta #links{display:flex;flex-wrap:wrap;gap:7px}
 #idx>.meta .linkBtn{width:auto;flex:0 1 auto}
 #idx>.meta #state{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
 #sysConsole{display:none!important}
 .view .sectionHead{flex-wrap:wrap;min-height:52px;height:auto;padding:10px 14px}
 .view pre{font-size:12px;line-height:1.7}
}
