/* ─────────────────────────────────────────────
   NutriScreen — Nutritional Self-Assessment
   Aesthetic: Warm clinical / editorial wellness
   Palette: Sage, warm cream, terracotta accent
   ───────────────────────────────────────────── */

:root {
  --cream: #FAF7F2;
  --cream-dark: #F2EDE4;
  --sage: #5B7A5F;
  --sage-light: #8BAF8E;
  --sage-pale: #EBF2EC;
  --terracotta: #C27B5A;
  --terracotta-light: #F5E9E2;
  --charcoal: #2C2C2A;
  --mid-gray: #7A7771;
  --light-gray: #D4CFC8;
  --white: #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(44, 44, 42, 0.06);
  --shadow-md: 0 8px 32px rgba(44, 44, 42, 0.10);
  --shadow-lg: 0 20px 60px rgba(44, 44, 42, 0.15);
  --transition: 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #F2F1F7 0%, #FDF1F4 100%);
  color: var(--charcoal);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── PROGRESS BAR ────────────────────────────── */
.progress-shell {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--cream-dark);
  z-index: 1000;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--terracotta));
  width: 10%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 2px 2px 0;
}

/* ── HEADER ─────────────────────────────────── */
.site-header {
  position: fixed;
  top: 4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: linear-gradient(135deg, #F2F1F7 0%, #FDF1F4 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-dark);
  z-index: 100;
}

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

.logo-leaf {
  color: var(--sage);
  font-size: 18px;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}

.step-indicator {
  font-size: 13px;
  color: var(--mid-gray);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── MAIN LAYOUT ─────────────────────────────── */
.assessment-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 160px;
}

/* ── FORM SECTIONS ───────────────────────────── */
.form-section {
  display: none;
  animation: fadeSlideIn 0.4s ease both;
}

.form-section.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.section-sub {
  color: var(--mid-gray);
  font-size: 15px;
  margin-bottom: 40px;
  font-weight: 300;
}

/* ── FIELDS ──────────────────────────────────── */
.field-group {
  margin-bottom: 28px;
}

.field-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
}

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

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 9px;
  letter-spacing: 0.01em;
}

.req {
  color: var(--terracotta);
}

.optional {
  color: var(--mid-gray);
  font-weight: 300;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--charcoal);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(91, 122, 95, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--light-gray);
}

textarea {
  resize: vertical;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7771' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Unit fields side by side */
.unit-fields {
  display: flex;
  gap: 10px;
}

.unit-fields input {
  flex: 1;
}

.unit-fields.hidden {
  display: none;
}

/* ── UNIT TOGGLE ─────────────────────────────── */
.unit-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.unit-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--light-gray);
  border-radius: 20px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--mid-gray);
  transition: all var(--transition);
}

.unit-btn.active {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--white);
}

/* ── PILL GROUPS ─────────────────────────────── */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 9px 18px;
  border: 1.5px solid var(--light-gray);
  border-radius: 40px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--charcoal);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--sage-light);
  background: var(--sage-pale);
}

.pill.selected {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--white);
}

/* ── FOOD FREQUENCY TABLE ────────────────────── */
.freq-table-wrap {
  margin-bottom: 32px;
}

.freq-instructions {
  font-size: 13px;
  color: var(--mid-gray);
  background: var(--sage-pale);
  border-left: 3px solid var(--sage);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
}

.food-category {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.food-cat-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 18px;
  background: var(--cream-dark);
  color: var(--mid-gray);
}

.food-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--cream-dark);
}

.food-item span {
  font-size: 13.5px;
  color: var(--charcoal);
}

.freq-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.fpill {
  padding: 5px 12px;
  border: 1.5px solid var(--light-gray);
  border-radius: 30px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--mid-gray);
  transition: all var(--transition);
  white-space: nowrap;
}

.fpill:hover {
  border-color: var(--sage-light);
  color: var(--sage);
}

.fpill.selected {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--white);
}

/* ── HYDRATION SECTION ───────────────────────── */
.hydration-section {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.hydration-section .field-group:last-child {
  margin-bottom: 0;
}

/* ── MOTIVATION SLIDER ───────────────────────── */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.slider-label {
  font-size: 11px;
  color: var(--mid-gray);
  white-space: nowrap;
}

.motivation-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: linear-gradient(90deg, var(--sage) var(--val, 50%), var(--light-gray) var(--val, 50%));
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.motivation-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--white);
  border: 2.5px solid var(--sage);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(91, 122, 95, 0.25);
  transition: transform var(--transition);
}

