:root {
  --bg: #0f1115;
  --panel: #171a21;
  --line: #262b35;
  --text: #e6e9ef;
  --muted: #8a93a6;
  --accent: #4aa3ff;
  --ok: #30a46c;
  --warn: #d9a441;
  --err: #e5484d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
header {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--line);
}
h1 { font-size: 1.1rem; margin: 0; letter-spacing: .02em; }
h2 { font-size: 1rem; margin: 0; }
h3 { font-size: .85rem; margin: 0 0 .5rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
main { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
.limits { margin-left: auto; color: var(--muted); font-size: .85rem; }
.row { display: flex; gap: .75rem; align-items: center; margin: .75rem 0; flex-wrap: wrap; }
.spacer { flex: 1; }
.hint { color: var(--muted); font-size: .85rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin: 1rem 0; }
button {
  background: var(--accent); color: #04121f; border: 0; border-radius: 7px;
  padding: .5rem .9rem; font-weight: 600; cursor: pointer; font-size: .9rem;
}
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: .45; cursor: not-allowed; }
label { display: block; margin: .6rem 0; color: var(--muted); font-size: .85rem; }
label.check, label.inline { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
input, textarea, select {
  width: 100%; margin-top: .25rem; background: #0c0e13; color: var(--text);
  border: 1px solid var(--line); border-radius: 7px; padding: .5rem .6rem; font: inherit;
}
input[type=checkbox] { width: auto; margin: 0; }
input[type=range] { padding: 0; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 1rem; }
.projects { display: grid; gap: .75rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: .9rem 1rem; cursor: pointer; display: flex; gap: 1rem; align-items: center;
}
.card:hover { border-color: var(--accent); }
.card .meta { color: var(--muted); font-size: .85rem; margin-left: auto; text-align: right; }
.badge { font-size: .75rem; padding: .15rem .5rem; border-radius: 99px; background: var(--line); color: var(--muted); }
.progress { height: 8px; background: #0c0e13; border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
#progress-bar { height: 100%; width: 0; background: var(--ok); transition: width .3s; }
#frame-image { width: 100%; border-radius: 8px; background: #0c0e13; margin-top: .5rem; display: none; }
.strip { display: flex; gap: 2px; margin-top: .75rem; height: 26px; overflow: hidden; border-radius: 4px; }
.strip span { flex: 1 1 0; min-width: 1px; background: var(--line); }
.strip span.done { background: var(--ok); }
.strip span.failed { background: var(--err); }
.strip span.running { background: var(--warn); }
.events { list-style: none; margin: 0; padding: 0; font-size: .82rem; max-height: 220px; overflow: auto; }
.events li { padding: .25rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.events li.error { color: var(--err); }
.events li.warn { color: var(--warn); }
.error { background: #2a1416; border: 1px solid var(--err); color: #ffb4b6; padding: .6rem .8rem; border-radius: 8px; }
.estimate { color: var(--muted); font-size: .85rem; padding: .5rem 0; }
#timeline-summary { font-size: .88rem; }
#timeline-summary .year { padding: .35rem 0; border-bottom: 1px solid var(--line); }
#timeline-summary .year b { color: var(--accent); font-weight: 600; }
video { width: 100%; margin-top: .75rem; border-radius: 8px; }
details summary { cursor: pointer; color: var(--muted); font-size: .85rem; margin: .5rem 0; }

.login { max-width: 380px; margin: 3rem auto; }
.login .error { margin-top: .6rem; }
header button { margin-left: .75rem; }

.pair { display: flex; gap: .4rem; margin-top: .25rem; }
.pair input { flex: 1; margin-top: 0; }
.pair select { width: auto; margin-top: 0; }

a.button { text-decoration: none; display: inline-block; line-height: 1.2; }
