:root {
  --ink: #181a2a;
  --muted: #626880;
  --line: #e7e8f0;
  --bg: #f4f5fb;
  --card: #ffffff;
  --accent: #4f46e5;        /* indigo */
  --accent-2: #6d28d9;      /* violet, for gradient */
  --accent-soft: #eef0fe;
  --accent-line: #dde0fb;
  --amber: #f59e0b;
  --ok: #16a34a;
  --sage: #4a7c6f;
  --err: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(24,26,42,.05), 0 4px 16px rgba(24,26,42,.04);
  --shadow-lg: 0 8px 30px rgba(24,26,42,.10);
  --ring: 0 0 0 4px var(--accent-soft);
  --head: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); font: 16px/1.6 var(--body);
  background: radial-gradient(1200px 600px at 70% -10%, #eef0ff 0%, rgba(238,240,255,0) 55%), var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -0.015em; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 26px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.82); backdrop-filter: saturate(140%) blur(8px);
}
.brand { font-family: var(--head); font-weight: 600; letter-spacing: -0.01em; font-size: 20px; }
.beta {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); background: var(--accent-soft); padding: 3px 7px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.tag { color: var(--muted); font-size: 14px; }
main { max-width: 800px; margin: 0 auto; padding: 38px 20px 72px; }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow);
}
.hidden { display: none !important; }
h1 { font-size: 33px; line-height: 1.12; margin: 0 0 10px; }
.lede { color: var(--muted); margin: 0 0 24px; font-size: 16.5px; }

