:root {
  color-scheme: dark;
  --bg: #0d1211;
  --panel: #141c1a;
  --panel-2: #101715;
  --line: #28332f;
  --text: #eef4ef;
  --muted: #97a69e;
  --accent: #64d6a2;
  --accent-ink: #082219;
  --warn: #e9c77a;
  --danger: #ef9b93;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { background: var(--bg); touch-action: pan-y; }
body { margin: 0; min-width: 320px; overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y; background: radial-gradient(circle at 80% -5%, #183128 0, transparent 34rem), var(--bg); color: var(--text); font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(calc(100% - 32px), 720px); margin: 0 auto; padding: 20px 0 32px; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-width: 0; min-height: 48px; }
.topbar > * { min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; letter-spacing: -.05em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: .02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.status { color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--warn); vertical-align: 1px; }
.status.ok .status-dot { background: var(--accent); }
.intro { padding: 74px 0 34px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 11ch; margin-bottom: 20px; font-size: clamp(42px, 12vw, 72px); letter-spacing: -.07em; line-height: .96; }
h1 em { color: var(--accent); font-style: normal; }
.lede { max-width: 34rem; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.query-panel, .result-panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(140deg, rgba(28, 43, 37, .8), rgba(15, 22, 20, .92)); }
.query-panel { padding: 20px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 22px; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -.04em; }
.vendor-chip { padding: 7px 8px; border: 1px solid #365346; border-radius: 999px; color: var(--accent); font-size: 9px; letter-spacing: .1em; white-space: nowrap; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--panel-2); color: var(--text); padding: 13px 14px; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(100, 214, 162, .12); }
input:disabled { color: #6f7d76; }
textarea { min-height: 84px; resize: vertical; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field-row > * { min-width: 0; }
.primary-button { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; border-radius: 12px; padding: 14px 15px; background: var(--accent); color: var(--accent-ink); font-weight: 800; transition: transform .16s, filter .16s; }
.primary-button:hover { filter: brightness(1.06); }
.primary-button:active { transform: translateY(1px) scale(.99); }
.primary-button:disabled { cursor: wait; opacity: .6; }
.form-note { margin: 0; color: #738178; font-size: 11px; line-height: 1.5; }
.result-panel { min-height: 180px; margin-top: 16px; padding: 20px; }
.result-empty { display: grid; place-items: start; align-content: center; min-height: 138px; }
.result-empty h2 { margin-bottom: 8px; }
.result-empty p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.progress-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.progress-kicker::before { content: ""; width: 7px; height: 7px; border: 2px solid var(--accent); border-radius: 50%; }
.progress-state { align-content: center; }
.progress-heading { display: flex; align-items: baseline; gap: 12px; width: 100%; margin-bottom: 14px; }
.progress-percent { color: var(--accent); font-size: clamp(30px, 9vw, 42px); letter-spacing: -.06em; line-height: 1; }
.progress-phase-wrap { display: grid; gap: 4px; min-width: 0; }
.progress-stage-count { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.progress-phase { min-width: 0; color: var(--text); font-size: 14px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.progress-track { width: 100%; height: 9px; overflow: hidden; border-radius: 999px; background: #26352e; }
.progress-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.progress { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.progress-status-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.progress-status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 5px 9px; border: 1px solid #365346; border-radius: 999px; color: var(--accent); font-size: 11px; font-weight: 800; }
.progress-status-badge::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.progress-updated { color: #78877e; font-size: 11px; }
.progress-hint { max-width: 54ch; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.progress-waiting .progress-status-badge, .progress-queued .progress-status-badge { border-color: rgba(233, 199, 122, .45); color: var(--warn); }
.progress-waiting .progress-fill, .progress-queued .progress-fill { background: var(--warn); }
.progress-stalled .progress-status-badge { border-color: rgba(239, 155, 147, .5); color: var(--danger); }
.progress-stalled .progress-fill { background: var(--danger); }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.meta { padding: 6px 8px; border-radius: 8px; background: #1c2924; color: var(--muted); font-size: 11px; }
.decision { white-space: pre-wrap; color: #dfe9e2; font-size: 13px; line-height: 1.75; }
.signal-title { margin: 18px 0 4px; color: var(--accent); font-size: 30px; font-weight: 800; letter-spacing: -.05em; }
.signal-note { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.report-actions { margin: 0 0 18px; }
.report-button { display: inline-flex; align-items: center; min-height: 40px; padding: 10px 13px; border: 1px solid #365346; border-radius: 10px; color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: none; }
.report-button:active { transform: translateY(1px) scale(.99); }
.report-list { display: grid; gap: 8px; }
details { border-top: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; color: var(--text); font-size: 13px; font-weight: 700; }
details .decision { padding-top: 12px; }
.error-label { color: #f0a7a0; }
.error { color: #f0a7a0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; margin-top: 26px; color: #647169; font-size: 11px; }
@media (min-width: 700px) { .shell { padding-top: 28px; } .intro { padding-top: 110px; } .query-panel, .result-panel { padding: 28px; } }
@media (max-width: 560px) { .section-head { flex-direction: column; } .vendor-chip { align-self: flex-start; } }
@media (max-width: 560px) {
  .progress-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .progress-percent { font-size: 38px; }
  .progress-phase { font-size: 13px; }
  .progress-status-line { align-items: flex-start; flex-direction: column; gap: 7px; }
  .progress-hint { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
