/* schwangerwerden.org LIVE 1.0.6 — graphics and responsive publication hotfix.
   Presentation and teaching graphics only. Medical models, calculations,
   storage, privacy controls and approved brand assets remain unchanged. */

/* Calm wrapping: headings stay on whole words; prose only breaks a token when
   it cannot otherwise fit the available 320 px card width. */
.sw-app-page :where(h1, h2, h3, h4, h5, h6, summary, button, .sw-header-action) {
  overflow-wrap: normal !important;
  word-break: normal !important;
  -webkit-hyphens: none !important;
  hyphens: none !important;
  text-wrap: balance;
}

.sw-app-page :where(p, li, label, small) {
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-hyphens: none;
  hyphens: none;
  text-wrap: pretty;
}

.sw-app-page :where(
  article,
  section,
  details,
  summary,
  form,
  fieldset,
  .body-signal-card,
  .body-signal-panel,
  .body-signal-info-body,
  .body-mucus-visual-sequence,
  .body-finger-check,
  .body-finger-grid,
  .v2-age-track,
  .v2-age-band-list
) {
  min-inline-size: 0;
  max-inline-size: 100%;
}

.sw-app-page :where(button, a, input, select, textarea) {
  max-inline-size: 100%;
}

/* The shared header remains a restrained brand carrier on product and legal
   routes. Its lockup does not collapse when the back action needs two lines. */
.sw-site-header-inner {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
}

.sw-site-header .site-brand {
  min-width: 0;
}

.sw-site-header .site-brand-lockup {
  flex: 0 1 auto;
  object-fit: contain;
  object-position: left center;
}

.sw-app-legal-main .sw-app-legal-content :where(p, li, a) {
  overflow-wrap: anywhere;
}

/* One editorial comparison plate instead of five unrelated miniature cards.
   Every row uses the same visual and textual reading order. */
.body-mucus-visual-sequence {
  overflow: hidden;
  border-color: rgba(70, 91, 84, 0.18);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 12px 34px rgba(48, 55, 53, 0.045);
}

.body-mucus-visual-sequence > li {
  position: relative;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: center;
  gap: 9px;
  padding: 14px 16px 16px;
}

.body-mucus-visual-sequence > li + li {
  border-top-color: rgba(70, 91, 84, 0.14);
}

.body-mucus-state-art,
.body-mucus-visual-sequence > li img {
  display: block;
  inline-size: min(100%, 210px) !important;
  width: min(100%, 210px) !important;
  max-inline-size: 210px;
  aspect-ratio: 5 / 3;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(232, 238, 234, 0.26));
  object-fit: contain;
}

.body-mucus-visual-sequence > li > div {
  width: 100%;
}

