:root {
  --bg: #f7f0e5;
  --bg-soft: #fffaf3;
  --surface: rgba(255, 252, 246, 0.92);
  --surface-strong: #fffdf9;
  --line: #e8dac4;
  --text: #2a1e15;
  --muted: #6d5b4c;
  --accent: #c06a2a;
  --accent-dark: #9d4f1d;
  --accent-soft: #f5dfc9;
  --danger: #c45847;
  --success: #2f7a56;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow: 0 18px 44px rgb(121 82 39 / 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgb(247 214 174 / 0.45), transparent 28%),
    radial-gradient(circle at right 14%, rgb(255 232 211 / 0.65), transparent 30%),
    linear-gradient(180deg, #fbf6ef 0%, #f7f0e5 100%);
}

button, input, textarea, select { font: inherit; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  color: var(--text);
  padding: 12px 14px;
}
textarea { min-height: 90px; resize: vertical; }

.warm-shell { padding: 24px 14px; }
.app-frame { width: min(1180px, 100%); margin: 0 auto; }
.admin-frame { padding-bottom: 24px; }
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  gap: 16px;
  align-items: start;
}
.hero-panel.compact { margin-top: 6vh; }
.hero-copy, .card, .image-card, .callout-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.hero-copy { padding: 28px; }
.card { padding: 20px; border-radius: var(--radius-lg); }
.auth-card { display: grid; gap: 12px; align-content: start; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: "Manrope", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4, .button { font-family: "Manrope", sans-serif; }
h1 {
  margin-bottom: 14px;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}
h2 {
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
h3 { margin-bottom: 6px; font-size: 1.2rem; }
h4 { margin-bottom: 8px; font-size: 1rem; }
.lede, .status-line, .empty-state, .stack-list p, .stack-list li, .split-stack, .quiz-panel, .timer-pill span {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.5;
}
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #fff7f1; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: var(--accent-soft); color: var(--text); }
.button.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.dashboard { display: grid; gap: 16px; }
.top-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.timer-pill {
  min-width: 120px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  text-align: center;
}
.timer-pill strong {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 1.4rem;
}
.grid {
  display: grid;
  gap: 16px;
}
.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.section-head, .inline-actions, .inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.section-head {
  align-items: start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.inline-form {
  align-items: center;
  margin-bottom: 12px;
}
.inline-form input, .inline-form textarea, .inline-form select { flex: 1 1 220px; }
.inline-actions { margin: 10px 0 14px; }
.stack-form { display: grid; gap: 10px; }
.stack-list {
  display: grid;
  gap: 10px;
}
.item-card, .qa-card, .quiz-choice, .email-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}
.item-card a {
  color: var(--accent-dark);
  font-weight: 700;
}
.subtle-tag {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: #f4e1ce;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}
.tag-success { background: #dceee4; color: var(--success); }
.tag-danger { background: #f6d7d1; color: var(--danger); }
.split-stack {
  display: grid;
  gap: 18px;
}
.quiz-panel {
  display: grid;
  gap: 12px;
}
.quiz-options {
  display: grid;
  gap: 10px;
}
.quiz-choice {
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.quiz-choice.selected {
  border-color: var(--accent);
  background: #fff1e1;
}
.quiz-choice.correct {
  border-color: var(--success);
  background: #edf8f2;
}
.quiz-choice.reveal {
  border-color: var(--accent-dark);
}
.status-line { min-height: 1.4em; margin-bottom: 0; }
.status-error { color: var(--danger); }
.status-success { color: var(--success); }
.timer-admin { display: grid; gap: 8px; }
.qa-actions, .email-actions, .quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.spacer-sm { height: 10px; }

@media (max-width: 900px) {
  .hero-panel, .two-col { grid-template-columns: 1fr; }
  .top-strip { flex-direction: column; }
}
