/* Nod — edit-bay UI. Neutral greys (safe for judging color), one signal yellow. */
:root {
  --bg: #19191a;
  --panel: #202021;
  --raised: #29292b;
  --hover: #2e2e30;
  --line: #313133;
  --line-2: #3d3d40;
  --text: #e8e6e3;
  --text-2: #b0aeaa;
  --muted: #7d7b78;
  --signal: #f2c230;
  --green: #74c27a;
  --red: #e5645a;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--signal); color: #000; }

svg.i { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.mono { font-family: var(--mono); }
.label {
  font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.muted { color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar {
  height: 52px; display: flex; align-items: center; gap: 20px; padding: 0 24px;
  border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20;
}
.topbar .spacer { flex: 1; }
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { height: 22px; width: auto; display: block; }
.crumb { color: var(--muted); font-size: 13px; }
.crumb:hover { color: var(--text); }

.container { max-width: 1120px; margin: 0 auto; padding: 36px 24px 96px; }

h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 0; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 4px;
  border: 1px solid var(--line-2); background: var(--raised); color: var(--text);
  font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .1s, border-color .1s;
}
.btn:hover { background: var(--hover); border-color: #4a4a4e; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--text); border-color: var(--text); color: #151515; }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-approve { background: var(--green); border-color: var(--green); color: #0e1a0f; font-weight: 600; }
.btn-approve:hover { background: #86d08c; border-color: #86d08c; }
.btn-text { background: none; border-color: transparent; color: var(--text-2); padding: 0 8px; }
.btn-text:hover { background: var(--raised); border-color: transparent; color: var(--text); }
.btn-icon { width: 32px; padding: 0; }
.btn-lg { height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- Fields ---------- */
.field { margin-top: 16px; }
.field > .label { display: block; margin-bottom: 8px; }
.input {
  width: 100%; height: 36px; padding: 0 10px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--line-2); outline: none;
}
textarea.input { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--text-2); }
.input::placeholder { color: var(--muted); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; cursor: pointer; font-size: 13px; }
.check input {
  appearance: none; width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg); display: grid; place-items: center;
}
.check input:checked { background: var(--text); border-color: var(--text); }
.check input:checked::after { content: ''; width: 8px; height: 4px; border: 2px solid #151515; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Status text (no pills) ---------- */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; color: var(--text-2); }
.status::before { content: ''; width: 7px; height: 7px; background: var(--muted); flex-shrink: 0; }
.status.review::before { background: var(--signal); }
.status.approved { color: var(--green); }
.status.approved::before { background: var(--green); }
.status.busy::before { background: var(--text-2); animation: blink 1s steps(2) infinite; }
.status.bad { color: var(--red); }
.status.bad::before { background: var(--red); }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- Progress ---------- */
.bar { height: 2px; background: var(--line-2); overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--text); transition: width .2s; }
.bar.done > div { background: var(--green); }

/* ---------- Thumbs ---------- */
.thumb {
  aspect-ratio: 16 / 9; background: #0f0f10 center / contain no-repeat; border-radius: 2px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--muted); font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; padding: 16px; display: none; place-items: center; background: rgba(8, 8, 8, 0.72); }
.modal-bg.open { display: grid; }
.modal {
  width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }

/* ---------- Menu ---------- */
.menu {
  position: fixed; z-index: 60; min-width: 180px; padding: 4px; display: none;
  background: var(--raised); border: 1px solid var(--line-2); border-radius: 5px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.menu.open { display: block; }
.menu button { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 3px; background: none; text-align: left; font-size: 13px; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--red); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 20px; left: 50%; z-index: 100; transform: translate(-50%, 8px);
  padding: 8px 14px; border-radius: 4px; background: var(--text); color: #151515; font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity .15s, transform .15s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  /* 16px text stops iPhones zooming in when a box is tapped */
  .input, textarea.input, select.input { font-size: 16px; }
  .topbar { padding: 0 16px; }
  .container { padding: 24px 16px 72px; }
  .row { grid-template-columns: 1fr; }
}
