:root {
  --ink: #212326; --graphite: #3f4448; --muted: #6b6f72; --line: #e1e3e1; --paper: #fff; --bg: #f5f6f4;
  --accent: #2c7f7c; --accent-dark: #226563; --blue: #468cd2; --plum: #b47896; --yellow: #fac864;
  --good: #2e7d5b; --good-bg: #e7f3ec; --warn: #8a6100; --warn-bg: #fdf3d7; --bad: #b3261e; --bad-bg: #fbe9e7;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent-dark); }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 .5rem; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; font-weight: 650; }
p { margin: 0 0 .9rem; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--bg); padding: .15em .4em; border-radius: 4px; word-break: break-all; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .8rem clamp(1rem, 4vw, 2.5rem); background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-name { font-weight: 700; font-size: 1.15rem; }
.brand-client { color: var(--muted); padding-left: .6rem; border-left: 1px solid var(--line); }
nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
nav a { color: var(--graphite); text-decoration: none; }
nav a:hover { color: var(--accent-dark); text-decoration: underline; }
nav form { margin: 0; }

main { max-width: 1120px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; }
main.narrow { max-width: 520px; }
main > section { margin-bottom: 2rem; }
footer { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem) 2.5rem; color: var(--muted); font-size: .875rem; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card + .card { margin-top: 1.25rem; }
.lead { color: var(--graphite); max-width: 70ch; }
.meta, .hint, .empty, .crumb { color: var(--muted); }
.hint { font-size: .9rem; }
.crumb { margin-bottom: .4rem; font-size: .9rem; }
.head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.head h1 { margin: 0; }
.nowrap { white-space: nowrap; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 1rem; }
input[type=text], input[type=email], input[type=password], select {
  display: block; width: 100%; margin-top: .35rem; padding: .6rem .7rem; font: inherit; color: inherit;
  background: var(--paper); border: 1px solid #c4c8c5; border-radius: 7px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(70,140,210,.45); outline-offset: 1px; }
input.code { font-size: 1.5rem; letter-spacing: .3em; max-width: 12rem; text-align: center; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > label { flex: 1 1 220px; }
.row > label.grow { flex: 2 1 320px; }
.check { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.check input { margin-top: .3rem; }

button, .button { display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: .6rem 1.1rem; border-radius: 7px; border: 1px solid #c4c8c5; background: var(--paper); color: var(--ink); }
button:hover, .button:hover { border-color: var(--graphite); }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button[disabled] { opacity: .6; cursor: progress; }
button.link { border: 0; background: none; padding: 0; font-weight: 400; color: var(--graphite); }
button.link:hover { text-decoration: underline; color: var(--accent-dark); }
button.quiet { color: var(--bad); }
button.quiet:hover { border-color: var(--bad); }

.drop { border: 2px dashed #b9bfbb; border-radius: var(--radius); padding: 1.6rem 1rem; text-align: center; cursor: pointer;
  font-weight: 400; background: var(--bg); position: relative; }
.drop.over { border-color: var(--accent); background: #eaf4f3; }
.drop strong { display: block; font-size: 1.05rem; }
.drop span { color: var(--muted); font-size: .9rem; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.picked { list-style: none; padding: 0; margin: 0 0 1rem; }
.picked li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.picked li span:last-child { color: var(--muted); white-space: nowrap; }
.picked li.bad span:first-child { color: var(--bad); }

.msg { padding: .7rem .9rem; border-radius: 7px; border: 1px solid transparent; }
.msg.bad { background: var(--bad-bg); color: var(--bad); border-color: #f1c4bf; }
.msg.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0dc9c; }
.msg.good { background: var(--good-bg); color: var(--good); border-color: #bfdfcc; }

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--graphite); background: #fafbfa; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
table.plain th { background: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sugg { display: block; color: var(--muted); margin-top: .25rem; }

.status, .tag { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.status.queued, .tag.info { background: #eceeed; color: var(--graphite); }
.status.running { background: #e3eefa; color: #1f5fa3; }
.status.done { background: var(--good-bg); color: var(--good); }
.status.failed, .tag.blocker { background: var(--bad-bg); color: var(--bad); }
.tag.warning { background: var(--warn-bg); color: var(--warn); }

.downloads { display: flex; gap: .75rem; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.tile .n { display: block; font-size: 1.7rem; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: .9rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.cols .card + .card { margin-top: 0; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.chip { padding: .3rem .8rem; border-radius: 999px; font-weight: 500; font-size: .9rem; }
.chip.on { background: var(--graphite); border-color: var(--graphite); color: #fff; }

.wait { display: flex; gap: 1.1rem; align-items: center; }
.wait p { margin: 0 0 .25rem; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }
.qr { margin: 0 0 1rem; }
.qr svg { width: 200px; height: 200px; display: block; }
.danger { border-top: 1px solid var(--line); padding-top: 1.25rem; }
[hidden] { display: none !important; }
.table-wrap table { min-width: 680px; }
table.plain { display: block; overflow-x: auto; }
td a { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  h1 { font-size: 1.4rem; }
  .card { padding: 1.1rem; }
  .downloads .button { width: 100%; text-align: center; }
}
