/* Meta Ads Profit Check. Loaded only on /meta-ads-calculator/. */
#profit-check { padding-top: 36px; }
#profit-check .pc-intro { max-width: 40rem; margin-bottom: 22px; }
#profit-check .pc-intro h2 { margin-bottom: 8px; }
#profit-check .pc-intro p { color: var(--muted); font-size: 17px; line-height: 1.5; }

#profit-check .pc-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}
#profit-check .pc-grid > * { min-width: 0; }

#profit-check .pc-card {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line-light);
  border-radius: 14px;
  padding: 18px;
}
#profit-check .pc-card h2,
#profit-check .pc-card h3 { color: var(--ink); }

#profit-check .pc-fields { display: grid; gap: 14px; }
#profit-check .pc-set { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
#profit-check .pc-set legend,
#profit-check .pc-field label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}
#profit-check .pc-field label {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
}
#profit-check .pc-field { display: grid; gap: 6px; }
#profit-check .pc-hint { color: var(--muted-dark); font-size: 13px; line-height: 1.4; font-weight: 500; }

#profit-check .pc-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#profit-check .pc-seg-opt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 10px;
  text-align: center;
  background: var(--off);
  border-radius: calc(var(--btn-radius) * (1.5em + 28px));
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}
#profit-check .pc-seg-opt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
#profit-check .pc-seg-opt:has(input:checked) {
  background: var(--black);
  color: var(--yellow);
}
#profit-check .pc-seg-opt:has(input:focus-visible) {
  outline: 3px solid var(--black);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--yellow);
}
#profit-check .pc-seg-opt input:focus-visible { outline: none; box-shadow: none; }

#profit-check .pc-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  background: var(--white);
  border: 1px solid #4d4d4d;
  border-radius: 10px;
}
#profit-check .pc-control span[aria-hidden="true"] {
  color: var(--muted-dark);
  font-weight: 800;
}
#profit-check .pc-control input {
  width: 100%;
  border: 0;
  padding: 12px 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
}
#profit-check .pc-control input::placeholder { color: #5f5f5c; font-weight: 500; }
[data-theme=light] #profit-check .pc-control {
  background: #dfe1e4;
  border: 1.5px solid #33363b;
}
[data-theme=light] #profit-check .pc-control input { color: #0e0e10; }
[data-theme=light] #profit-check .pc-control > span { color: #33363b; }
#profit-check .pc-control:focus-within {
  outline: 3px solid var(--black);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--yellow);
}
#profit-check .pc-control input:focus,
#profit-check .pc-control input:focus-visible { outline: none; box-shadow: none; }
#profit-check input[aria-invalid="true"] { border-color: #ff4d2e; }

#profit-check .pc-results {
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}
#profit-check .pc-results .eyebrow { color: var(--yellow); }
#profit-check .pc-results .eyebrow::before { background: var(--yellow); }
#profit-check .pc-results :focus-visible {
  outline-color: var(--yellow);
  box-shadow: 0 0 0 6px var(--black);
}

#profit-check .pc-verdict h3 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 4px 0 10px;
}
#profit-check .pc-verdict p { color: var(--muted); font-size: 16px; line-height: 1.5; margin-top: 8px; }
#profit-check .pc-verdict p.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.5;
  margin-top: 0;
}
#profit-check .pc-verdict [data-verdict-next]:empty { display: none; }
#profit-check .pc-verdict[data-state="printing"] h3 { color: var(--yellow); }
#profit-check .pc-verdict[data-state="ok"] h3 { color: var(--yellow); }
#profit-check .pc-verdict[data-state="edge"] h3 { color: var(--white); }
#profit-check .pc-verdict[data-state="bleeding"] h3 { color: #ff4d2e; }
#profit-check .pc-verdict[data-state="empty"] .pc-ctas { display: none; }

#profit-check .pc-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
}
#profit-check .pc-results .cta-note { color: var(--yellow); margin: 0; }

#profit-check .pc-gauge { margin-top: 18px; }
#profit-check .pc-gauge.is-wait .pc-gauge-track,
#profit-check .pc-gauge.is-under .pc-gauge-track { opacity: 0.55; }
#profit-check .pc-gauge-track {
  position: relative;
  display: flex;
  height: 16px;
  border-radius: calc(var(--btn-radius) * 16px);
  overflow: hidden;
  background: #1c1c1c;
}
#profit-check .pc-zone { display: block; height: 100%; }
#profit-check .pc-zone-under { width: 45%; background: #2a2a2a; }
#profit-check .pc-zone-edge { width: 10%; background: #5c5c58; }
#profit-check .pc-zone-ok { width: 20%; background: #9aa84a; }
#profit-check .pc-zone-print { width: 25%; background: var(--yellow); }
#profit-check .pc-even,
#profit-check .pc-you {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 2px;
  background: var(--white);
}
#profit-check .pc-even { left: 50%; }
#profit-check .pc-you {
  width: 12px;
  height: 12px;
  top: 2px;
  bottom: auto;
  border-radius: 50%;
  background: var(--black);
  border: 2px solid var(--white);
  transform: translateX(-50%);
}
#profit-check .pc-gauge-key {
  display: grid;
  grid-template-columns: 45% 10% 20% 25%;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#profit-check .pc-gauge-key span:nth-child(n + 2) { text-align: center; }
#profit-check .pc-gauge-caption { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 8px; }