/* ingest */
.ingest {
  background: linear-gradient(180deg, #f3f1ff, #eef0fe); border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: 18px 18px 16px; margin-bottom: 24px;
}
.ingest label { margin: 0; font-weight: 600; font-size: 14.5px; }
.ingest-row { display: flex; gap: 8px; margin-top: 10px; }
.ingest-row input { margin: 0; background: #fff; }
.ingest-row button { margin: 0; white-space: nowrap; }
.ingest-status { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
@media (max-width: 540px) { .ingest-row { flex-direction: column; } }

/* form */
input[type=file] { width: 100%; margin-top: 7px; font-size: 13px; color: var(--muted); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb-img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; border: 0.5px solid var(--line); }

form label { display: block; font-weight: 600; font-size: 14px; margin: 18px 0 0; }
.req { color: var(--accent); }
input, textarea, select {
  width: 100%; margin-top: 7px; padding: 12px 14px; font: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
textarea { resize: vertical; }
.more { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 6px; }
.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); padding: 10px 0; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+ "; font-weight: 700; }
details[open] > summary::before { content: "– "; }
.cfg-label { font-weight: 600; font-size: 13px; margin: 18px 0 8px; color: var(--ink); }
.platforms { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 14px; margin: 0; }
.chk input { width: auto; margin: 0; }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 14px; }
.cfg-grid label, .colors label { font-size: 13px; font-weight: 600; }
.cfg-grid input, .cfg-grid select { margin-top: 6px; }
.colors { display: flex; flex-wrap: wrap; gap: 14px; }
.colors .col { display: flex; flex-direction: column; align-items: flex-start; font-size: 12px; }
.colors input[type=color] { width: 56px; height: 36px; padding: 2px; margin-top: 6px; border-radius: 8px; cursor: pointer; }
.usecolors { margin-top: 14px; font-size: 13px; }
@media (max-width: 540px) { .cfg-grid { grid-template-columns: 1fr; } }

/* buttons */
button {
  margin-top: 24px; padding: 13px 22px; font: inherit; font-weight: 700; font-size: 15px;
  color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border: 0; border-radius: var(--radius-sm);
  cursor: pointer; box-shadow: 0 1px 2px rgba(79,70,229,.35); transition: transform .08s, box-shadow .15s, filter .15s;
}
button:hover { filter: brightness(1.05); box-shadow: 0 4px 14px rgba(79,70,229,.32); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: default; box-shadow: none; }
button.ghost { background: #fff; color: var(--muted); border: 1px solid var(--line); margin: 0; padding: 8px 14px; font-weight: 600; box-shadow: none; }
#go { width: 100%; padding: 15px; font-size: 16px; margin-top: 26px; }
.fineprint { color: var(--muted); font-size: 13px; margin: 12px 0 0; text-align: center; }

/* run */
.runhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: 25px; margin: 0; }
.steps { list-style: none; margin: 22px 0 8px; padding: 16px 18px; display: grid; gap: 9px; background: #fbfbfe; border: 1px solid var(--line); border-radius: var(--radius); }
.step { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--muted); transition: color .2s; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); flex: 0 0 auto; transition: background .2s, box-shadow .2s; }
.step.active { color: var(--ink); font-weight: 600; }
.step.active .dot { background: var(--amber); box-shadow: 0 0 0 4px #fdebcb; animation: pulse 1.1s infinite; }
.step.done { color: var(--ink); }
.step.done .dot { background: var(--ok); box-shadow: 0 0 0 4px #dcf2e2; }
@keyframes pulse { 50% { opacity: .4; } }

/* streamed sections (during the run) */
.brief { margin-top: 10px; }
.section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.section:first-child { border-top: 0; }
.section h3 { font-family: var(--body); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 10px; font-weight: 700; }
.section h4, .section h5 { margin: 16px 0 6px; font-size: 16px; }
.section p { margin: 8px 0; }
.section ul, .section ol { margin: 8px 0; padding-left: 22px; }
.section li { margin: 4px 0; }
.section code { background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; font-size: 13px; }

/* landing preview + downloads */
.preview { margin-top: 26px; }
.preview-label { font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 9px; }
.preview iframe { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; align-items: center; }
.actions button { margin-top: 0; }
.btn-dl { display: inline-block; background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; padding: 12px 18px; border-radius: var(--radius-sm); box-shadow: 0 1px 2px rgba(79,70,229,.35); transition: filter .15s, box-shadow .15s; }
.btn-dl:hover { filter: brightness(1.05); box-shadow: 0 4px 14px rgba(79,70,229,.3); }
.btn-ghost { background: #fff !important; color: var(--muted) !important; border: 1px solid var(--line); font-weight: 600; box-shadow: none; }

/* guided, usable kit view */
.launch { background: linear-gradient(180deg, #f3f1ff, #eef0fe); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 22px 24px; margin: 10px 0 14px; }
.launch h2 { font-size: 20px; margin-bottom: 12px; }
.launch ol { margin: 0; padding-left: 20px; }
.launch li { margin: 8px 0; font-size: 14.5px; }
.asset { border-top: 1px solid var(--line); padding: 26px 0; }
.asset-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.asset-head h3 { font-size: 19px; margin: 0; }
.copybtn { margin: 0; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 8px; cursor: pointer; box-shadow: none; }
.copybtn:hover { background: #e6e9fe; }
.use { background: #f0f6f4; border-left: 3px solid var(--sage); padding: 11px 13px; border-radius: 8px; font-size: 13.5px; color: #2f4039; margin: 13px 0; }
.asset-body { margin-top: 6px; }
.asset-body h2, .asset-body h3 { font-size: 17px; margin: 18px 0 6px; }
.asset-body p { margin: 8px 0; }
.asset-body ul, .asset-body ol { margin: 8px 0; padding-left: 22px; }
.asset-body code { background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.muted2 { color: var(--muted); font-size: 14px; margin-top: 8px; }
.kswatches { display: flex; gap: 10px; margin: 10px 0; }
.ksw { width: 42px; height: 42px; border-radius: 9px; border: 1px solid #00000010; display: inline-block; box-shadow: var(--shadow); }

/* the "before you publish" quality-check card stands out */
.asset.asset-qc { background: #fffaf0; border: 1px solid #f6e2b8; border-top: 1px solid #f6e2b8; border-radius: var(--radius); padding: 22px 24px; margin: 16px 0; }
.asset.asset-qc .asset-head h3::before { content: "✓ "; color: var(--amber); }

.strategy { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 8px; }
.strategy summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 12px 0; font-size: 14px; list-style: none; }
.strategy summary::-webkit-details-marker { display: none; }
.asset-btns { display: flex; gap: 8px; }
.redobtn { margin: 0; background: #fff; color: var(--accent); border: 1px solid var(--accent-line); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 8px; cursor: pointer; box-shadow: none; }
.redobtn:hover { background: var(--accent-soft); }
.redo-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 13px 0; background: #fbfbfe; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px; }
.redo-steer { flex: 1; min-width: 200px; margin: 0; padding: 10px 12px; font-size: 14px; }
.redo-go { margin: 0; font-size: 13px; padding: 10px 16px; }
.redo-cancel { margin: 0; background: #fff !important; color: var(--muted) !important; border: 1px solid var(--line); font-weight: 600; font-size: 13px; padding: 10px 14px; box-shadow: none; }

/* schedule & approve */
.sched { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 22px; }
.sched .asset-head h3 { font-size: 19px; }
.sched-start { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; margin: 4px 0 14px; }
.sched-start input { width: auto; margin: 0; }
.sched-list { display: grid; gap: 8px; }
.sched-item { display: grid; grid-template-columns: auto 70px 1fr auto; align-items: center; gap: 12px; margin: 0; font-weight: 500; font-size: 14px; background: #fbfbfe; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; }
.sched-item input { width: auto; margin: 0; }
.sched-date { color: var(--muted); font-size: 13px; font-weight: 600; }
.sched-act { color: var(--ink); }
.sched-tag { justify-self: end; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
.sched-tag.auto { color: var(--accent); background: var(--accent-soft); }
.sched-tag.man { color: #8a6d1f; background: #fdf3d6; }

/* on-demand video generation */
.vidgen { margin-top: 14px; padding: 14px; background: #fbfbfe; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.vidbtn { margin: 0 8px 0 0; background: #fff; color: var(--accent); border: 1px solid var(--accent-line); font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 8px; cursor: pointer; box-shadow: none; }
.vidbtn:hover { background: var(--accent-soft); }
.vid-result { margin-top: 10px; }
.vid-result video, .vid-result img { display: block; }

.error { margin-top: 18px; color: var(--err); background: #fef2f2; border: 1px solid #fecaca; padding: 13px; border-radius: var(--radius-sm); }
.foot { max-width: 800px; margin: 0 auto; padding: 0 20px 48px; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 540px) { .card { padding: 22px; } h1 { font-size: 27px; } main { padding-top: 26px; } }
