/* Sexual Health Starter Kit — A4 booklet pages */

.ig-page {
  --cream: #efe8dc;
  --paper: #fffcf7;
  --ink: #1c2b22;
  --body: #3d4a43;
  --muted: #6b756f;
  --green: #2d4a35;
  --line: rgba(28, 43, 34, 0.16);
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

body.ig-page {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.ig-book {
  --page: min(210mm, calc(100vw - 1.5rem));
  width: var(--page);
  margin: 0 auto;
  padding: 1.25rem 0 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding: 1.15rem 1.25rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(28, 43, 34, 0.08);
  box-sizing: border-box;
  break-after: page;
  page-break-after: always;
}

.sheet--recipe {
  padding: 1rem 1.1rem 0.95rem;
  height: calc(var(--page) * 297 / 210);
  min-height: calc(var(--page) * 297 / 210);
  overflow: hidden;
}

.sheet--recipe .sheet__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sheet--recipe .ig-card {
  flex: 1;
  min-height: 0;
}

.sheet--recipe .ig-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

.sheet--cover {
  padding: 0;
  overflow: hidden;
  margin-bottom: 2.25rem;
  min-height: 0;
}

.sheet--cover img {
  display: block;
  width: 100%;
  height: auto;
}

.sheet__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.sheet__brand {
  margin: 0;
  color: var(--green);
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.sheet__tag {
  margin: 0;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sheet__body {
  flex: 1;
}

.sheet__foot {
  display: block;
  margin-top: 1rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.sheet h2 {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.45rem, 4.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sheet p + h2 {
  margin-top: 1.45rem;
}

.sheet h3 {
  margin: 1.15rem 0 0.35rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.2rem, 3.4vw, 1.4rem);
  font-weight: 600;
}

.sheet p {
  margin: 0 0 0.9rem;
}

.ig__lede {
  margin: 0 0 1.35rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.2rem, 3.4vw, 1.45rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
}

.ig__note {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--green);
  background: #eef3ee;
}

.ig__note strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ig__note + h2 {
  margin-top: 1.5rem;
}

.ig-split {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
}

@media (min-width: 640px) {
  .ig-split {
    grid-template-columns: 1fr 1fr;
  }
}

.ig-box {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.ig-box + .ig-box {
  margin-top: 0.75rem;
}

.ig-split .ig-box + .ig-box {
  margin-top: 0;
}

.ig-split + .ig-box {
  margin-top: 0.75rem;
}

.ig-box h3 {
  margin-top: 0;
}

.ig-box ul,
.sheet__body > ul {
  margin: 0;
  padding-left: 1.1rem;
}

.ig-box li,
.sheet__body > ul li {
  margin: 0 0 0.45rem;
}

.ig-table {
  width: 100%;
  margin: 0 0 1.1rem;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.4;
}

.ig-table th,
.ig-table td {
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.ig-table th {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #eef3ee;
}

.ig-table td:first-child {
  color: var(--ink);
  font-weight: 600;
  width: 28%;
}

.ig-table--protocol {
  font-size: 12.5px;
}

.ig-table--protocol td:first-child {
  width: 24%;
}

.ig-table--protocol td:nth-child(2) {
  width: 22%;
  font-weight: 600;
}

.ig-box p:last-child {
  margin-bottom: 0;
}

.ig-table--4col {
  font-size: 11.5px;
}

.ig-table--4col td:first-child {
  width: 16%;
}

.ig-table--4col th {
  font-size: 9px;
  letter-spacing: 0.06em;
}

@media (max-width: 720px) {
  .ig-table--4col thead {
    display: none;
  }

  .ig-table--4col,
  .ig-table--4col tbody,
  .ig-table--4col tr,
  .ig-table--4col td {
    display: block;
    width: 100%;
  }

  .ig-table--4col tr {
    margin: 0 0 0.75rem;
    border: 1px solid var(--line);
  }

  .ig-table--4col td {
    border: none;
    padding: 0.35rem 0.7rem;
  }

  .ig-table--4col td:first-child {
    width: 100%;
    padding-top: 0.7rem;
    font-size: 0.95rem;
  }

  .ig-table--4col td:last-child {
    padding-bottom: 0.7rem;
  }

  .ig-table--4col td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.15rem;
    color: #2d4a35;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
}

@media (max-width: 640px) {
  .ig-table--protocol thead {
    display: none;
  }

  .ig-table--protocol,
  .ig-table--protocol tbody,
  .ig-table--protocol tr,
  .ig-table--protocol td {
    display: block;
    width: 100%;
  }

  .ig-table--protocol tr {
    margin: 0 0 0.75rem;
    border: 1px solid var(--line);
  }

  .ig-table--protocol td {
    border: none;
    padding: 0.35rem 0.7rem;
  }

  .ig-table--protocol td:first-child,
  .ig-table--protocol td:nth-child(2) {
    width: 100%;
  }

  .ig-table--protocol td:first-child {
    padding-top: 0.7rem;
    font-size: 0.95rem;
  }

  .ig-table--protocol td:last-child {
    padding-bottom: 0.7rem;
  }
}

.sheet--chapter h2,
.sheet--chapter .sheet__sell {
  text-align: left;
}

.sheet__sell {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.2rem, 3.6vw, 1.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
}

.sheet__meal {
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.85rem, 5.5vw, 2.45rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ig-card {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
}

.ig-card img {
  display: block;
  width: 100%;
  height: auto;
}

.ig-cta {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  text-align: left;
}

.ig-cta h2 {
  margin: 0 0 0.85rem;
}

.ig-cta p {
  margin: 0 0 1.35rem;
  max-width: 36rem;
}

a.ig-app {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.ig-cta a,
.ig-cta__btn {
  display: inline-block;
  align-self: flex-start;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--green);
  color: #f7f4ee;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.ig__legal {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body.ig-page {
    background: #fff;
  }

  .ig-book {
    width: 210mm;
    padding: 0;
    gap: 0;
  }

  .sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none;
  }

  .sheet--cover {
    margin: 0;
  }
}