.body-mucus-visual-sequence strong {
  margin-bottom: 7px;
  color: var(--v2-plum, #543d55);
  font-size: 16px;
  line-height: 1.22;
}

.body-mucus-features {
  gap: 4px;
}

.body-mucus-features li {
  display: block;
  grid-template-columns: none;
  padding: 0 0 0 14px;
  color: var(--v2-muted, #626b68);
  font-size: 13.5px;
  line-height: 1.38;
  overflow-wrap: normal;
  word-break: normal;
}

.body-mucus-features li + li {
  border-top: 0;
  border-left: 0;
}

/* Finger comparison uses the same atlas logic. The 5:3 asset ratio matches the
   actual SVG viewBox and prevents optical compression in Safari/WebKit. */
.body-finger-check {
  padding: clamp(16px, 3vw, 22px);
  border-color: rgba(109, 72, 98, 0.14);
  border-radius: 18px;
  background: rgba(238, 225, 221, 0.28);
  box-shadow: none;
}

.body-finger-check > h6 {
  margin-bottom: 7px;
}

.body-finger-check > p {
  max-width: 68ch;
  margin-top: 0;
  color: var(--v2-muted, #626b68);
}

.body-finger-grid {
  grid-template-columns: minmax(0, 1fr);
  border-color: rgba(70, 91, 84, 0.16);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.82);
}

.body-finger-grid article {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 7px;
  padding: 14px 16px 16px;
}

.body-finger-grid article + article {
  border-top: 1px solid rgba(70, 91, 84, 0.13);
  border-left: 0;
}

.body-finger-art,
.body-finger-grid article img {
  inline-size: min(100%, 220px) !important;
  width: min(100%, 220px) !important;
  max-inline-size: 220px;
  aspect-ratio: 5 / 3;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(232, 238, 234, 0.24));
  object-fit: contain;
}

.body-finger-grid article strong {
  width: 100%;
  color: var(--v2-plum, #543d55);
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

.body-finger-grid article span {
  width: 100%;
  color: var(--v2-muted, #626b68);
  font-size: 13.5px;
  line-height: 1.4;
  overflow-wrap: normal;
  word-break: normal;
}

/* Reduce repeated card/shadow noise in the optional signal module. */
.body-signal-cards {
  gap: 10px;
}

.body-signal-card {
  border-color: rgba(70, 91, 84, 0.16);
  background: rgba(255, 253, 248, 0.62);
  box-shadow: none;
}

.body-signal-card.is-open {
  background: rgba(255, 253, 248, 0.88);
}

.body-signal-accordion-toggle {
  min-height: 58px;
}

.body-signal-info-body section + section {
  margin-top: 20px;
  padding-top: 19px;
}

.body-signal-info-body :where(.body-signal-commit, .body-temperature-add) {
  min-height: 48px;
}

/* Desktop age overview: calm, equal stages rather than a compressed rail.
   The existing links and data attributes remain the interaction contract. */
.v2-age-track {
  counter-reset: age-stage;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}

.v2-age-track::before {
  content: none;
}

.v2-age-track li {
  counter-increment: age-stage;
}

.v2-age-track a {
  min-height: 74px;
  grid-template-columns: 30px minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  align-content: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--v2-line, rgba(62, 91, 83, 0.16));
  border-radius: 14px;
  background: rgba(232, 238, 233, 0.36);
  color: var(--v2-ink, #303735);
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.v2-age-track a:hover,
.v2-age-track a:focus-visible {
  border-color: rgba(62, 91, 83, 0.38);
  background: rgba(232, 238, 233, 0.7);
}

.v2-age-track a:focus-visible {
  outline: 3px solid rgba(62, 91, 83, 0.18);
  outline-offset: 2px;
}

.v2-age-track a > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  background: var(--v2-sage-deep, #3e5b53);
  box-shadow: none;
}

.v2-age-track a > span::after {
  color: #fff;
  content: counter(age-stage);
  font-size: 12px;
  font-weight: 800;
}

.v2-age-track li[aria-current="true"] a {
  border-color: rgba(84, 61, 85, 0.28);
  background: var(--v2-plum-wash, #eee7ee);
  color: var(--v2-plum, #543d55);
}

.v2-age-track li[aria-current="true"] a > span {
  background: var(--v2-plum, #543d55);
  box-shadow: none;
}

.v2-age-band-list {
  counter-reset: age-band;
  border-color: rgba(62, 91, 83, 0.18);
  box-shadow: 0 12px 34px rgba(48, 55, 53, 0.035);
}

.v2-age-band-list details {
  counter-increment: age-band;
}

.v2-age-band-list summary {
  display: grid;
  grid-template-columns: minmax(110px, 0.25fr) minmax(0, 1fr) 24px;
  gap: 12px;
  padding: 14px 17px;
}

.v2-age-band-list summary::after {
  grid-column: 3;
  align-self: center;
  justify-self: end;
}

.v2-age-band-list summary strong {
  min-width: 0;
}

.v2-age-band-list details[open] summary {
  background: rgba(232, 238, 233, 0.4);
}

/* Primary and secondary actions are visibly different without hiding either. */
.v2-age-hero-actions {
  gap: 7px;
}

.v2-age-downlink {
  width: fit-content;
  min-height: 44px;
  padding-inline: 2px;
  color: var(--v2-muted, #626b68);
  font-weight: 680;
}

.v2-age-distinction,
.v2-age-section,
.v2-age-selector,
.v2-age-early,
.v2-age-partners {
  box-shadow: none;
}

/* The three secondary home situations read as one choice group. This keeps the
   main fertility action dominant without removing or hiding another path. */
@media (min-width: 701px) {
  .v2-page .v2-intent-list {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--v2-line, rgba(62, 91, 83, 0.16));
    border-radius: 17px;
    background: rgba(255, 253, 248, 0.62);
  }

  .v2-page .v2-intent-card {
    min-height: 104px;
    border: 0;
    border-radius: 0;
    background: transparent;
    transform: none;
  }

  .v2-page .v2-intent-card + .v2-intent-card {
    border-left: 1px solid var(--v2-line, rgba(62, 91, 83, 0.16));
  }

  .v2-page .v2-intent-card:hover,
  .v2-page .v2-intent-card:focus-visible {
    background: rgba(232, 238, 233, 0.52);
    transform: none;
  }
}

@media (max-width: 720px) {
  /* The five repeated anchors would duplicate the five expandable steps on a
     phone. The expandable list itself becomes the complete vertical timeline. */
  .v2-age-track {
    display: none;
  }

  .v2-age-band-list {
    position: relative;
    overflow: hidden;
    border-radius: 17px;
  }

  .v2-age-band-list::before {
    position: absolute;
    top: 28px;
    bottom: 28px;
    left: 29px;
    width: 2px;
    background: linear-gradient(180deg, var(--v2-sage, #82988c), var(--v2-clay, #c99680), var(--v2-plum, #543d55));
    content: "";
    opacity: 0.46;
  }

  .v2-age-band-list summary {
    position: relative;
    grid-template-columns: 34px minmax(0, 1fr) 24px;
    gap: 3px 11px;
    min-height: 84px;
    padding: 13px 12px;
  }

  .v2-age-band-list summary::before {
    z-index: 1;
    display: grid;
    width: 30px;
    height: 30px;
    grid-row: 1 / 3;
    grid-column: 1;
    align-self: center;
    place-items: center;
    border: 5px solid var(--v2-paper, #fffdf8);
    border-radius: 50%;
    background: var(--v2-sage-deep, #3e5b53);
    color: #fff;
    content: counter(age-band);
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 0 0 1px rgba(62, 91, 83, 0.22);
  }

  .v2-age-band-list summary strong {
    grid-row: 1;
    grid-column: 2;
    align-self: end;
    font-size: 16px;
    line-height: 1.24;
  }

  .v2-age-band-list summary > span {
    grid-row: 2;
    grid-column: 2;
    font-size: 14px;
    line-height: 1.35;
  }

  .v2-age-band-list summary::after {
    grid-row: 1 / 3;
    grid-column: 3;
  }

  .v2-age-band-list details[open] summary::before {
    background: var(--v2-plum, #543d55);
  }

  .v2-age-band-list details > div {
    padding: 0 14px 17px 57px;
  }

  .body-mucus-visual-sequence strong {
    font-size: 15px;
  }

  .body-mucus-features li {
    font-size: 13px !important;
    line-height: 1.33 !important;
  }

  .body-finger-grid article {
    padding: 13px 14px 15px;
  }

  .body-finger-art,
  .body-finger-grid article img {
    inline-size: min(100%, 208px) !important;
    width: min(100%, 208px) !important;
  }

  .v2-age-downlink {
    width: fit-content;
  }
}

@media (max-width: 430px) {
  .sw-app-page :where(
    .v2-age-input-row,
    .body-signal-options-three,
    .body-temperature-row,
    .pc-field-grid,
    .two-fields
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .sw-app-page :where(
    .v2-age-input-row button,
    .body-signal-options-three label,
    .body-temperature-row [data-remove-temperature]
  ) {
    width: 100%;
  }

  .v2-age-personal-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-age-personal-topline > span {
    width: fit-content;
  }
}

@media (max-width: 360px) {
  .sw-site-header .site-brand-lockup {
    width: min(150px, 100%);
    height: 34px;
  }

  .sw-site-header .sw-header-action {
    max-width: 112px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .body-mucus-features li {
    padding-left: 12px;
    font-size: 12.5px !important;
  }

  .body-finger-check {
    padding: 13px 8px;
  }

  .body-finger-grid article {
    padding-inline: 10px;
  }

  .body-finger-grid article span {
    font-size: 12.5px;
  }

  .v2-age-band-list::before {
    left: 25px;
  }

  .v2-age-band-list summary {
    grid-template-columns: 30px minmax(0, 1fr) 22px;
    gap: 3px 8px;
    padding-inline: 9px;
  }

  .v2-age-band-list summary::before {
    width: 28px;
    height: 28px;
  }

  .v2-age-band-list details > div {
    padding-left: 47px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-age-track a {
    transition: none;
  }
}
