:root {
  --bg: #f6f3ef;
  --panel: #ffffff;
  --border: #ddd6ce;
  --border-strong: #cdbfb0;
  --text: #1f2430;
  --muted: #5f6672;
  --accent: #7d2031;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 Inter, Arial, Helvetica, sans-serif;
}
img { display: block; max-width: 100%; }
button { font: inherit; }
strong { color: var(--text); }

.page {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.section + .section { margin-top: 16px; }
.intro { padding-bottom: 18px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
}
h2 {
  margin-bottom: 10px;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.15;
}
p, li, figcaption span { color: var(--muted); }
.lede { margin-bottom: 0; max-width: 62ch; }
.build-stamp {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.carousel-controls,
.dots {
  display: flex;
  gap: 10px;
}
.control,
.dot {
  border: 1px solid var(--border-strong);
  background: #faf8f5;
  color: var(--text);
}
.control {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
}
.dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
}
.dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

.carousel { display: block; }
.slide { display: none; }
.slide.is-active { display: block; }

.image-panel {
  margin: 0;
}
.image-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f2eeea;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.image-frame.landscape {
  min-height: 420px;
}
.image-frame.portrait {
  min-height: 520px;
}
.image-frame img {
  width: auto;
  max-width: 300px;
  max-height: 300px;
  object-fit: contain;
  object-position: center top;
}

figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
}
figcaption strong {
  font-size: 1rem;
}

.dots {
  justify-content: center;
  margin-top: 14px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.note-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #fcfbf9;
}
.note-card h2 {
  font-size: 1.12rem;
}
.note-card ul,
.next-steps {
  margin: 0;
  padding-left: 20px;
}
.note-card li + li,
.next-steps li + li {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 16px, 1100px);
    padding-top: 16px;
  }
  .section {
    padding: 16px;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
  }
  .image-frame.landscape {
    min-height: 260px;
  }
  .image-frame.portrait {
    min-height: 360px;
  }
}
