/* The free tools' own pages (/tools and /tools/<name>; views/tools/about.php and about_index.php, app/lib/toolpages.php;
   Nov 6, 2026). Loaded only by those pages, after app.css; the hero, buttons, tiles, phone and browser frames are app.css's
   (.pp-hero-home, .pp-hero-pair, .pp-btn-see, .pp-rl-tile, .pp-phone, .pp-browser), so these are the parts of their own. */

/* the hero's screens: the tool on a computer, with the phone in front of it at the bottom left */
.pp-tool-vis { position: relative; max-width: 640px; margin: 0 auto; padding: 0 0 64px 74px; }
.pp-tool-vis .pp-browser { position: relative; z-index: 1; }
.pp-tool-vis .pp-car-track img { cursor: zoom-in; }
.pp-tool-vis .pp-tool-pstack { position: absolute; left: 0; bottom: 0; z-index: 3; width: 176px; max-width: none; height: auto; margin: 0; }
.pp-tool-pstack .pp-phone { position: relative; top: 0; left: auto; transform: none; width: 100%; padding: 20px 6px 7px; border-radius: 29px; }
.pp-tool-pstack .pp-phone::before { top: 7px; width: 44px; height: 9px; }
.pp-tool-pstack .pp-phone img { border-radius: 4px 4px 23px 23px; }
.pp-tool-pstack .pp-phone .pp-zoom-mark { bottom: 12px; right: 10px; width: 24px; height: 24px; font-size: .6rem; }
@media (max-width: 991.98px) { .pp-tool-vis { max-width: 560px; } }
@media (max-width: 575.98px) {   /* phones: the phone screen alone, big enough to read */
  .pp-tool-vis { padding: 0; }
  .pp-tool-vis .pp-browser { display: none; }
  .pp-tool-vis .pp-tool-pstack { position: relative; width: 214px; margin: 0 auto; }
}

/* the worked example: what goes in as chips, the answer as the calculator's own tiles (.pp-cx-out, .pp-cx-t in app.css) */
.pp-tool-ex { padding: 20px 22px 22px; border-radius: 18px; border: 1px solid var(--pp-line); background: var(--pp-card); }
.pp-tool-ex-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.pp-tool-ex h2 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.pp-tool-try { display: inline-flex; align-items: center; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--pp-line-2); color: var(--pp-text); font-weight: 650; font-size: .92rem; }
.pp-tool-try:hover, .pp-tool-try:focus-visible { border-color: var(--pp-dim); color: var(--pp-hi); background: var(--pp-card-2); }
.pp-tool-in { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.pp-tool-in > div { display: inline-flex; align-items: baseline; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--pp-card-2); font-size: .84rem; }
.pp-tool-in dt { font-weight: 600; color: var(--pp-dim); }
.pp-tool-in dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--pp-hi); }
.pp-tool-out .pp-cx-t b { white-space: normal; }
@media (max-width: 575.98px) {
  .pp-tool-ex { padding: 16px 14px 18px; }
  .pp-tool-ex h2 { font-size: 1.12rem; }
  .pp-tool-try.is-wide { display: flex; justify-content: center; margin-top: 14px; }
}

/* how it works: three numbered steps */
.pp-tool-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pp-tool-steps li { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 44px 14px 14px; border-radius: 14px; border: 1px solid var(--pp-line); background: var(--pp-card); }
.pp-tool-steps b { display: block; margin-bottom: 2px; color: var(--pp-hi); font-size: .95rem; }
.pp-tool-steps small { display: block; font-size: .86rem; line-height: 1.45; color: var(--pp-dim); }
.pp-tool-n { position: absolute; top: 10px; right: 14px; font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--pp-line-2); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
  .pp-tool-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .pp-tool-steps li { flex-direction: column; padding: 18px; }
  .pp-tool-n { top: 14px; right: 18px; font-size: 2rem; }
}

