:root {
  --bg: #fff5f8;
  --bg-alt: #f7f3f0;
  --card: #ffffff;
  --muted: #5a5a5a;
  --text: #2d2d2d;
  --accent: #e8b4a0; /* rose gold */
  --accent-strong: #8b2845; /* berry */
  --border: #f0e4e8;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  --success: #2ecc71;
  --warning: #f5a524;
  --error: #e65656;
}

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

body {
  margin: 0;
  padding: 0 1rem 2rem;
  font-family: "Mulish", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 20% 10%, rgba(232, 180, 160, 0.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(139, 40, 69, 0.08), transparent 28%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

header.hero {
  padding: 2rem 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(232, 180, 160, 0.18), rgba(230, 215, 255, 0.2));
  border-radius: 20px;
  box-shadow: var(--shadow);
  position: relative;
}

.hero-top {
  width: 100%;
}

.hero-brand {
  width: 100%;
}

.hero-brand .eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--accent-strong);
}

.hero-brand .eyebrow .brand-link {
  flex: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.top-actions .link-btn,
.top-actions .nav-toggle {
  font-size: 0.75rem;
}

.top-actions .nav-label {
  font-size: 0.75rem;
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.auth-links .muted {
  font-size: 0.75rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .auth-links .muted {
    display: none;
  }
}

@media (max-width: 480px) {
  .top-actions {
    gap: 0.5rem;
  }
  
  .nav-toggle {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .link-btn.small {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.nav-toggle {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  z-index: 1001;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hamburger-icon span {
  width: 18px;
  height: 2px;
  background: var(--accent-strong);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.close-icon {
  display: none;
  font-size: 18px;
  line-height: 1;
  color: var(--accent-strong);
}

.nav-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1),
.nav-toggle.is-open .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px) !important;
}

.nav-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2),
.nav-toggle.is-open .hamburger-icon span:nth-child(2) {
  opacity: 0 !important;
}

.nav-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3),
.nav-toggle.is-open .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px) !important;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--card);
  padding: 80px 20px 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
}

