:root {
  --paper: #f4f1e9;
  --paper-deep: #e9e4d8;
  --ink: #213029;
  --muted: #6f7872;
  --sage: #607669;
  --sage-pale: #dfe6de;
  --clay: #a86550;
  --line: rgba(33, 48, 41, 0.16);
  --white: #fbfaf6;
  --serif: 'Iowan Old Style', Baskerville, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button,
select {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

[hidden],
.hidden {
  display: none !important;
}

.skip-link {
  background: var(--ink);
  color: var(--white);
  left: 1rem;
  padding: 0.65rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.dosha-entry,
.experience,
footer {
  margin-inline: auto;
  max-width: 1220px;
  width: calc(100% - 48px);
}

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  min-height: 80px;
}

.wordmark {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 600;
  gap: 0.7rem;
  line-height: 1.2;
  text-decoration: none;
}

.wordmark small {
  color: var(--muted);
  display: block;
  font-size: 0.66rem;
  font-weight: 400;
  margin-top: 0.1rem;
}

.brand-mark {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--clay);
  display: inline-flex;
  font-size: 0.74rem;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.eyebrow {
  color: var(--sage);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dosha-entry {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
  padding-block: clamp(3.5rem, 7vh, 6rem);
  text-align: center;
}

.entry-heading {
  position: relative;
  z-index: 2;
}

.entry-heading h1 {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 7vw, 6.6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
  margin-block: 0.65rem 1rem;
}

.entry-heading > p:last-child {
  color: var(--muted);
  font-size: 0.86rem;
  margin-inline: auto;
  max-width: 470px;
}

.dosha-map {
  aspect-ratio: 1;
  margin-block: clamp(1.5rem, 3vh, 2.75rem);
  max-width: 610px;
  position: relative;
  width: min(62vh, 610px);
}

.dosha-lines {
  height: 100%;
  inset: 0;
  overflow: visible;
  position: absolute;
  width: 100%;
}

.dosha-lines circle,
.dosha-lines path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.dosha-lines path {
  stroke-dasharray: 3 7;
}

.dosha-center,
.dosha-node {
  border-radius: 50%;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.dosha-center {
  align-items: center;
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
  height: 126px;
  justify-content: center;
  width: 126px;
  z-index: 2;
}

.dosha-center span {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1;
}

.dosha-center small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  margin-top: 0.35rem;
  text-transform: uppercase;
}

.dosha-node {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 150px;
  justify-content: center;
  width: 150px;
  z-index: 3;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.dosha-node:hover,
.dosha-node:focus-visible {
  background: var(--white);
  border-color: var(--sage);
}

.dosha-node:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.node-vata {
  top: 15.3%;
}

.node-pitta {
  left: 80%;
  top: 68.5%;
}

.node-kapha {
  left: 20%;
  top: 68.5%;
}

.node-symbol {
  color: var(--clay);
  font-size: 0.9rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}

.dosha-node strong {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1;
}

.dosha-node small {
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  margin-top: 0.35rem;
  text-transform: uppercase;
}

.node-action {
  color: var(--sage);
  font-size: 0.6rem;
  margin-top: 0.55rem;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.dosha-node:hover .node-action,
.dosha-node:focus-visible .node-action {
  opacity: 1;
  transform: translateY(0);
}

.quiet-action,
.text-action {
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.025em;
  padding: 0.25rem 0;
}

.quiet-action {
  color: var(--ink);
}

.quiet-action span {
  display: inline-block;
  margin-left: 1.2rem;
  transition: transform 180ms ease;
}

.quiet-action:hover span {
  transform: translateX(4px);
}

.text-action:hover,
.quiet-action:hover {
  color: var(--clay);
}

.experience {
  scroll-margin-top: 1rem;
}

.app-view {
  border-top: 1px solid var(--line);
  padding-block: clamp(4rem, 8vw, 8rem);
}

.view-heading,
.quiz-meta,
.meal-heading,
.result-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.quiz-meta {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  margin-top: 2.5rem;
  text-transform: uppercase;
}

.quiz-progress-bar {
  background: var(--paper-deep);
  height: 2px;
  margin-block: 1rem 3.5rem;
  overflow: hidden;
}

.quiz-progress-fill {
  background: var(--clay);
  height: 100%;
  transition: width 280ms ease;
}

.quiz-question,
.meal-heading h2,
.dietary-tips h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.quiz-question {
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: 1.05;
}

.quiz-support {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.quiz-image-cards {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2.5rem;
}

.quiz-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0 1.25rem 1.25rem;
  text-align: left;
}

.quiz-card + .quiz-card {
  border-left: 1px solid var(--line);
}

.quiz-card-img {
  grid-column: 1 / -1;
  height: clamp(210px, 25vw, 330px);
  margin: 0 -1.25rem 1.2rem;
  overflow: hidden;
}

.quiz-card-img img {
  filter: saturate(0.72);
  height: 100%;
  object-fit: cover;
  transition: filter 200ms ease, transform 300ms ease;
  width: 100%;
}

.quiz-card:hover .quiz-card-img img,
.quiz-card.selected .quiz-card-img img {
  filter: saturate(1);
  transform: scale(1.015);
}

.quiz-card-copy {
  display: flex;
  flex-direction: column;
}

.quiz-card-title {
  font-family: var(--serif);
  font-size: 1.35rem;
}

.quiz-card-sub {
  color: var(--muted);
  font-size: 0.72rem;
}

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

.quiz-card.selected,
.quiz-card:hover .choice-mark {
  color: var(--clay);
}

.quiz-nav {
  margin-top: 1.5rem;
}

.result-intro {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: clamp(3rem, 8vw, 8rem);
  grid-template-columns: minmax(280px, 0.8fr) 1.2fr;
  padding-bottom: 4rem;
}

.result-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.result-image img {
  filter: saturate(0.78);
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.result-copy h1 {
  font-family: var(--serif);
  font-size: clamp(5rem, 11vw, 10rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin-block: 0.75rem 1.5rem;
}

.dosha-desc {
  color: var(--muted);
  max-width: 590px;
}

.favor-avoid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.favor-avoid > div {
  padding: 3rem;
}

.favor-avoid > div + div {
  border-left: 1px solid var(--line);
}

.list-label {
  color: var(--sage);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.favor-avoid ul,
.dietary-tips ul {
  list-style: none;
}

.favor-avoid li,
.dietary-tips li {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  padding-block: 0.72rem;
}

.meal-heading {
  align-items: end;
  margin-top: 7rem;
}

.meal-heading h2,
.dietary-tips h2 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1;
  margin-top: 0.65rem;
}

.meal-filter {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.7rem;
  gap: 0.7rem;
}

.meal-filter select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.35rem 1.25rem 0.35rem 0;
}

.meals-grid {
  display: grid;
  gap: 3.2rem 1.4rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2.75rem;
}

.meal-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.meal-card-img img {
  filter: saturate(0.76);
  height: 100%;
  object-fit: cover;
  transition: filter 200ms ease, transform 300ms ease;
  width: 100%;
}

.meal-card:hover .meal-card-img img {
  filter: saturate(1);
  transform: scale(1.02);
}

.meal-card-body {
  padding-top: 1rem;
}

.meal-tag {
  color: var(--clay);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meal-card h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
  margin-block: 0.45rem;
}

.meal-card-body > p {
  color: var(--muted);
  font-size: 0.76rem;
}

.ingredients {
  border-top: 1px solid var(--line);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.ingredients span {
  color: var(--ink);
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.dietary-tips {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4rem;
  grid-template-columns: 0.8fr 1.2fr;
  margin-top: 7rem;
  padding-block: 4rem;
}

.result-actions {
  margin-top: 2rem;
}

.care-note {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.6;
  margin: 4rem auto 0;
  max-width: 620px;
  text-align: center;
}

footer {
  align-items: end;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-block: 2.5rem;
}

footer > p {
  color: var(--muted);
  font-size: 0.68rem;
}

@media (max-width: 820px) {
  .dosha-map {
    width: min(72vw, 580px);
  }

  .quiz-image-cards,
  .meals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quiz-card:last-child {
    border-left: 0;
    margin-top: 1.5rem;
  }

  .result-intro,
  .dietary-tips {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header,
  .dosha-entry,
  .experience,
  footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 70px;
  }

  .dosha-entry {
    min-height: calc(100vh - 70px);
    padding-block: 3rem;
  }

  .entry-heading h1 {
    font-size: 3.7rem;
  }

  .entry-heading > p:last-child {
    max-width: 340px;
  }

  .dosha-map {
    margin-block: 2rem;
    width: min(96vw, 440px);
  }

  .dosha-center {
    height: 92px;
    width: 92px;
  }

  .dosha-center span {
    font-size: 1.2rem;
  }

  .dosha-node {
    height: 112px;
    width: 112px;
  }

  .dosha-node strong {
    font-size: 1.25rem;
  }

  .node-action {
    display: none;
  }

  .quiz-image-cards,
  .meals-grid {
    grid-template-columns: 1fr;
  }

  .quiz-card,
  .quiz-card + .quiz-card,
  .quiz-card:last-child {
    border-left: 0;
    margin-top: 1.3rem;
    padding-inline: 0;
  }

  .quiz-card-img {
    height: 220px;
    margin-inline: 0;
  }

  .result-intro {
    gap: 2.5rem;
  }

  .result-image {
    aspect-ratio: 4 / 3;
  }

  .favor-avoid {
    grid-template-columns: 1fr;
  }

  .favor-avoid > div {
    padding: 2.5rem 0;
  }

  .favor-avoid > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .meal-heading {
    align-items: start;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 5rem;
  }

  .dietary-tips {
    gap: 2.5rem;
    margin-top: 5rem;
  }

  .result-actions,
  footer {
    align-items: start;
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Soft contrast and image finish */
.favor-avoid {
  gap: 1rem;
  padding-block: 3rem;
}

.favor-avoid > div {
  border: 1px solid rgba(33, 48, 41, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(33, 48, 41, 0.05);
  padding: 2.5rem;
}

.favor-avoid > div:first-child {
  background: #e2ebe2;
}

.favor-avoid > div:last-child {
  background: #efe1da;
}

.favor-avoid > div + div {
  border-left: 1px solid rgba(33, 48, 41, 0.08);
}

.favor-avoid > div:first-child .list-label {
  color: #486557;
}

.favor-avoid > div:last-child .list-label {
  color: #965743;
}

.result-image,
.quiz-card-img,
.meal-card-img {
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(33, 48, 41, 0.09);
}

.meal-card-img {
  background: var(--paper-deep);
}

@media (max-width: 620px) {
  .favor-avoid {
    gap: 0.85rem;
  }

  .favor-avoid > div,
  .favor-avoid > div + div {
    border: 1px solid rgba(33, 48, 41, 0.08);
    padding: 2rem;
  }

  .result-image,
  .quiz-card-img,
  .meal-card-img {
    border-radius: 14px;
  }
}