/* Console presentation. Existing controls and data hooks stay in index.html. */
:root {
  --ink: #203a32;
  --muted: #5d7069;
  --paper: #f3f4ef;
  --panel: #fdfdf9;
  --line: #dce2d9;
  --green: #155c46;
  --green-soft: #e6f0e9;
  --shadow: none;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --blue: #286990;
  --blue-soft: #edf6fc;
  --rose: #a63d53;
  --rose-soft: #fff0f3;
  --gold: #916012;
  --gold-soft: #fff4d9;
}
body { background: var(--paper); font-size: 13px; line-height: 1.5; }
.shell { width: 100%; max-width: none; padding: 16px 12px 32px; }
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 18px; }
.hero > div:first-child { flex: 1; min-width: 0; }
.hero .eyebrow { margin: 0 0 3px; }
.hero h1 { font-family: inherit; font-size: 18px; font-weight: 650; letter-spacing: -.025em; line-height: 1.3; }
.hero h1 br { display: none; }
.lede { font-size: 12px; line-height: 1.5; margin: 6px 0 0; max-width: none; }
.account-block { gap: 5px; justify-items: start; }
.health { font-size: 11px; margin: 0; }
.health span, .health.online span { width: 6px; height: 6px; box-shadow: none; }
.signed-in { font-size: 11px; }
.eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; margin-bottom: 5px; }
h2 { font-family: inherit; font-size: 16px; line-height: 1.4; font-weight: 650; letter-spacing: -.025em; }
h3 { font-size: 11px; }
.panel { border-radius: 8px; background: var(--panel); box-shadow: none; }
.workspace-tabs { gap: 4px; margin: 0 0 16px; padding: 0 0 12px; flex-wrap: wrap; }
.workspace-tab { min-height: 38px; font-size: 12px; border-radius: 5px; }
.workspace-tab.active { background: var(--green-soft); box-shadow: none; border-color: var(--line); }
.launch-panel, .overview, .activity-panel, .supervisor-panel, #artifacts-panel, .history,
.request-launch-panel, .request-status-panel, .request-job-panel, .request-errors-panel { padding: 16px; margin: 0; min-width: 0; }
.launch-panel { margin-bottom: 14px; }
.configuration-heading { margin-bottom: 16px; align-items: center; }
.section-note { color: var(--muted); font: 10px var(--mono); text-align: right; }
label { font-size: 11px; margin-bottom: 6px; }
input, textarea, select { border-radius: 5px; padding: 10px 11px; font-size: 12px; min-height: 42px; border-color: var(--line); }
textarea { min-height: 92px; }
.url-row, .form-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.form-grid { margin-top: 14px; }
.instruction-field { margin-top: 14px; }
.instruction-field p { font-size: 10px; }
button { border-radius: 5px; min-height: 40px; padding: 8px 16px; font-size: 12px; }
button:hover:not(:disabled) { filter: brightness(.94); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, a:focus-visible, summary:focus-visible, .history-run:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.quiet-button { min-height: 34px; font-size: 11px; }
.form-error:empty { display: none; }
.run-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.run-sidebar { display: grid; gap: 14px; min-width: 0; }
.overview { grid-column: 1 / -1; }
.run-heading { gap: 12px; flex-wrap: wrap; align-items: center; }
.run-heading > div:first-child { min-width: 0; }
#run-domain { overflow-wrap: anywhere; font-size: 19px; }
.status { border-radius: 4px; font: 600 10px var(--mono); padding: 5px 8px; white-space: nowrap; }
.run-actions { gap: 6px; flex-wrap: wrap; }
.progress-track { height: 4px; margin: 12px 0 8px; }
.stage-message { font-size: 12px; margin: 6px 0 12px; min-height: 0; }
.usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0; gap: 8px; }
.usage-grid div { border-radius: 4px; background: var(--paper); border-color: transparent; padding: 8px 10px; min-width: 0; }
.usage-grid span { font: 9px/1.5 var(--mono); letter-spacing: .02em; }
.usage-grid strong { font-size: 12px; overflow-wrap: anywhere; }
#progress-cost { color: var(--green); }
#progress-cost-detail, #progress-sync-status, #activity-sync-status { font-size: 11px; margin: 5px 0; }
.stages { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 15px; }
.stages li { padding: 0 0 0 25px; font-size: 10px; color: var(--muted); line-height: 1.7; }
.stages li::before { width: 18px; height: 18px; top: 0; font-size: 9px; }
.stages li::after { display: none; }
.technical-diagnostics { margin-top: 14px; padding-top: 10px; }
.technical-diagnostics summary { min-height: 28px; }
.activity-panel { min-height: 0; }
.section-title { gap: 12px; flex-wrap: wrap; align-items: center; }
.activity { margin-top: 12px; max-height: 670px; padding: 0; scrollbar-width: thin; }
.event { grid-template-columns: 67px minmax(0, 1fr); padding: 12px 8px; gap: 10px; border-color: var(--line); }
.event time { color: var(--muted); font: 9px/1.6 var(--mono); }
.event small { font: 600 9px/1.5 var(--mono); letter-spacing: .02em; }
.event p { font-size: 12px; line-height: 1.65; }
.reasoning-event { border-left: 0; background: var(--green-soft); }
.supervisor-panel { grid-column: auto; }
.supervisor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.supervisor-columns { grid-template-columns: 1fr; gap: 8px; }
.supervisor-columns > div { border-radius: 4px; padding: 10px; background: var(--paper); }
.supervisor-columns h3, .screenshot-section h3 { font: 600 9px/1.5 var(--mono); text-transform: uppercase; color: var(--green); letter-spacing: .05em; }
.supervisor-columns p, .compact-list { font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.compact-list { max-height: 180px; }
.screenshot-section { margin-top: 12px; padding-top: 5px; }
.screenshot-section .muted { font-size: 11px; }
#artifacts-panel { margin-top: 0; }
.artifacts { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 12px; }
.artifact { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 11px 4px; }
.artifact:hover { background: var(--green-soft); }
.artifact strong { margin: 0; font: 11px/1.5 var(--mono); overflow-wrap: anywhere; min-width: 0; }
.artifact span { font-size: 10px; flex-shrink: 0; }
.history { margin-top: 14px; }
.history-run { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 6px; gap: 6px 16px; }
.history-run:hover:not(.locked) { background: var(--green-soft); }
.history-run strong { font-size: 12px; overflow-wrap: anywhere; }
.history-run span:nth-child(2) { display: block; grid-column: 1 / -1; grid-row: 2; font-size: 11px; overflow-wrap: anywhere; }
.history-run span:last-child { font: 10px var(--mono); }
.request-launch-panel, .request-status-panel, .request-job-panel, .request-errors-panel { margin-bottom: 14px; }
.request-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
.request-metrics div { background: var(--paper); border-radius: 4px; }
.request-actions { flex-wrap: wrap; }
.login-card { box-shadow: 0 12px 45px #203a3210; }
.local-preview { display: block; padding: 7px 12px; background: var(--green); color: var(--panel); font: 10px/1.5 var(--mono); letter-spacing: .04em; }
@media (min-width: 700px) {
  .shell { padding: 20px 24px 36px; }
  .hero { flex-wrap: nowrap; }
  .account-block { justify-items: end; flex-shrink: 0; }
  .url-row { grid-template-columns: minmax(0, 1fr) auto; }
  #run-form { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0,1fr); gap: 0 22px; }
  #run-form > label, #run-form > .url-row { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); margin-top: 14px; gap: 12px; }
  .instruction-field { margin-top: 14px; }
  #supervisor-instructions { min-height: 120px; }
  .usage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-run { grid-template-columns: minmax(180px,.85fr) minmax(0,2fr) 100px; }
  .history-run span:nth-child(2) { grid-column: auto; grid-row: auto; }
  .supervisor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .request-metrics { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (min-width: 1050px) {
  .shell { padding: 22px 28px 40px; }
  .hero { margin-bottom: 14px; }
  .hero h1 { font-size: 16px; }
  .lede { font-size: 11px; }
  .launch-panel, .overview, .activity-panel, .supervisor-panel, #artifacts-panel, .history { padding: 18px 20px; }
  .run-layout { grid-template-columns: minmax(0,1.55fr) minmax(365px,1fr); }
  .overview > .usage-grid { grid-template-columns: repeat(8, minmax(0,1fr)); }
  .stages { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .technical-diagnostics .usage-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .activity-panel { position: sticky; top: 16px; }
  .activity { max-height: 730px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

#fields { min-height: 64px; }
.hero h1 br::after { content: " "; }
#run-form { display: block; }
.target-row, .fields-instructions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.fields-instructions { margin-top: 14px; }
.fields-instructions .form-grid { display: block; margin: 0; }
.fields-instructions .instruction-field { margin: 0; }
.fields-instructions textarea { min-height: 78px; }
#supervisor-instructions { min-height: 78px; }
@media (min-width: 700px) {
  .target-row { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) auto; align-items: end; }
  .fields-instructions { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (min-width: 1050px) {
  .overview { padding-top: 12px; padding-bottom: 12px; }
  .overview .eyebrow { margin-bottom: 2px; }
  .overview .usage-grid { margin: 9px 0; }
  .overview .usage-grid div { padding: 6px 8px; }
  .overview .stages { margin-top: 10px; }
  .overview .technical-diagnostics { margin-top: 10px; padding-top: 6px; }
  .technical-diagnostics summary { min-height: 22px; }
}

/* Small, meaningful color accents and line icons, following the reference. */
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.eyebrow { display: flex; align-items: center; gap: 7px; }
.eyebrow .ui-icon { width: 12px; height: 12px; flex-basis: 12px; color: var(--gold); }
.workspace-tab { display: inline-flex; align-items: center; gap: 7px; }
.workspace-tab .ui-icon { color: var(--muted); }
.workspace-tab.active .ui-icon { color: var(--green); }
.configuration-heading .eyebrow { color: var(--ink); }
.activity-panel .eyebrow::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #25b78c; }
.activity-panel .eyebrow .ui-icon { color: var(--green); }
.supervisor-panel .eyebrow .ui-icon { color: var(--gold); }
#artifacts-panel .eyebrow .ui-icon, .history .eyebrow .ui-icon { color: var(--green); }
#website { padding-left: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23708278' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cellipse cx='12' cy='12' rx='3' ry='8'/%3E%3Cpath d='M4 12h16'/%3E%3C/svg%3E"); background-size: 15px; background-position: 10px center; background-repeat: no-repeat; }
#start-button::before { content: ''; display: inline-block; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid currentColor; margin-right: 9px; }
.usage-grid div { border-color: var(--line); background: #fafaf6; }
.overview .usage-grid > div:nth-child(7) { background: var(--green-soft); border-color: #c8dfd1; }
.overview .usage-grid > div:nth-child(8) { background: var(--gold-soft); border-color: #eadcba; }
.event { background: transparent; border-top-color: #edf0e8; border-radius: 4px; margin: 4px 0; }
.event small { padding: 2px 5px; background: var(--green-soft); color: var(--green); border-radius: 3px; margin-bottom: 5px; }
.event[data-tone="reasoning"] { background: var(--blue-soft); }
.event[data-tone="reasoning"] small { color: var(--blue); background: #d9edf9; }
.event[data-tone="failure"] { background: var(--rose-soft); }
.event[data-tone="failure"] small { color: var(--rose); background: #fbdde5; }
.event[data-tone="failure"] p { color: var(--rose); }
.event[data-tone="warning"] { background: var(--gold-soft); }
.event[data-tone="warning"] small { color: var(--gold); background: #f9e7b4; }
.event[data-tone="validation"] small, .event[data-tone="probe"] small { color: var(--blue); background: #e0eff9; }
.artifact-name { display: flex; align-items: center; gap: 9px; min-width: 0; flex-shrink: 1 !important; }
.file-badge { display: inline-flex; justify-content: center; align-items: center; min-width: 32px; padding: 2px 4px; border-radius: 3px; font: 600 8px/1.6 var(--mono) !important; color: var(--muted); background: var(--paper); border: 1px solid var(--line); }
.file-badge[data-type="csv"] { color: var(--green); background: #e0f4e9; border-color: #bce4cd; }
.file-badge[data-type="json"], .file-badge[data-type="jsonl"] { color: var(--blue); background: #e3f2fc; border-color: #c1dfef; }
.file-badge[data-type="md"], .file-badge[data-type="pdf"] { color: var(--gold); background: var(--gold-soft); border-color: #efdcad; }
.artifact-meta { display: inline-flex; align-items: center; gap: 10px; }
.artifact-meta .ui-icon { width: 12px; height: 12px; flex-basis: 12px; color: var(--green); }
.history-run strong { display: flex; align-items: baseline; gap: 8px; }
.history-run strong::before { content: ''; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--muted); }
.history-run span:last-child { justify-self: end; padding: 4px 7px; border-radius: 3px; background: var(--paper); }
.history-run[data-status="FAILED"] strong::before { background: var(--rose); }
.history-run[data-status="FAILED"] span:last-child { color: var(--rose); background: var(--rose-soft); }
.history-run[data-status="PARTIAL"] strong::before { background: var(--gold); }
.history-run[data-status="PARTIAL"] span:last-child { color: var(--gold); background: var(--gold-soft); }
.history-run[data-status="COMPLETED"] strong::before, .history-run[data-status="RUNNING"] strong::before { background: var(--green); }
.history-run[data-status="COMPLETED"] span:last-child, .history-run[data-status="RUNNING"] span:last-child { color: var(--green); background: var(--green-soft); }

/* Readability: comfortable text at normal browser zoom, across both workspaces. */
:root {
  --ink: #18352b;
  --muted: #475d53;
  --line: #cbd5cc;
}
body { font-size: 16px; font-weight: 500; line-height: 1.6; }
.hero h1 { font-size: 22px; font-weight: 700; line-height: 1.4; }
h2 { font-size: 20px; font-weight: 700; line-height: 1.4; }
h3 { font-size: 15px; }
.lede { font-size: 14px; line-height: 1.65; }
.eyebrow { font-family: inherit; font-size: 12px; font-weight: 750; letter-spacing: .07em; }
.eyebrow .ui-icon { width: 15px; height: 15px; flex-basis: 15px; }
.health, .signed-in, .section-note { font-size: 13px; font-weight: 500; }
.section-note { font-family: inherit; }
.ui-icon { width: 17px; height: 17px; flex-basis: 17px; stroke-width: 1.8; }
label { font-size: 14px; font-weight: 650; line-height: 1.5; margin-bottom: 8px; }
label span { font-weight: 500; }
input, textarea, select { font-size: 15px; font-weight: 500; line-height: 1.6; padding: 11px 13px; min-height: 46px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
#website { padding-left: 37px; background-size: 18px; }
.fields-instructions textarea, #supervisor-instructions, #fields { min-height: 104px; }
.instruction-field p, .secure-note { font-size: 13px; line-height: 1.6; }
button, .workspace-tab, .quiet-button, .stop-button, .signed-in .quiet-button { font-size: 14px; font-weight: 650; min-height: 44px; }
.status { font-family: inherit; font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .03em; padding: 6px 10px; }
#run-domain { font-size: 23px; }
.stage-message, .empty-state, .request-intro, .form-error { font-size: 15px; line-height: 1.65; }
.usage-grid span, .request-metrics span { font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: .02em; }
.usage-grid strong { font-size: 16px; font-weight: 700; line-height: 1.5; margin-top: 5px; }
.usage-grid div, .overview .usage-grid div { padding: 10px 12px; }
#progress-cost-detail, #progress-sync-status, #activity-sync-status { font-size: 13px; line-height: 1.65; margin: 8px 0; }
.stages { gap: 14px; }
.stages li { font-size: 13px; line-height: 1.6; padding-left: 29px; }
.stages li::before { width: 22px; height: 22px; font-size: 11px; }
.technical-diagnostics summary, .event details summary { font-size: 14px; line-height: 1.6; padding: 10px 0; min-height: 44px; }
.event { grid-template-columns: 94px minmax(0, 1fr); gap: 12px; padding: 15px 12px; }
.event time { font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.6; }
.event p { font-size: 15px; line-height: 1.7; }
.event small { font-family: inherit; font-size: 11px; font-weight: 750; line-height: 1.5; padding: 3px 7px; margin-bottom: 7px; }
.event pre { font-size: 13px; line-height: 1.65; }
.supervisor-columns h3, .screenshot-section h3 { font-family: inherit; font-size: 12px; font-weight: 750; line-height: 1.6; }
.supervisor-columns p, .compact-list, .screenshot-section .muted { font-size: 14px; line-height: 1.7; }
.supervisor-columns > div { padding: 13px; }
.artifact { padding: 13px 4px; flex-wrap: wrap; gap: 8px 14px; }
.artifact strong { font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.6; }
.artifact span { font-size: 12px; }
.file-badge { min-width: 39px; font: 700 12px/1.6 var(--mono) !important; padding: 3px 5px; }
.artifact-meta .ui-icon { width: 16px; height: 16px; flex-basis: 16px; }
.history-run { padding: 16px 8px; }
.history-run strong { font-size: 15px; font-weight: 650; }
.history-run span:nth-child(2) { font-size: 14px; line-height: 1.6; }
.history-run span:last-child { font-family: inherit; font-size: 12px; font-weight: 700; }
.request-error-row, .screenshots a, .error-card { font-size: 14px; line-height: 1.6; }
.local-preview { font-family: inherit; font-size: 12px; font-weight: 600; padding: 8px 16px; }
button:focus-visible, a:focus-visible, summary:focus-visible, .history-run:focus-visible { outline-width: 3px; }
@media (min-width: 700px) {
  .overview > .usage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1050px) {
  .hero h1 { font-size: 22px; }
  .lede { font-size: 14px; }
  .launch-panel, .overview, .activity-panel, .supervisor-panel, #artifacts-panel, .history { padding: 22px; }
  .run-layout { grid-template-columns: minmax(410px, 1fr) minmax(0, 1.45fr); gap: 18px; }
  .run-sidebar { grid-column: 1; grid-row: 2; }
  .activity-panel { grid-column: 2; grid-row: 2; }
  .technical-diagnostics .usage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1500px) {
  .overview > .usage-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .stages { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .event { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}
