:root {
  --black: #000000;
  --ink: #ededea;
  --muted: #8e8e93;
  --fill: rgba(255, 255, 255, 0.055);
  --edge: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.08);
  --review: #e9d9a6;
  --stuck: #e8a3a0;
  --good: #a9d4bc;
  --running: #cfe0f5;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--black); }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font: 400 16px/1.5 "Segoe UI Variable Text", "SF Pro Text", Roboto, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* two dim light pools so the glass has something to bend */
.pools { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.pools i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.22; }
.pools i:first-child { width: 60vmax; height: 60vmax; left: -20vmax; top: -25vmax; background: #3b3f47; }
.pools i:last-child { width: 50vmax; height: 50vmax; right: -18vmax; bottom: -20vmax; background: #2a2c31; }

main { max-width: 720px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 18px 48px; }

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  border-top-color: var(--edge);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}

.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
h1 { font: 600 22px/1.2 "Segoe UI Variable Display", "SF Pro Display", Roboto, system-ui, sans-serif; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 600; margin: 32px 0 10px; }
h3 { font-size: 15px; font-weight: 600; margin: 20px 0 6px; }
.muted { color: var(--muted); margin: 0; font-size: 14px; }
.count { color: var(--review); font-weight: 600; }

/* the one loud thing: what the worker is doing right now */
.now { position: relative; overflow: hidden; border-radius: 28px; padding: 26px 24px 24px; min-height: 150px; }
.now .label { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.now .title { font: 600 clamp(24px, 6vw, 34px)/1.15 "Segoe UI Variable Display", "SF Pro Display", Roboto, system-ui, sans-serif; letter-spacing: -0.015em; margin: 0 0 12px; max-width: 22ch; }
.now .step { margin: 0; font-size: 15px; }
.now.live::after {
  content: ""; position: absolute; inset: -40% -60%; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(207,224,245,0.10) 50%, transparent 58%);
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { from { transform: translateX(-35%); } to { transform: translateX(35%); } }

.list { padding: 4px 0; }
.row {
  display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 12px; align-items: center;
  width: 100%; padding: 14px 18px; background: none; border: 0; color: inherit; font: inherit; text-align: left;
  cursor: pointer; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row:hover { background: rgba(255,255,255,0.03); }
.row .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { grid-column: 2 / 4; color: var(--muted); font-size: 14px; }
.row .when { color: var(--muted); font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.review { background: var(--review); box-shadow: 0 0 10px rgba(233,217,166,0.55); }
.dot.stuck { background: var(--stuck); }
.dot.good, .dot.done { background: var(--good); }
.dot.running { background: var(--running); }
.dot.ai-review { background: var(--running); opacity: 0.6; }
.dot.reviewed { background: var(--good); opacity: 0.5; }
.dot.fix { background: var(--review); opacity: 0.5; }
.empty { padding: 16px 18px; color: var(--muted); margin: 0; }

.usage { padding: 14px 18px; display: grid; gap: 14px; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.bar { grid-column: 1 / 3; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.bar i.high { background: var(--stuck); }

.sheet {
  width: min(720px, 100vw); max-height: 92dvh; margin: auto auto 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  color: var(--ink); border-radius: 24px 24px 0 0; background-color: rgba(18,18,20,0.88);
}
.sheet::backdrop { background: rgba(0,0,0,0.6); }
@media (min-width: 760px) { .sheet { margin: auto; border-radius: 24px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.sheet-head h2 { margin: 2px 0 6px; font-size: 20px; }
.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 14px 0; }
.images img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.check { margin: 10px 0 0; font-size: 15px; }
.check.ok::before { content: "Passed"; color: var(--good); font-weight: 600; margin-right: 8px; }
.check.no::before { content: "Failed"; color: var(--stuck); font-weight: 600; margin-right: 8px; }
.report {
  white-space: pre-wrap; word-break: break-word; margin: 0; font-family: inherit; font-size: 14px; line-height: 1.55;
  max-height: 40vh; overflow: auto; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.04);
}
details { margin-top: 18px; }
summary { cursor: pointer; color: var(--muted); }

.decide { margin-top: 20px; }
.decide label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
textarea, input, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--edge);
  background: rgba(255,255,255,0.05); color: var(--ink); font: inherit;
}
.buttons { display: flex; gap: 10px; margin: 12px 0 8px; }
.btn {
  flex: 1; padding: 13px; border-radius: 14px; border: 1px solid var(--edge); background: rgba(255,255,255,0.07);
  color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
}
.btn.good { background: rgba(169,212,188,0.16); border-color: rgba(169,212,188,0.4); }
.btn.quiet { color: var(--muted); }
.newjob { padding: 16px 18px; display: grid; gap: 8px; }
.newjob label { font-size: 14px; color: var(--muted); }
.newjob .btn { margin-top: 6px; }
.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 0; }
.signout { margin-top: 36px; }

:focus-visible { outline: 2px solid var(--running); outline-offset: 2px; }

.login { display: grid; place-items: center; padding: 20px; }
.login form { width: min(360px, 100%); padding: 28px 24px; display: grid; gap: 16px; }
.login h1 { margin: 0; }
.login label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.login button { padding: 13px; border-radius: 14px; border: 1px solid var(--edge); background: rgba(255,255,255,0.1); color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; }
.err { color: var(--stuck); margin: 0; }

@media (prefers-reduced-motion: reduce) { .now.live::after { animation: none; } }
