/* Page content. Coordinates are artboard px read off Storyboard 2a. */

/* ---------- Conversation Topics (p5 / p9) ---------- */

.topics-lead {
  position: absolute;
  top: 156px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.topic-row {
  position: absolute;
  top: 202px;
  left: 122px;
  display: flex;
  gap: 36px;
}

.topic-card {
  width: 180px;
  height: 255px;
  padding: 9px;
  border: 2px solid var(--aqua);
  border-radius: 8px;
  background: var(--white);
  transition:
    outline-color 0.15s ease,
    transform 0.15s ease;
}

.topic-card:hover {
  transform: translateY(-3px);
}

.topic-card.is-selected {
  outline: 4px solid var(--lime);
  outline-offset: 5px;
}

.topic-inner {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 20px;
  width: 100%;
  height: 100%;
  padding: 26px 8px 0;
  border-radius: 4px;
  background: var(--mint);
}

/* Cropped from the storyboard: the navy ring is part of the artwork, so the
   box is the measured 112px ring diameter plus its 2px bleed. */
.topic-icon {
  width: 116px;
  height: 116px;
}

.topic-label {
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

/* Measured off page 9: a 34px tick inset 19px/15px from the card corner,
   less the 11px the mint inner already sits in by. */
.topic-check {
  position: absolute;
  top: 8px;
  right: 4px;
}

.topic-check svg {
  width: 34px;
  height: 34px;
}

/* Shown once every topic has its check. */
.topics-done {
  position: absolute;
  top: 494px;
  left: 50%;
  width: 900px;
  margin: 0;
  transform: translateX(-50%);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.topics-done a {
  color: var(--navy);
  text-decoration: underline;
}

/* ---------- Overview (p15, p37, P2 p5 / p25 / p43) ----------
   One layout for all five topics. The hero photo is always 344 wide at x 0
   but each topic crops it to a different height, and the panel stack sits at
   a different y with a different gap; both are measured per page. */

.overview-photo {
  position: absolute;
  top: var(--ov-photo-top);
  left: 0;
  width: 344px;
  height: var(--ov-photo-h);
  object-fit: cover;
}

.info-stack {
  position: absolute;
  top: var(--ov-top);
  left: var(--ov-left);
  width: 882px;
  display: grid;
  gap: var(--ov-gap);
}

.ov-family-history {
  --ov-photo-top: 86px;
  --ov-photo-h: 371px;
  --ov-top: 124px;
  --ov-left: 373px;
  --ov-gap: 25px;
}

.ov-prevention {
  --ov-photo-top: 72px;
  --ov-photo-h: 372px;
  --ov-top: 109px;
  --ov-left: 373px;
  --ov-gap: 25px;
  --ov-pad: 41px;
  --ov-panel-h: 397px;
}

.ov-managing {
  --ov-photo-top: 79px;
  --ov-photo-h: 365px;
  --ov-top: 98px;
  --ov-left: 371px;
  --ov-gap: 14px;
}

.ov-risk {
  --ov-photo-top: 72px;
  --ov-photo-h: 372px;
  --ov-top: 111px;
  --ov-left: 374px;
  --ov-gap: 25px;
}

.ov-lifestyle {
  --ov-photo-top: 72px;
  --ov-photo-h: 366px;
  --ov-top: 96px;
  --ov-left: 374px;
  --ov-gap: 8px;
}

/* The habit grid is the tall panel. A slightly tighter row keeps the stack
   clear of Next without running into the Badges button. */
.ov-lifestyle .info-grid.is-3up {
  row-gap: 10px;
}

/* A heading above an icon grid (Managing, Healthy Lifestyle). */
.info-heading {
  margin: 0 0 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

.info-row.has-grid {
  align-items: start;
  height: var(--ov-panel-h, auto);
  padding: 19px var(--ov-pad, 26px);
}

.info-row.has-grid:not(.has-icon) {
  grid-template-columns: 1fr;
}

.info-grid {
  display: grid;
  align-items: center;
  margin-top: 18px;
  column-gap: 24px;
  row-gap: 22px;
}

/* Prevention's four icons sit in a narrow two-column block indented well
   inside the panel, so the labels wrap the way the storyboard draws them. */
.info-grid.is-2up {
  grid-template-columns: repeat(2, 240px);
  column-gap: 103px;
  row-gap: 37px;
  margin-top: 35px;
  padding-left: 118px;
}

/* Managing and Healthy Lifestyle put three icons on a 267px pitch under the
   panel heading, indented to clear the panel's own left icon column. */
.info-grid.is-3up {
  grid-template-columns: repeat(3, 238px);
  column-gap: 29px;
  margin-top: 6px;
  padding-left: 67px;
}

.info-cell {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  font-size: 17px;
  line-height: 1.24;
}

.info-cell img {
  width: 64px;
  height: 64px;
}

/* Prevention draws the same icons at 82px. */
.info-grid.is-2up .info-cell img {
  width: 82px;
  height: 82px;
}

.info-main {
  min-width: 0;
}

/* The storyboard's rows are 100px for two lines and 110px for three: a 23px
   line pitch inside a row that stays at least 100px tall. */
.info-row {
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  gap: 20px;
  min-height: 100px;
  padding: 16px 26px;
  border-radius: 10px;
  background: var(--mint);
  font-size: 18px;
  line-height: 23px;
}

.info-row p {
  margin: 0;
}

/* As on the topic cards, the navy ring belongs to the cropped artwork. */
.info-icon {
  width: 66px;
  height: 66px;
}

/* ---------- How to Use, standalone page ---------- */

/* Direct child only: the Help popover renders its own copy of the block
   inside the page and must keep it in normal flow. */
.page-body > .htu {
  position: absolute;
  top: 122px;
  left: 46px;
}

/* ---------- Dev review bar (not part of the deliverable UI) ----------
   Hidden by default. The corner toggle is nearly invisible until hover. */

.review-toggle {
  position: fixed;
  right: 4px;
  bottom: 4px;
  z-index: 91;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: rgba(22, 32, 43, 0.12);
  cursor: pointer;
}

.review-toggle:hover,
.review-toggle:focus-visible {
  background: rgba(22, 32, 43, 0.45);
}

.review-toggle.is-open {
  background: rgba(22, 32, 43, 0.55);
}

.review-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #16202b;
  color: #9fb3c8;
  font-family: var(--font);
  font-size: 12px;
}

.review-bar.is-open {
  display: flex;
}

.review-bar span {
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  opacity: 0.7;
}

.review-bar span:first-child {
  margin-left: 0;
}

.review-bar button {
  padding: 4px 10px;
  border-radius: 5px;
  background: #24323f;
  color: #dbe6f0;
  font-size: 12px;
}

.review-bar button:hover {
  background: #33485c;
}

.review-bar button.is-on {
  background: var(--sky);
  color: #fff;
}
