/* Page styles for the product site: modules. Loaded after marketing.css. Colours come from brand.css tokens only - no blue. */

/*
 * Three pages live here, each wrapped in its own class so nothing leaks onto
 * the rest of the site (every page sheet is loaded on every page):
 *
 *   .pg-modules       /modules            group headers with illustrations, module cards
 *   .pg-module-group  /modules/{slug}     illustrated hero, capability cards, other groups
 *   .pg-pricing       /pricing            plan cards, comparison table, self-hosted
 *
 * A module group's colour arrives through --acc / --acc-soft, set by the
 * .mod-* classes in brand.css. Plan cards get theirs from .plan-tone-*, below.
 */

/* ======================================================================
 * /modules
 * ==================================================================== */

body.marketing .pg-modules .mods-hero {
    background:
        radial-gradient(36rem 24rem at 92% 0%, var(--accent-50) 0%, transparent 62%),
        radial-gradient(40rem 22rem at 10% -20%, var(--brand-50) 0%, transparent 65%),
        linear-gradient(180deg, var(--brand-50) 0%, #fff 100%);
    padding-bottom: clamp(2.5rem, 4.5vw, 3.75rem);
}

/* The group index: one coloured tile per group, not a row of grey buttons. */
.pg-modules .mods-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

/* An odd tile out at the end takes the whole row rather than leaving a hole. */
.pg-modules .mods-nav li:last-child:nth-child(odd) { grid-column: 1 / -1; }

.pg-modules .mods-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    height: 100%;
    padding: .65rem .8rem .65rem .7rem;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    color: var(--ink);
    font-weight: 650;
    font-size: .95rem;
    letter-spacing: -.01em;
    line-height: 1.25;
    text-decoration: none;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pg-modules .mods-nav-link::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--acc, var(--brand));
}

.pg-modules .mods-nav-link:hover,
.pg-modules .mods-nav-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--brand-300);
    border-color: color-mix(in srgb, var(--acc, var(--brand)) 38%, #fff);
    color: var(--ink);
}

.pg-modules .mods-nav-icon {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--acc-soft, var(--brand-50));
    color: var(--acc, var(--brand));
    font-size: 1.1rem;
    transition: background-color .18s ease, color .18s ease;
}

.pg-modules .mods-nav-link:hover .mods-nav-icon {
    background: var(--acc, var(--brand));
    color: #fff;
}

.pg-modules .mods-nav-name { min-width: 0; }

