/* ============================================================================
   Conversion Equation — page-specific styles
   Values taken from reference/spec/conversion-equation.desktop.json and the
   live page's own #pagestyle block (Duda serves this widget as hand-written
   CSS, so the geometry below is the live geometry, not an approximation).
   Every rule is scoped to .page-conversion-equation.
   ========================================================================== */

/* ---------- shared-system workarounds (scoped, not edits to site.css) ----------
   1. The live Duda header casts a soft drop shadow over the page (has-shadow),
      which site.css does not reproduce; without it a 15px band under the header
      differs on every page. Measured off the live pixels: ~0.33 alpha, ~14px blur.
   2. The live footer rule is a 1px border on a 3px-tall box; site.css draws a
      3px border. Both are noted in the build report as site.css fixes. */
.page-conversion-equation .site-header { box-shadow: 0 0 14px rgba(0, 0, 0, .33); }
.page-conversion-equation .footer-rule { height: 3px; border-top-width: 1px; }
/* 3. "You can also find us here:" is a 17px line box on the live page; ours
      inherits Arial's 18.4px normal line-height, which pushes everything from
      the social row down to the page foot 1px low. */
.page-conversion-equation .footer-find { line-height: 17px; }

/* ---------- page shell ----------
   Live: h1 text top y=151 (header 119 + 32), h1 box bottom 234, first section
   top 324 (=234 + 45 wrapper pad + 45 section margin). Page ends 15px after
   the button's 10px bottom margin, at y=3465 where the footer starts. */
.page-conversion-equation .ce-page {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 15px;
}

/* Live h1: 70px arialroundedmtbold 700, black, inset 40px from the container
   left edge (Duda nests two padded rows around it). */
.page-conversion-equation .ce-h1 {
  font-family: var(--font-rounded);
  font-size: 70px;
  font-weight: 700;
  line-height: normal;
  color: #000;
  text-align: left;
  padding: 32px 0 2px 40px;
}
.page-conversion-equation .ce-h1__c { color: var(--gold); }

.page-conversion-equation .ce-sections {
  padding-top: 45px;
  text-align: center;
}

/* ---------- scoring block ---------- */
.page-conversion-equation .ce-sec {
  margin: 45px 10px;
  border: 2px solid #000;
  background: var(--white);
}
/* The first block is left-aligned and given a fixed height on the live page. */
.page-conversion-equation .ce-sec--first {
  width: 940px;
  max-width: 100%;
  height: 545px;
  margin-left: 0;
  margin-right: auto;
}

.page-conversion-equation .ce-sec-title {
  display: flex;
  align-items: center;
  height: 100px;
  background: #000;
}

.page-conversion-equation .ce-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10%;
  height: 80px;
}
.page-conversion-equation .ce-num-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60%;
  height: 80%;
  background: var(--gold);
}
.page-conversion-equation .ce-num-box span {
  color: var(--white);
  font-weight: 700;
  font-size: 30px;
  line-height: normal;
  text-align: center;
}

.page-conversion-equation .ce-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10%;
  height: 80%;
  margin-right: 20px;
}
/* Duda draws these with the Material Icons webfont; redrawn as inline SVG at
   the same 48px box so nothing is fetched off-site. */
.page-conversion-equation .ce-ico svg {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  fill: var(--white);
}
/* The ligature name the icon font renders stays in the DOM (as it is on the
   live page) but takes no space and paints nothing. */
.page-conversion-equation .ce-lig {
  font-size: 0;
  line-height: 0;
  color: transparent;
  font-style: normal;
}

.page-conversion-equation .ce-name {
  display: flex;
  align-items: center;
  height: 80px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 25px;
  font-weight: 400;
  line-height: normal;
}
/* A single-line title centres on a half-pixel inside the 80px title box and
   lands one pixel below the live page; the two-line title (block 1) centres on
   a whole pixel and already matches. Paint-only nudge, no layout change. */
.page-conversion-equation .ce-name--single span {
  position: relative;
  top: -1px;
}

.page-conversion-equation .ce-body { padding: 12px 20px; }

