.it-root { color:var(--ink,#1e293b); max-width:1280px; margin:0 auto; }
.it-screenshot-zone{border:1px dashed #cbd5e1;border-radius:12px;padding:14px;background:#fafbff}
.it-screenshot-zone.dragging{border-color:#6366f1;background:#eef2ff}
.it-screenshot-zone input[hidden]{display:none!important}
.it-screenshot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin-top:8px}
.it-screenshot{position:relative;display:flex;flex-direction:column;min-width:0;text-decoration:none;color:#475569;background:#fff;border:1px solid #e2e8f0;border-radius:9px;overflow:hidden}
.it-screenshot img{width:100%;height:105px;object-fit:contain;background:#f8fafc}
.it-screenshot span{padding:7px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.it-screenshot button{position:absolute;right:4px;top:4px;width:24px;height:24px;border:0;border-radius:50%;background:#fff;box-shadow:0 1px 5px #0002;cursor:pointer}
.it-head,.it-toolbar,.it-row,.it-tabs,.it-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.it-head { justify-content:space-between; margin-bottom:16px; }
.it-head h2,.it-card h3,.it-modal h3 { margin:0 0 8px; }
.it-head p,.it-muted { color:var(--gray,#64748b); font-size:13px; line-height:1.65; margin:0; }
.it-tabs { border-bottom:1px solid #e2e8f0; padding-bottom:12px; margin-bottom:16px; }
.it-tabs a { padding:8px 12px; border-radius:8px; color:#475569; text-decoration:none; }
.it-tabs a.active { background:#eaf0ff; color:#2456cc; font-weight:600; }
.it-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.it-stat,.it-card { border:1px solid var(--line,#e2e8f0); border-radius:12px; background:var(--surface,#fff); padding:18px; }
.it-stat b { display:block; font-size:25px; margin-bottom:4px; }
.it-stat small { color:#64748b; }
.it-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(230px,1fr); gap:16px; }
.it-card { margin-bottom:14px; min-width:0; }
.it-card p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; margin:10px 0; }
.it-card .it-row { justify-content:space-between; }
.it-list { display:grid; gap:12px; margin-top:14px; }
.it-list .it-card { margin:0; }
.it-title { font-size:16px; font-weight:600; color:#1e293b; text-decoration:none; overflow-wrap:anywhere; }
.it-title:hover { color:#2563eb; }
.it-badge { display:inline-block; font-size:12px; border-radius:20px; padding:3px 9px; background:#f1f5f9; color:#475569; }
.it-badge.passed,.it-badge.adopted,.it-badge.active { background:#e7f7ec; color:#187345; }
.it-badge.failed,.it-badge.unavailable { background:#fff1ef; color:#be362e; }
.it-badge.validating,.it-badge.generated { background:#eaf0ff; color:#2456cc; }
.it-empty { padding:32px 18px; color:#64748b; text-align:center; border:1px dashed #cbd5e1; border-radius:12px; }
.it-error { color:#b91c1c; background:#fff1f2; border:1px solid #fecdd3; border-radius:9px; padding:12px; white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0; }
.it-notice { font-size:13px; line-height:1.75; background:#f6f8ff; color:#475569; border-radius:9px; padding:12px; margin:12px 0; }
.it-form { display:grid; gap:12px; }
.it-form label { display:grid; gap:6px; font-size:13px; font-weight:500; }
.it-form input,.it-form textarea,.it-form select,.it-toolbar input,.it-toolbar select { width:100%; box-sizing:border-box; border:1px solid #cbd5e1; border-radius:8px; padding:9px 10px; background:#fff; font:inherit; color:#1e293b; }
.it-form textarea { resize:vertical; min-height:90px; line-height:1.6; }
.it-form .it-code { min-height:230px; font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; }
.it-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.it-toolbar input { flex:1; min-width:180px; width:auto; }
.it-toolbar select { width:auto; max-width:210px; }
.it-actions { margin-top:14px; }
.it-source { color:#475569; font-size:12px; margin-top:7px; overflow-wrap:anywhere; }
.it-submission{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:10px;font-size:12px;color:#475569;overflow-wrap:anywhere}
.it-badge.system-auto{background:#eaf0ff;color:#2456cc}
.it-badge.manual-report{background:#f1f5f9;color:#475569}
.it-badge.repair-eligible{background:#e7f7ec;color:#187345}
.it-table-wrap { overflow:auto; }
.it-table { width:100%; border-collapse:collapse; font-size:13px; }
.it-table th,.it-table td { border-bottom:1px solid #e2e8f0; padding:10px; text-align:left; vertical-align:top; }
.it-table td { overflow-wrap:anywhere; max-width:430px; }
.it-code-preview { background:#f8fafc; border-radius:8px; padding:12px; font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; max-height:340px; overflow:auto; }
.it-modal-mask { position:fixed; inset:0; background:#0f172a75; z-index:12000; display:flex; align-items:center; justify-content:center; padding:20px; }
.it-modal { background:#fff; border-radius:14px; width:720px; max-width:100%; max-height:90vh; overflow:auto; padding:24px; box-shadow:0 20px 80px #0f172a33; }
.it-modal-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.it-modal-top button { background:none; border:none; font-size:23px; cursor:pointer; color:#64748b; }
.it-modal .it-form small { font-weight:400; color:#64748b; line-height:1.6; }
.it-modal [hidden],.it-root [hidden] { display:none !important; }
.it-root button:disabled,.it-modal button:disabled { opacity:.55; cursor:wait; }
.it-steps { display:flex; flex-wrap:wrap; gap:8px; margin:15px 0; font-size:12px; }
.it-steps span { padding:7px 10px; background:#f1f5f9; border-radius:7px; }
.it-steps span.done { background:#e7f7ec; color:#187345; }
.it-runtime-list { display:grid; gap:9px; margin:12px 0; }
.it-runtime-list div { font-size:13px; padding:10px; border:1px solid #e2e8f0; border-radius:8px; }
@media(max-width:780px) { .it-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .it-grid,.it-form-grid { grid-template-columns:1fr; } .it-modal-mask { padding:10px; } .it-modal { padding:18px; } .it-tabs { gap:4px; } .it-tabs a { padding:7px; } }

/* The iteration page and its body-mounted dialogs share the workspace palette. */
body:not(.is-editor) :is(.it-root,.it-modal){color:var(--workspace-text)}
body:not(.is-editor) .it-root :is(h2,h3,h4,.it-stat b,.it-runtime-list b,.it-title),body:not(.is-editor) .it-modal :is(h3,label){color:var(--workspace-text)}
body:not(.is-editor) .it-root :is(.it-head p,.it-muted,.it-stat small,.it-source,.it-submission),body:not(.is-editor) .it-modal :is(.it-muted,.it-source,.it-form small){color:var(--workspace-muted)}
body:not(.is-editor) .it-root :is(.it-stat,.it-card),body:not(.is-editor) .it-modal{background:var(--workspace-surface);border:1px solid var(--workspace-border);box-shadow:none}
body:not(.is-editor) .it-root .it-list .it-card{background:var(--workspace-raised)}
body:not(.is-editor) .it-root .it-tabs{background:transparent;border-color:var(--workspace-border)}
body:not(.is-editor) .it-root .it-tabs a{color:var(--workspace-muted)}
body:not(.is-editor) .it-root .it-tabs a:hover{background:var(--workspace-hover);color:var(--workspace-text)}
body:not(.is-editor) .it-root .it-tabs a.active{background:var(--workspace-soft);color:var(--workspace-text)}
body:not(.is-editor) .it-root .it-title:hover{color:var(--workspace-text);text-decoration:underline;text-underline-offset:3px}
body:not(.is-editor) .it-root :is(.it-empty,.it-runtime-list div){background:var(--workspace-bg);border-color:var(--workspace-border);color:var(--workspace-muted)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-notice{background:var(--workspace-soft);color:var(--workspace-muted);border:1px solid var(--workspace-border)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-error{background:var(--workspace-danger-bg);color:var(--workspace-danger);border-color:var(--workspace-danger-border)}
body:not(.is-editor) :is(.it-root,.it-modal) :is(.it-form input,.it-form textarea,.it-form select,.it-toolbar input,.it-toolbar select){background:var(--workspace-bg);color:var(--workspace-text);border-color:var(--workspace-border)}
body:not(.is-editor) :is(.it-root,.it-modal) :is(input,textarea,select,button,a):focus-visible{outline:2px solid var(--workspace-focus);outline-offset:2px;box-shadow:none}
body:not(.is-editor) :is(.it-root,.it-modal) .it-badge{background:var(--workspace-soft);color:var(--workspace-muted);border:1px solid var(--workspace-border)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-badge:is(.passed,.adopted,.active,.improved,.released,.repair-eligible){background:var(--workspace-success-bg);color:var(--workspace-success);border-color:var(--workspace-success-border)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-badge:is(.failed,.validation_failed,.unavailable){background:var(--workspace-danger-bg);color:var(--workspace-danger);border-color:var(--workspace-danger-border)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-badge:is(.validating,.validated,.generated,.system-auto){background:var(--workspace-info-bg);color:var(--workspace-info);border-color:var(--workspace-info-border)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-badge:is(.rolled_back,.preflight_only){background:var(--workspace-warning-bg);color:var(--workspace-warning);border-color:var(--workspace-warning-border)}
body:not(.is-editor) .it-root .it-table :is(th,td){border-color:var(--workspace-border);color:var(--workspace-text)}
body:not(.is-editor) .it-root .it-table th{background:var(--workspace-raised);color:var(--workspace-muted)}
body:not(.is-editor) .it-root .it-table tr:hover td{background:var(--workspace-hover)}
body:not(.is-editor) :is(.it-root,.it-modal) :is(.it-code-preview,.it-screenshot-zone,.it-screenshot img){background:var(--workspace-bg);color:var(--workspace-text);border-color:var(--workspace-border)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-screenshot{background:var(--workspace-raised);color:var(--workspace-muted);border-color:var(--workspace-border)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-screenshot-zone.dragging{background:var(--workspace-soft);border-color:var(--workspace-focus)}
body:not(.is-editor) :is(.it-root,.it-modal) .it-screenshot button{background:var(--workspace-surface);color:var(--workspace-text);border:1px solid var(--workspace-border);box-shadow:none}
body:not(.is-editor) .it-modal-mask{background:#0009}
body:not(.is-editor) .it-modal{box-shadow:var(--shadow-lg)}
body:not(.is-editor) .it-modal-top button{color:var(--workspace-muted)}
body:not(.is-editor) .it-modal-top button:hover{color:var(--workspace-text)}
body:not(.is-editor) .it-root .it-steps span{background:var(--workspace-soft);color:var(--workspace-muted)}
body:not(.is-editor) .it-root .it-steps span.done{background:var(--workspace-success-bg);color:var(--workspace-success)}
