/* Amazon PPC page: hero illustration "where one sale goes" and the break-even ACoS calculator. */

/* Hero panel */
.ppc-leak { padding-bottom: 22px; }
.leak-rows { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.leak-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.leak-name { font-size: 16px; color: var(--muted); }
.leak-val { font-family: var(--mono); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.leak-bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: var(--ground); overflow: hidden; }
.leak-bar i { display: block; height: 100%; border-radius: 999px; }
.leak-tax .leak-bar i { background: #9AACB8; }
.leak-fee .leak-bar i { background: var(--orange); }
.leak-cost .leak-bar i { background: var(--blue); }
.leak-left .leak-bar i { background: #1F9D55; }
.leak-left .leak-name { color: var(--ink); font-weight: 700; }
.leak-left .leak-val { color: #157346; }
.leak-be { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.leak-be span { font-weight: 700; }
.leak-be b { font-size: 34px; line-height: 1; font-weight: 800; color: var(--night); }
.leak-bad, .leak-good { margin: 8px 0 0; font-size: 15.5px; line-height: 1.45; padding: 9px 12px 9px 14px; border-left: 4px solid; border-radius: 0 var(--radius) var(--radius) 0; }
.leak-bad { border-color: #C62828; background: #FDECEC; color: #7A1616; font-weight: 600; }
.leak-good { border-color: #1F9D55; background: #E8F6EE; color: #0F5132; }
.leak-foot { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }

/* Calculator */
.ppc-calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; margin: 8px 0 24px;
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.ppc-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 0; align-items: end; }
.ppc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ppc-field label { font-weight: 700; font-size: 15px; line-height: 1.3; }
.ppc-hint, .ppc-opt { font-weight: 400; color: var(--muted); }
.ppc-hint { display: block; font-size: 13.5px; }
.ppc-input { position: relative; display: flex; align-items: center; }
.ppc-field input, .ppc-field select { width: 100%; min-height: 46px; font: inherit; font-size: 17px; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--field); border-radius: var(--radius); padding: 9px 12px; }
.ppc-input input { padding-right: 46px; }
.ppc-field input:focus, .ppc-field select:focus { outline: 3px solid rgba(240,101,28,.35); outline-offset: 1px; border-color: var(--orange); }
.ppc-unit { position: absolute; right: 12px; color: var(--muted); font-weight: 600; pointer-events: none; }
.ppc-out { background: var(--night); color: var(--white); border-radius: var(--radius); padding: 22px; min-height: 100%; }
.ppc-out p { margin: 0 0 12px; }
.ppc-out p:last-child { margin-bottom: 0; }
.ppc-empty { color: var(--muted-on-dark); }
.ppc-before, .ppc-target { display: flex; flex-direction: column; gap: 2px; }
.ppc-before span, .ppc-target span, .ppc-be span { color: var(--muted-on-dark); font-size: 15px; }
.ppc-before b, .ppc-target b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ppc-be { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); }
.ppc-be b { font-size: clamp(44px, 5vw, 60px); line-height: 1; font-weight: 800; color: var(--orange-on-dark); font-variant-numeric: tabular-nums; }
.ppc-small { font-size: 14.5px; color: var(--muted-on-dark); }

/* Gauge: 0% ACoS on the left, green up to the break-even, red beyond it */
.ppc-gauge { position: relative; margin: 34px 0 34px; }
.ppc-gauge-bar { display: flex; height: 26px; border-radius: 999px; overflow: hidden; }
.ppc-zone { display: flex; align-items: center; min-width: 0; padding: 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.ppc-zone-ok { background: #1F7A4A; color: #E6F6EC; }
.ppc-zone-bad { background: #9E2B2B; color: #FFE5E5; justify-content: flex-end; }
.ppc-mark { position: absolute; top: -6px; bottom: -6px; width: 0; }
.ppc-mark::before { content: ""; position: absolute; left: -1.5px; top: 0; bottom: 0; width: 3px; background: var(--white); border-radius: 2px; }
.ppc-mark-t { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ppc-mark-t.is-start { transform: none; }
.ppc-mark-t.is-end { transform: translateX(-100%); }
.ppc-mark-be .ppc-mark-t { bottom: 100%; margin-bottom: 3px; color: var(--muted-on-dark); }
.ppc-mark-you .ppc-mark-t { top: 100%; margin-top: 3px; }
.ppc-mark-you::after { content: ""; position: absolute; left: -9px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--night); box-shadow: 0 0 0 2px var(--white); }
.is-loss .ppc-mark-you .ppc-mark-t { color: #FF8F8F; }
.is-gain .ppc-mark-you .ppc-mark-t { color: #8BDDA9; }
.ppc-hint-acos { color: var(--muted-on-dark); font-size: 15px; line-height: 1.45; }

/* Verdict card */
.ppc-verdict { border-radius: var(--radius); padding: 16px 18px; border: 2px solid; }
.ppc-verdict p { margin: 0; }
.ppc-verdict.is-loss { background: rgba(214, 48, 49, .22); border-color: #FF6B6B; }
.ppc-verdict.is-gain { background: rgba(31, 157, 85, .2); border-color: #5FBA82; }
.ppc-verdict-h { font-weight: 800; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; }
.is-loss .ppc-verdict-h::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  margin-right: 8px; border-radius: 50%; background: #FF6B6B; color: var(--night); font-size: 15px; vertical-align: 1px; }
.ppc-verdict-n { font-size: clamp(40px, 4.6vw, 54px); line-height: 1.05; font-weight: 800; margin: 6px 0 8px !important; font-variant-numeric: tabular-nums; }
.is-loss .ppc-verdict-n { color: #FF8F8F; }
.is-gain .ppc-verdict-n { color: #8BDDA9; }
.ppc-verdict-sub { font-size: 15px; line-height: 1.45; }
.ppc-verdict-q { margin-top: 14px !important; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); font-size: 14.5px; color: var(--muted-on-dark); }
.ppc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.ppc-tile { display: flex; flex-direction: column; gap: 2px; background: rgba(0,0,0,.22); border-radius: var(--radius); padding: 10px 12px; }
.ppc-tile span { font-size: 13.5px; color: var(--muted-on-dark); }
.ppc-tile b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-loss .ppc-tile b { color: #FF8F8F; }
.is-gain .ppc-tile b { color: #8BDDA9; }
@media (prefers-reduced-motion: no-preference) {
  .ppc-flash { animation: ppc-flash .9s ease-out 1; }
  @keyframes ppc-flash { 0% { box-shadow: 0 0 0 0 rgba(255,107,107,.75); } 100% { box-shadow: 0 0 0 16px rgba(255,107,107,0); } }
}

@media (max-width: 860px) {
  .ppc-calc { grid-template-columns: 1fr; padding: 18px; }
}
@media (max-width: 520px) {
  .ppc-form { grid-template-columns: 1fr; }
  .ppc-out { padding: 18px 16px; }
  .ppc-tiles { grid-template-columns: 1fr; }
  .ppc-tile { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
}

/* spacing between stacked blocks in the chapters */
.ppc .steps + .svc-cards, .ppc .steps + .svc-facts { margin-top: 30px; }
.ppc .svc-facts + .cta-row { margin-top: 18px; }