.page-conversion-equation .ce-row {
  display: flex;
  align-items: center;
  font-size: 22px;
}
.page-conversion-equation .ce-row-radio {
  display: flex;
  align-items: center;
  width: 12%;
}
.page-conversion-equation .ce-row-text {
  width: 80%;
  margin-right: 20px;
  padding: 10px 20px;
  color: var(--body-text);
}
.page-conversion-equation .ce-row-text--alert { color: #ff0000; }

/* ---------- radios ---------- */
.page-conversion-equation .ce-label {
  display: block;
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  color: var(--body-text);
  font-size: 22px;
  line-height: normal;
  -webkit-user-select: none;
  user-select: none;
}
.page-conversion-equation .ce-label--plain { cursor: default; }
.page-conversion-equation .ce-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.page-conversion-equation .ce-check {
  position: absolute;
  top: 0;
  left: 0;
  width: 25px;
  height: 25px;
  background: #000;
  border-radius: 50%;
}
.page-conversion-equation .ce-label:hover input ~ .ce-check { background: #ccc; }
.page-conversion-equation .ce-label input:checked ~ .ce-check { background: var(--gold); }
.page-conversion-equation .ce-label input:focus-visible ~ .ce-check {
  outline: 2px solid var(--gold-btn);
  outline-offset: 2px;
}
.page-conversion-equation .ce-check::after {
  content: "";
  position: absolute;
  display: none;
  top: 9px;
  left: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
}
.page-conversion-equation .ce-label input:checked ~ .ce-check::after { display: block; }

/* ---------- running total ---------- */
.page-conversion-equation .ce-total .ce-row-text p {
  margin: 22px 0;
  font-size: 22px;
  color: var(--body-text);
}

/* ---------- results button ----------
   Live: 280x47, 3px black border, 10px radius, 0 3px 11px rgba(0,0,0,.25). */
.page-conversion-equation .ce-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  max-width: 100%;
  height: 47px;
  margin: 10px auto;
  padding: 0;
  background: var(--gold-btn);
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, .25) 0 3px 11px 0;
  text-align: center;
}
.page-conversion-equation .ce-btn span {
  display: inline-block;
  padding: 10px 7px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
  color: var(--white);
}
.page-conversion-equation .ce-btn:hover { background: var(--gold-btn-hover); }

/* ---------- overall block (revealed by the button) ---------- */
.page-conversion-equation .ce-result-item { display: none; }

/* ============================================================================
   MOBILE — same content, stacked and re-proportioned so nothing is squeezed.
   Duda serves a different mobile layout; this matches its shape, not its pixels.
   ========================================================================== */
@media (max-width: 767px) {
  .page-conversion-equation .ce-h1 {
    font-size: 30px;
    padding: 20px 15px 2px;
  }
  .page-conversion-equation .ce-sections { padding-top: 20px; }

  .page-conversion-equation .ce-sec { margin: 30px 10px; }
  .page-conversion-equation .ce-sec--first {
    width: auto;
    height: auto;
    margin-left: 10px;
  }

  .page-conversion-equation .ce-num {
    width: auto;
    flex: 0 0 66px;
    height: 64px;
  }
  .page-conversion-equation .ce-num-box { width: 46px; height: 64px; }
  .page-conversion-equation .ce-ico {
    width: auto;
    flex: 0 0 48px;
    margin-right: 12px;
  }
  .page-conversion-equation .ce-name {
    height: auto;
    font-size: 16px;
    padding: 8px 10px 8px 0;
  }

  .page-conversion-equation .ce-body { padding: 12px 8px; }
  .page-conversion-equation .ce-row { font-size: 14px; }
  .page-conversion-equation .ce-row-radio { width: auto; flex: 0 0 105px; }
  .page-conversion-equation .ce-label { font-size: 14px; }
  .page-conversion-equation .ce-row-text {
    width: auto;
    flex: 1 1 auto;
    margin-right: 0;
    padding: 10px 12px;
    text-align: left;
  }
  .page-conversion-equation .ce-total .ce-row-text p { font-size: 14px; margin: 14px 0; }
}
