:root {
  color-scheme: dark;
  --ink: #edf7ff;
  --muted: #91a6ba;
  --panel: #0d1b2a;
  --panel-2: #12253a;
  --line: rgba(102, 197, 255, .22);
  --blue: #42b8ff;
  --green: #68e39f;
  --red: #ff7c7c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 0, rgba(38, 123, 193, .22), transparent 33rem),
    #07111f;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

header,
.setup,
.actions,
.status-grid,
.activity {
  border: 1px solid var(--line);
  background: rgba(13, 27, 42, .94);
  box-shadow: 0 22px 55px rgba(0, 0, 0, .25);
}

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 32px;
  border-bottom-color: rgba(66, 184, 255, .5);
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 5vw, 48px); }
h2 { margin-bottom: 8px; }
.summary { max-width: 650px; margin-bottom: 0; color: var(--muted); }
.eyebrow, .section-label {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .17em;
}

.state {
  min-width: 104px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
}
.state.idle { color: var(--muted); }
.state.running { color: var(--green); }
.state.error { color: var(--red); }

.setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px) auto;
  align-items: end;
  gap: 22px;
  margin-top: 18px;
  padding: 24px 28px;
}
.setup p:last-child { margin-bottom: 0; color: var(--muted); }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font: inherit;
}
input {
  width: 100%;
  padding: 0 12px;
  background: #07111f;
  color: var(--ink);
}
button {
  padding: 0 16px;
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}
button:hover:not(:disabled) { border-color: var(--blue); }
button:disabled { cursor: default; opacity: .42; }
button.primary {
  border-color: rgba(66, 184, 255, .7);
  background: #176fa9;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
}

.publisher-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.publisher-tools a {
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(13, 27, 42, .78);
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}
.publisher-tools a:hover { border-color: var(--blue); }

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}
.status-grid article {
  min-width: 0;
  padding: 22px 25px;
  border-right: 1px solid var(--line);
}
.status-grid article:last-child { border-right: 0; }
.status-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.status-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity { margin-top: 18px; padding: 24px 28px; }
.activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.activity ol {
  display: grid;
  gap: 8px;
  max-height: 340px;
  margin: 16px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.activity li {
  padding: 11px 13px;
  border-left: 3px solid var(--line);
  background: rgba(7, 17, 31, .7);
  color: var(--muted);
}
.activity li.success { border-left-color: var(--green); color: var(--ink); }
.activity li.error { border-left-color: var(--red); color: var(--ink); }
.activity time { color: var(--blue); font-weight: 800; }

.capture-frame {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 1920px;
  height: 1080px;
  border: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  main { width: min(100% - 20px, 980px); padding-top: 20px; }
  header, .setup { grid-template-columns: 1fr; }
  header { flex-direction: column; }
  .setup { align-items: stretch; }
  .status-grid { grid-template-columns: 1fr; }
  .status-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .status-grid article:last-child { border-bottom: 0; }
}
