:root {
  --ink: #1c2420;
  --muted: #5c6b63;
  --paper: #e8efe9;
  --panel: rgba(255, 252, 247, 0.88);
  --line: rgba(28, 36, 32, 0.12);
  --accent: #1f6b4a;
  --accent-deep: #0f3d2c;
  --warn: #8a5a12;
  --bad: #8b2e2e;
  --ok: #1f6b4a;
  --shadow: 0 18px 50px rgba(20, 40, 30, 0.12);
  --radius: 14px;
  --font: "Figtree", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(47, 122, 88, 0.28), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(180, 140, 70, 0.18), transparent 50%),
    linear-gradient(165deg, #d5e4da 0%, #eef3ec 42%, #f4efe6 100%);
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.25rem 0 3.5rem;
  animation: rise 0.55s ease-out;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.7);
  border: 1px solid var(--line);
}

.tab {
  flex: 1;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  font: inherit;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: var(--accent);
  color: #f7fff9;
}

.panel.hidden {
  display: none;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fff;
}

.countdown {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(138, 90, 18, 0.12);
  color: var(--warn);
  font-weight: 600;
}

.countdown.ready {
  background: rgba(31, 107, 74, 0.12);
  color: var(--ok);
}

.countdown.hidden {
  display: none;
}

.name-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.name-list li.current {
  color: var(--accent-deep);
  font-weight: 700;
}

.name-list li.done {
  text-decoration: line-through;
  opacity: 0.65;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.tagline {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.health {
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease;
}

.health[data-state="ok"] {
  color: var(--ok);
  border-color: rgba(31, 107, 74, 0.35);
}

.health[data-state="bad"] {
  color: var(--bad);
  border-color: rgba(139, 46, 46, 0.35);
}

section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem 1.3rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}

.auth label,
.options label:not(.check) {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.auth-row {
  display: flex;
  gap: 0.5rem;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.auth-row input {
  flex: 1;
}

.hero-action h1,
.steps h2,
.options h2,
.status-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.45rem;
}

.lede {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 38rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  color: #f7fff9;
}

.btn.primary:hover:not(:disabled) {
  background: var(--accent-deep);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.check {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.step:hover:not(:disabled) {
  border-color: rgba(31, 107, 74, 0.45);
  transform: translateX(2px);
}

.step:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.step .num {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(31, 107, 74, 0.12);
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.step strong {
  display: block;
  font-size: 0.98rem;
}

.step small {
  color: var(--muted);
  font-size: 0.82rem;
}

.opt-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.status-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(28, 36, 32, 0.08);
  overflow: hidden;
  margin: 0.75rem 0;
}

.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #3f9a6d);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.log {
  margin: 0;
  min-height: 9rem;
  max-height: 22rem;
  overflow: auto;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  background: #15201a;
  color: #d7ebe0;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 560px) {
  .top {
    flex-direction: column;
  }

  .auth-row {
    flex-direction: column;
  }
}
