/* Money pages and platform hubs (templates/pages/). Built on the design system in site.css
   (.section, .section-head, .card, .steps, .compare, .faq, .cta-band, .media...); this file
   only adds what those pages have of their own. Colors are site tokens only, so every rule
   works in light and dark mode; logical properties keep Arabic (rtl) right. */

/* --- Breadcrumbs ------------------------------------------------------------------------ */
.pg-crumbs { margin: -12px 0 clamp(12px, 1.6vw, 24px); }
.pg-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0;
                font-size: 14.5px; line-height: 1.3; color: var(--muted); }
.pg-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.pg-crumbs li + li::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; margin-inline: 6px 10px;
                             border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); opacity: .55; }
[dir="rtl"] .pg-crumbs li + li::before { transform: rotate(-135deg); }
.pg-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.pg-crumbs a:hover { color: var(--brand); text-decoration: underline; }
.pg-crumbs [aria-current] { color: var(--text); font-weight: 500; padding-block: 12px; }

/* --- Hero ------------------------------------------------------------------------------- */
.pg-hero .hero__grid { align-items: center; }
.pg-hero .h1 { max-width: 15em; }
.pg-hero__media { position: relative; width: 100%; max-width: 620px; margin-inline: auto; padding: 0 0 18px 18px; }
[dir="rtl"] .pg-hero__media { padding: 0 18px 18px 0; }
.pg-hero__media::before { content: ""; position: absolute; z-index: -1; inset: 18px 18px 0 0; border-radius: var(--radius-l);
                          border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
                          background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, transparent) 0 1px, transparent 1px 12px); }
[dir="rtl"] .pg-hero__media::before { inset: 18px 0 0 18px; }
.pg-hero__media .media { box-shadow: var(--shadow-lg); }
@media (max-width: 999.98px) { .pg-hero__media { max-width: 560px; } }

/* --- Card grids that are lists ------------------------------------------------------------ */
.pg-included, .pg-services, .pg-hubs { list-style: none; margin: 0; padding: 0; }

/* --- Quantity pace (templates/pages/_pace.html) ------------------------------------------ */
.pg-pace__text { color: var(--muted); }
.pg-pace { display: grid; gap: 18px; }
@media (min-width: 960px) { .pg-pace { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.pg-pace__chart { margin: 0; }
.pg-pace__caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.pg-goal { background: var(--accent-soft); color: var(--accent-text); }
.pg-goal::before { content: ""; width: 2px; height: 14px; border-radius: 1px;
                   background: repeating-linear-gradient(to bottom, var(--accent) 0 3px, transparent 3px 5px); }
.pg-pace__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.pg-pace__row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "month range" "track track";
                gap: 8px 12px; align-items: center; }
@media (min-width: 560px) {
  .pg-pace__row { grid-template-columns: 88px minmax(0, 1fr) minmax(112px, auto); grid-template-areas: "month track range"; gap: 16px; }
}
.pg-pace__month { grid-area: month; font: 600 14.5px/1.2 var(--display); color: var(--muted); }
.pg-pace__range { grid-area: range; font: 600 15.5px/1.2 var(--display); text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-pace__track { grid-area: track; position: relative; height: 14px; border-radius: 999px; background: var(--surface-2);
                  box-shadow: inset 0 0 0 1px var(--border); }
.pg-pace__track::after { content: ""; position: absolute; z-index: 1; top: -8px; bottom: -8px; inset-inline-start: var(--goal); width: 2px;
                         margin-inline-start: -1px; background: repeating-linear-gradient(to bottom, var(--accent) 0 4px, transparent 4px 7px); }
.pg-pace__band { position: absolute; top: 0; bottom: 0; inset-inline-start: var(--start); width: calc(var(--end) - var(--start));
                 min-width: 14px; border-radius: 999px;
                 background: linear-gradient(90deg, color-mix(in srgb, var(--brand-fill) 45%, var(--surface-2)), var(--brand-fill)); }
[dir="rtl"] .pg-pace__band { background: linear-gradient(270deg, color-mix(in srgb, var(--brand-fill) 45%, var(--surface-2)), var(--brand-fill)); }
.pg-pace__plans { background: var(--surface-2); }
.pg-pace__plans .h3 { margin-bottom: 18px; }
.pg-pace__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pg-pace__plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border-radius: var(--radius-s);
                 border: 1px solid var(--border); background: var(--surface); }
.pg-pace__plan.is-pick { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pg-pace__name { font: 600 16px/1.3 var(--display); }
.pg-pace__price { color: var(--muted); font-size: 14.5px; text-align: end; white-space: nowrap; }
.pg-pace__per { grid-column: 1 / -1; font-size: 15px; }
.pg-pace__when { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--muted); }
.pg-pace__when .icon { width: 16px; height: 16px; color: var(--brand); }

/* --- The page's own sections (templates/pages/_story.html) ------------------------------- */
.pg-story .flow { gap: clamp(56px, 5vw + 16px, 104px); }
.pg-story__body > p { margin: 16px 0 0; color: var(--muted); font-size: 17.5px; line-height: 1.65; }
.pg-story__body .checklist { margin-top: 22px; }
.pg-story__split .pg-story__body > :first-child { margin-top: 0; }
.pg-story__split .h2 { max-width: 14em; }

/* --- Link groups: related pages, a hub's goals (templates/pages/_links.html) -------------- */
.pg-links { display: grid; gap: 32px 24px; }
@media (min-width: 720px) { .pg-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .pg-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pg-links__title { margin: 0 0 12px; font: 600 13px/1.2 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pg-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pg-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 16px 12px 18px;
           border-radius: var(--radius-s); border: 1px solid var(--border); background: var(--surface); color: var(--text);
           font: 600 16px/1.3 var(--display); text-decoration: none; transition: border-color .15s, color .15s, box-shadow .15s; }
.pg-link .icon { width: 18px; height: 18px; color: var(--brand); transition: transform .15s; }
.pg-link:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--shadow); }
.pg-link:hover .icon { transform: translateX(3px); }
[dir="rtl"] .pg-link .icon { transform: scaleX(-1); }
[dir="rtl"] .pg-link:hover .icon { transform: scaleX(-1) translateX(3px); }

