:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #151922;
  --muted: #5e6777;
  --border: #d9dde5;
  --accent: #16625f;
  --accent-strong: #104946;
  --danger-bg: #fff0f0;
  --danger-border: #df9b9b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  width: min(980px, calc(100% - 32px));
  margin: 32px auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 24px;
  line-height: 1.2;
}

p,
label,
dd,
dt {
  line-height: 1.5;
}

.topbar p,
.lede {
  color: var(--muted);
}

.panel,
.login-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 12px 28px rgba(21, 25, 34, 0.08);
}

.login-shell {
  width: min(460px, calc(100% - 32px));
  margin: 12vh auto;
}

.form-stack {
  display: grid;
  gap: 12px;
}

input[type="password"],
input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: fit-content;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font: 700 14px/1 Arial, Helvetica, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

button:hover,
.button-link:hover {
  background: var(--accent-strong);
}

.ghost,
.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.ghost:hover,
.secondary:hover {
  background: #eef1f4;
  color: var(--text);
}

.alert {
  margin: 16px 0;
  border: 1px solid var(--danger-border);
  border-radius: 6px;
  padding: 12px;
  background: var(--danger-bg);
}

.hidden {
  display: none;
}

.progress-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eaef;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.step-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.step-list li.done {
  color: var(--accent);
}

.step-list li.active {
  color: var(--text);
  font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.stats div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.stats dt {
  color: var(--muted);
  font-size: 13px;
}

.stats dd {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 700;
}

@media (max-width: 680px) {
  .topbar,
  .stats {
    display: block;
  }

  .stats div {
    margin-bottom: 12px;
  }
}
