/* Experiment forms keep context and outcome visible while metric tables scroll on small screens. */
.ab-filters,.ab-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}#experiments label{display:flex;flex-direction:column;gap:8px;color:#475569;font-size:13px}#experiments input,#experiments select,#experiments textarea{width:100%;padding:10px;border:1px solid #dce3ec;border-radius:8px;background:#fff;color:#172b4d;font:inherit;box-sizing:border-box}#experiments fieldset{border:1px solid #e2e8f0;border-radius:12px;margin:20px 0;padding:18px}#experiments legend{font-weight:600;padding:0 8px}#experiments textarea{resize:vertical}#experiments td{vertical-align:top}#abMetrics input{min-width:90px}#abMetrics td:first-child input{min-width:150px}.ab-empty{padding:48px 24px;text-align:center;color:#64748b;background:#f8fafc;border-radius:12px}.ab-delta,.ab-relative{min-width:110px;text-align:center!important;white-space:nowrap}#abHistory pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}#abHistory details{padding:12px 0;border-bottom:1px solid #e2e8f0}@media(max-width:900px){.ab-grid,.ab-filters{grid-template-columns:1fr 1fr}}@media(max-width:600px){.ab-grid,.ab-filters{grid-template-columns:1fr}}

/* Historical revisions use business labels rather than serialized field names. */
#abHistory dl{display:grid;grid-template-columns:180px 1fr;gap:10px}#abHistory dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}#abHistory dt{color:#64748b}

/* Source configuration distinguishes the blueprint from the active write destination. */
.ab-config-form{display:flex;align-items:end;gap:16px;margin:18px 0}.ab-config-form label{flex:1}.ab-config-form button{flex-shrink:0}#abSourceEvents p{overflow-wrap:anywhere}@media(max-width:700px){.ab-config-form{align-items:stretch;flex-direction:column}}

#abSourcePanel{margin-bottom:20px}

/* Simplified experiment flow: schemes and outcomes remain visible, context is expandable. */
#abSourcePanel>summary{cursor:pointer;font-weight:600;color:var(--muted,#60758b)}
.ab-simple-section{margin:18px 0}.ab-simple .ab-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.ab-simple .ab-schemes .ab-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ab-schemes label{padding:16px;border-radius:10px;background:#f0f7ff}.ab-schemes label:last-child{background:#edf9f7}
.ab-result{padding:18px;background:#edf7fa;border:1px solid #d9ecef;border-radius:10px}
.ab-simple .ab-result .ab-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ab-result label:last-child{grid-column:1/-1}

.ab-simple textarea{min-height:64px}.ab-simple fieldset{margin:16px 0}
@media(max-width:760px){.ab-simple .ab-grid,.ab-simple .ab-schemes .ab-grid,.ab-simple .ab-result .ab-grid{grid-template-columns:1fr}}

/* Keep archive configuration compact, with a single path and one primary action. */
.ab-source-tools,.ab-current-source,.ab-create-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0}
.ab-current-source{justify-content:flex-start;padding:12px 0;border-bottom:1px solid #e2e8f0}.ab-current-source>span:first-child{color:#64748b;flex-shrink:0}
.ab-directory-controls{display:flex;gap:12px;align-items:end;margin-top:16px}.ab-directory-controls label{flex:1}.ab-directory-controls select{margin:0}
/* Match the collection panel's shared dropdown tree, including nested selection. */
.ab-directory-field{margin-top:14px}.ab-directory-field>label{margin-bottom:8px}#abDirectoryPath{overflow-wrap:anywhere}
#abCreateDirectory{margin-top:12px}.ab-create-footer{border-top:1px solid #e2e8f0;padding-top:14px}#abTemplatePreview{margin:10px 0}
@media(max-width:600px){.ab-source-tools,.ab-create-footer{align-items:flex-start;flex-direction:column}}

/* Center unit and group labels above their metric input columns. */
#experiments th.ab-metric-heading{text-align:center}

/* Red/green indicate B rising/falling relative to A, independent of desirability. */
#experiments .ab-relative.up{color:#dc2626}#experiments .ab-relative.down{color:#15803d}

/* Evidence rows give manual summaries room alongside multiple attachments. */
#abAttachments td:first-child{width:22%}#abAttachments td:nth-child(2){width:34%}#abAttachments textarea{min-width:220px;min-height:80px}.ab-file-list>div{display:flex;align-items:center;gap:8px;margin-top:8px}.ab-file-list a{overflow-wrap:anywhere}
