/* Allgood · Daylight theme */
:root {
  --bg: #f7f6f2; --card: #ffffff; --ink: #14161a; --muted: #5f6470; --dim: #9096a3; --line: #e9e7e1;
  --accent: #4f46e5; --accent-soft: #eef0ff;
  --ok: #059669; --ok-soft: #e6f7f0; --bad: #dc2626; --bad-soft: #fdeceb; --warn: #b45309; --warn-soft: #fdf3e1;
  --shadow: 0 1px 2px rgba(20,22,26,.04), 0 12px 40px rgba(20,22,26,.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* header */
header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 18px Manrope, Inter, sans-serif; letter-spacing: -.02em; }
.brand small { display: none; }
.dot { width: 26px; height: 26px; border-radius: 9px; background: var(--accent); position: relative; flex: none; }
.dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 3px solid #fff; border-right-color: transparent; transform: rotate(-40deg); }
header nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
header nav a { padding: 8px 13px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; }
header nav a:hover { background: var(--bg); color: var(--ink); }
header nav a.cta { background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 999px; }
header nav a.cta:hover { background: #2a2d33; }

/* hero */
.hero { padding: 64px 0 10px; text-align: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
h1 { font: 800 54px/1.05 Manrope, Inter, sans-serif; letter-spacing: -.03em; margin: 22px 0 14px; }
h1 em { font-style: normal; color: var(--accent); }
.lede { color: var(--muted); font-size: 18px; max-width: 580px; margin: 0 auto; }
.trust { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin: 28px 0 0; color: var(--dim); font-size: 13.5px; }
.trust b { color: var(--ink); margin-right: 5px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }

/* form */
form.run { padding: 22px; display: grid; gap: 14px; max-width: 820px; margin: 36px auto 0; text-align: left; }
label { font-size: 13px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 8px; }
input, textarea {
  width: 100%; background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink);
  padding: 14px 16px; font: inherit; resize: vertical; transition: border-color .12s, box-shadow .12s; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
textarea { min-height: 96px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > div { flex: 1; min-width: 180px; }
button.primary { background: var(--accent); color: #fff; border: 0; padding: 15px 24px; border-radius: 14px;
  font: 700 15px Manrope, Inter, sans-serif; cursor: pointer; box-shadow: 0 8px 24px rgba(79,70,229,.28); transition: transform .08s, box-shadow .12s; }
button.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(79,70,229,.34); }
button.primary:disabled { opacity: .55; cursor: default; transform: none; }
.hint { color: var(--dim); font-size: 13px; }
.examples { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }

/* sections */
.section-title { display: flex; align-items: center; gap: 12px; margin: 52px 0 16px; }
.section-title h2 { font: 800 22px Manrope, Inter, sans-serif; margin: 0; letter-spacing: -.02em; }
.section-title .filters { margin-left: auto; display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.filters a { font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 500; }
.filters a.on { background: var(--ink); color: #fff; }

/* run tiles */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tile { overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,22,26,.05), 0 18px 48px rgba(20,22,26,.12); }
.thumb { aspect-ratio: 16/10; background: #0f1115 center/cover no-repeat; position: relative; display: block; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-size: 14px; }
.thumb .play::before { content: ""; position: absolute; width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.thumb .play:empty::before { display: none; }
.thumb .play { z-index: 0; } .thumb .play::before { z-index: -1; }
.thumb.empty { background: linear-gradient(135deg, #e0e7ff, #fce7f3); }
.tile .meta { padding: 14px 16px 16px; }
.tile .meta .goal { font-weight: 600; font-size: 14.5px; line-height: 1.4; max-height: 4.2em; overflow: hidden; }
.tile .meta .url { color: var(--dim); font-size: 12.5px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta .foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tile .meta .foot .when { color: var(--dim); font-size: 12.5px; margin-left: auto; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.b-pass { background: var(--ok-soft); color: var(--ok); }
.b-fail { background: var(--bad-soft); color: var(--bad); }
.b-partial { background: var(--warn-soft); color: var(--warn); }
.b-bug { background: var(--bad-soft); color: var(--bad); }
.b-run { background: var(--accent-soft); color: var(--accent); }

/* run detail */
.detail { padding-top: 26px; }
.detail video { width: 100%; border-radius: 18px; background: #000; display: block; box-shadow: var(--shadow); }
.detail .head { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 18px; }
.detail .head .goal { font: 800 26px/1.15 Manrope, Inter, sans-serif; letter-spacing: -.02em; }
.detail .head .url { color: var(--dim); font-size: 14px; margin-top: 6px; word-break: break-all; }
.verdict { padding: 18px 20px; display: grid; gap: 6px; margin: 18px 0; }
.verdict .summary { font-size: 17px; font-weight: 600; }
.verdict .details { color: var(--muted); }
.steps { padding: 6px 4px; box-shadow: var(--shadow); }
.steps li { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.steps li:last-child { border-bottom: 0; }
.steps .k { font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; min-width: 56px; }
.steps .typed { color: var(--accent); font-weight: 600; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.running-note { padding: 18px; display: flex; gap: 12px; align-items: center; color: var(--muted); }

pre { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; overflow: auto;
  font: 12.5px/1.55 ui-monospace, Menlo, monospace; color: var(--ink); box-shadow: var(--shadow); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.muted { color: var(--muted); }
.empty-state { text-align: center; color: var(--dim); padding: 50px 0; }
footer { color: var(--dim); font-size: 13px; text-align: center; padding: 44px 0 34px; }

@media (max-width: 760px) {
  h1 { font-size: 38px; }
  .two { grid-template-columns: 1fr; }
  .detail .head .goal { font-size: 21px; }
  header nav a#apilink { display: none; }
  header nav a { padding: 8px 10px; }
  .brand small { display: none; }
}

/* explore-first home */
.linkish { color: var(--muted); font-weight: 500; cursor: pointer; padding: 10px 6px; }
.linkish:hover { color: var(--accent); }
.custom { display: grid; gap: 12px; padding-top: 6px; border-top: 1px dashed var(--line); }
.scout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; padding: 16px; margin: 18px auto 0; max-width: 820px; text-align: left; }
.scout-shot { position: relative; aspect-ratio: 1120/780; background: #0f1115; border-radius: 14px; overflow: hidden; }
.scout-shot img.live { width: 100%; height: 100%; object-fit: cover; display: block; }
.scout-shot img.live:not([src]) { display: none; }
.scout-frame { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; pointer-events: none; }
.scout-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.scout-status { font-weight: 600; font-size: 14px; }
.bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #8b5cf6); border-radius: 999px; transition: width .8s linear; }
.scout-log { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; color: var(--muted); max-height: 200px; overflow: auto; }
.scout-log li { padding: 5px 0 5px 18px; position: relative; border-top: 1px solid var(--line); animation: fadein .3s ease; }
.scout-log li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.scout-log li:first-child { border-top: 0; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.suggestions { display: grid; gap: 10px; text-align: left; max-width: 820px; margin: 0 auto; }
.suggestion { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow); transition: border-color .12s; }
.suggestion:hover { border-color: var(--accent); }
.suggestion:has(input:checked) { border-color: var(--accent); background: #fbfbff; }
.suggestion input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); }
.s-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s-head b { font-size: 15px; }
.s-text { color: var(--ink); font-size: 14px; margin-top: 4px; }
.s-url { color: var(--dim); font-size: 12px; margin-top: 4px; }
.b-cat { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) { .scout { grid-template-columns: 1fr; } }

.custom[hidden] { display: none; }

/* schedules */
.sched { padding: 18px; display: grid; gap: 14px; }
.sched-row { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sched-row > div:first-child { flex: 1; min-width: 0; }
.sched-actions { display: flex; gap: 6px; flex: none; }
.sched-form { display: grid; gap: 12px; }
select { width: 100%; background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; font: inherit; color: var(--ink); }

.blocked { padding: 18px 20px; margin: 16px auto 0; max-width: 820px; text-align: left; border-color: #f3c8c8; }
.blocked b { color: var(--bad); }
.blocked code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; }

.allow { display: flex; gap: 22px; flex-wrap: wrap; margin: 10px 0 12px; }
.allow .k { display: block; font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.allow code { font-size: 15px; font-weight: 600; }
