:root {
  color-scheme: dark;
  --ink: #f2f4ee;
  --muted: #999f98;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(17, 20, 18, 0.82);
  --green: #b8ff5a;
  --green-deep: #71be32;
  --amber: #ffca67;
  --red: #ff716c;
  --bg: #090b0a;
  --radius: 22px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 72% 5%, rgba(111, 168, 55, 0.13), transparent 28rem),
    linear-gradient(180deg, #0b0e0c 0%, var(--bg) 45%, #070807 100%);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.ambient { position: fixed; pointer-events: none; filter: blur(70px); opacity: .16; border-radius: 50%; }
.ambient-one { width: 220px; height: 220px; background: var(--green); right: 7%; top: 32%; }
.ambient-two { width: 180px; height: 180px; background: #285d31; left: -5%; bottom: 10%; }

.topbar { height: 90px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand strong { display: block; font-size: 1.2rem; letter-spacing: -.04em; }
.brand small { color: var(--muted); display: block; font: 10px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.record-mark { width: 38px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: repeating-radial-gradient(circle, #151916 0 2px, #262d27 3px 4px); border: 1px solid #3d493e; box-shadow: inset 0 0 0 7px rgba(0,0,0,.17); }
.record-mark::before { content: ""; width: 12px; aspect-ratio: 1; border-radius: 50%; background: var(--green); box-shadow: 0 0 18px rgba(184,255,90,.45); }
.record-mark i { display: none; }
.record-mark.large { width: 58px; margin-bottom: 24px; }
.top-actions, .connection { display: flex; align-items: center; gap: 12px; }
.connection { color: var(--muted); font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(255,202,103,.1); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 4px rgba(184,255,90,.1); }
.status-dot.offline { background: var(--red); }
.quiet-button { border: 1px solid var(--line); color: var(--muted); background: transparent; border-radius: 999px; padding: 9px 15px; }

.hero { padding: 84px 0 64px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 72px; align-items: end; }
.eyebrow { color: var(--green); font: 11px var(--mono); letter-spacing: .16em; margin: 0 0 18px; }
h1 { font-size: clamp(3.2rem, 7vw, 6.4rem); line-height: .9; letter-spacing: -.075em; margin: 0; font-weight: 620; }
h1 em { color: var(--muted); font-style: normal; font-weight: 450; }
.hero-copy { color: var(--muted); max-width: 620px; font-size: 1.02rem; line-height: 1.65; margin: 30px 0 0; }
.system-pulse { border-top: 1px solid var(--line); padding-top: 18px; }
.pulse-line { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.live-pill { color: var(--green); border: 1px solid rgba(184,255,90,.25); border-radius: 999px; padding: 5px 8px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.metric-card { min-height: 116px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); border-radius: 15px; padding: 17px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-label { color: var(--muted); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.metric-card strong { font-size: 1.65rem; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); font-size: .72rem; }
.metric-card.warm strong { color: var(--amber); }
.metric-card.hot strong { color: var(--red); }
.meter { height: 3px; width: 100%; background: #272c28; overflow: hidden; border-radius: 3px; }
.meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width .5s ease; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(18px); }
.intake { padding: 32px; }
.control-panel { padding: 32px; }
.section-heading, .feed-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.section-heading > div, .feed-heading > div { display: flex; align-items: center; gap: 12px; }
.section-heading h2, .feed-heading h2 { margin: 0; font-size: 1.12rem; letter-spacing: -.025em; }
.step { color: var(--green); font: 10px var(--mono); border: 1px solid rgba(184,255,90,.24); border-radius: 6px; padding: 5px; }
.microcopy, .feed-heading p { color: var(--muted); font-size: .75rem; margin: 0; }
label { display: flex; justify-content: space-between; color: #cfd3cc; font-size: .76rem; margin: 0 0 9px; }
label span { color: #656b65; }
.source-mode { display: flex; gap: 7px; border: 0; padding: 0; margin: 0 0 21px; }
.source-mode legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.source-mode label { margin: 0; cursor: pointer; }
.source-mode input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.source-mode span { display: block; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font: 10px var(--mono); text-transform: uppercase; letter-spacing: .07em; }
.source-mode input:checked + span { color: #10140c; background: var(--green); border-color: var(--green); }
textarea, input { width: 100%; color: var(--ink); background: #0c0f0d; border: 1px solid #2a2f2b; border-radius: 12px; padding: 14px 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; min-height: 132px; line-height: 1.5; }
textarea:focus, input:focus { border-color: rgba(184,255,90,.55); box-shadow: 0 0 0 3px rgba(184,255,90,.07); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 24px; }
.form-footer p { color: #6f756f; font-size: .68rem; max-width: 270px; margin: 0; line-height: 1.4; }
.primary-button { border: 0; border-radius: 12px; background: var(--green); color: #10140c; min-height: 48px; padding: 0 8px 0 19px; display: inline-flex; align-items: center; gap: 17px; font-weight: 700; }
.primary-button b { width: 34px; aspect-ratio: 1; display: grid; place-items: center; background: rgba(0,0,0,.13); border-radius: 9px; font-size: 1rem; }
.primary-button:hover { background: #c7ff81; }
.primary-button:disabled { opacity: .5; cursor: wait; }
.primary-button.wide { width: 100%; justify-content: center; margin-top: 10px; }
.concurrency-control { display: flex; justify-content: space-between; align-items: center; padding: 19px 0 24px; border-bottom: 1px solid var(--line); }
.concurrency-control strong, .concurrency-control small { display: block; }
.concurrency-control strong { font-size: .86rem; }
.concurrency-control small { color: var(--muted); margin-top: 5px; font-size: .68rem; }
.stepper { display: grid; grid-template-columns: 30px 34px 30px; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { height: 34px; color: var(--muted); background: transparent; border: 0; font-size: 1.1rem; }
.stepper button:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.stepper output { font: 700 13px var(--mono); text-align: center; }
.queue-summary { display: grid; grid-template-columns: repeat(3, 1fr); padding: 24px 0; }
.queue-summary div { border-right: 1px solid var(--line); text-align: center; }
.queue-summary div:last-child { border: 0; }
.queue-summary strong, .queue-summary span { display: block; }
.queue-summary strong { font-size: 1.45rem; }
.queue-summary span { color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-top: 5px; }
.outline-button { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: transparent; }
.outline-button:hover { color: var(--ink); border-color: rgba(255,255,255,.2); }
.control-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.feed-section { padding: 70px 0 100px; }
.feed-heading { margin-bottom: 20px; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.queue-list { display: grid; gap: 9px; }
.empty-state { min-height: 270px; border: 1px dashed #303530; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--muted); }
.empty-state strong { color: var(--ink); margin-top: 18px; }
.empty-state p { font-size: .8rem; max-width: 300px; line-height: 1.5; }
.empty-record { width: 52px; aspect-ratio: 1; border: 1px solid #3a413b; border-radius: 50%; background: repeating-radial-gradient(circle, #0d100e 0 3px, #1c211d 4px 5px); }
.job { background: var(--panel); border: 1px solid var(--line); border-radius: 17px; padding: 19px; }
.job-main { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.job-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--green); background: rgba(184,255,90,.08); font-size: .9rem; }
.job-title { overflow: hidden; }
.job-title strong, .job-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-title strong { font-size: .86rem; }
.job-title span { color: var(--muted); font-size: .68rem; margin-top: 5px; }
.job-status { font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.job-status.downloading, .job-status.resolving, .job-status.tagging, .job-status.moving { color: var(--green); }
.job-status.failed { color: var(--red); }
.job-status.completed { color: var(--green); }
.job-progress { margin-top: 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 13px; }
.job-progress .meter { height: 4px; }
.job-progress span { min-width: 34px; text-align: right; color: var(--muted); font: 10px var(--mono); }
.job-footer { margin-top: 13px; display: flex; justify-content: space-between; align-items: center; color: #6f756f; font-size: .67rem; }
.job-actions { display: flex; gap: 6px; }
.job-actions button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 7px; padding: 5px 8px; font-size: .65rem; }
.activity-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: rgba(12,15,13,.7); }
.activity-title { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.activity-title h3 { margin: 0; font-size: .86rem; }
.activity-title span { color: var(--muted); font: 9px var(--mono); }
.activity-panel ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 18px; }
.activity-panel li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 11px; align-items: start; }
.activity-panel li i { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: #576057; box-shadow: 0 0 0 4px rgba(255,255,255,.025); }
.activity-panel li:first-child i { background: var(--green); }
.activity-panel li strong, .activity-panel li time { display: block; }
.activity-panel li strong { font-size: .72rem; font-weight: 500; line-height: 1.4; }
.activity-panel li time { color: #666c66; font: 9px var(--mono); margin-top: 4px; }
footer { min-height: 78px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: #666c66; font: 10px var(--mono); text-transform: uppercase; letter-spacing: .07em; }

dialog { color: var(--ink); background: #111411; border: 1px solid #343a34; border-radius: 22px; width: min(420px, calc(100% - 32px)); padding: 34px; box-shadow: 0 28px 100px #000; }
dialog::backdrop { background: rgba(4,6,5,.82); backdrop-filter: blur(9px); }
dialog h2 { margin: 0 0 10px; font-size: 2rem; letter-spacing: -.05em; }
dialog p:not(.eyebrow):not(.form-error) { color: var(--muted); line-height: 1.5; font-size: .82rem; margin-bottom: 24px; }
.form-error { color: var(--red); min-height: 18px; font-size: .72rem; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 380px; background: #e9f7df; color: #192014; padding: 13px 17px; border-radius: 11px; font-size: .78rem; transform: translateY(30px); opacity: 0; pointer-events: none; transition: .25s ease; z-index: 20; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #ffd9d6; color: #3f1412; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 58px; }
  .workspace { grid-template-columns: 1fr; }
  .feed-layout { grid-template-columns: 1fr; }
  .activity-panel { order: -1; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 24px, 1180px); }
  .topbar { height: 72px; }
  .connection span:last-child { display: none; }
  .hero { padding: 50px 0 40px; gap: 38px; }
  h1 { font-size: clamp(3rem, 16vw, 4.7rem); }
  .hero-copy { font-size: .9rem; }
  .metric-card { min-height: 104px; padding: 14px; }
  .intake, .control-panel { padding: 22px; }
  .section-heading { align-items: flex-start; }
  .microcopy { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .control-actions { grid-template-columns: 1fr; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .primary-button { justify-content: space-between; }
  .feed-section { padding: 52px 0 70px; }
  .feed-heading { align-items: flex-start; }
  .feed-heading p { max-width: 150px; text-align: right; }
  .job-main { grid-template-columns: 36px minmax(0, 1fr); }
  .job-status { grid-column: 2; }
  footer { flex-direction: column; justify-content: center; align-items: flex-start; gap: 7px; }
}