.pg-modules .mods-nav-count {
    margin-left: auto;
    min-width: 1.9rem;
    padding: .12rem .5rem;
    border-radius: var(--r-pill);
    background: var(--acc-soft, var(--brand-50));
    color: var(--acc, var(--brand));
    font-size: .78rem;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* --- a group: illustrated header, then its cards ------------------------ */

.pg-modules .mods-group { scroll-margin-top: 4.5rem; }

.pg-modules .mods-group-head {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    margin-bottom: clamp(1.75rem, 3vw, 2.25rem);
    padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3.5vw, 2.75rem);
    border-radius: var(--r-xl);
    background:
        radial-gradient(28rem 18rem at 100% 100%, #fff 0%, transparent 70%),
        linear-gradient(125deg, var(--acc-soft, var(--brand-50)) 0%, #fff 78%);
    border: 1px solid var(--line);
    border-color: color-mix(in srgb, var(--acc, var(--brand)) 16%, var(--line));
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Two faint rings in the group's colour, behind the words. */
.pg-modules .mods-group-head::before {
    content: "";
    position: absolute;
    left: -7rem;
    bottom: -9rem;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    border: 2px solid var(--acc, var(--brand));
    opacity: .09;
    outline: 2px solid var(--acc, var(--brand));
    outline-offset: 2.25rem;
    pointer-events: none;
}

.pg-modules .mods-group-head.no-art { grid-template-columns: minmax(0, 1fr); }

.pg-modules .mods-group-text { position: relative; }

body.marketing .pg-modules .mods-group-text h2 {
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    margin-bottom: .65rem;
}

.pg-modules .mods-group-text .section-kicker {
    display: inline-block;
    color: var(--acc, var(--brand));
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--acc, var(--brand)) 22%, #fff);
    border-radius: var(--r-pill);
    padding: .3rem .75rem;
    margin-bottom: .9rem;
}

.pg-modules .mods-group-text p {
    max-width: 34em;
    margin-bottom: 1.35rem;
    color: var(--ink-body);
    font-size: 1.04rem;
}

/* The group's own colour on its "More about" button. */
body.marketing .pg-modules .mods-group-text .btn-outline-primary {
    --bs-btn-color: var(--acc, var(--brand));
    --bs-btn-border-color: color-mix(in srgb, var(--acc, var(--brand)) 40%, #fff);
    --bs-btn-bg: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--acc, var(--brand));
    --bs-btn-hover-border-color: var(--acc, var(--brand));
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--acc, var(--brand));
    --bs-btn-active-border-color: var(--acc, var(--brand));
}

.pg-modules .mods-group-text .btn i { transition: transform .18s ease; }
.pg-modules .mods-group-text .btn:hover i { transform: translateX(3px); }

.pg-modules .mods-group-art img {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin-left: auto;
}

/* --- module cards -------------------------------------------------------- */

.pg-modules .mods-card {
    isolation: isolate;
    overflow: hidden;
    padding: 1.6rem 1.6rem 1.25rem;
    box-shadow: var(--shadow-xs);
}

/* The accent bar is always there on this page; hover only brightens it. */
.pg-modules .mods-card::before {
    height: 4px;
    opacity: .85;
    background: linear-gradient(90deg, var(--acc, var(--brand)) 0%, color-mix(in srgb, var(--acc, var(--brand)) 35%, #fff) 60%, transparent 100%);
}

.pg-modules .mods-card:hover::before { opacity: 1; }

.pg-modules .mods-card > i {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 1.4rem;
    background: linear-gradient(145deg, #fff 0%, var(--acc-soft, var(--brand-50)) 100%);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--acc, var(--brand)) 18%, transparent),
        0 8px 16px -10px color-mix(in srgb, var(--acc, var(--brand)) 70%, transparent);
}

.pg-modules .mods-card:hover > i { background: var(--acc, var(--brand)); }

/* Each card's own glyph, large and faint in the corner: no two cards alike. */
.pg-modules .mods-card-mark,
.pg-module-group .mg-cap-mark {
    position: absolute;
    top: -1.1rem;
    right: -.9rem;
    z-index: -1;
    font-size: 6.75rem;
    line-height: 1;
    color: var(--acc, var(--brand));
    opacity: .065;
    pointer-events: none;
    transition: transform .35s ease, opacity .35s ease;
}

.pg-modules .mods-card:hover .mods-card-mark {
    opacity: .11;
    transform: rotate(-8deg) scale(1.05);
}

.pg-modules .mods-card p { margin-bottom: 1.1rem; }

.pg-modules .mods-card-plans {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding-top: .85rem;
    border-top: 1px dashed var(--line);
    font-size: .86rem;
    line-height: 1.45;
    color: var(--ink-faint);
}

.pg-modules .mods-card-plans i {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--ink-dim);
}

.pg-modules .mods-card-plans.is-included i { color: var(--ok); }
.pg-modules .mods-card-plans.is-included span { color: var(--ink-body); font-weight: 550; }
.pg-modules .mods-card-plans a { color: var(--acc, var(--brand)); }

/* --- not sold separately ------------------------------------------------- */

.pg-modules .mods-every {
    position: relative;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    border-radius: var(--r-xl);
    background:
        radial-gradient(24rem 14rem at 50% 0%, var(--brand-50) 0%, transparent 75%),
        #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.pg-modules .mods-every::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--brand-gradient);
}

.pg-modules .mods-every-icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: var(--shadow-brand);
}

/* ======================================================================
 * /modules/{slug}
 * ==================================================================== */

.pg-module-group .mg-hero { padding-bottom: clamp(2.5rem, 4.5vw, 3.5rem); }

.pg-module-group .mg-hero-art {
    position: relative;
}

/* A soft pool of the group's colour behind the illustration. */
.pg-module-group .mg-hero-art::before {
    content: "";
    position: absolute;
    inset: 6% 6% 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--acc, var(--brand)) 16%, transparent), transparent 72%);
    filter: blur(12px);
    pointer-events: none;
}

.pg-module-group .mg-hero-art img {
    position: relative;
    display: block;
    width: 100%;
    max-width: 540px;
    height: auto;
    margin-inline: auto;
}

/* --- capabilities: one card per module ----------------------------------- */

.pg-module-group .mg-cap {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-bottom: 1.25rem;
    padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2rem) clamp(1.6rem, 3.2vw, 2.25rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xs);
    scroll-margin-top: 5.5rem;
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.pg-module-group .mg-cap:last-child {
    margin-bottom: 0;
    border-bottom: 1px solid var(--line);
}