/* more than the math: what ours does beyond the sum */
.pp-tool-why-l { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 32px; margin-top: 14px; }
.pp-tool-why-i { width: 1.4rem; flex: none; text-align: center; color: var(--pp-hi); }
@media (min-width: 768px) { .pp-tool-why-l { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* questions */
.pp-tool-faq { max-width: 860px; }
.pp-tool-faq h2 { margin-bottom: 4px; }
.pp-tool-faq details { border-bottom: 1px solid var(--pp-line); }
.pp-tool-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; list-style: none; cursor: pointer; font-weight: 700; color: var(--pp-hi); }
.pp-tool-faq summary::-webkit-details-marker { display: none; }
.pp-tool-faq summary i { flex: none; font-size: .78rem; color: var(--pp-dim); transition: transform .2s; }
.pp-tool-faq details[open] summary i { transform: rotate(180deg); }
.pp-tool-faq details p { margin: -4px 0 16px; max-width: 70ch; color: var(--pp-soft); line-height: 1.55; }
.pp-tool-note { margin: 14px 0 0; font-size: .78rem; color: var(--pp-dim); }

/* more free tools: three tiles and All tools */
.pp-rl-tile.is-all { border-style: dashed; }
@media (min-width: 992px) { .pp-tool-more { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* the end: shown on phones too (Research's own end band is computers only), the buttons full width there */
.pp-tool-end { display: flex; }
@media (max-width: 991.98px) {
  .pp-tool-end { flex-direction: column; align-items: stretch; gap: 18px; margin-top: 28px; padding: 22px 18px; }
  .pp-tool-end h2 { font-size: 1.35rem; }
}

/* /tools: each tool as a card that opens its page, with Open going straight to the tool */
.pp-tool-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pp-tool-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--pp-line); background: var(--pp-card); transition: border-color .15s; }
.pp-tool-card:hover, .pp-tool-card:focus-within { border-color: var(--pp-dim); }
.pp-tool-card-a { display: flex; align-items: flex-start; gap: 12px; color: var(--pp-dim); font-size: .86rem; line-height: 1.4; text-decoration: none; }
.pp-tool-card-a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* the whole card opens the tool's page */
.pp-tool-card-a:focus-visible { outline: 0; }
.pp-tool-card-a b { display: block; margin-bottom: 2px; color: var(--pp-hi); font-size: .95rem; }
.pp-tool-card-a small { display: block; font-size: inherit; }
.pp-tool-card-acts { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.pp-tool-card-acts a { pointer-events: auto; }
.pp-tool-card-more { font-size: .8rem; font-weight: 650; color: var(--pp-dim); text-decoration: none; }
.pp-tool-card-more:hover { color: var(--pp-hi); }
.pp-tool-card-open { --bs-btn-padding-x: .85rem; --bs-btn-font-weight: 700; --bs-btn-color: var(--pp-accent-ink); --bs-btn-bg: var(--pp-accent); --bs-btn-border-color: var(--pp-accent);
  --bs-btn-hover-color: var(--pp-accent-ink); --bs-btn-hover-bg: var(--pp-accent-hover, #e6e5e1); --bs-btn-hover-border-color: var(--pp-accent-hover, #e6e5e1); border-radius: 999px; }
@media (min-width: 768px) { .pp-tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1200px) { .pp-tool-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- the calculators themselves (Nov 7, 2026): loaded on /calculators too, after app.css's .pp-cx-* ---------- */
/* Round robin: the picks without Push, the sizes as boxes to tick, and what each number of hits pays */
.pp-cx-leg.is-rr { grid-template-columns: 26px minmax(0, 190px) minmax(0, 1fr) auto; }
@media (max-width: 575.98px) { .pp-cx-leg.is-rr { grid-template-columns: 26px minmax(0, 1fr) auto; } }
.pp-cx-bys { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-cx-by { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.pp-cx-by input { position: absolute; opacity: 0; pointer-events: none; }
.pp-cx-by span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--pp-line-2); background: var(--pp-field); color: var(--pp-soft); font-size: .82rem; font-weight: 650; }
.pp-cx-by span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--pp-dim); }
.pp-cx-by input:checked + span { background: var(--pp-card-3); color: var(--pp-text); border-color: var(--pp-dim); }
.pp-cx-by input:checked + span::before { border-color: var(--pp-hi); background: var(--pp-hi) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pp-cx-by input:focus-visible + span { box-shadow: 0 0 0 2px var(--pp-link); }
.pp-cx-hits { list-style: none; margin: 10px 0 0; padding: 0; border-radius: 14px; background: var(--pp-card-2); }
.pp-cx-hits:empty { display: none; }
.pp-cx-hits li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; padding: 9px 14px; font-size: .86rem; }
.pp-cx-hits li + li { border-top: 1px solid var(--pp-line); }
.pp-cx-hits span { font-weight: 650; color: var(--pp-soft); }
.pp-cx-hits b { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.pp-cx-hits b.is-up { color: var(--pp-ok-text); } .pp-cx-hits b.is-down { color: var(--pp-bad-text); }
.pp-cx-hits small { grid-column: 2; text-align: right; font-size: .72rem; color: var(--pp-dim); font-variant-numeric: tabular-nums; }
/* Teaser (Nov 9, 2026): each leg is Spread / Over / Under, its line, and what it becomes */
.pp-cx-leg.is-tz { grid-template-columns: 26px 116px minmax(0, 150px) minmax(0, 1fr) auto; }
.pp-cx-tk.form-select { height: 40px; border-radius: 12px; font-weight: 600; font-size: .9rem; padding-right: 30px; }
.pp-cx-leg.is-tz .pp-cx-rd { white-space: normal; }
@media (max-width: 575.98px) {
  .pp-cx-leg.is-tz { grid-template-columns: 26px 100px minmax(0, 1fr) auto; }
  .pp-cx-f > .is-wide { grid-column: 1 / -1; }   /* Alt line's Side gets the row */
}
/* Share and Picture beside the calculator's name */
.pp-cx-share { margin-left: auto; display: flex; gap: 6px; flex: none; }
.pp-cx-share .pp-cx-mini { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
@media (max-width: 575.98px) { .pp-cx-share .pp-cx-mini { width: 36px; height: 36px; padding: 0; justify-content: center; } .pp-cx-share .pp-cx-mini span { display: none; } .pp-cx-share .pp-cx-mini i { font-size: .82rem; } }   /* phones: two round buttons, the header stays one row */

/* Nov 7: the tool itself at the top of its page (partials/calc_form.php or Photo to slip's drop box), the screens beside the example */
.pp-tool-live { position: relative; z-index: 1; }
.pp-tool-live .pp-cx-calc { margin: 0; box-shadow: 0 18px 50px rgba(0, 0, 0, .28); }
.pp-tool-live .pp-my-drop { margin: 0; min-height: 280px; }
.pp-tool-live-go { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 200px; border-radius: 18px; border: 1px dashed var(--pp-line-2); color: var(--pp-hi); font-weight: 700; text-decoration: none; }
.pp-tool-hero.is-live .pp-hero-t { font-size: clamp(2rem, 4vw, 2.9rem); }
.pp-tool-ex .pp-tool-vis { max-width: 560px; }
@media (max-width: 991.98px) { .pp-tool-ex .pp-tool-vis { margin-top: 8px; } }
@media (max-width: 575.98px) {
  .pp-tool-hero.is-live { padding: 20px 14px !important; }
  .pp-tool-live .pp-cx-calc { box-shadow: none; }
}
.pp-tool-ex .pp-tool-out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pp-tool-ex .pp-tool-out .pp-cx-t.is-main b { font-size: 1.35rem; }

/* Fill in from a game (calc_form.php $game, calc.js gameSetup): a button, then the game, the bet and a book or side */
.pp-cx-game { margin-bottom: 14px; }
.pp-cx-game-in { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.pp-cx-game-in:has(> label[hidden]) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pp-cx-sel { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pp-cx-sel[hidden] { display: none; }
.pp-cx-sel .form-select { border-radius: 12px; min-height: 44px; font-weight: 600; }
.pp-cx-game-note { margin: 8px 0 0; font-size: .84rem; color: var(--pp-soft); }
.pp-cx-game-note:empty { display: none; }
@media (max-width: 575.98px) {
  .pp-cx-game-in, .pp-cx-game-in:has(> label[hidden]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pp-cx-sel.is-g { grid-column: 1 / -1; }
}