.motivation-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--sage);
}

/* ── CONTACT SECTION ─────────────────────────── */
.contact-section {
  background: var(--terracotta-light);
  border: 1px solid rgba(194, 123, 90, 0.2);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-top: 32px;
}

.contact-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.contact-sub {
  font-size: 13px;
  color: var(--mid-gray);
  margin-bottom: 20px;
}

.contact-section .field-group:last-child {
  margin-bottom: 0;
}

/* ── NAVIGATION ──────────────────────────────── */
.form-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: linear-gradient(135deg, #F2F1F7 0%, #FDF1F4 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--cream-dark);
  z-index: 100;
}

.btn-back,
.btn-next,
.btn-submit {
  padding: 13px 30px;
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-back {
  background: transparent;
  border: 1.5px solid var(--light-gray);
  color: var(--mid-gray);
}

.btn-back:hover {
  border-color: var(--sage);
  color: var(--sage);
}

.btn-back:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.btn-next {
  background: linear-gradient(135deg, #4CAF50, #3E9442);
  color: var(--white);
  letter-spacing: 0.02em;
}

.btn-next:hover {
  background: var(--sage);
  transform: translateX(2px);
}

.btn-submit {
  background: linear-gradient(135deg, var(--sage), var(--terracotta));
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 13px 36px;
  box-shadow: 0 4px 20px rgba(91, 122, 95, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(91, 122, 95, 0.4);
}

.hidden {
  display: none !important;
}

/* ── CONSENT CHECKBOX ────────────────────────── */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--mid-gray);
  line-height: 1.45;
  max-width: 340px;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.5px solid var(--light-gray);
  border-radius: 4px;
  accent-color: var(--sage);
  cursor: pointer;
  margin-top: 1px;
}

.consent-label.shake {
  animation: consentShake 0.45s ease;
}

.consent-label.unchecked-error input[type="checkbox"] {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

@keyframes consentShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-5px);
  }

  40% {
    transform: translateX(5px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

/* ── NUTRITIONAL RISK SECTION ────────────────── */
.risk-section {
  background: var(--white);
  border: 1.5px solid var(--terracotta);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.risk-section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 40px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.risk-badge.high {
  background: #fde8e8;
  color: #b91c1c;
}

.risk-badge.medium {
  background: #fef3c7;
  color: #92400e;
}

.risk-badge.low {
  background: var(--sage-pale);
  color: var(--sage);
}

.risk-item {
  border-left: 3px solid var(--terracotta);
  padding: 12px 16px;
  background: var(--terracotta-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 10px;
}

.risk-item.medium {
  border-color: #f59e0b;
  background: #fffbeb;
}

.risk-item.low {
  border-color: var(--sage);
  background: var(--sage-pale);
}

.risk-item-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.risk-item-detail {
  font-size: 12.5px;
  color: var(--mid-gray);
  line-height: 1.5;
}

.risk-score-bar-wrap {
  background: var(--cream-dark);
  border-radius: 40px;
  height: 8px;
  margin: 10px 0 4px;
  overflow: hidden;
}

.risk-score-bar {
  height: 100%;
  border-radius: 40px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.overall-score-box {
  background: linear-gradient(135deg, var(--sage-pale), var(--terracotta-light));
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--white);
  background: var(--sage);
}

.score-circle.medium {
  background: #d97706;
}

.score-circle.high {
  background: #dc2626;
}

.score-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mid-gray);
  margin-bottom: 4px;
}

.score-summary {
  font-size: 14.5px;
  color: var(--charcoal);
  line-height: 1.5;
}

/* ── RESULTS OVERLAY ─────────────────────────── */
.results-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 44, 42, 0.5);
  z-index: 500;
  overflow-y: auto;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}

.results-panel {
  background: var(--cream);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  overflow: scroll;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideIn 0.5s ease both;
}

.results-header {
  background: linear-gradient(135deg, var(--sage) 0%, #3d5e41 100%);
  color: var(--white);
  padding: 48px 48px 40px;
  position: relative;
  overflow: hidden;
}

.results-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.results-logo {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 16px;
}

.results-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 8px;
}

.results-subtitle {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.85;
}

.results-date {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.results-body {
  padding: 40px 48px;
}

.results-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--cream-dark);
}

