/* Workbench look: an ESD-mat grey-green ground, dark ink, one teal accent.
   The board is full width, one column per GitHub status label, and every
   column and card takes its color from that label. The build strip at the top
   shows how far along the next build is. */

:root {
  color-scheme: light dark;
  --bg: #e8edea;
  --col: #d9e1dd;
  --card: #f6f9f7;
  --ink: #12201c;
  --muted: #4a5d56;
  --rule: #b7c5be;
  --edge: rgba(18, 32, 28, 0.28);
  --accent: #0e7c6b;
  --on-accent: #ffffff;
  --field: #f6f9f7;
  --warn: #855300;
  --err: #a12a1c;
  --display: "Bahnschrift SemiCondensed", Bahnschrift, "DIN Alternate", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(1rem, 3vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1816;
    --col: #16221f;
    --card: #1f2e2a;
    --ink: #e4efea;
    --muted: #9bb0a8;
    --rule: #2b3b36;
    --edge: rgba(228, 239, 234, 0.3);
    --accent: #3dc4a9;
    --on-accent: #0f1816;
    --field: #16221f;
    --warn: #e3b04b;
    --err: #ff9a8a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.55 var(--body);
}

.shell { padding: 0 var(--gutter) 4rem; }

h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.8rem, 7vw, 4.75rem); }
h2 { font-size: 1.5rem; }

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Top: title on the left, next-build strip on the right */
.top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 4rem; padding: 3rem 0 2.25rem; }
@media (min-width: 62rem) {
  .top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: end; }
}
.lede { font-size: 1.15rem; max-width: 32rem; margin: 0.9rem 0 1.1rem; color: var(--muted); }
.jump { font-weight: 600; }

.demo-note {
  margin: 0 0 1.5rem; padding: 0.6rem 0.9rem;
  border: 2px dashed var(--warn); color: var(--warn); font-weight: 600;
}

/* Build strip */
.build .summary { margin: 0.5rem 0 1.1rem; font-size: 1.1rem; }
.strip { display: flex; gap: 5px; list-style: none; margin: 0 0 1rem; padding: 0; }
.cell {
  position: relative; flex: 1 1 0; min-width: 0; max-width: 4.25rem; height: 3.5rem;
  border: 2px solid var(--ink); border-radius: 3px; overflow: hidden;
}
.cell::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform-origin: bottom; transform: scaleY(var(--p, 0));
}
.cell.f25 { --p: 0.25; } .cell.f50 { --p: 0.5; } .cell.f75 { --p: 0.75; } .cell.f100 { --p: 1; }
.strip .cell::after { animation: fill 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes fill { from { transform: scaleY(0); } }

.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 0.95rem; }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend .cell { flex: none; width: 0.9rem; height: 0.9rem; border-width: 1.5px; border-radius: 2px; }

/* The board: one column per status label, scrolls sideways when it must */
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15.5rem, 1fr);
  gap: 0.9rem; align-items: start; overflow-x: auto; padding: 0 0 1rem;
  scroll-snap-type: x proximity;
}
.col {
  background: var(--col); border-radius: 4px; scroll-snap-align: start;
  border-top: 5px solid var(--c, var(--rule)); min-width: 0;
  box-shadow: inset 0 0 0 1px var(--edge);
}
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.8rem 0.9rem 0.6rem; }
.col-head h2 { font-size: 1.2rem; }
.count {
  flex: none; min-width: 1.6rem; padding: 0.05rem 0.5rem; border-radius: 999px; text-align: center;
  font: 700 0.9rem/1.5 var(--body); background: var(--c); color: var(--on-c, #000);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.cards { list-style: none; margin: 0; padding: 0 0.6rem 0.7rem; display: grid; gap: 0.55rem; }
.card {
  background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--c, var(--rule));
  border-radius: 3px; padding: 0.6rem 0.75rem 0.65rem;
}
.card .what { display: block; font-size: 0.97rem; line-height: 1.4; overflow-wrap: anywhere; }
.kind { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; color: var(--muted); font-size: 0.85rem; }
.dot { flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--edge); }
.ver { margin-left: auto; font-size: 0.85rem; }
.col-empty { margin: 0; padding: 0.2rem 0.9rem 1rem; color: var(--muted); font-size: 0.92rem; }
.loading, .problem { color: var(--muted); padding: 1.5rem 0; }

/* Form */
.send { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); max-width: 44rem; }
.send .desc { margin: 0.35rem 0 0.9rem; color: var(--muted); max-width: 38rem; }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; margin-top: 1.25rem; }
form > * { grid-column: 1 / -1; }
.field.half { grid-column: span 1; }
fieldset.type { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; }
fieldset.type legend { padding: 0; margin-bottom: 0.35rem; font-weight: 600; }
fieldset.type label { display: inline-flex; align-items: center; gap: 0.5rem; }
input[type="radio"] { accent-color: var(--accent); width: 1.15rem; height: 1.15rem; margin: 0; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
input[type="text"], textarea {
  width: 100%; padding: 0.65rem 0.75rem; font: inherit; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--ink); border-radius: 2px;
}
textarea { min-height: 9rem; resize: vertical; }
.hint { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
button {
  font: 700 1.15rem var(--display); letter-spacing: 0.01em; padding: 0.7rem 1.6rem;
  background: var(--ink); color: var(--bg); border: 0; border-radius: 2px; cursor: pointer;
}
button:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); }
button:disabled { opacity: 0.6; cursor: progress; }
.status { margin: 0; min-height: 1.5rem; font-weight: 600; }
.status.error { color: var(--err); }

footer { margin-top: 3.5rem; color: var(--muted); font-size: 0.9rem; }
footer p { margin: 0; }

@media (max-width: 34rem) {
  .board { grid-auto-columns: 84vw; }
  .field.half { grid-column: 1 / -1; }
  .cell { height: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .strip .cell::after { animation: none; }
  .board { scroll-behavior: auto; }
}
