@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&family=Urbanist:wght@500;600;700&display=swap");
/* Look follows withpronto.com: green #05ac5f / #048a4c, Lexend body + Urbanist accents, cool surfaces, large radii. */
:root {
  --green: #05ac5f; --green-ink: #048a4c; --green-tint: #e7f7ef;
  --bg: #f4f7f9; --surface: #ffffff; --surface-2: #f9fafc; --surface-3: #eef2f6;
  --border: #dde5ed; --ink: #0c0c0c; --ink-2: #262626; --muted: #666666; --muted-2: #9ca3af;
  --danger: #b91c1c; --danger-tint: #fef2f2; --warn: #b45309; --warn-tint: #fff7e6; --info: #1d4ed8; --info-tint: #eef4ff;
  --shadow: 0 2px 4px -1px #1118270a, 0 4px 8px -2px #11182714;
  --r-sm: .375rem; --r-md: .75rem; --r-lg: 1rem; --r-xl: 1.25rem;
  --font: "Lexend", ui-sans-serif, system-ui, sans-serif; --font-accent: "Urbanist", "Lexend", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  /* lanes / plots */
  --c-yes: #05ac5f; --c-no: #dc2626; --c-unrev: #9aa5b1; --c-unc: #f59e0b; --c-dead: #ef4444; --c-work: #05ac5f;
  --c-task1: #5b6b8c; --c-task2: #74849f; --c-sub1: #2f7fd8; --c-sub2: #2563b0; --c-idle: #8a929c; --c-trans: #d9a33a;
  --c-x: #e4572e; --c-y: #29a36a; --c-z: #2f6fd8; --c-m: #7c3aed; --playhead: #e11d48; --plot-bg: #ffffff; --grid: #e7edf3;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1113; --surface: #161a1d; --surface-2: #1b2024; --surface-3: #232a30; --border: #2c343b;
    --ink: #f2f4f5; --ink-2: #dfe3e6; --muted: #a2abb3; --muted-2: #6b747c; --green-tint: #0f2a1d;
    --danger: #f87171; --danger-tint: #2a1414; --warn: #fbbf24; --warn-tint: #2a2210; --info: #93b4ff; --info-tint: #141d2e;
    --shadow: 0 2px 6px #00000055; --plot-bg: #12161a; --grid: #232a30; --c-unrev: #5f6a75; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1113; --surface: #161a1d; --surface-2: #1b2024; --surface-3: #232a30; --border: #2c343b;
  --ink: #f2f4f5; --ink-2: #dfe3e6; --muted: #a2abb3; --muted-2: #6b747c; --green-tint: #0f2a1d;
  --danger: #f87171; --danger-tint: #2a1414; --warn: #fbbf24; --warn-tint: #2a2210; --info: #93b4ff; --info-tint: #141d2e;
  --shadow: 0 2px 6px #00000055; --plot-bg: #12161a; --grid: #232a30; --c-unrev: #5f6a75; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); }
a { color: var(--green-ink); text-decoration: none; } a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12px; } .num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; }
h1, h2, h3 { font-family: var(--font-accent); margin: 0; letter-spacing: -.01em; }
button, select, input, textarea { font: inherit; color: var(--ink); }
button { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 7px 14px; cursor: pointer; white-space: nowrap; font-weight: 500; }
button:hover { border-color: var(--green); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover { background: var(--green-ink); }
button.ghost { background: transparent; }
button.on { background: var(--green-tint); border-color: var(--green); color: var(--green-ink); }
button.sm { padding: 4px 10px; font-size: 12px; border-radius: var(--r-sm); }
input, select, textarea { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 7px 10px; }
textarea { width: 100%; resize: vertical; }
header.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-accent); font-weight: 700; font-size: 18px; color: var(--ink); }
.brand .dot { width: 22px; height: 22px; border-radius: 7px; background: var(--green); display: inline-block; position: relative; }
.brand .dot::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 16px 18px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid transparent; white-space: nowrap; }
.pill.ok { background: var(--green-tint); color: var(--green-ink); } .pill.bad { background: var(--danger-tint); color: var(--danger); }
.pill.warn { background: var(--warn-tint); color: var(--warn); } .pill.info { background: var(--info-tint); color: var(--info); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px;
  border-radius: var(--r-md); z-index: 100; max-width: 90vw; box-shadow: var(--shadow); }
#toast.bad { background: var(--danger); color: #fff; }
/* login */
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
#login .card { width: 100%; max-width: 400px; padding: 28px; }
#login h1 { font-size: 26px; margin: 10px 0 4px; }
#login label { display: block; margin: 14px 0 4px; font-weight: 500; }
#login input { width: 100%; font-size: 16px; }
#login .code { letter-spacing: 8px; font-size: 24px; text-align: center; font-variant-numeric: tabular-nums; }
#login button { width: 100%; margin-top: 14px; padding: 10px; }
.err { color: var(--danger); min-height: 1.3em; margin-top: 8px; }
.msg { color: var(--green-ink); min-height: 1.3em; margin-top: 8px; }
/* tables */
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; }
table.grid th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  padding: 9px 10px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; white-space: nowrap; }
table.grid th.sorted { color: var(--green-ink); }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.grid tbody tr { cursor: pointer; } table.grid tbody tr:hover td { background: var(--surface-2); }
.bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--green); }
kbd { font: 11px var(--mono); background: var(--surface-3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
#modal { position: fixed; inset: 0; background: #0008; display: flex; align-items: center; justify-content: center; z-index: 90; padding: 16px; }
#modal .card { max-width: 640px; width: 100%; max-height: 85vh; overflow: auto; }
@media (max-width: 700px) { header.top { padding: 8px 12px; flex-wrap: wrap; } }
