:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #2d2d2d;
  --muted: #666b75;
  --line: #e2e4e8;
  --primary: #1a1a2e;
  --accent: #fd7201;
  --accent-hover: #d96200;
  --ok: #1e8e4e;
  --err: #c62828;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
}

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
main.narrow { max-width: 420px; padding-top: 12vh; }

.brand { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 18px; color: var(--primary); }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.brand nav { margin-left: auto; display: flex; gap: 16px; font-size: 14px; }

a { color: var(--primary); }

.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: 0 4px 20px rgba(0, 0, 0, .06); }
h1 { margin: 0 0 8px; font-size: 22px; color: var(--primary); }
.hint { color: var(--muted); font-size: 14px; }
.error { color: var(--err); }
.ok { color: var(--ok); }
code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 13px; word-break: break-all; }

.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 500; }

input[type=text], input[type=password], select {
  width: 100%; padding: 10px 12px; font: inherit; color: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

button, .button {
  display: inline-block; padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); cursor: pointer;
}
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled), .button.primary:hover { background: var(--accent-hover); }
button:disabled { opacity: .5; cursor: not-allowed; }

.step { border: 0; padding: 0; margin: 24px 0 0; min-width: 0; }
.step legend { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; }

.seg { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.seg label { display: flex; align-items: center; gap: 6px; font-weight: 400; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--accent); background: #fff4ea; }

.drop {
  position: relative; display: grid; place-items: center; gap: 4px; text-align: center;
  padding: 32px 16px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 400;
}
.drop.over, .drop:hover { border-color: var(--accent); background: #fffaf5; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-title { font-weight: 600; }

.files { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.files li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.files .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.files .state { font-size: 13px; color: var(--muted); white-space: nowrap; }
.files .bar { grid-column: 1 / -1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.files .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.files li.done .bar span { background: var(--ok); }
.files li.done .state { color: var(--ok); }
.files li.error .state { color: var(--err); white-space: normal; }
.files li.error .bar span { background: var(--err); }
.files .remove { border: 0; padding: 0 4px; background: none; color: var(--muted); font-size: 18px; line-height: 1; }

.actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.actions .hint { margin-right: auto; }

@media (max-width: 480px) {
  .card { padding: 18px; }
  .actions button { flex: 1; }
}
