/* TorpasBuilder. Colour-blind safe: blue #0072B2 / orange #E69F00 + white/grey, always icon + word. */
:root {
  --bg: #0d0f14; --card: #171a22; --line: #2a2f3b; --text: #f2f4f8; --dim: #a3abbb;
  --blue: #3d9be0; --blue-solid: #0072B2; --orange: #E69F00;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { padding: env(safe-area-inset-top) 0 calc(80px + env(safe-area-inset-bottom)); }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
header.top { display: flex; align-items: center; gap: 10px; padding: 18px 16px 4px; max-width: 760px; margin: 0 auto; }
header.top h1 { font-size: 22px; margin: 0; letter-spacing: .3px; }
header.top .logo { font-size: 26px; }
header.top .who { margin-left: auto; color: var(--dim); font-size: 14px; }
h2 { font-size: 19px; margin: 18px 0 8px; }
p.lead { color: var(--dim); margin: 0 0 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; }
.card h3 { margin: 0 0 6px; font-size: 17px; overflow-wrap: anywhere; }
.card .pitch { white-space: pre-wrap; overflow-wrap: anywhere; color: #dfe3ea; }
.meta { color: var(--dim); font-size: 13px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.badge.queued { border: 2px dashed var(--orange); color: var(--orange); }      /* outline dashed = waiting */
.badge.building { background: var(--blue-solid); color: #fff; }                 /* solid blue = working */
.badge.ready { background: var(--orange); color: #111; }                         /* solid orange = play it */
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, textarea { width: 100%; background: #0f1218; color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; font: inherit; }
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
button { font: inherit; font-weight: 600; border-radius: 10px; padding: 11px 16px; border: 0; cursor: pointer; }
button.primary { background: var(--blue-solid); color: #fff; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 6px 12px; font-size: 14px; }
button.ghost.on { border: 2px solid var(--orange); color: var(--orange); }
button:disabled { opacity: .5; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.msg { margin-top: 10px; font-size: 14px; min-height: 1em; }
.msg.err { color: var(--orange); }
.msg.ok { color: var(--blue); }
.empty { text-align: center; color: var(--dim); padding: 30px 10px; }
.empty .big { font-size: 40px; }
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: center;
  background: rgba(13, 15, 20, .96); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
nav.tabs button { background: none; color: var(--dim); display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 12px; padding: 6px 18px; border-radius: 10px; }
nav.tabs button .ic { font-size: 22px; }
nav.tabs button.on { color: var(--text); background: #1d2230; text-decoration: underline; text-underline-offset: 4px; }
.hidden { display: none !important; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.steps { counter-reset: s; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: s; padding: 6px 0 6px 34px; position: relative; color: var(--dim); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 5px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--blue); color: var(--blue); font-size: 13px; display: grid; place-items: center; font-weight: 700; }
.login { max-width: 380px; margin: 12vh auto 0; padding: 16px; }
.login .logo { font-size: 46px; text-align: center; }
.login h1 { text-align: center; margin: 4px 0 18px; }
.login button { width: 100%; margin-top: 16px; }
code.pw { background: #0f1218; border: 1px solid var(--orange); padding: 2px 8px; border-radius: 6px; user-select: all; }
/* phase 2–4 */
.badge.failed { border: 2px solid #fff; color: #fff; }                             /* white outline = problem */
.badge.proposed { border: 2px dashed var(--dim); color: var(--dim); }
.badge.done { color: var(--dim); border: 1px solid var(--line); }
a { color: var(--blue); }
a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; border-radius: 10px; padding: 11px 16px; }
a.btn.primary { background: var(--orange); color: #111; }
a.btn.ghost { color: var(--text); border: 1px solid var(--line); padding: 10px 14px; }
details.versions { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
details.versions summary { cursor: pointer; font-weight: 600; color: var(--dim); padding: 4px 0; }
.ver { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.ver .vhead { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pitch.small { font-size: 14px; margin-top: 4px; }
.fb { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.fbform { margin: 8px 0; }
textarea.short { min-height: 80px; }
.row.tight { margin-top: 6px; }
.card.tap { cursor: pointer; }
.boardtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
h4 { margin: 14px 0 4px; color: var(--dim); font-size: 14px; }
select { background: #0f1218; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; width: 100%; }
#mini { margin-bottom: 8px; font-size: 14px; }
#maestro div { padding: 3px 0; }
select { -webkit-appearance: none; appearance: none; background-color: #0f1218; color: var(--text); }
