:root {
  color-scheme: dark;
  --bg: #0f1117;
  --panel: #171a22;
  --panel-soft: #1d212b;
  --line: #2a2f3b;
  --text: #edf0f5;
  --muted: #9aa3b2;
  --soft: #747d8e;
  --accent: #8fbc8f;
  --accent-2: #b7c9a8;
  --danger: #d97878;
  --warn: #d3aa65;
  --shadow: 0 18px 60px rgba(0, 0, 0, .25);
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #171b23 0, var(--bg) 420px);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 46px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

h1, h2 { margin: 0; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: .98; letter-spacing: -.04em; }
h2 { font-size: 19px; letter-spacing: -.015em; }

.muted, .hint, .soft-note, .status-line {
  color: var(--muted);
}

.hero .muted {
  max-width: 690px;
  margin: 14px 0 0;
  font-size: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 20, 27, .74);
  color: var(--muted);
  font-weight: 650;
}

a {
  color: #cfe0c1;
  text-decoration: none;
}

a:hover {
  color: #eef7eb;
}

.health {
  flex: none;
  border: 1px solid var(--line);
  background: rgba(23, 26, 34, .72);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
}

.card {
  background: rgba(23, 26, 34, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.card-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.hint {
  max-width: 420px;
  margin: 0;
  text-align: right;
}

button {
  border: 0;
  border-radius: 14px;
  color: var(--text);
  background: var(--panel-soft);
  min-height: 44px;
  padding: 0 18px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, opacity .14s ease;
}

button:hover { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

.primary { background: #324830; }
.secondary { background: #313c4f; }
.ghost { background: #232832; color: #cbd2dc; }
.danger { background: #5a3030; }
.big { min-height: 52px; font-size: 16px; }

.grid.two {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 18px;
  align-items: start;
}

.hidden { display: none; }

label {
  display: block;
  color: #c6ccd6;
  font-size: 13px;
  font-weight: 700;
  margin: 14px 0 7px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #11141b;
  color: var(--text);
  outline: none;
  padding: 13px 14px;
  min-height: 46px;
  font: inherit;
}

textarea { resize: vertical; min-height: 116px; }
input::placeholder, textarea::placeholder { color: #687181; }
input:focus, textarea:focus { border-color: #536050; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.row.small-big { grid-template-columns: 120px minmax(0, 1fr); }
.inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.actions.wide { display: grid; grid-template-columns: 1fr 160px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-top: 14px;
}
.check input { width: 18px; min-height: 18px; }

.status-line {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #11141b;
}
.status-line.ok { color: #bfe0b8; border-color: #3b5138; }
.status-line.bad { color: #efb2b2; border-color: #674040; }

.soft-note {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #11141b;
  border: 1px solid var(--line);
}

.log-card { margin-bottom: 0; }
.progress {
  height: 10px;
  border-radius: 999px;
  background: #11141b;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 14px;
}
.progress div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6f956d, #b7c9a8);
  transition: width .22s ease;
}

pre {
  margin: 0;
  min-height: 260px;
  max-height: 430px;
  overflow: auto;
  border-radius: 16px;
  background: #0b0d12;
  border: 1px solid var(--line);
  padding: 16px;
  color: #d7ddcf;
  white-space: pre-wrap;
  font: 13px/1.55 "Cascadia Code", "Consolas", monospace;
}

.footer-brand {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--soft);
  font-weight: 650;
}

@media (max-width: 920px) {
  .hero, .card-head { display: block; }
  .hint { text-align: left; margin-top: 10px; }
  .grid.two, .row, .row.small-big, .actions.wide, .inline-action { grid-template-columns: 1fr; }
  .health { display: inline-block; margin-top: 18px; }
}