.pg-module-group .mg-cap::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--acc, var(--brand)) 0%, color-mix(in srgb, var(--acc, var(--brand)) 25%, #fff) 100%);
}

.pg-module-group .mg-cap:hover,
.pg-module-group .mg-cap:target {
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--acc, var(--brand)) 30%, var(--line));
}

.pg-module-group .mg-cap-mark {
    top: -1.5rem;
    right: -1.25rem;
    font-size: 9rem;
    opacity: .05;
}

.pg-module-group .mg-cap .feature-row-head > i {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 1.45rem;
    background: linear-gradient(145deg, #fff 0%, var(--acc-soft, var(--brand-50)) 100%);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--acc, var(--brand)) 18%, transparent),
        0 8px 16px -10px color-mix(in srgb, var(--acc, var(--brand)) 70%, transparent);
}

body.marketing .pg-module-group .mg-cap h3 { font-size: 1.35rem; }

.pg-module-group .mg-cap .tick-list {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: .6rem 1.5rem;
    font-size: .98rem;
}

.pg-module-group .mg-plans {
    padding: 1.1rem 1.15rem;
    border-radius: var(--r-lg);
    background: var(--acc-soft, var(--brand-50));
    border: 1px solid color-mix(in srgb, var(--acc, var(--brand)) 14%, transparent);
}

body.marketing .pg-module-group .mg-plans-title {
    margin-bottom: .75rem;
    font-family: var(--font-body);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--acc, var(--brand));
}

.pg-module-group .mg-plan {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .7rem;
    border-radius: var(--r);
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    font-size: .93rem;
    box-shadow: var(--shadow-xs);
}

.pg-module-group .mg-plan i {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    font-size: .85rem;
}

.pg-module-group .mg-plan.is-in i {
    background: color-mix(in srgb, var(--ok) 14%, #fff);
    color: var(--ok-deep);
}

.pg-module-group .mg-plan.is-out {
    background: rgba(255, 255, 255, .5);
    box-shadow: none;
    color: var(--ink-faint);
    font-weight: 500;
}

.pg-module-group .mg-plan.is-out i {
    background: var(--surface-3);
    color: var(--ink-dim);
}

.pg-module-group .mg-plans-request a { color: var(--acc, var(--brand)); font-weight: 600; }

/* --- the other groups, each with its own picture ------------------------- */

.pg-module-group .mg-other {
    padding: 0 0 1.5rem;
    overflow: hidden;
}

.pg-module-group .mg-other > :not(.mg-other-art) { margin-inline: 1.5rem; }

.pg-module-group .mg-other-art {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    margin-bottom: 1.15rem;
    padding: .5rem 1rem 0;
    background: linear-gradient(160deg, var(--acc-soft, var(--brand-50)) 0%, #fff 90%);
    border-bottom: 1px solid var(--line-soft);
    overflow: hidden;
}

.pg-module-group .mg-other-art img {
    display: block;
    width: 100%;
    max-width: 290px;
    height: auto;
    transition: transform .35s ease;
}

.pg-module-group .mg-other:hover .mg-other-art img { transform: translateY(-3px) scale(1.04); }

/* ======================================================================
 * /pricing
 * ==================================================================== */

/* One accent per plan card, in display order. Presentation only. */
.pg-pricing .plan-tone-1 { --acc: var(--accent-600);     --acc-soft: var(--accent-50);          --acc-hi: var(--accent); }
.pg-pricing .plan-tone-2 { --acc: var(--brand);          --acc-soft: var(--brand-50);           --acc-hi: var(--brand-500); }
.pg-pricing .plan-tone-3 { --acc: var(--green-600);      --acc-soft: var(--green-50);           --acc-hi: var(--green); }
.pg-pricing .plan-tone-4 { --acc: var(--red-600);        --acc-soft: var(--red-50);             --acc-hi: var(--red); }
.pg-pricing .plan-tone-5 { --acc: var(--acc-people);     --acc-soft: var(--acc-people-soft);    --acc-hi: var(--acc-people); }
.pg-pricing .plan-tone-6 { --acc: var(--acc-operations); --acc-soft: var(--acc-operations-soft); --acc-hi: var(--acc-operations); }

body.marketing .pg-pricing .pr-hero {
    background:
        radial-gradient(34rem 22rem at 94% 10%, var(--accent-50) 0%, transparent 62%),
        radial-gradient(30rem 20rem at 70% 110%, var(--green-50) 0%, transparent 60%),
        radial-gradient(40rem 22rem at 10% -20%, var(--brand-50) 0%, transparent 65%),
        linear-gradient(180deg, var(--brand-50) 0%, #fff 100%);
}

.pg-pricing .pr-hero .hero-points { gap: .55rem; }

.pg-pricing .pr-hero .hero-points li {
    padding: .38rem .85rem .38rem .6rem;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    color: var(--ink-body);
    font-weight: 550;
}

/* --- plan cards ---------------------------------------------------------- */

.pg-pricing .pr-plan {
    isolation: isolate;
    overflow: hidden;
    padding: 2rem 1.75rem 1.65rem;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
}

/* The accent top border. */
.pg-pricing .pr-plan::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--acc) 0%, var(--acc-hi, var(--acc)) 55%, color-mix(in srgb, var(--acc) 30%, #fff) 100%);
}

/* A soft glow of the same colour in the top corner. */
.pg-pricing .pr-plan::after {
    content: "";
    position: absolute;
    top: -6rem;
    right: -6rem;
    z-index: -1;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--acc-soft), transparent);
    pointer-events: none;
}