/* --- Hubs: services and the other platforms ---------------------------------------------- */
.pg-service { display: flex; flex-direction: column; }
.pg-service .card__foot { margin-top: auto; padding-top: 20px; }
.pg-service .link-arrow { position: static; }

/* --- The closing band is the last thing before the footer (which brings its own space) ---- */
.pg-cta { padding-bottom: 0; }

/* --- FAQ heading beside the questions (desktop) ------------------------------------------ */
@media (min-width: 960px) { .pg-faq__head { position: sticky; top: calc(var(--header-h) + 32px); } }

/* --- Phones: the preselected package in a bar (static/js/pages.js) ----------------------- */
.pg-sticky { position: fixed; z-index: 20; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
             display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 18px;
             border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
             background: color-mix(in srgb, var(--surface) 92%, transparent);
             -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
             transform: translateY(calc(100% + 28px)); transition: transform .28s ease; }
[dir="rtl"] .pg-sticky { padding: 8px 18px 8px 8px; }
.pg-sticky.is-shown { transform: none; }
.pg-sticky__text { margin: 0; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pg-sticky__text b { font: 600 15.5px/1.25 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-sticky__text span { font-size: 13.5px; color: var(--muted); }
.pg-sticky .btn { flex-shrink: 0; min-height: 48px; }
@media (min-width: 900px) { .pg-sticky { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .pg-sticky { transition: none; } }

/* --- Free tools (templates/pages/_tool.html) ---------------------------------------------- */
.pg-tool__form { display: grid; gap: 14px; max-width: 640px; padding: 22px; }
@media (min-width: 720px) { .pg-tool__form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; } }
.pg-tool__form .field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.pg-tool__form input { min-height: 48px; padding: 0 14px; border-radius: var(--radius-s); border: 1px solid var(--border);
                       background: var(--surface); color: var(--text); font: inherit; }
.pg-tool__form input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pg-tool__result { grid-column: 1 / -1; padding: 14px 16px; border-radius: var(--radius-s); background: var(--brand-soft);
                   color: var(--text); font: 600 17px/1.5 var(--display); }
.pg-tool__plans { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-weight: 500; }
.pg-tool__plans a { color: var(--brand); font-weight: 700; }
.pg-tool__note { margin-top: 14px; color: var(--muted); max-width: 70ch; }

/* --- Who is behind the page (templates/pages/_author.html) -------------------------------- */
.pg-author__card { max-width: 760px; padding: 20px 22px; display: grid; gap: 6px; }
.pg-author__card p { margin: 0; line-height: 1.6; }
.pg-author__card a { color: var(--brand); font-weight: 600; }
.pg-author__date { color: var(--muted); font-size: 14px; }