.results-section:last-child {
  border-bottom: none;
}

.results-section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.result-item {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.result-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid-gray);
  margin-bottom: 4px;
}

.result-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--charcoal);
}

.flag-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--terracotta-light);
  border: 1px solid rgba(194, 123, 90, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 8px;
}

.flag-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.flag-text {
  font-size: 14px;
  color: var(--charcoal);
}

.bmi-display {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--sage-pale);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.bmi-number {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 300;
  color: var(--sage);
  line-height: 1;
}

.bmi-label {
  font-size: 13px;
  color: var(--mid-gray);
}

.bmi-category {
  font-size: 18px;
  font-weight: 600;
  color: var(--charcoal);
}

/* ── CTA SECTION ─────────────────────────────── */
.results-cta {
  background: var(--charcoal);
  color: var(--white);
  padding: 48px;
}

.results-cta h3 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 300;
  margin-bottom: 12px;
}

.results-cta>p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  margin-bottom: 28px;
}

/* ── CTA CARDS ───────────────────────────────── */
.cta-cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.cta-card {
  border-radius: var(--radius-md);
  padding: 24px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform var(--transition);
}

.cta-card:hover {
  transform: translateY(-3px);
}

.cta-card--primary {
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
}

.cta-card--secondary {
  background: rgba(91, 122, 95, 0.20);
  border: 1.5px solid rgba(91, 122, 95, 0.35);
}

.cta-card__icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cta-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
}

.cta-card__sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.60);
  line-height: 1.55;
  margin-bottom: 14px;
}

.btn-cta {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.btn-cta--primary {
  background: var(--terracotta);
  color: var(--white);
}

.btn-cta--primary:hover {
  background: #d4895e;
  transform: translateY(-1px);
}

.btn-cta--secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-cta--secondary:hover {
  background: rgba(255, 255, 255, 0.22);
}

.dietitian-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.dietitian-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all var(--transition);
}

.dietitian-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.dt-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.dt-spec {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}

.dt-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(91, 122, 95, 0.4);
  color: #9ec9a2;
  padding: 3px 10px;
  border-radius: 20px;
}

.results-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-schedule {
  padding: 14px 28px;
  background: var(--terracotta);
  color: var(--white);
  border: none;
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-schedule:hover {
  background: #d4895e;
  transform: translateY(-2px);
}

.btn-print {
  padding: 14px 28px;
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-print:hover {
  border-color: var(--white);
}

/* ── SCHEDULE MODAL ──────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 44, 42, 0.65);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 560px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideIn 0.3s ease both;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: var(--cream-dark);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: var(--mid-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--light-gray);
  color: var(--charcoal);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.modal-sub {
  font-size: 14px;
  color: var(--mid-gray);
  margin-bottom: 28px;
}

.btn-confirm {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--sage), #3d5e41);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
  margin-top: 8px;
}

.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 122, 95, 0.35);
}

/* Confirmation */
.confirmation-message {
  text-align: center;
  padding: 40px 20px;
}

.confirm-icon {
  font-size: 40px;
  color: var(--sage);
  margin-bottom: 16px;
  animation: pulse 1s ease;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.confirmation-message h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.confirmation-message p {
  color: var(--mid-gray);
  font-size: 15px;
  line-height: 1.6;
}

/* ── PRINT STYLES ─────────────────────────────── */
@media print {

  .site-header,
  .form-nav,
  .progress-shell,
  .results-cta,
  .modal-overlay,
  .assessment-wrap {
    display: none !important;
  }

  .results-overlay {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }

  .results-panel {
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .results-body {
    padding: 24px !important;
  }

  .results-header {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  @page {
    margin: 0.5in;
  }
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 680px) {
  .assessment-wrap {
    padding: 100px 16px 140px;
  }

  .section-title {
    font-size: 28px;
  }

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

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

  .site-header {
    padding: 14px 20px;
  }

  .form-nav {
    padding: 16px 20px;
  }

  .btn-back,
  .btn-next,
  .btn-submit {
    padding: 12px 20px;
    font-size: 13px;
  }

  .results-header {
    padding: 32px 28px;
  }

  .results-title {
    font-size: 30px;
  }

  .results-body {
    padding: 28px;
  }

  .results-cta {
    padding: 32px 28px;
  }

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

  .cta-cards-row {
    grid-template-columns: 1fr;
  }

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

  .modal-box {
    padding: 32px 24px;
  }
}