/* Same look as Magnifica Ops, plus a dark theme (system preference, or the ◐ toggle). */
:root { --ground:#F6F5F0; --surface:#fff; --ink:#17201B; --muted:#5F6B64; --line:#E4E2DA; --soft:#F0EFE8; --track:#E6E5DD; --green:#2E7D4F; --green-light:#5FBF86; --amber:#C2680F; --amber-tint:#FDF1E3; --red:#B3261E; --red-ink:#8C1D16; --red-tint:#FBE9E7; --green-ink:#1F5C39; --green-tint:#EAF5EE; --on-green:#fff; color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ground:#0F1411; --surface:#171E1A; --ink:#E7ECE8; --muted:#97A39C; --line:#28322C; --soft:#202923; --track:#2A342E; --green:#5FBF86; --green-light:#3F8F5F; --amber:#E89A4A; --amber-tint:#33261A; --red:#F07A70; --red-ink:#F7B4AD; --red-tint:#3A1F1C; --green-ink:#A7DDBC; --green-tint:#1B2E22; --on-green:#0F1411; color-scheme: dark; }
}
:root[data-theme="dark"] { --ground:#0F1411; --surface:#171E1A; --ink:#E7ECE8; --muted:#97A39C; --line:#28322C; --soft:#202923; --track:#2A342E; --green:#5FBF86; --green-light:#3F8F5F; --amber:#E89A4A; --amber-tint:#33261A; --red:#F07A70; --red-ink:#F7B4AD; --red-tint:#3A1F1C; --green-ink:#A7DDBC; --green-tint:#1B2E22; --on-green:#0F1411; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 600 14px/1.45 Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--green); }
.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.top { display:flex; align-items:center; justify-content:space-between; gap: 10px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 3; flex-wrap: wrap; }
.brand { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; } .brand span { color: var(--green); }
.top-right { display:flex; gap: 10px; align-items:center; font-size: 13px; }
.navlink { color: var(--ink); text-decoration: none; font-weight: 700; padding: 6px 4px; } .navlink.active { color: var(--green); }
main { max-width: 1100px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--muted); } .hidden { display: none !important; }
.btn { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.btn.icon { width: 36px; padding: 0; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn.big { height: 48px; border-radius: 14px; font-size: 15px; }
.input, select.input { height: 48px; width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; font: inherit; font-weight: 700; background: var(--surface); color: var(--ink); }
select.input.small { height: 36px; width: auto; border-radius: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.appcard { position: relative; display:flex; flex-direction:column; gap: 12px; color: var(--ink); transition: transform .1s; } .appcard:hover { transform: translateY(-2px); }
/* The whole card opens the latest run; the trend cells above it open their own runs. */
.cardlink { color: inherit; text-decoration: none; } .cardlink::after { content: ''; position: absolute; inset: 0; border-radius: 18px; } .appcard .strip { position: relative; z-index: 1; }
.apphead { display:flex; align-items:center; gap: 10px; } .apphead h2 { margin:0; font-size: 17px; letter-spacing: -0.01em; flex: 1; }
.dot { width: 12px; height: 12px; border-radius: 6px; background: var(--track); flex: 0 0 auto; } .dot.up { background: var(--green); box-shadow: 0 0 0 4px var(--green-tint); } .dot.down { background: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.verdict { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; } .verdict.good { color: var(--green); } .verdict.bad { color: var(--red); }
.strip { display:flex; gap: 3px; height: 26px; align-items: stretch; } .strip a, .strip i { flex: 1; border-radius: 3px; background: var(--track); max-width: 28px; } .strip .ok { background: var(--green-light); } .strip .flaky { background: var(--amber); } .strip .fail { background: var(--red); }
.row { display:flex; align-items:center; gap: 10px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; } h2 { font-size: 18px; margin: 0; } h3 { margin: 0 0 10px; font-size: 15px; }
.section { display:flex; flex-direction:column; gap: 10px; }
.tag { display:inline-block; padding: 2px 8px; border-radius: 6px; background: var(--track); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .03em; } .tag.bad { background: var(--red-tint); color: var(--red-ink); } .tag.good { background: var(--green-tint); color: var(--green-ink); } .tag.warn { background: var(--amber-tint); color: var(--amber); }
.login { max-width: 380px; margin: 10vh auto; display:flex; flex-direction:column; gap: 12px; }
.error { color: var(--red); font-size: 13px; }
.banner { max-width: 1100px; margin: 14px auto 0; padding: 12px 16px; border-radius: 14px; background: var(--amber-tint); color: var(--ink); border: 1px solid var(--line); display:flex; gap: 10px; align-items:center; }
.banner.done { background: var(--green-tint); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--amber); border-top-color: transparent; animation: spin 1s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.runnow { display:flex; gap: 8px; align-items:center; flex-wrap: wrap; }
.runs { display:flex; flex-direction: column; } .runrow { display:grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items:center; padding: 12px 4px; border-top: 1px solid var(--soft); color: var(--ink); text-decoration: none; } .runrow:first-child { border-top: 0; } .runrow:hover { background: var(--soft); }
.runrow .sub { font-size: 12px; color: var(--muted); }
.chips { display:flex; gap: 8px; flex-wrap: wrap; } .chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration:none; font-weight: 700; font-size: 13px; } .chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.flow { display:flex; flex-direction: column; gap: 4px; }
.test { border-top: 1px solid var(--soft); } .test:first-of-type { border-top: 0; }
.test > summary { list-style: none; cursor: pointer; display:grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; } .test > summary::-webkit-details-marker { display: none; }
.test > summary .t { font-weight: 700; } .test > summary .d { font-size: 12px; color: var(--muted); }
.testbody { display:grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; padding: 4px 0 16px; }
.problem { grid-column: 1 / -1; background: var(--red-tint); border-radius: 12px; padding: 12px 14px; } .problem .h { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--red-ink); } .problem .m { font-weight: 700; word-break: break-word; margin-top: 4px; } .problem pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; margin: 8px 0 0; max-height: 280px; overflow: auto; }
.problem.warn { background: var(--amber-tint); } .problem.warn .h { color: var(--amber); }
video, .shot { width: 100%; border-radius: 12px; background: #000; display: block; }
.steps { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; font-size: 13px; }
.steps li { display:grid; grid-template-columns: 1fr auto; gap: 8px; padding: 5px 6px; border-radius: 8px; cursor: pointer; } .steps li:hover { background: var(--soft); }
.steps li.d1 { padding-left: 20px; color: var(--muted); font-weight: 600; } .steps li.bad { color: var(--red); } .steps li .s { font-size: 11px; color: var(--muted); }
.links { display:flex; gap: 14px; flex-wrap: wrap; font-size: 13px; margin-top: 10px; } .links a { font-weight: 700; }
.empty { text-align:center; padding: 32px 16px; }
@media (max-width: 700px) {
  .top { padding: 12px 16px; } main { padding: 16px; } .banner { margin: 12px 16px 0; }
  .testbody { grid-template-columns: 1fr; }
  .brand { font-size: 16px; }
}
