/* Fees & pricing page (pages/pricing.php). Loaded only there, through $page_styles in includes/header.php.
   Colours are the shared --ui-* variables from main.css. Cards, not tables, so the figures read first and the
   page works on a phone; the one real comparison table scrolls sideways inside its own box. */

/* Safety net: this stylesheet loads only on this page, so nothing here can ever make the page scroll sideways, even if
   a browser rounds a width up by a fraction of a pixel (clip, unlike hidden, creates no scroll container). */
html, body { overflow-x: clip; }

.pr { background: var(--ui-surface); color: var(--ui-body); padding-bottom: 56px; }
.pr .container { max-width: 1080px; }

/* ---- top ---- */
.pr-hero { background: var(--ui-white); border-bottom: 1px solid var(--ui-line-soft); padding: 44px 0 28px; text-align: center; }
.pr-hero h1 { color: var(--ui-ink); font-size: 2.4rem; line-height: 1.15; margin: 0 0 12px; }
.pr-hero .pr-lead { color: var(--ui-muted); font-size: 1.1rem; max-width: 46rem; margin: 0 auto 22px; }
.pr-promises { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; margin: 0 0 26px; padding: 0; }
.pr-promises li { margin: 0; background: var(--ui-ok-bg); color: var(--ui-ok-text); border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: .95rem; }
.pr-jump { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pr-jump a { display: inline-block; padding: 11px 22px; border-radius: 8px; border: 1px solid var(--ui-line); background: var(--ui-white);
             color: var(--ui-brand); font-weight: 700; text-decoration: none; }
.pr-jump a:hover, .pr-jump a:focus-visible { background: var(--ui-brand); border-color: var(--ui-brand); color: var(--ui-white); }

/* ---- sections ---- */
.pr-section { padding-top: 46px; scroll-margin-top: 16px; }
.pr-head { margin-bottom: 20px; }
.pr-eyebrow { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--ui-brand); margin-bottom: 4px; }
.pr-head h2 { border: 0; margin: 0 0 6px; padding: 0; color: var(--ui-ink); font-size: 1.9rem; }
.pr-sub { color: var(--ui-muted); font-size: 1.05rem; margin: 0; max-width: 44rem; }

/* ---- fee cards ---- */
/* the card rows hold four cards: 4 across on a wide screen, 2x2 on a tablet, 1 on a phone (never 3 + 1) */
.pr-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 1000px) { .pr-cards { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 575px)  { .pr-cards { grid-template-columns: 1fr; } }
.pr-card { background: var(--ui-white); border: 1px solid var(--ui-line-soft); border-radius: 12px; padding: 20px 20px 18px; display: flex; flex-direction: column; }
.pr-card h3 { margin: 0 0 8px; font-size: 1rem; color: var(--ui-body); font-weight: 700; }
.pr-card p { font-size: .95rem; margin: 0; }
.pr .pr-fig { color: var(--ui-ink); font-size: 2rem; font-weight: 800; line-height: 1.1; margin: 0; }
.pr .pr-fig small { font-size: .9rem; font-weight: 600; color: var(--ui-muted); }
.pr .pr-qual { color: var(--ui-muted); font-size: .92rem; margin: 4px 0 10px; }
.pr-card .pr-tag { display: inline-block; margin-top: 12px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
                   color: var(--ui-ok-text); }

.pr-callout { margin-top: 18px; background: var(--ui-info-bg); border-left: 5px solid var(--ui-brand); border-radius: 0 10px 10px 0; padding: 16px 20px; }
.pr-callout h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--ui-ink); }
.pr-callout p { margin: 0; font-size: .96rem; }

.pr-checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 8px 22px; }
.pr-checks li { margin: 0; padding-left: 26px; position: relative; font-size: .96rem; }
.pr-checks li::before { content: ""; position: absolute; left: 4px; top: .35em; width: 6px; height: 11px; border: solid var(--ui-ok); border-width: 0 2px 2px 0; transform: rotate(40deg); }

/* ---- owner tiers ---- */
.pr-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 18px; align-items: stretch; }
.pr-tier { background: var(--ui-white); border: 1px solid var(--ui-line-soft); border-radius: 14px; padding: 24px 22px; display: flex; flex-direction: column; position: relative; }
.pr-tier.is-featured { border: 2px solid var(--ui-brand); }
@media (min-width: 576px) and (max-width: 991px) { .pr-tiers .pr-tier:nth-child(3) { grid-column: 1 / -1; } }   /* two across on a tablet: the third card gets the full row, not an empty half */
.pr-badge { position: absolute; top: -13px; left: 20px; background: var(--ui-brand); color: var(--ui-white); font-size: .75rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: .06em; padding: 4px 12px; border-radius: 999px; }
.pr-tier h3 { margin: 0; font-size: 1.25rem; color: var(--ui-ink); }
.pr-tier .pr-for { color: var(--ui-muted); font-size: .94rem; margin: 2px 0 14px; }
.pr .pr-tier .pr-fig { font-size: 2.3rem; }
.pr .pr-tier .pr-qual { margin-bottom: 14px; }
.pr-tier h4 { margin: 14px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ui-muted); }
.pr-tier ul { list-style: none; margin: 0; padding: 0; }
.pr-tier ul li { position: relative; padding-left: 22px; margin: 0 0 6px; font-size: .94rem; }
.pr-tier ul li::before { content: ""; position: absolute; left: 3px; top: .38em; width: 5px; height: 9px; border: solid var(--ui-ok); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.pr-tier ul.is-yours li::before { border-color: var(--ui-amber-text); }
.pr-onboard { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ui-line-soft); font-size: .92rem; }
.pr-onboard strong { color: var(--ui-ink); }
.pr-tier .pr-btn { margin-top: 14px; }