.pg-pricing .pr-plan:hover {
    border-color: var(--brand-300);
    border-color: color-mix(in srgb, var(--acc) 40%, #fff);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.pg-pricing .pr-plan .plan-head {
    flex-wrap: wrap;
    align-items: center;
    row-gap: .6rem;
    margin-bottom: 1.2rem;
}

.pg-pricing .pr-plan-id {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.pg-pricing .pr-plan-icon {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--acc-hi, var(--acc)) 0%, var(--acc) 100%);
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--acc) 80%, transparent);
}

body.marketing .pg-pricing .pr-plan .plan-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.025em;
}

.pg-pricing .pr-plan .plan-trial {
    color: var(--acc);
    background: var(--acc-soft);
    border: 1px solid color-mix(in srgb, var(--acc) 20%, transparent);
}

.pg-pricing .pr-plan-price {
    margin-bottom: 1.35rem;
    padding: 1.05rem 1.15rem 1rem;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, var(--acc-soft) 0%, #fff 100%);
    border: 1px solid color-mix(in srgb, var(--acc) 14%, transparent);
}

.pg-pricing .pr-plan .plan-price { line-height: 1.1; }

.pg-pricing .pr-plan .plan-amount {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 3.4vw, 2.85rem);
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--ink);
}

.pg-pricing .pr-plan .plan-amount-quote { font-size: 1.6rem; }

.pg-pricing .pr-plan .plan-cycle {
    font-weight: 600;
    color: var(--ink-faint);
}

.pg-pricing .pr-plan .plan-blurb { font-size: .92rem; }
.pg-pricing .pr-plan .plan-blurb strong { color: var(--ink); }

.pg-pricing .pr-saving {
    color: var(--ok-deep);
    font-weight: 700;
}

.pg-pricing .pr-plan .plan-limits { gap: .5rem; }

.pg-pricing .pr-plan .plan-limits i {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--surface-3);
    color: var(--ink-soft);
    font-size: .95rem;
}

.pg-pricing .pr-plan .plan-limits strong {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
}

.pg-pricing .pr-plan .plan-modules i {
    display: inline-grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ok) 13%, #fff);
    color: var(--ok-deep);
    font-size: .8rem;
}

.pg-pricing .pr-plan .plan-modules li { font-weight: 550; color: var(--ink-body); }
.pg-pricing .pr-plan .btn { padding-block: .72rem; }

body.marketing .pg-pricing .pr-plan .btn-accent {
    box-shadow: 0 12px 26px -12px rgba(var(--accent-rgb), .75);
}

body.marketing .pg-pricing .pr-plan .btn-accent:hover { transform: translateY(-1px); }

/* --- the comparison table ------------------------------------------------ */

.pg-pricing .compare-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
}

.pg-pricing .compare-table {
    border-collapse: separate;
    border-spacing: 0;
    --bs-table-bg: #fff;
}

.pg-pricing .compare-table > :not(caption) > * > * {
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--line-soft);
}

.pg-pricing .compare-table thead th {
    background: #fff;
    border-bottom: 2px solid var(--line);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -.015em;
    color: var(--ink);
    vertical-align: bottom;
    padding-top: 1.1rem;
    padding-bottom: .9rem;
}

