:root {
  --bg: #efe2d0;
  --bg-deep: #e2c8af;
  --surface: rgba(255, 248, 240, 0.74);
  --surface-strong: #f8efe6;
  --border: rgba(108, 58, 45, 0.18);
  --text: #3d241d;
  --muted: #7b5b4d;
  --primary: #7c2d2d;
  --primary-deep: #5a1f1f;
  --accent: #9c6b3f;
  --shadow: 0 22px 50px rgba(89, 49, 35, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(156, 107, 63, 0.18), transparent 28%),
    radial-gradient(circle at right, rgba(124, 45, 45, 0.14), transparent 24%),
    linear-gradient(135deg, #f5eadb 0%, var(--bg) 48%, #dec0a7 100%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.card {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 38px;
  border-radius: var(--radius-lg);
}

.hero-panel {
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: stretch;
}

.panel-card {
  width: 100%;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(124, 45, 45, 0.92), rgba(83, 32, 32, 0.92));
  color: #f9ebe3;
  padding: 28px;
}

.panel-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.panel-label,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

.eyebrow {
  color: var(--accent);
  margin: 0 0 12px;
}

.panel-label {
  margin: 0;
  color: #f2cfbe;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.95;
  max-width: 10ch;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.hero-text {
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 18px 0 0;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span {
  border-radius: 999px;
  background: rgba(124, 45, 45, 0.09);
  color: var(--primary);
  border: 1px solid rgba(124, 45, 45, 0.12);
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 30px;
}

.section-head {
  margin-bottom: 22px;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label,
fieldset {
  display: block;
}

label span,
legend {
  display: block;
  margin-bottom: 9px;
  font-weight: 700;
  color: var(--text);
}

input,
select {
  width: 100%;
  border: 1px solid rgba(108, 58, 45, 0.16);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  padding: 14px 14px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  border-color: rgba(124, 45, 45, 0.55);
  box-shadow: 0 0 0 4px rgba(124, 45, 45, 0.08);
  transform: translateY(-1px);
}

.diet-choice {
  margin: 22px 0;
  border: 0;
  padding: 0;
}

.radio-pill {
  display: inline-flex;
  margin-right: 12px;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill span {
  margin: 0;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(156, 107, 63, 0.08);
  border: 1px solid rgba(156, 107, 63, 0.16);
  color: var(--muted);
  transition: all 0.2s ease;
}

.radio-pill input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff3ea;
}

.primary-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff4ec;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(124, 45, 45, 0.22);
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--primary);
  font-weight: 600;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  border: 1px dashed rgba(124, 45, 45, 0.2);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.hidden {
  display: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-box {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 250, 245, 0.92), rgba(242, 224, 206, 0.92));
  border: 1px solid rgba(108, 58, 45, 0.14);
}

.metric-box p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.metric-box strong {
  font-size: 1.35rem;
  color: var(--primary-deep);
}

.result-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.diet-list,
.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.diet-list li,
.tips-list li {
  position: relative;
  padding: 14px 14px 14px 44px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(255, 250, 245, 0.78);
  border: 1px solid rgba(108, 58, 45, 0.1);
  line-height: 1.55;
}

.diet-list li::before,
.tips-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 0 0 4px rgba(124, 45, 45, 0.08);
}

@media (max-width: 920px) {
  .hero,
  .content-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .card {
    padding: 24px;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

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

  h1 {
    max-width: 100%;
  }

  .radio-pill {
    width: 100%;
    margin: 0 0 10px;
  }

  .radio-pill span {
    width: 100%;
    text-align: center;
  }
}