.pr-wide { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.pr .pr-card .pr-qual + .pr-fig { margin-top: 12px; }

/* ---- comparison ---- */
.pr-compare-wrap { margin-top: 26px; background: var(--ui-white); border: 1px solid var(--ui-line-soft); border-radius: 12px; }
.pr-compare-wrap h3 { margin: 0; padding: 16px 20px 0; font-size: 1.1rem; color: var(--ui-ink); }
.pr-compare { width: 100%; border-collapse: collapse; font-size: .94rem; margin-top: 8px; }
.pr-compare th, .pr-compare td { padding: 11px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--ui-line-soft); }
.pr-compare thead th { background: var(--ui-row); color: var(--ui-ink); border-top: 0; }
.pr-compare tbody th { color: var(--ui-ink); font-weight: 700; width: 26%; }
.pr-compare .is-yours { color: var(--ui-amber-text); }

/* phone: never scroll sideways. Each row becomes a small card: the row title, then the three tiers one under another,
   each cell labelled with its tier (data-label in the markup). */
@media (max-width: 699px) {
    .pr-compare, .pr-compare tbody, .pr-compare tr, .pr-compare th, .pr-compare td { display: block; width: auto; }
    .pr-compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }   /* kept for screen readers */
    .pr-compare tbody tr { border-top: 1px solid var(--ui-line-soft); padding: 12px 16px 8px; }
    .pr-compare tbody tr:first-child { border-top: 0; }
    .pr-compare tbody th { width: auto; padding: 0 0 6px; border: 0; }
    .pr-compare td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 5.5rem 1fr; gap: 10px; }
    .pr-compare td::before { content: attr(data-label); font-weight: 700; color: var(--ui-muted); }
}

/* ---- one-time fees ---- */
.pr-onetime { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.pr-onetime .pr-card ul { list-style: none; margin: 8px 0 0; padding: 0; }
.pr-onetime .pr-card ul li { padding-left: 20px; position: relative; margin: 0 0 4px; font-size: .94rem; }
.pr-onetime .pr-card ul li::before { content: ""; position: absolute; left: 3px; top: .38em; width: 5px; height: 9px; border: solid var(--ui-ok); border-width: 0 2px 2px 0; transform: rotate(40deg); }

/* ---- buttons / closing ---- */
.pr-btn { display: inline-block; text-align: center; padding: 12px 22px; border-radius: 8px; background: var(--ui-brand); border: 2px solid var(--ui-brand);
          color: var(--ui-white); font-weight: 700; text-decoration: none; }
.pr-btn:hover, .pr-btn:focus-visible { background: var(--ui-brand-dark); border-color: var(--ui-brand-dark); color: var(--ui-white); text-decoration: none; }
.pr-btn.is-quiet { background: var(--ui-white); color: var(--ui-brand); }
.pr-btn.is-quiet:hover, .pr-btn.is-quiet:focus-visible { background: var(--ui-info-bg); color: var(--ui-brand-dark); }

.pr-cta { margin-top: 52px; background: var(--ui-brand); color: var(--ui-white); border-radius: 16px; padding: 34px 28px; text-align: center; }
.pr-cta h2 { border: 0; margin: 0 0 6px; padding: 0; color: var(--ui-white); font-size: 1.7rem; }
.pr-cta p { color: var(--ui-info-bg); margin: 0 auto 20px; max-width: 40rem; }
.pr-cta .pr-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pr-cta .pr-btn { background: var(--ui-white); border-color: var(--ui-white); color: var(--ui-brand); }
.pr-cta .pr-btn:hover, .pr-cta .pr-btn:focus-visible { background: var(--ui-info-bg); border-color: var(--ui-info-bg); }
.pr-cta .pr-btn.is-quiet { background: transparent; color: var(--ui-white); }
.pr-cta .pr-btn.is-quiet:hover, .pr-cta .pr-btn.is-quiet:focus-visible { background: rgba(255, 255, 255, .14); }

.pr-fine { margin-top: 22px; text-align: center; color: var(--ui-muted); font-size: .9rem; }
.pr-fine a { color: var(--ui-brand); }

.pr a:focus-visible { outline: 3px solid var(--ui-orange); outline-offset: 2px; }

@media (max-width: 575px) {
    .pr-hero { padding: 32px 0 22px; }
    .pr-hero h1 { font-size: 1.9rem; }
    .pr-head h2 { font-size: 1.6rem; }
    .pr-jump a { flex: 1 1 100%; text-align: center; }
    .pr-cta { padding: 28px 18px; border-radius: 12px; }
    .pr-cta .pr-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
