:root {
  color-scheme: light;
  --bg: #f5efe4;
  --bg-deep: #e9dcc6;
  --card: rgba(254, 251, 245, 0.88);
  --card-strong: #fffaf1;
  --text: #1f1a17;
  --muted: #6d6157;
  --line: rgba(71, 51, 27, 0.14);
  --primary: #bf5a2b;
  --primary-strong: #95401b;
  --accent: #0f766e;
  --skip: #7a5a13;
  --danger: #8d2f2f;
  --shadow: 0 24px 70px rgba(84, 57, 27, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(191, 90, 43, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 26%),
    linear-gradient(180deg, #f9f1e3 0%, var(--bg) 48%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.page-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.45;
  pointer-events: none;
}

.page-glow-left {
  top: -80px;
  left: -70px;
  background: rgba(191, 90, 43, 0.24);
}

.page-glow-right {
  right: -90px;
  bottom: 12%;
  background: rgba(15, 118, 110, 0.22);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.view {
  display: none;
  animation: rise-in 420ms ease;
}

.view.is-active {
  display: block;
}

.hero-card,
.wizard-card,
.summary-card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(1.5rem, 3vw, 3rem);
}

.wizard-card,
.summary-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(191, 90, 43, 0.12);
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

h1 {
  margin-top: 1rem;
  font-size: clamp(3.2rem, 8vw, 5.6rem);
  line-height: 0.94;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.lead {
  max-width: 42rem;
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.stack-lg {
  display: grid;
  gap: 1.2rem;
  margin-top: 2rem;
}

.grid-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field span {
  font-size: 0.95rem;
  font-weight: 700;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.template-btn {
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  border: 1px solid rgba(71, 51, 27, 0.12);
}

.template-btn.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, #18a394 100%);
  color: #f3fffd;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.18);
}

.template-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 245, 0.94);
  color: var(--text);
  padding: 0.95rem 1rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(191, 90, 43, 0.52);
  box-shadow: 0 0 0 4px rgba(191, 90, 43, 0.12);
  transform: translateY(-1px);
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.actions-wide {
  margin-top: 0.8rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    color var(--transition);
}

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

button:active {
  transform: translateY(0);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #d5793f 100%);
  color: #fff8f2;
  box-shadow: 0 14px 28px rgba(191, 90, 43, 0.22);
}

.secondary-btn {
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
}

.ghost-btn {
  background: rgba(122, 90, 19, 0.12);
  color: var(--skip);
}

.reset-btn {
  background: rgba(141, 47, 47, 0.12);
  color: var(--danger);
}

.wizard-header,
.summary-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.progress-copy,
.date-pill {
  padding: 0.75rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(71, 51, 27, 0.08);
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.progress-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(191, 90, 43, 0.12);
  margin: 1.2rem 0 1.4rem;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary) 0%, #e2a454 100%);
  transition: width 260ms ease;
}

.product-panel {
  padding: clamp(1.2rem, 2vw, 1.7rem);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.94), rgba(255, 255, 255, 0.74)),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(71, 51, 27, 0.08);
}

.product-label {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

#productName {
  margin-top: 0.55rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.02;
}

.product-hint {
  margin: 0.8rem 0 1.4rem;
  color: var(--muted);
  line-height: 1.55;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
}

.metric-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(71, 51, 27, 0.08);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 0.45rem;
}

.metric-value {
  font-size: 1.65rem;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(71, 51, 27, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  text-align: left;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(71, 51, 27, 0.08);
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-chip.completed {
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
}

.status-chip.skipped {
  background: rgba(122, 90, 19, 0.12);
  color: var(--skip);
}

.actions-summary {
  margin-top: 1.4rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 1rem, 980px);
    padding: 1rem 0 2rem;
  }

  .wizard-header,
  .summary-header {
    flex-direction: column;
    align-items: stretch;
  }

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

  h1 {
    font-size: clamp(2.8rem, 18vw, 4.2rem);
  }

  #productName {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .progress-copy,
  .date-pill {
    white-space: normal;
  }

  button {
    width: 100%;
    justify-content: center;
  }
}
