.theoria-app{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#202124;max-width:1600px;margin:0 auto}
.theoria-app [hidden]{display:none!important}
.theoria-toolbar{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;padding:12px;background:#f4f5f6;border:1px solid #ddd;border-radius:6px}
.theoria-control{display:flex;flex-direction:column;gap:4px}.theoria-control label{font-size:12px;font-weight:700;color:#4a4f55}
.theoria-control select{min-height:36px;max-width:100%;background:white}.theoria-question-control{min-width:min(520px,100%)}.theoria-question-control select{min-width:min(500px,100%)}
.period-selects{display:flex;align-items:center;gap:6px}.theoria-run{min-height:36px;padding:0 14px;font-weight:700;border:1px solid #9aa0a6;background:#fff;border-radius:4px;cursor:pointer}
.theoria-run.needs-run{background:#fff2a8;color:#7a2500;border-color:#d7a500}
.theoria-formulated{font-size:18px;font-weight:700;padding:12px 2px}
.theoria-answer{display:grid;grid-template-columns:minmax(0,4fr) minmax(280px,1fr);gap:18px}
.theoria-chart-panel{position:relative;min-height:650px;background:white}.theoria-chart{width:100%;height:650px}.theoria-loading{position:absolute;z-index:5;top:12px;left:12px;background:#fff;border:1px solid #ddd;padding:8px 12px;border-radius:4px}
.theoria-librarian{border-left:1px solid #ddd;padding-left:18px;max-height:760px;overflow:auto}.theoria-librarian section{padding:0 0 14px;margin:0 0 14px;border-bottom:1px solid #ddd}.theoria-librarian h3{font-size:17px;margin:0 0 7px}.theoria-librarian div{font-size:14px;line-height:1.42}
.theoria-afford-item{margin-bottom:14px}.theoria-drawer-button{padding:8px 10px;background:white;border:1px solid #aaa;border-radius:4px;cursor:pointer}.theoria-drawer-note{font-size:12px!important;margin-top:5px;color:#666}
.theoria-drawer{width:min(820px,92vw);max-height:86vh;border:1px solid #bbb;border-radius:8px;padding:0}.theoria-drawer::backdrop{background:rgba(0,0,0,.35)}.theoria-drawer-head{position:sticky;top:0;background:white;display:flex;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid #ddd}.theoria-drawer-head h2{margin:0}.theoria-drawer-head p{margin:4px 0 0}.theoria-drawer-head button{font-size:28px;border:0;background:transparent;cursor:pointer}.theoria-drawer-body{padding:18px 22px;overflow:auto}.theoria-policy-event{margin-bottom:18px}
.theoria-unavailable{padding:16px;border:1px solid #ddd;background:#fafafa}
@media(max-width:900px){.theoria-answer{grid-template-columns:1fr}.theoria-librarian{border-left:0;border-top:1px solid #ddd;padding-left:0;padding-top:16px;max-height:none}.theoria-chart,.theoria-chart-panel{height:520px;min-height:520px}.theoria-question-control{min-width:100%}.theoria-question-control select{width:100%;min-width:0}}

/* v0.2.0 / desktop v60 online additions */
.theoria-dive-row{display:flex;align-items:center;gap:8px;padding:6px 2px 12px}.theoria-dive-row select{min-height:34px;max-width:min(620px,100%)}
.theoria-librarian section h3{line-height:1.2}

.theoria-version{margin-top:12px;padding-top:8px;border-top:1px solid #e4e6e8;text-align:right;font-size:12px;color:#697078;letter-spacing:.02em}
.theoria-control[data-wrap="periodB"]{min-width:185px}

/* v1.3 context-preserving investigation navigation */
.theoria-context-nav{display:flex;align-items:center;gap:10px;margin:10px 0 2px;padding:8px 10px;background:#f7f8fa;border:1px solid #dfe3e7;border-radius:6px}
.theoria-back{border:1px solid #9aa0a6;background:#fff;border-radius:4px;padding:5px 10px;cursor:pointer;font-weight:650}
.theoria-context-trail{font-size:13px;color:#4b5563;font-weight:600}
.theoria-context-note{margin:8px 0;padding:9px 11px;border-left:4px solid #b7791f;background:#fff8e6;font-size:13px;line-height:1.4}

/* v1.7 current-generation question laboratory */
.theoria-question-lab-bar{display:flex;align-items:center;gap:14px;padding:8px 12px;margin:0 0 10px;border:1px solid #d7dce2;border-radius:7px;background:#fafbfc;font-size:14px;color:#39424e;}
.theoria-question-lab-button{font-weight:650;padding:7px 11px;border:1px solid #aeb7c2;border-radius:5px;background:#fff;cursor:pointer;}
.theoria-question-lab{width:min(920px,92vw);max-height:82vh;border:0;border-radius:10px;padding:0;box-shadow:0 18px 60px rgba(0,0,0,.28);}
.theoria-question-lab::backdrop{background:rgba(20,28,38,.42);}
.theoria-lab-head{display:flex;justify-content:space-between;gap:18px;padding:18px 20px 12px;border-bottom:1px solid #dfe3e8;}
.theoria-lab-head h2{margin:0 0 4px;font-size:24px}.theoria-lab-head p{margin:0;color:#56606d}.theoria-lab-head button{border:0;background:transparent;font-size:28px;cursor:pointer;}
.theoria-lab-tools{display:flex;gap:18px;flex-wrap:wrap;padding:12px 20px;background:#f6f8fa;border-bottom:1px solid #e1e5ea}.theoria-lab-tools label{font-weight:650}.theoria-lab-tools input,.theoria-lab-tools select{margin-left:6px;padding:7px 9px;border:1px solid #bcc5cf;border-radius:4px;background:#fff;}
.theoria-lab-body{padding:12px 20px 22px;max-height:62vh;overflow:auto}.theoria-lab-group{margin:8px 0 18px}.theoria-lab-group h3{margin:0 0 8px;font-size:17px;border-bottom:1px solid #e4e7eb;padding-bottom:5px;}
.theoria-lab-item{display:grid;grid-template-columns:minmax(0,1fr) auto;width:100%;text-align:left;gap:4px 10px;padding:8px 9px;margin:3px 0;border:1px solid transparent;border-radius:5px;background:transparent;color:inherit;}
.theoria-lab-item.is-actionable{cursor:pointer}.theoria-lab-item.is-actionable:hover{border-color:#b6c6da;background:#f3f7fb}.theoria-lab-question{font-weight:600}.theoria-lab-status{font-size:12px;font-weight:700;padding:2px 7px;border-radius:999px;background:#eceff3;align-self:start}.status-answerable{background:#e6f4ea}.status-partial{background:#fff4d6}.status-needs-data{background:#f2e8e8}.theoria-lab-note{grid-column:1 / -1;color:#626d79;font-size:13px;line-height:1.35}
@media(max-width:760px){.theoria-question-lab-bar{align-items:flex-start;flex-direction:column;gap:5px}.theoria-lab-tools{flex-direction:column}.theoria-lab-tools input{max-width:70vw}.theoria-lab-item{grid-template-columns:1fr}.theoria-lab-status{justify-self:start}}

/* v1.8 evidence-gap presentation */
.theoria-fallback{padding:18px 20px;}
.theoria-no-data{max-width:780px;margin:36px auto;padding:22px 24px;border:1px solid #d6dbe1;border-radius:8px;background:#fafbfc;line-height:1.5;}
.theoria-no-data strong{display:block;font-size:20px;margin-bottom:8px;}
.theoria-no-data p{margin:8px 0;}
.theoria-no-data-detail{color:#5d6672;}