.pg-pricing .compare-table thead th:first-child {
    font-family: var(--font-body);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--ink-faint);
    border-top-left-radius: calc(var(--r-xl) - 1px);
}

.pg-pricing .compare-table thead th:last-child { border-top-right-radius: calc(var(--r-xl) - 1px); }

/* Each plan column carries its card's colour: a bar along the top and a dot. */
.pg-pricing .compare-table thead th { position: relative; }

.pg-pricing .compare-table thead th[class*="plan-tone-"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: .75rem;
    right: .75rem;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--acc), var(--acc-hi, var(--acc)));
}

.pg-pricing .cmp-plan {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.pg-pricing .cmp-plan::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--acc);
    box-shadow: 0 0 0 3px var(--acc-soft);
}

.pg-pricing .compare-table th[scope="row"] {
    font-weight: 600;
    color: var(--ink);
    font-size: .95rem;
}

.pg-pricing .compare-table th[scope="row"] a { color: var(--ink); }
.pg-pricing .compare-table th[scope="row"] a:hover { color: var(--acc, var(--brand)); text-decoration: underline !important; }

/* Zebra rows in warm neutrals. The first row under a group heading is white. */
.pg-pricing .compare-table .cmp-summary tr:nth-child(even) > *,
.pg-pricing .compare-table .cmp-group tr:nth-child(odd):not(.cmp-group-row) > * {
    --bs-table-bg: var(--canvas);
}

.pg-pricing .compare-table tbody tr:not(.cmp-group-row):hover > * {
    --bs-table-bg: var(--surface-3);
}

