:root {
  --ink: #111b18;
  --muted: #66746f;
  --paper: #f4f1e8;
  --card: #fffdf7;
  --line: #d8ddd7;
  --green: #0c684d;
  --lime: #b8e75a;
  --red: #a93c32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 8%, rgba(184, 231, 90, .26), transparent 25rem),
    linear-gradient(180deg, #f8f6ef 0, var(--paper) 100%);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, sans-serif;
}

.topbar {
  height: 68px;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(17, 27, 24, .12);
}

.brand { color: var(--ink); text-decoration: none; font-weight: 760; letter-spacing: -.03em; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: 8px; border-radius: 50%; color: white; background: var(--green); font-size: 11px; }
.status-dot { color: var(--muted); font-size: 13px; }
.status-dot i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #42a67f; box-shadow: 0 0 0 4px rgba(66,166,127,.12); }

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hero { padding: 76px 0 58px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { max-width: 820px; margin: 0; font-family: Georgia, serif; font-size: clamp(48px, 8vw, 92px); line-height: .98; letter-spacing: -.055em; font-weight: 500; }
h1 em { color: var(--green); font-weight: 500; }
.intro { max-width: 620px; margin: 24px 0 32px; color: var(--muted); font-size: 18px; }

.query-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr .85fr auto;
  gap: 1px;
  overflow: hidden;
  max-width: 980px;
  padding: 1px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  box-shadow: 0 18px 50px rgba(17,27,24,.09);
}

label { padding: 12px 16px; background: var(--card); }
label span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
input, select { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-weight: 650; }
.ticker-field input { font-size: 21px; letter-spacing: .05em; text-transform: uppercase; }
button { border: 0; padding: 0 25px; color: white; background: var(--green); font: inherit; font-weight: 750; cursor: pointer; }
button:hover { background: #07513c; }
button:disabled { cursor: wait; opacity: .65; }
button b { margin-left: 12px; color: var(--lime); font-size: 19px; }
.error { display: none; }
.fine-print { color: var(--muted); font-size: 12px; }

.workspace { padding: 34px 0 80px; border-top: 1px solid var(--line); }
.workspace-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
h2 { margin: 0; font: 500 clamp(34px, 5vw, 56px)/1 Georgia, serif; letter-spacing: -.04em; }
.job-status { padding: 8px 13px; border-radius: 999px; color: var(--green); background: #dfeecf; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.progress { margin: 30px 0; color: var(--muted); }
.progress-bar { height: 5px; overflow: hidden; border-radius: 99px; background: #dfe3dd; }
.progress-bar span { display: block; width: 36%; height: 100%; border-radius: inherit; background: var(--green); animation: loading 1.7s ease-in-out infinite alternate; }
@keyframes loading { to { transform: translateX(175%); } }

.decision-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0; padding: 22px 26px; border: 1px solid #b9d7a3; border-radius: 12px; background: #edf6df; }
.decision-card span { color: var(--muted); font-size: 13px; font-weight: 750; text-transform: uppercase; }
.decision-card strong { color: var(--green); font: 600 25px Georgia, serif; }
.reports { display: grid; gap: 14px; }
.report { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.report summary { padding: 18px 22px; cursor: pointer; font-weight: 800; list-style: none; }
.report summary::after { content: "+"; float: right; color: var(--green); font-size: 22px; }
.report[open] summary::after { content: "−"; }
.report-content { padding: 0 22px 24px; border-top: 1px solid var(--line); color: #293630; overflow-wrap: anywhere; }
.report-content table { display: block; overflow-x: auto; border-collapse: collapse; }
.report-content th, .report-content td { padding: 7px; border: 1px solid var(--line); }
.job-error { padding: 18px; border-radius: 10px; color: var(--red); background: #f8e8e4; }
.hidden { display: none !important; }

@media (max-width: 800px) {
  .status-dot { display: none; }
  .hero { padding-top: 48px; }
  .query-card { grid-template-columns: 1fr; }
  button { min-height: 58px; }
  .workspace-head, .decision-card { align-items: flex-start; flex-direction: column; }
}
