:root {
  --bg: #f4efe6;
  --panel: rgba(255, 251, 246, 0.86);
  --panel-strong: #fffaf2;
  --ink: #1f1a16;
  --muted: #6f6258;
  --accent: #b45309;
  --accent-deep: #7c2d12;
  --line: rgba(31, 26, 22, 0.12);
  --success: #1d6b47;
  --shadow: 0 18px 40px rgba(86, 52, 22, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.28), transparent 30%),
    radial-gradient(circle at top right, rgba(180, 83, 9, 0.2), transparent 24%),
    linear-gradient(180deg, #fbf6ef 0%, var(--bg) 46%, #efe4d3 100%);
  font-family: Georgia, 'Times New Roman', serif;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  padding: 20px 4px 18px;
}

.login-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

.login-form {
  padding: 8px 0;
}

.hero h1,
.section-head h2,
.progress-head h2 {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.progress-head h2,
.section-head h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent-deep);
}

.lede,
.subtle {
  margin: 14px 0 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.form-panel {
  margin-top: 8px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 0.95rem;
  color: var(--accent-deep);
}

input,
select,
textarea,
button,
pre {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(124, 45, 18, 0.18);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

input:focus,
button:focus,
textarea:focus {
  outline: none;
  border-color: rgba(180, 83, 9, 0.6);
  box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.14);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff9f2;
  box-shadow: 0 10px 24px rgba(124, 45, 18, 0.24);
}

.ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent-deep);
  border: 1px solid rgba(124, 45, 18, 0.16);
}

.hidden {
  display: none;
}

#progressPanel,
.results {
  margin-top: 22px;
}

.progress-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.progress-percent {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--success);
}

.progress-bar {
  margin-top: 18px;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: rgba(124, 45, 18, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d97706 0%, #7c2d12 100%);
  transition: width 220ms ease;
}

.step-list {
  margin: 18px 0 0;
  padding-left: 22px;
  color: var(--ink);
}

.step-list li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.code-block,
.prompt-box {
  margin: 18px 0 0;
  width: 100%;
  min-height: 260px;
  border-radius: 18px;
  border: 1px solid rgba(124, 45, 18, 0.15);
  background: var(--panel-strong);
  padding: 18px;
  white-space: pre-wrap;
  overflow: auto;
  color: var(--ink);
  line-height: 1.45;
}

.prompt-box {
  min-height: 520px;
  resize: vertical;
}

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 20px, 100%);
    padding-top: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .actions,
  .progress-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary,
  .ghost {
    width: 100%;
  }
}
