:root {
  --accent: #e8650a;
  --accent-dark: #bd4f08;
  --bg: #0a0a0a;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(232, 101, 10, 0.42);
  --text: #f0ece4;
  --muted: rgba(240, 236, 228, 0.58);
  --dim: rgba(240, 236, 228, 0.32);
  --green: #7fcf9a;
  --gold: #f4c766;
  --max: 760px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(232, 101, 10, 0.14), transparent 34rem),
    #0a0a0a;
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='280' height='280' filter='url(%23noise)'/%3E%3C/svg%3E");
}

button,
a {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(100%, var(--max));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
}

.intro-screen {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.mark,
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  box-shadow: 0 0 42px rgba(232, 101, 10, 0.28);
}

.mark {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  margin-bottom: 28px;
}

.eyebrow,
.card-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 16px;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(52px, 12vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 560px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 10px;
  margin-bottom: 28px;
}

.promise-grid div,
.result-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
}

.promise-grid div {
  padding: 15px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.promise-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
}

.lead-form {
  width: 100%;
  margin-bottom: 12px;
}

.lead-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.lead-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lead-fields input {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  outline: none;
}

.lead-fields input:focus {
  border-color: var(--border-strong);
}

.form-error {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
}

.primary-btn,
.secondary-btn,
.primary-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.primary-btn,
.primary-link {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 28px rgba(232, 101, 10, 0.24);
}

.primary-btn:hover,
.primary-link:hover {
  background: var(--accent-dark);
}

.secondary-btn {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.secondary-btn:hover {
  border-color: var(--border-strong);
}

.microcopy {
  margin-top: 12px;
  color: var(--dim);
  font-size: 12px;
}

.checkup-shell {
  min-height: calc(100vh - 48px);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex: 0 0 auto;
}

#progressText {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.24s ease;
}

.question-stage,
.loading-stage,
.result-stage {
  padding: 26px 22px 28px;
}

.question-kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.question-title {
  margin-bottom: 9px;
  font-size: 25px;
  line-height: 1.25;
}

.question-help {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.55;
}

.options {
  display: grid;
  gap: 10px;
}

.option-btn {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 13px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.option-btn:hover,
.option-btn.selected {
  border-color: var(--border-strong);
  background: rgba(232, 101, 10, 0.09);
}

.letter {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.option-btn.selected .letter {
  background: var(--accent);
  color: white;
}

.option-title {
  margin-bottom: 4px;
  font-weight: 700;
  line-height: 1.35;
}

.option-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.scale-btn {
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

.scale-btn.selected,
.scale-btn:hover {
  border-color: var(--border-strong);
  color: var(--accent);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--dim);
  font-size: 11px;
}

textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  outline: none;
}

textarea:focus {
  border-color: var(--border-strong);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 26px;
}

.loading-stage {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.loader {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-stage p {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.6;
}

.result-stage {
  display: grid;
  gap: 14px;
}

.result-hero,
.result-card {
  padding: 20px;
}

.result-hero {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(232, 101, 10, 0.16), rgba(255, 255, 255, 0.035));
}

.result-hero h2 {
  margin-bottom: 8px;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 44px;
  line-height: 1;
}

.result-hero p:last-child,
.support-copy {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.result-card h3 {
  margin-bottom: 8px;
}

.result-card p:not(.card-label) {
  color: var(--muted);
  line-height: 1.6;
}

.plain-list,
.today-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.plain-list li,
.today-list li {
  margin: 8px 0;
}

.weeks {
  display: grid;
  gap: 12px;
}

.week {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.week:first-child {
  border-top: 0;
  padding-top: 0;
}

.week-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.week-title {
  margin-bottom: 5px;
  font-weight: 800;
}

.week ul {
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  line-height: 1.6;
}

.highlight-card {
  border-color: rgba(127, 207, 154, 0.28);
  background: rgba(127, 207, 154, 0.06);
}

.pattern-card {
  border-color: rgba(244, 199, 102, 0.26);
  background: rgba(244, 199, 102, 0.055);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.comment-card pre {
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-family: inherit;
  line-height: 1.55;
}

.cta-card {
  border-color: rgba(232, 101, 10, 0.34);
  background: rgba(232, 101, 10, 0.08);
}

.cta-card h3 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.2;
}

.cta-card .primary-btn {
  margin-top: 4px;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px;
  }

  .intro-screen {
    min-height: calc(100vh - 32px);
  }

  .promise-grid,
  .lead-fields,
  .result-grid,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .question-stage,
  .loading-stage,
  .result-stage {
    padding: 22px 16px;
  }

  .scale-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .week {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .topbar {
    align-items: flex-start;
  }
}
