/* openMIX bug board (bugs/): status colours are the app's — blue input (new), orange Preview (in progress),
   green Program (fixed), grey (won't fix) */
.bugs { padding: 140px var(--m) 120px; }
.bugs-head h1 { font-size: var(--step-display); }
.bugs-head p { margin-top: 22px; max-width: 60ch; }
.bugs-head .gets { margin-top: 28px; }
.view { margin-top: 72px; }
.view > h2 { font-size: var(--step-head); margin-top: 20px; }
.back { display: inline-flex; gap: 8px; font-weight: 500; text-decoration: none; padding: 8px 0; }
.back:hover { text-decoration: underline; }
.msg { margin-top: 24px; color: var(--muted); }

.st { display: inline-block; flex: none; width: 12px; height: 12px; background: var(--accent); }
.st.progress { background: var(--pvw); }
.st.fixed { background: var(--pgm); }
.st.wontfix { background: #8b97a4; }
.stag { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }

/* ---------- the list ---------- */
.tools { display: grid; gap: 14px; }
.search input { width: 100%; max-width: 640px; font: 400 var(--step-body)/1 "Onest", sans-serif; min-height: 52px; padding: 0 14px; border: 2px solid transparent; border-radius: 0; background: #fff; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 0; background: var(--surface); color: var(--ink); font: 500 var(--step-small)/1 "Onest", sans-serif; cursor: pointer; }
.chips button:hover { background: #b2d2f4; }
.chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chips b { font-weight: 400; opacity: 0.7; }
.blist { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 6px; }
.blist .row { display: grid; grid-template-columns: 11rem 1fr; grid-template-areas: "st t" "st meta"; gap: 4px 20px; align-items: baseline; padding: 16px 20px; background: var(--surface); text-decoration: none; transition: background-color 160ms; }
.blist .row:hover { background: #b2d2f4; }
.blist .row.fixed { grid-template-areas: "st t" "st meta" "st fx"; }
.blist .stag { grid-area: st; font-size: var(--step-small); }
.blist .t { grid-area: t; font-weight: 500; overflow-wrap: anywhere; }
.blist .n, .bmeta .n { color: var(--muted); font-weight: 400; margin-right: 4px; }
.blist .meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: var(--step-small); }
.blist .ic { display: inline-flex; align-items: center; gap: 4px; }
.blist .fx { grid-area: fx; color: var(--pgm-ui); font-size: var(--step-small); font-weight: 500; }

/* ---------- one report ---------- */
.bug h1 { margin-top: 20px; font-size: var(--step-head); line-height: 1.08; max-width: 26ch; overflow-wrap: anywhere; }
.bmeta { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; color: var(--muted); font-size: var(--step-small); }
.bmeta .stag { color: var(--ink); }
.bug .text { margin-top: 32px; max-width: 72ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.note { margin-top: 28px; max-width: 72ch; padding: 18px 22px; }
.note.work { background: #ffe2bf; }
.note.wont { background: var(--stone); }
.note.fixed { background: var(--dark); color: var(--dark-ink); display: grid; gap: 10px; justify-items: start; box-shadow: inset 6px 0 0 var(--pgm); padding-left: 28px; }
.note.fixed .big { font: 800 var(--step-mid)/1.15 "Unbounded", sans-serif; letter-spacing: -0.02em; color: #fff; }
.note.fixed blockquote { margin: 0; color: #d6dde3; max-width: 64ch; }
.note.fixed .link { color: #fff; }
.shots { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.shots button { display: block; width: 100%; padding: 0; border: 0; background: var(--dark); cursor: zoom-in; }
.shots img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; }
.shots button:hover img { opacity: 0.88; }
.reply { margin-top: 40px; max-width: 72ch; background: var(--dark); color: var(--dark-ink); padding: 24px; }
.reply h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font: 500 var(--step-body)/1.3 "Onest", sans-serif; color: #fff; }
.reply .when { color: #a9b3bd; font-size: var(--step-small); }
.reply .text { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.addendum { margin-top: 32px; max-width: 72ch; border-left: 3px solid var(--line, #c9ced3); padding-left: 18px; }
.addendum h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font: 500 var(--step-body)/1.3 "Onest", sans-serif; }
.addendum .when { color: var(--muted, #6b7580); font-size: var(--step-small); }
.addendum .text { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.addmore { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.addmore .hint { color: var(--muted, #6b7580); font-size: var(--step-small); }

/* the viewer */
.shot { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 56px 64px 48px; border: 0; background: rgb(20 23 28 / 0.96); color: #fff; }
.shot[open] { display: grid; place-items: center; }
.shot::backdrop { background: rgb(20 23 28 / 0.6); }
.shot img { max-width: 100%; max-height: calc(100svh - 120px); width: auto; height: auto; object-fit: contain; cursor: zoom-out; }
.shot .x, .shot .nav { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.shot .x { top: 6px; right: 8px; }
.shot .nav { top: calc(50% - 24px); }
.shot .prev { left: 8px; } .shot .next { right: 8px; }
.shot .x:hover, .shot .nav:hover { background: rgb(255 255 255 / 0.12); }
.shot .orig { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: var(--step-small); color: #cfd6dc; }

/* ---------- the form ---------- */
.bform { max-width: 820px; grid-template-columns: 1fr 1fr; margin-top: 32px; }
.bform .wide, .adm .form .wide { grid-column: 1 / -1; }
.bform textarea, .bform select, .adm textarea, .adm select { font: 400 var(--step-body)/1.45 "Onest", sans-serif; padding: 12px 14px; border: 2px solid transparent; border-radius: 0; background: #fff; color: var(--ink); resize: vertical; min-height: 52px; }
.bform textarea:focus, .bform select:focus, .adm textarea:focus, .adm select:focus { outline: none; border-color: var(--accent); }
.bform input[name="key"] { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.bform .hint a { color: inherit; }
.bform .hint.ok { color: var(--pgm-ui); font-weight: 500; }
.bform .hint.bad { color: #b3261e; font-weight: 500; }
.bform .check { display: flex; align-items: center; gap: 10px; font-size: var(--step-small); font-weight: 400; }
.bform .check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.drop { padding: 18px; border: 2px dashed #8fb3d9; background: rgb(255 255 255 / 0.45); transition: border-color 160ms, background-color 160ms; }
.drop.over { border-color: var(--accent); background: rgb(255 255 255 / 0.85); }
.drop-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.drop-row .btn { min-height: 48px; }
.drop-row p { font-size: var(--step-small); color: var(--muted); max-width: 44ch; }
.drop kbd { font: 500 0.95em/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; padding: 2px 5px; background: #fff; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumbs:not(:empty) { margin-top: 16px; }
.thumbs li { position: relative; aspect-ratio: 4 / 3; background: var(--dark); overflow: hidden; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs li.busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.18), transparent); animation: shimmer 1.1s linear infinite; }
.thumbs .prog { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--accent); transition: width 120ms linear; }
.thumbs li.done .prog { width: 100% !important; background: var(--pgm); }
.thumbs .x { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; background: rgb(28 32 38 / 0.8); color: #fff; cursor: pointer; }
.thumbs .x:hover { background: #b3261e; }
.bform.sending .thumbs .x { visibility: hidden; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sent { margin-top: 32px; max-width: 820px; background: var(--dark); color: var(--dark-ink); padding: 28px; }
.sent h3 { font: 800 var(--step-mid)/1.15 "Unbounded", sans-serif; color: #fff; letter-spacing: -0.02em; }
.sent p { margin-top: 12px; max-width: 60ch; }
.sent .gets { margin-top: 22px; }
.sent .btn.ghost { color: #fff; }

/* ---------- admin ---------- */
.adm { margin-top: 48px; padding-top: 24px; border-top: 2px solid var(--ink); max-width: 820px; }
.adm h2 { font-size: var(--step-mid); }
.adm dl { margin: 16px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: var(--step-small); }
.adm dt { color: var(--muted); } .adm dd { margin: 0; overflow-wrap: anywhere; }
.adm .form { max-width: none; }
.adm .form label { min-width: 0; }
.adm select, .adm textarea { width: 100%; min-width: 0; }
.adm .imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.adm .imgs .btn, .adm .go .btn { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }

@media (max-width: 900px) {
  .bugs { padding-top: 112px; }
  .view { margin-top: 48px; }
  .bugs-head .gets .btn, .sent .gets .btn { width: 100%; }
  .blist .row, .blist .row.fixed { grid-template-columns: 1fr; grid-template-areas: "st" "t" "meta" "fx"; padding: 14px 16px; }
  .bform { grid-template-columns: 1fr; }
  .bform .btn[type=submit] { width: 100%; }
  .shot { padding: 56px 8px 48px; }
  .shot .nav { top: auto; bottom: 4px; }
  .adm dl { grid-template-columns: 1fr; gap: 2px; }
  .adm dd + dt { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .thumbs li.busy::after { animation: none; }
  .blist .row, .drop, .thumbs .prog { transition: none; }
}