.mobile-nav[aria-hidden="false"] .nav-content {
  transform: translateX(0);
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  color: var(--accent-strong);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.nav-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-section li {
  margin-bottom: 8px;
}

.nav-section a {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.nav-section a:hover,
.nav-section a:focus {
  background: var(--bg-alt);
  color: var(--accent-strong);
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-btn.small {
  font-size: 0.9rem;
}

.top-actions .link-btn.small {
  font-size: 0.75rem !important;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--accent-strong);
  margin: 0 0 0.35rem;
}

.brand-link {
  color: var(--accent-strong);
  text-decoration: none;
}

.brand-link:hover,
.brand-link:focus {
  text-decoration: underline;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.9rem;
  line-height: 1.2;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
}

.lede {
  margin: 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-top: 18px;
}

.card-home {
  margin-top: 18px;
}

.upload {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-label {
  font-weight: 600;
}

.preview {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: 14px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.placeholder {
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 1rem;
}

.placeholder-icon {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
}

#selfie {
  width: 100%;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

button {
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button:active {
  transform: translateY(1px);
}

.primary {
  background: linear-gradient(120deg, var(--accent), #e6d7ff);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow);
}

.ghost {
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid var(--border);
}

.secondary {
  background: #fff;
  color: var(--accent-strong);
  border: 1px solid var(--border);
  width: 100%;
}

.full-width {
  width: 100%;
  display: inline-block;
}

.status {
  margin: 0.2rem 0 0;
  color: var(--muted);
  min-height: 1.25rem;
}

.status.error {
  color: var(--error);
}

.results {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.result-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.code-block {
  background: #f5f1f4;
  color: #2d2d2d;
  padding: 0.75rem;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 0.3rem 0 0;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 10px;
}

.loading {
  position: fixed;
  inset: 0;
  background: rgba(255, 245, 248, 0.8);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text);
  z-index: 10;
}

.loading.hidden {
  display: none;
}

.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tab {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  border-color: var(--accent-strong);
  color: var(--text);
  box-shadow: var(--shadow);
}

.tab-panel.hidden {
  display: none;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(232, 180, 160, 0.16), rgba(255, 255, 255, 0.95));
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.summary-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.muted {
  color: var(--muted);
}

.confidence .bar {
  position: relative;
  width: 140px;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.3rem 0;
}

.confidence .bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}

.tag-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #f8e8eb;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--accent-strong);
}

.severity-list {
  display: grid;
  gap: 0.5rem;
}

.severity-row {
  display: grid;
  grid-template-columns: 1fr 3fr auto;
  align-items: center;
  gap: 0.5rem;
}

.severity-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.severity-fill {
  height: 100%;
  border-radius: 999px;
}

.severity-low {
  background: var(--success);
}

.severity-moderate {
  background: var(--warning);
}

.severity-high {
  background: var(--error);
}

.severity-label {
  text-transform: capitalize;
}

.severity-value {
  color: var(--muted);
}

.plan-section {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #f8e8eb;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-strong);
}

.pill-premium {
  border-color: #ffd166;
  color: #ffd166;
}

.step-grid {
  display: grid;
  gap: 0.6rem;
}

.step-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.product-image {
  margin: 0.5rem 0;
  text-align: center;
}

.product-image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.why {
  color: var(--muted);
  font-size: 0.95rem;
}

.step-foot {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price {
  color: var(--muted);
}

.link-btn {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.content-page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.page-header {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.page-image {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.page-intro h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--accent-strong);
  margin: 0 0 1rem 0;
  text-align: center;
}

.goal {
  font-size: 1.1rem;
  text-align: center;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

.content-page section {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.content-page h2 {
  font-family: "Cormorant Garamond", serif;
  color: var(--accent-strong);
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
}

.content-page ol,
.content-page ul {
  padding-left: 1.2rem;
}

.content-page li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.faq-section {
  margin-bottom: 2rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: var(--bg-alt);
  border: none;
  padding: 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: var(--accent);
  color: #fff;
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.faq-item[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item[aria-expanded="true"] .faq-answer {
  padding: 1rem;
  max-height: 240px;
}

.faq-answer p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.no-js .mobile-nav {
  display: none;
}

.shopping-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.recommendations-list {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.recommendations-list li {
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.shopping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  box-shadow: var(--shadow);
  gap: 0.75rem;
}

.shopping-item-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.shopping-item-text {
  flex: 1;
  text-align: left;
}

.shopping-item p {
  margin: 0;
}

.total {
  margin-top: 0.5rem;
}

.plan-summary {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
}

.cta-row {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.email-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.email-field {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.5rem;
}

.email-field input {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.75rem;
}

.status.small {
  font-size: 0.9rem;
}

.dots {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
}

.dot.active {
  background: var(--accent-strong);
}

.legal {
  max-width: 840px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  display: grid;
  gap: 0.4rem;
}

.legal h1,
.legal h2 {
  margin: 0.2rem 0;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
}

.legal ul {
  margin: 0.3rem 0 0.7rem 1.2rem;
  color: var(--muted);
}

.footer {
  margin: 1.5rem auto;
  max-width: 720px;
  color: var(--muted);
  display: grid;
  gap: 0.3rem;
  padding: 0 0.5rem 1rem;
}

.footer-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer a {
  color: var(--accent-strong);
  text-decoration: none;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(232, 180, 160, 0.35);
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 0.75rem;
}

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

@media (max-width: 768px) {
  .content-page {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }

  .page-header {
    padding: 1.5rem;
  }

  .page-intro h1 {
    font-size: 1.75rem;
  }

  .content-page section {
    padding: 1rem;
  }
}

@media (min-width: 768px) {
  body {
    padding: 0 2rem 3rem;
  }

  .card {
    max-width: 720px;
    margin: 18px auto 0;
  }
}