#profit-check .pc-hero-stat { margin-top: 16px; }
#profit-check .pc-hero-stat dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
#profit-check .pc-hero-stat dd {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.04em;
  line-height: .95;
  margin-top: 4px;
}
#profit-check .pc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-top: 16px;
}
#profit-check .pc-metrics div { min-width: 0; }
#profit-check .pc-metrics dt { color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.3; }
#profit-check .pc-metrics dt span { font-weight: 500; }
#profit-check .pc-metrics dd {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
#profit-check .pc-sub { display: block; margin-top: 4px; color: var(--muted); font-family: var(--sans); font-size: 12px; letter-spacing: 0; font-weight: 600; }
#profit-check .pc-formula { color: var(--yellow); font-size: 13px; line-height: 1.45; margin-top: 12px; }

#profit-check .pc-split { margin-top: 18px; }
#profit-check .pc-split h3 { font-size: 22px; margin-bottom: 8px; }
#profit-check .pc-bar-wrap { position: relative; margin: 20px 0 10px; }
#profit-check .pc-bar {
  display: flex;
  height: 18px;
  width: 100%;
  overflow: hidden;
  background: #1c1c1c;
  border-radius: calc(var(--btn-radius) * 18px);
}
#profit-check .pc-bar i { display: block; height: 100%; width: 0; }
#profit-check [data-slice="product"] { background: #f4f4f1; }
#profit-check [data-slice="ship"] { background: #bdbdb6; }
#profit-check [data-slice="fees"] { background: #8a8a84; }
#profit-check [data-slice="other"] { background: #5c5c58; }
#profit-check [data-slice="ads"] { background: var(--yellow); }
#profit-check [data-slice="profit"] { background: #ffffff; box-shadow: inset 0 0 0 1px var(--yellow); }
@media (prefers-reduced-motion: no-preference) {
  #profit-check .pc-bar i,
  #profit-check .pc-you { transition: width .45s ease, left .45s ease; }
}
#profit-check .pc-tick {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: var(--white);
  transform: translateX(-1px);
}
#profit-check .pc-tick span {
  position: absolute;
  top: -16px;
  left: 4px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
#profit-check .pc-legend { list-style: none; display: grid; gap: 6px; margin-top: 8px; }
#profit-check .pc-legend li {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}
#profit-check .pc-legend i { width: 12px; height: 12px; border-radius: 2px; }
#profit-check .pc-legend b { color: var(--white); font-weight: 700; }
#profit-check .pc-legend .is-neg b { color: #ff4d2e; }
#profit-check .sw-product { background: #f4f4f1; }
#profit-check .sw-ship { background: #bdbdb6; }
#profit-check .sw-fees { background: #8a8a84; }
#profit-check .sw-other { background: #5c5c58; }
#profit-check .sw-ads { background: var(--yellow); }
[data-theme=light] #profit-check .pc-legend .sw-ads,
[data-theme=light] #profit-check [data-slice="ads"] {
  box-shadow: inset 0 0 0 1.5px #0b0b0b;
}
#profit-check .sw-profit { background: #fff; box-shadow: inset 0 0 0 1px var(--yellow); }
#profit-check .pc-bar-note { color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 8px; }
#profit-check .pc-bar-note:empty { display: none; }
#profit-check .pc-fine { font-size: 12.5px; line-height: 1.45; margin-top: 10px; }
#profit-check .pc-results .pc-fine { color: var(--muted); }
#profit-check .pc-card .pc-fine,
#profit-check .pc-form .pc-fine { color: var(--muted-dark); }
#profit-check .pc-fine a { font-weight: 700; }

#profit-check .pc-form { margin-top: 22px; margin-inline: auto; max-width: 60rem; }
#profit-check .pc-form h2 { margin-bottom: 8px; }
#profit-check .pc-form form,
#profit-check .pc-form .pc-fields { margin-top: 14px; }
#profit-check .pc-form .btn { margin-top: 4px; }
#profit-check .form-success { margin-top: 8px; }
@media (min-width: 768px) {
  #profit-check .pc-form .pc-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
  }
  #profit-check .pc-form .pc-fields > :not(.pc-field) { grid-column: 1 / -1; }
  #profit-check .pc-form .pc-field {
    align-content: start;
    align-items: start;
  }
  #profit-check .pc-form .pc-field label {
    min-height: 0;
    height: auto;
    align-items: end;
    line-height: 1.3;
  }
  /* Compact label, full 44px hit area (it focuses its own input). */
  #profit-check .pc-form .pc-field label::before {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%);
  }
  #profit-check .pc-form .pc-control {
    align-self: start;
    height: 48px;
    min-height: 48px;
  }
  #profit-check .pc-form .pc-control input { padding-block: 0; height: 100%; }
  #profit-check .pc-form .pc-hint { margin: 0; }
}

#profit-check .pc-faq { margin-top: clamp(32px, 3vw, 48px); }
#profit-check .pc-faq h2 { margin-bottom: 8px; }

@media (min-width: 900px) {
  #profit-check .pc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
  #profit-check .pc-card,
  #profit-check .pc-results { padding: 22px; }
}
@media (max-width: 520px) {
  #profit-check .pc-seg { grid-template-columns: 1fr; }
  #profit-check .pc-metrics { grid-template-columns: 1fr; }
  #profit-check .pc-gauge-key { font-size: 12px; letter-spacing: .04em; }
}
