:root {
  --bg: #111312;
  --panel: #191b1a;
  --panel-2: #202321;
  --line: #343735;
  --muted: #969b98;
  --text: #e7eae8;
  --accent: #c8cdca;
  --accent-dim: #747a76;
  --red: #b9a09e;
  --amber: #aaa9a1;
  --blue: #a4aaad;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); font-size: 16px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--accent); color: #171918; font-weight: 900; border-radius: 8px; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .14em; margin-top: 3px; }
.topbar-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px currentColor; }
.dot.ok { background: var(--accent); }
.dot.bad { background: var(--red); }

.layout { max-width: 1540px; min-height: calc(100vh - 78px); margin: 0 auto; display: grid; grid-template-columns: minmax(330px, 430px) minmax(0, 1fr); }
.launch-panel { padding: 48px 42px; border-right: 1px solid var(--line); background: #151716; }
.workspace { padding: 54px 50px 70px; min-width: 0; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; margin-bottom: 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 350px; font-size: clamp(38px, 5vw, 64px); line-height: .95; letter-spacing: -.055em; margin-bottom: 18px; }
h2 { font-size: 28px; letter-spacing: -.035em; margin-bottom: 0; }
h3 { letter-spacing: -.02em; }
.lead { color: var(--muted); line-height: 1.55; margin-bottom: 38px; max-width: 360px; }

.field { display: grid; gap: 9px; margin-bottom: 20px; }
.field > span { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: #c9d1cc; }
.field small { color: var(--muted); line-height: 1.4; }
input, select { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: #0d110f; color: var(--text); outline: none; }
input:focus, select:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px rgba(200,205,202,.07); }
select:disabled, input:disabled { opacity: .55; cursor: not-allowed; }
.danger-field { border: 1px solid rgba(255,107,102,.35); border-radius: 10px; padding: 14px; background: rgba(255,107,102,.05); }
.launch-button { min-height: 52px; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; border: 0; border-radius: 10px; color: #171918; background: var(--accent); font-weight: 850; transition: filter .15s ease; }
.launch-button:hover { filter: brightness(1.08); }
.launch-button:disabled { opacity: .45; transform: none; cursor: not-allowed; }
.form-message { min-height: 22px; color: var(--muted); margin: 12px 0 0; font-size: 13px; }
.form-message.error { color: var(--red); }
.history { margin-top: 38px; padding-top: 25px; border-top: 1px solid var(--line); }
.history-head { display: flex; justify-content: space-between; align-items: baseline; }
.history-head small, .muted { color: var(--muted); }
.history-list { display: grid; gap: 7px; margin-top: 7px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
.history-item { width: 100%; display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; padding: 11px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text); text-align: left; }
.history-item:hover, .history-item.active { background: #151a17; border-color: var(--line); }
.history-item .history-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.history-item .history-dot.PASS { background: var(--accent); }
.history-item .history-dot.FAIL, .history-item .history-dot.INTERRUPTED { background: var(--red); }
.history-item .history-dot.REVIEW, .history-item .history-dot.PARTIAL { background: var(--blue); }
.history-main strong, .history-main small { display: block; }
.history-main small, .history-time { color: var(--muted); font-size: 11px; }

.workspace-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 34px; }
.workspace-head select { width: min(320px, 45%); min-height: 42px; font-size: 13px; }
.empty-state { min-height: 460px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed #303a35; border-radius: 18px; color: var(--muted); padding: 50px; }
.empty-state h3 { color: var(--text); font-size: 26px; margin: 16px 0 8px; }
.empty-state p { max-width: 470px; line-height: 1.55; }
.empty-glyph { font-size: 72px; font-weight: 900; letter-spacing: -.08em; color: #1d261f; text-shadow: 0 0 34px rgba(185,255,59,.12); }

.run-summary { display: flex; justify-content: space-between; gap: 30px; padding: 25px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.run-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.run-summary h3 { font-size: 28px; margin-bottom: 8px; }
.run-summary p { color: var(--muted); margin-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; color: #10140f; background: var(--amber); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.status-pill.PASS { background: var(--accent); }
.status-pill.FAIL, .status-pill.INTERRUPTED { background: var(--red); }
.status-pill.REVIEW, .status-pill.PARTIAL { background: var(--blue); }
.mono { color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.score-ring { width: 92px; height: 92px; flex: 0 0 92px; display: grid; place-content: center; text-align: center; border-radius: 50%; background: radial-gradient(circle, var(--panel) 56%, transparent 58%), conic-gradient(var(--accent) var(--score, 0%), #303330 0); }
.score-ring strong, .score-ring small { display: block; }
.score-ring strong { font-size: 21px; }
.score-ring small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.progress-track { height: 4px; background: #232a26; margin: 25px 4px 18px; overflow: hidden; border-radius: 99px; }
.progress-track div { height: 100%; width: 0; background: var(--accent); transition: width .35s ease; }
.phase-list { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 34px; }
.phase { position: relative; color: #647068; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.phase::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; margin-bottom: 8px; background: #313a35; }
.phase.done, .phase.active { color: var(--text); }
.phase.done::before { background: var(--accent); }
.phase.active::before { background: var(--amber); box-shadow: 0 0 14px rgba(255,200,87,.6); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab { padding: 12px 16px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; }
.tab.active { color: var(--text); border-color: var(--accent); }
.tab-panel { display: grid; gap: 14px; }
.analysis-card, .interview-card, .alert-card, .log-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 20px; }
.analysis-card { background: var(--panel); }
.interview-open { cursor: pointer; outline: none; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.interview-open:hover, .interview-open:focus-visible, .interview-open.selected { border-color: #676c69; background: var(--panel-2); }
.interview-open:hover { transform: translateY(-1px); }
.interview-row-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.interview-cta { display: inline-block; margin-top: 16px; color: var(--text); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.card-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.card-head h3 { margin-bottom: 6px; }
.card-head p { color: var(--muted); margin-bottom: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 18px; }
.metric { padding: 15px; background: #0f1311; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: 24px; }
.metric span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.check { padding: 6px 8px; border-radius: 6px; background: #1b221e; color: #c2cbc5; font-size: 11px; }
.check.pass { color: var(--text); }
.check.fail { color: var(--red); background: rgba(255,107,102,.08); }
.interview-picker { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; }
.interview-picker-button { min-width: 150px; display: grid; gap: 3px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #111412; color: var(--text); text-align: left; }
.interview-picker-button:hover, .interview-picker-button:focus-visible, .interview-picker-button.active { border-color: #676c69; background: var(--panel-2); outline: none; }
.interview-picker-button span { font-size: 13px; font-weight: 750; }
.interview-picker-button small { color: var(--muted); font-size: 10px; }
.interview-detail { display: grid; gap: 14px; }
.detail-hero, .detail-section { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 20px; }
.detail-hero { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.detail-hero h3 { margin-bottom: 7px; font-size: 24px; }
.detail-hero p { margin-bottom: 0; }
.interview-metrics { margin-top: 0; }
.section-title { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.section-title h4 { margin: 0; font-size: 18px; }
.section-title small { color: var(--muted); }
.detail-subcard { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #111412; }
.detail-subcard p { margin: 8px 0 0; color: #c4cbc7; line-height: 1.5; }
.detail-message { margin: 12px 0 0; }
.report-meta { color: var(--muted) !important; font-size: 12px; }
.report-list { margin-top: 14px; }
.report-list small { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.report-list ul { margin: 7px 0 0; padding-left: 20px; color: #c4cbc7; }
.report-list li + li { margin-top: 5px; }
.report-link { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 13px; text-underline-offset: 3px; }
.report-state { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 15px; }
.screenshot-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #0e1210; color: var(--text); text-align: left; }
.screenshot-card:hover:not(:disabled), .screenshot-card:focus-visible { border-color: #777c79; outline: none; }
.screenshot-card:disabled { cursor: default; }
.screenshot-card img, .screenshot-placeholder { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; background: #090b0a; }
.screenshot-card img { display: block; }
.screenshot-placeholder { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.screenshot-copy { display: grid; gap: 3px; padding: 12px; }
.screenshot-copy strong { font-size: 12px; }
.screenshot-copy small { color: var(--muted); font-size: 10px; }
.question-list { display: grid; gap: 8px; margin-top: 16px; }
.question { border: 1px solid var(--line); border-radius: 10px; background: #0e1210; }
.question summary { display: flex; justify-content: space-between; gap: 15px; padding: 14px; cursor: pointer; }
.question-body { padding: 0 14px 14px; color: #c4cdc7; white-space: pre-wrap; line-height: 1.5; }
.question-body small { color: var(--muted); display: block; margin: 12px 0 5px; text-transform: uppercase; letter-spacing: .08em; }
.ok-text { color: var(--accent); }
.bad-text { color: var(--red); }
.warn-text { color: var(--amber); }
.issues { margin: 12px 0 0; padding-left: 20px; color: #d7ded9; }
.issues li + li { margin-top: 6px; }
.interview-log { margin-top: 14px; padding: 15px; background: #0e1210; max-height: 360px; overflow: auto; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #aab5ae; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.run-log-summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.run-log-summary h3 { margin-bottom: 7px; }
.run-log-summary p { margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.privacy-note { padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.event-log { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.event-log li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.event-log li:first-child { padding-top: 0; }
.event-log li:last-child { padding-bottom: 0; border-bottom: 0; }
.event-log li > span { color: var(--muted); font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.event-log p { margin: 0; color: #c8ceca; line-height: 1.55; overflow-wrap: anywhere; }

.screenshot-dialog { width: min(1120px, calc(100vw - 36px)); max-height: calc(100vh - 36px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #0c0e0d; color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.screenshot-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(4px); }
.screenshot-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: #131615; }
.screenshot-dialog-head button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: #202321; color: var(--text); }
.screenshot-dialog > img { display: block; width: 100%; height: auto; }

.access-overlay { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(5,7,6,.88); backdrop-filter: blur(18px); }
.access-card { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: #121714; box-shadow: 0 32px 80px rgba(0,0,0,.55); }
.access-card .brand-mark { margin-bottom: 28px; }
.access-card h2 { font-size: 32px; margin-bottom: 12px; }
.access-card p { color: var(--muted); line-height: 1.5; }

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .launch-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace { padding-top: 38px; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 18px; }
  .brand small { display: none; }
  .launch-panel, .workspace { padding: 34px 20px; }
  .metric-grid { grid-template-columns: 1fr; }
  .workspace-head { align-items: stretch; flex-direction: column; }
  .workspace-head select { width: 100%; }
  .run-summary { align-items: start; }
  .detail-hero, .section-title { flex-direction: column; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .score-ring { width: 74px; height: 74px; flex-basis: 74px; }
  .phase-list { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .card-head { flex-direction: column; }
  .history-list { max-height: 230px; }
}