.pg-pricing .compare-table .cmp-price td {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.pg-pricing .cmp-saving {
    font-family: var(--font-body);
    font-weight: 650;
    color: var(--ok-deep);
}

/* A group heading row, tinted with that group's colour. */
.pg-pricing .compare-table .cmp-group-row > th {
    --bs-table-bg: var(--acc-soft, var(--surface-3));
    background-image: linear-gradient(90deg, var(--acc-soft, var(--surface-3)) 0%, #fff 95%);
    box-shadow: inset 4px 0 0 var(--acc, var(--brand));
    border-top: 1px solid color-mix(in srgb, var(--acc, var(--brand)) 18%, #fff);
    border-bottom: 1px solid color-mix(in srgb, var(--acc, var(--brand)) 18%, #fff);
    padding-top: .75rem;
    padding-bottom: .75rem;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--acc, var(--ink-faint));
}

/* The label stays in view while a narrow screen scrolls the table sideways. */
.pg-pricing .cmp-group-label {
    position: sticky;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}

.pg-pricing .cmp-group-label i {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--acc, var(--brand));
    color: #fff;
    font-size: .78rem;
}

/* Green disc for included, a quiet dash for not. */
.pg-pricing .cmp-yes,
.pg-pricing .cmp-no {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1rem;
    vertical-align: middle;
}

.pg-pricing .cmp-yes {
    background: color-mix(in srgb, var(--ok) 14%, #fff);
    color: var(--ok-deep);
}

.pg-pricing .cmp-no { color: var(--ink-dim); }

.pg-pricing .compare-table tbody:last-child tr:last-child > * { border-bottom: 0; }
.pg-pricing .compare-table tbody:last-child tr:last-child > :first-child { border-bottom-left-radius: calc(var(--r-xl) - 1px); }
.pg-pricing .compare-table tbody:last-child tr:last-child > :last-child { border-bottom-right-radius: calc(var(--r-xl) - 1px); }

/*
 * On a wide screen, when every plan fits, the table leaves its scroll box so
 * the plan names can stick under the site header as the module rows go by.
 */
@media (min-width: 992px) {
    .pg-pricing .compare-wrap.fits {
        position: relative;
        overflow: visible;
        border-color: transparent;
    }

    /*
     * The frame is drawn over the table, not under it, so the header cells can
     * be square: a rounded header cell, once stuck, lets the rows scrolling
     * beneath show through its corners.
     */
    .pg-pricing .compare-wrap.fits::after {
        content: "";
        position: absolute;
        inset: -1px;
        z-index: 5;
        border: 1px solid var(--line);
        border-radius: var(--r-xl);
        pointer-events: none;
    }

    .pg-pricing .compare-wrap.fits .compare-table thead th {
        position: sticky;
        top: 70px; /* the site header's height */
        z-index: 3;
        border-radius: 0;
    }

    .pg-pricing .compare-wrap.fits .compare-table thead th:first-child { z-index: 4 !important; }

    .pg-pricing .compare-table th[scope="row"] { width: 34%; }
}

@media (max-width: 575.98px) {
    .pg-pricing .compare-table > :not(caption) > * > * { padding: .7rem .6rem; }
    .pg-pricing .compare-table th[scope="row"] { font-size: .88rem; }
    .pg-pricing .compare-table thead th { font-size: .92rem; }
    .pg-pricing .compare-table .cmp-price td { font-size: .95rem; }
    .pg-pricing .cmp-group-label { left: .6rem; }
}

/* --- included on every plan ---------------------------------------------- */

.pg-pricing .pr-every-list {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: .7rem;
}

.pg-pricing .pr-every-list li {
    align-items: flex-start;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    color: var(--ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.pg-pricing .pr-every-list li:hover {
    border-color: color-mix(in srgb, var(--ok) 35%, var(--line));
    box-shadow: var(--shadow-sm);
}

/* --- self-hosted --------------------------------------------------------- */

body.marketing .pg-pricing #self-hosted {
    background:
        radial-gradient(40rem 26rem at 82% 30%, var(--brand-50) 0%, transparent 65%),
        linear-gradient(180deg, var(--surface-2) 0%, #fff 100%);
}

.pg-pricing .pr-hosted-visual { position: relative; }

.pg-pricing .pr-hosted-art {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin-inline: auto;
}

.pg-pricing .pr-hosted-card {
    position: relative;
    z-index: 1;
    height: auto;
    max-width: 440px;
    margin: -3.25rem 0 0 auto;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--brand);
}

.pg-pricing .pr-hosted-card li strong { color: var(--ink); }

/* --- outgrowing a plan --------------------------------------------------- */

.pg-pricing .pr-grow {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 1.75rem;
    padding: 1.5rem 1.75rem;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, var(--accent-50) 0%, #fff 62%);
    border: 1px solid var(--line);
    border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
    box-shadow: var(--shadow-sm);
}

.pg-pricing .pr-grow-art {
    display: block;
    width: 100%;
    height: auto;
}

/* ======================================================================
 * Small screens
 * ==================================================================== */

@media (max-width: 991.98px) {
    .pg-module-group .mg-hero-art img { max-width: 420px; }
    .pg-pricing .pr-hosted-card { margin: -2rem auto 0; }
}

@media (max-width: 767.98px) {
    .pg-modules .mods-group-head {
        grid-template-columns: minmax(0, 1fr);
        gap: .5rem;
    }

    /* The picture first, as a banner over the words (it is decorative here). */
    .pg-modules .mods-group-art { order: -1; }

    .pg-modules .mods-group-art img {
        max-width: 300px;
        margin-inline: auto;
    }
}

@media (max-width: 575.98px) {
    .pg-modules .mods-nav { gap: .55rem; }
    .pg-modules .mods-nav-link { gap: .55rem; padding: .55rem .6rem; font-size: .9rem; }
    .pg-modules .mods-nav-icon { width: 34px; height: 34px; font-size: 1rem; }
    .pg-modules .mods-card { padding: 1.4rem 1.35rem 1.1rem; }
    .pg-module-group .mg-cap .feature-row-head { gap: .9rem; }
    .pg-module-group .mg-cap-mark { font-size: 5.5rem; opacity: .04; }

    .pg-pricing .pr-plan { padding: 1.75rem 1.35rem 1.4rem; }

    .pg-pricing .pr-grow {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        padding: 1.35rem;
    }

    .pg-pricing .pr-grow-art { max-width: 210px; }
}

/* ======================================================================
 * Motion
 * ==================================================================== */

@media (prefers-reduced-motion: reduce) {
    .pg-modules .mods-nav-link:hover,
    .pg-modules .mods-nav-link:focus-visible,
    .pg-modules .mods-card:hover .mods-card-mark,
    .pg-modules .mods-group-text .btn:hover i,
    .pg-module-group .mg-other:hover .mg-other-art img,
    .pg-pricing .pr-plan:hover,
    body.marketing .pg-pricing .pr-plan .btn-accent:hover {
        transform: none;
    }
}

@media print {
    .pg-modules .mods-card-mark,
    .pg-module-group .mg-cap-mark,
    .pg-pricing .pr-plan::after { display: none; }

    .pg-modules .mods-group-head,
    .pg-module-group .mg-cap,
    .pg-pricing .pr-plan { box-shadow: none; break-inside: avoid; }
}
