@import url('https://fonts.googleapis.com/css2?family=Quattrocento:wght@400;700&family=Poppins:wght@400;500;600;700&display=swap');

.chp-app,
.chp-app * {
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
}

.chp-app {
  --chp-blue: #09233c;
  --chp-light-blue: #d1dfe8;
  --chp-orange: #f47b29;
  --chp-orange-soft: #fedfcd;
  --chp-white: #ffffff;
  --chp-muted: #5f6f7f;
  --chp-border: rgba(9, 35, 60, 0.14);
  --chp-shadow: 0 16px 36px rgba(9, 35, 60, 0.12);

  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px;
  border-radius: 22px;
  color: var(--chp-blue);
  background:
    radial-gradient(circle at top left, rgba(244, 123, 41, 0.18), transparent 32%),
    linear-gradient(135deg, var(--chp-light-blue), #f0f4f8);
}

.chp-screen { display: none; }
.chp-screen.active { display: block; }

.chp-shell {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: var(--chp-shadow);
}

.chp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(244, 123, 41, 0.13);
  color: var(--chp-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chp-app h2,
.chp-app h3,
.chp-app p { margin-top: 0; }

.chp-title {
  margin-bottom: 10px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.chp-subtitle {
  max-width: 760px;
  color: var(--chp-muted);
  font-size: 16px;
  line-height: 1.65;
}

.chp-progress-wrap {
  margin: 24px 0 8px;
}

.chp-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--chp-muted);
  font-size: 13px;
  font-weight: 600;
}

.chp-progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(9, 35, 60, 0.12);
}

.chp-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--chp-orange);
  transition: width 220ms ease;
}

.chp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.chp-card {
  min-height: 66px;
  padding: 14px 12px;
  border: 2px solid var(--chp-border);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  background: var(--chp-white);
  color: var(--chp-blue);
  font-size: 14px;
  font-weight: 600;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.chp-card:hover,
.chp-card:focus {
  transform: translateY(-1px);
  border-color: rgba(244, 123, 41, 0.55);
  box-shadow: 0 10px 24px rgba(9, 35, 60, 0.1);
  outline: none;
}

.chp-card.selected {
  border-color: var(--chp-orange);
  background: var(--chp-orange-soft);
  box-shadow: inset 0 0 0 1px rgba(244, 123, 41, 0.18);
}

.chp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}

.chp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.chp-btn:hover,
.chp-btn:focus {
  transform: translateY(-1px);
  outline: none;
}

.chp-primary {
  background: var(--chp-orange);
  color: #fff;
  box-shadow: 0 10px 22px rgba(244, 123, 41, 0.26);
}

.chp-secondary {
  background: #fff;
  color: var(--chp-blue);
  border: 1px solid var(--chp-border);
}

.chp-input {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 14px 0 0;
  padding: 14px 15px;
  border: 1px solid var(--chp-border);
  border-radius: 12px;
  color: var(--chp-blue);
  background: #fff;
  font-size: 16px;
}

.chp-input:focus {
  border-color: var(--chp-orange);
  outline: none;
  box-shadow: 0 0 0 4px rgba(244, 123, 41, 0.14);
}

.chp-notice {
  display: none;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff4ec;
  color: #8a3c0d;
  font-size: 14px;
  font-weight: 600;
}

.chp-notice.active { display: block; }

.chp-result-header {
  text-align: center;
  margin-bottom: 28px;
}

.chp-result-header h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.035em;
}

.chp-result-header p {
  color: var(--chp-muted);
  line-height: 1.6;
}

.chp-result {
  page-break-inside: avoid;
  margin: 20px 0;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(9, 35, 60, 0.1);
}

.chp-result-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.chp-result-top h3 {
  margin: 0;
  font-size: 20px;
}

.chp-pill {
  display: inline-flex;
  max-width: 250px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.chp-label {
  margin-bottom: 5px;
  color: #7b8794;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.chp-brand-name {
  font-size: 20px;
  font-weight: 700;
}

.chp-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.chp-color-swatch {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
}

.chp-body-copy {
  color: #1d2e3d;
  font-size: 15px;
  line-height: 1.75;
}

.chp-fear-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  background: #f8fafb;
}

.chp-verse {
  margin-top: 16px;
  padding-left: 14px;
  font-style: italic;
  line-height: 1.6;
}

.chp-verse a {
  text-decoration: none;
  font-weight: 700;
}

.chp-loading,
.chp-error {
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--chp-shadow);
  line-height: 1.7;
}

.chp-error {
  border-left: 6px solid #c0392b;
}

.chp-pdf-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 816px;
  background: #fff;
  color: #111;
  z-index: 2147483647;
  pointer-events: none;
  transform: none;
  overflow: visible;
}

.chp-pdf-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.88);
  color: var(--chp-blue);
  font-weight: 700;
  text-align: center;
}

@media (max-width: 680px) {
  .chp-app { padding: 14px; }
  .chp-result-top { flex-direction: column; }
  .chp-actions { flex-direction: column; align-items: stretch; }
  .chp-btn { width: 100%; }
}
