:root {
  --primary: #9f1239;
  --secondary: #fce7f3;
  --accent: #d97706;
  --text: #500724;
  --bg: #fdf2f8;
}

body {
  background: #fafafa;
  color: #18181b;
  font-family: ui-monospace, monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New";
}

section {
  padding: 32px 16px;
}

@media (min-width: 768px) {
  section {
    padding: 48px 16px;
  }
}

.card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 4px;
}

.btn {
  border-radius: 4px;
  border: 1px solid #18181b;
  font-weight: 500;
}

h1, h2 {
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* Typography Scale via clamp() */
p, li, span, label, div {
  font-size: clamp(14px, 4vw, 16px);
}

h1 {
  font-size: clamp(20px, 5vw, 32px);
}

h2 {
  font-size: clamp(18px, 4.5vw, 26px);
}

/* Gallery CSS Rules */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.gallery-container {
  width: 100%;
}

.gallery-main {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Strict height via padding-bottom */
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid #e4e4e7;
  background-color: #f4f4f5;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.3s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Radio Checked States for Slides */
#img-1:checked ~ .gallery-main .slide-1,
#img-2:checked ~ .gallery-main .slide-2,
#img-3:checked ~ .gallery-main .slide-3,
#img-4:checked ~ .gallery-main .slide-4 {
  opacity: 1;
  z-index: 10;
}

/* Thumbnails */
.thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.thumbnails label {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: block;
  transition: border-color 0.2s ease;
}

.thumbnails label img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Active Thumbnail Border */
#img-1:checked ~ .thumbnails label[for="img-1"],
#img-2:checked ~ .thumbnails label[for="img-2"],
#img-3:checked ~ .thumbnails label[for="img-3"],
#img-4:checked ~ .thumbnails label[for="img-4"] {
  border-color: var(--primary);
}