:root {
  --bg: #000;
  --panel: #0e0e0e;
  --panel2: #171717;
  --line: #2a2a2a;
  --text: #f4f4f1;
  --dim: #9a9a94;
  --yellow: #fcd902;
  --green: #5fd38d;
  --red: #ff7a6b;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.dim { color: var(--dim); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 16px 120px; flex: 1; }
h1, h2 { font-stretch: 120%; font-weight: 800; text-transform: uppercase; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 6vw, 44px); }
h2 { font-size: 18px; margin-top: 40px; margin-bottom: 12px; }
p { margin: 0 0 12px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.brand img { display: block; height: 34px; width: auto; }
.who { color: var(--dim); text-align: right; }
.foot { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--dim); text-align: center; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--dim); margin-bottom: 14px; }
.crumbs a { text-decoration: none; color: var(--dim); }
.crumbs a:hover { color: var(--yellow); }
.kicker { color: var(--yellow); margin-bottom: 8px; }
.sub { color: var(--dim); max-width: 60ch; margin-top: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  background: var(--yellow); color: #000; border: 1px solid var(--yellow); border-radius: var(--radius);
  font: 800 14px/1 Archivo, sans-serif; font-stretch: 115%; text-transform: uppercase; letter-spacing: 0.03em;
  text-decoration: none; cursor: pointer;
}
.btn.line { background: transparent; color: var(--text); border-color: #555; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:focus-visible, a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; color: var(--dim); font: inherit; text-decoration: underline; cursor: pointer; }

.chip { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; white-space: nowrap; }
.chip.review { color: #000; background: var(--yellow); border-color: var(--yellow); }
.chip.changes { color: var(--red); border-color: var(--red); }
.chip.ok { color: var(--green); border-color: var(--green); }

/* lists */
.list { display: grid; gap: 10px; margin-top: 20px; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
}
.row:hover { border-color: var(--yellow); }
.row .t { font-weight: 800; font-stretch: 115%; text-transform: uppercase; font-size: 17px; }
.row .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.group { margin-top: 28px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card:hover { border-color: var(--yellow); }
.card .ph { aspect-ratio: 9 / 16; background: var(--panel2) center / cover no-repeat; }
.card .meta { padding: 10px; display: grid; gap: 6px; }
.card .t { font-weight: 800; font-size: 14px; text-transform: uppercase; overflow-wrap: anywhere; }

/* review */
.review { display: grid; gap: 20px; }
@media (min-width: 860px) {
  .review { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; }
  .review.wide { grid-template-columns: 1fr; }
  .stage { position: sticky; top: 16px; }
  .stage video { max-height: 72dvh; }
}
.stage video { display: block; width: 100%; max-height: 56dvh; background: #000; border: 1px solid var(--line); border-radius: var(--radius); }
.strip { position: relative; height: 26px; margin-top: 8px; background: var(--panel2); border-radius: var(--radius); cursor: pointer; touch-action: none; }
.strip .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: #3a3a3a; border-radius: var(--radius); pointer-events: none; }
.strip .dot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--yellow); border: 2px solid #000; padding: 0; cursor: pointer; }
.strip .dot.done { background: var(--green); }
.strip .dot.bim { background: #fff; }
.vers { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; align-items: center; }
.vers button { min-height: 36px; padding: 0 12px; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
.vers button[aria-pressed="true"] { background: var(--text); color: #000; border-color: var(--text); }

.addnote { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
textarea, input[type="text"], input[type="password"] {
  width: 100%; background: #000; color: var(--text); border: 1px solid #444; border-radius: var(--radius);
  padding: 12px; font: 16px/1.4 Archivo, sans-serif; resize: vertical;
}
.addnote .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tchip { color: var(--yellow); }

.notes { display: grid; gap: 8px; margin-top: 14px; }
.note { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--yellow); border-radius: var(--radius); padding: 12px; }
.note.bim { border-left-color: #fff; }
.note.done { border-left-color: var(--green); opacity: 0.7; }
.note .head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--dim); margin-bottom: 6px; }
.note .time { color: var(--yellow); background: none; border: 0; padding: 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-decoration: underline; }
.note .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.note .acts { display: flex; gap: 14px; margin-top: 8px; }
.note .reply { margin: 10px 0 0 14px; padding-left: 12px; border-left: 1px solid var(--line); }
.empty { color: var(--dim); padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); }

.decide {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.92); border-top: 1px solid var(--line);
}
.decide .btn { flex: 1 1 160px; max-width: 320px; }
.banner { padding: 12px 14px; border: 1px solid var(--green); color: var(--green); border-radius: var(--radius); margin-bottom: 14px; }
.banner.warn { border-color: var(--red); color: var(--red); }
.banner.info { border-color: var(--line); color: var(--dim); }

/* uploads */
.files { display: grid; gap: 6px; margin-top: 12px; }
.file { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.file .n { overflow-wrap: anywhere; }
.prog { height: 4px; background: var(--panel2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--yellow); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.seg button { min-height: 36px; padding: 0 14px; background: transparent; color: var(--dim); border: 0; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--text); color: #000; }

dialog { background: var(--panel); color: var(--text); border: 1px solid #444; border-radius: var(--radius); padding: 20px; width: min(92vw, 440px); }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog h2 { margin-top: 0; }
dialog .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
dialog .acts .btn { flex: 1 1 140px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--text); color: #000; padding: 10px 14px; border-radius: var(--radius); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 10; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
