/* /pricing only (flagship 11-16, T3-pricing: GQC-SITE-11/12/13/28/62 + P2 -44/-45/-48).
   One top block: a short H1, the unit line, the cadence switch, then the cards, so Start and Grow show their price in the
   first screen at 1440x900 and Start at 390x844 (GQC-SITE-13). Every value here is a token from tokens.css / site.css. */

.pr-top{padding-top:56px}
.pr-top h1{font-size:var(--gb-type-display-3-size);line-height:var(--gb-type-display-3-lh);max-width:22ch}   /* V1-type r3 (GQC-SITE-58, pool judge): display-3 (was clamp(34px,3.9vw,56px), off-scale); Arabic display floor 1.3, Latin its own */
.pr-top .sub{margin:16px auto 0;max-width:60ch;font-size:var(--gb-type-lead-size);line-height:var(--gb-type-lead-lh);color:var(--gb-text-muted)}
.pr-top .sub b{display:inline;font-family:inherit;font-size:inherit;color:var(--gb-text);font-weight:var(--gb-weight-semibold);white-space:nowrap}
.pr-top .bill{margin-top:24px}
.pr-top .bill button{min-height:44px}                                       /* GQC-SITE-45: the switch is a 44px target */

.pr-plans{padding-top:32px}
.pr-plans .plans-p{margin-top:0}
/* what every paid plan has, said once above the cards instead of on every card (GQC-SITE-62) */
.pr-all{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 18px;margin:0 0 20px;padding:0;list-style:none;font-size:var(--gb-type-caption-size);color:var(--gb-text-muted)}
.pr-all li{display:inline-flex;align-items:center;gap:8px}
.pr-all li + li::before{content:"";width:3px;height:3px;border-radius:50%;background:var(--gb-text-muted)}
.pr-all b{display:inline;font-family:inherit;font-size:inherit;color:var(--gb-text);font-weight:var(--gb-weight-semibold)}

/* the card */
.plans-p .plan .per{white-space:nowrap}
.plans-p .plan .py{margin:6px 0 0;font-size:var(--gb-type-caption-size);color:var(--gb-text-muted);min-height:1.6em}
.plans-p .plan .py b{display:inline;font-family:inherit;font-size:inherit;color:var(--gb-text);font-weight:var(--gb-weight-semibold)}
.plans-p .plan .fine{margin:10px 0 0;font-size:var(--gb-type-caption-size);line-height:var(--gb-type-caption-lh);color:var(--gb-text-muted);min-height:3.2em}
.plans-p .plan ul{margin-top:18px}
.plans-p .plan ul li b{display:inline;font-family:inherit;font-size:inherit;font-weight:var(--gb-weight-semibold);color:var(--gb-text)}   /* .plan b is a block title in site.css */
.plans-p .plan ul li.plus{display:flex;gap:8px;align-items:baseline}
.plans-p .plan ul li.plus::before{content:"+";color:var(--gb-text-brand);font-weight:var(--gb-weight-semibold)}

/* the one recommended plan: the only solid button, a brand hairline and its label (GQC-SITE-28) */
.plans-p .plan.rec{border-color:rgb(var(--gb-text-brand-rgb) / .55);box-shadow:0 18px 40px -30px rgb(var(--gb-text-brand-rgb) / .55)}
.plans-p .plan > .rec-l{position:absolute;inset-block-start:-12px;inset-inline-start:22px;margin:0;padding:2px 10px;border-radius:var(--gb-radius-pill);background:var(--gb-text-brand);color:var(--gb-color-white);font-size:var(--gb-type-micro-size);font-weight:var(--gb-weight-semibold);line-height:1.7}

/* the free row: the plain fact of its scope stays on one line with the price */
.pr-plans .free-row .fr-t{font-size:var(--gb-type-body-sm-size)}

@media (max-width:860px){
  .pr-top{padding-top:32px}
  .pr-plans{padding-top:24px}
}
@media (max-width:560px){
  .pr-all{gap:4px 16px}.pr-all li + li::before{display:none}
  .plans-p .plan .fine,.plans-p .plan .py{min-height:0}
  .plans-p .plan.rec{margin-top:10px}
}

/* ---------- the plan comparison (GQC-SITE-61 remainder, flagship F3 11-17, r2) ----------
   One grouped table, every plan a column, and no inner scroll box, so the page is the only vertical scroller (no scroll trap)
   and the plan header row sticks under the site header at every width (76px; 64px ≤860). ≥768 the whole table fits the
   column. <768 two selects («قارن … مع …») choose the two plan columns shown: CSS :has on the checked option, no script.
   A browser without :has gets all six plans in a sideways-only box with a sticky feature column. Marks: ✓ = brand check,
   — = muted dash, each with a hidden word for screen readers. Tokens only (tokens.css / site.css). */
.pr-cmp{--cmp-top:76px;--cmp-c0:30%}
.cmp-wrap{position:relative;margin-top:44px}   /* the hidden words (.vh, absolute) stay inside the box */
.cmp-pick{display:none}
.cmp{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:var(--gb-type-body-sm-size);line-height:var(--gb-type-body-sm-lh);font-variant-numeric:tabular-nums}
.cmp col.c0{width:var(--cmp-c0)}
.cmp th,.cmp td{padding:13px 10px;border-bottom:1px solid var(--hair);vertical-align:middle}
.cmp td{text-align:center;color:var(--gb-text)}
.cmp tbody th[scope=row]{text-align:start;font-weight:var(--gb-weight-regular);padding-inline:0 20px;color:var(--gb-text)}
.cmp tbody th small{display:block;margin-top:2px;font-size:var(--gb-type-caption-size);line-height:var(--gb-type-caption-lh);color:var(--gb-text-muted)}
/* the plan header row */
.cmp thead th{position:sticky;top:var(--cmp-top);z-index:3;padding:16px 10px 14px;background:var(--gb-ground);border-bottom:1px solid var(--gb-border-strong);text-align:center;vertical-align:top;font-weight:var(--gb-weight-regular)}
.cmp thead .pn{display:block;font-family:var(--gb-font-display);font-weight:var(--gb-weight-semibold);font-size:var(--gb-type-lead-size);line-height:var(--gb-type-lead-lh);color:var(--gb-text)}
.cmp thead .pr{display:block;margin-top:2px;font-size:var(--gb-type-caption-size);line-height:var(--gb-type-caption-lh);color:var(--gb-text-muted)}
.cmp thead .pr .amt{font-weight:var(--gb-weight-semibold);color:var(--gb-text)}
/* a group: its name on its own row, a stronger rule under it */
.cmp .cmp-g th{padding:40px 0 10px;text-align:start;border-bottom:1px solid var(--gb-border-strong);font-family:var(--gb-font-display);font-weight:var(--gb-weight-semibold);font-size:var(--gb-type-heading-3-size);line-height:var(--gb-type-heading-3-lh);color:var(--gb-text)}
.cmp tbody:first-of-type .cmp-g th{padding-top:28px}
.cmp .cmp-g th > span{display:inline-block}
/* values */
.cmp .n{font-weight:var(--gb-weight-semibold)}
.cmp td.t{font-size:var(--gb-type-caption-size);line-height:var(--gb-type-caption-lh)}
.cmp td.ct{color:var(--gb-text-muted)}
.cmp .mk{display:inline-block;vertical-align:middle}
.cmp .mk.y{width:18px;height:18px;background:var(--gb-text-brand);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.5 9.5l3.6 3.4L14.5 5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.5 9.5l3.6 3.4L14.5 5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat}
.cmp .mk.n{width:12px;height:2px;border-radius:1px;background:var(--gb-text-muted);opacity:.55}
/* the same comparison as sentences, folded under the table */
.pr-words{margin-top:28px;border-top:1px solid var(--hair);padding-top:6px}
.pr-words summary{display:inline-flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;font-size:var(--gb-type-ui-size);color:var(--gb-text)}
.pr-words summary::-webkit-details-marker{display:none}
.pr-words summary::after{content:"";width:7px;height:7px;margin-top:-4px;border-inline-end:1.5px solid currentColor;border-block-end:1.5px solid currentColor;transform:rotate(45deg);transition:transform var(--gb-duration-quick) var(--gb-ease-brand)}
.pr-words[open] summary::after{margin-top:3px;transform:rotate(-135deg)}
.pr-words ul{list-style:none;margin:8px 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 40px}
.pr-words li{display:flex;flex-direction:column;gap:4px;padding:16px 0;border-top:1px solid var(--hair);font-size:var(--gb-type-body-sm-size);line-height:var(--gb-type-body-sm-lh)}
.pr-words li b{font-weight:var(--gb-weight-semibold);color:var(--gb-text)}
.pr-words li span{color:var(--gb-text-muted)}

@media (max-width:1023px){
  /* tablet: the six plans still fit the column; a wider feature column keeps its sub-notes to two or three lines */
  .pr-cmp{--cmp-c0:180px}
  .cmp th,.cmp td{padding:12px 6px}
  .cmp tbody th[scope=row]{padding-inline:0 14px}
  .cmp thead th{padding:14px 6px 12px}
  .cmp thead .pn{font-size:var(--gb-type-ui-size);line-height:var(--gb-type-ui-lh)}
  .cmp .cmp-g th{padding-top:32px}
  .pr-words ul{grid-template-columns:1fr}
}
@media (max-width:860px){
  .pr-cmp{--cmp-top:64px}
}
@media (max-width:767px){
  /* phone without :has: all six plans in a box that scrolls sideways only (it never scrolls up and down) */
  .pr-cmp{--cmp-c0:136px}
  .cmp-wrap{margin:28px calc(var(--gutter) * -1) 0;overflow-x:auto;overscroll-behavior-inline:contain}
  .cmp{min-width:680px}
  .cmp tbody th[scope=row],.cmp thead th:first-child{position:sticky;inset-inline-start:0;z-index:2;background:var(--gb-ground);padding-inline-start:var(--gutter)}
  .cmp thead th:first-child{z-index:4}
  .cmp .cmp-g th{padding-inline-start:var(--gutter)}
  .cmp .cmp-g th > span{position:sticky;inset-inline-start:var(--gutter)}
}
@supports selector(:has(*)){
  @media (max-width:767px){
    /* phone: pick two plans, see those two columns; the page is the only scroller, so the plan header stays under the site header */
    .pr-cmp{--cmp-c0:46%}
    .cmp-wrap{margin:28px 0 0;overflow:visible}
    .cmp{min-width:0}
    .cmp tbody th[scope=row]{position:static;padding-inline-start:0}
    /* C1: each row's hairline is one line drawn by its row header across the whole row (the feature column is 46% of the table,
       so 100% / .46 = the table), not a border per cell: swapped columns left a 1 device px gap at the cell joins */
    .cmp tbody tr:not(.cmp-g) > *{border-bottom-color:transparent}
    .cmp tbody th[scope=row]{position:relative}
    .cmp tbody th[scope=row]::after{content:"";position:absolute;inset-inline-start:0;bottom:-1px;width:calc(100% / .46);height:1px;background:var(--hair)}
    .cmp thead th:first-child{padding-inline-start:0}
    /* C1: the header row sticks as one piece (thead, not each th), and its rule is one line drawn by the thead, not a border
       per cell: per-cell borders on a sticky row snapped 1 device px apart after a stick, unstick and new pick */
    .cmp thead{position:sticky;top:var(--cmp-top);z-index:3}
    .cmp thead th,.cmp thead th:first-child{position:static;border-bottom-color:transparent}
    .cmp thead::after{content:"";position:absolute;inset-inline:0;bottom:0;height:1px;background:var(--gb-border-strong)}
    .cmp .cmp-g th{padding-inline-start:0}
    .cmp .cmp-g th > span{position:static}
    .cmp-pick{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:6px 10px;margin-bottom:4px}
    .cmp-pick label{font-size:var(--gb-type-ui-size);line-height:var(--gb-type-ui-lh);color:var(--gb-text-muted)}
    .cmp-pick label:first-child{grid-column:1 / -1}
    .cmp-pick select{-webkit-appearance:none;appearance:none;width:100%;min-width:0;min-height:44px;padding-block:8px;padding-inline:12px 32px;border:1px solid var(--gb-border-control);border-radius:var(--gb-radius-sm);background:var(--gb-color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%23555' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px;font:inherit;font-size:var(--gb-type-input-size);font-weight:var(--gb-weight-semibold);color:var(--gb-text);text-overflow:ellipsis;cursor:pointer}
    [dir=rtl] .cmp-pick select{background-position:left 12px center}
    .cmp-pick select:focus-visible{outline:var(--gb-stroke-focus-ring) solid var(--gb-focus);outline-offset:var(--gb-stroke-focus-offset)}
    .cmp tr > :nth-child(n+2){display:none}
    /* the group rows still span 7 columns: the two shown plans take the whole rest, so the 4 hidden ones get 0 width */
    .cmp thead th:first-child{width:var(--cmp-c0)}
    .cmp thead th:nth-child(n+2){width:calc((100% - var(--cmp-c0)) / 2)}
    .pr-cmp:has(.cmp-pick option[value=free]:checked) .cmp tr > :nth-child(2),
    .pr-cmp:has(.cmp-pick option[value=start]:checked) .cmp tr > :nth-child(3),
    .pr-cmp:has(.cmp-pick option[value=grow]:checked) .cmp tr > :nth-child(4),
    .pr-cmp:has(.cmp-pick option[value=pro]:checked) .cmp tr > :nth-child(5),
    .pr-cmp:has(.cmp-pick option[value=business]:checked) .cmp tr > :nth-child(6),
    .pr-cmp:has(.cmp-pick option[value=enterprise]:checked) .cmp tr > :nth-child(7){display:table-cell}
    /* C1 11-17: the columns follow the selects. The table keeps plan order, so when the start-side select («قارن» / "Compare")
       holds the later plan, the two shown columns trade places. Both are exactly (100% − feature) / 2 wide, so moving each by
       its own width (translate 100%) swaps them cell for cell; rules and hairlines stay continuous. --cmp-s = the inline-start
       direction on the x axis (RTL +1, LTR −1). */
    .pr-cmp{--cmp-s:-1}
    [dir=rtl] .pr-cmp{--cmp-s:1}
    /* the «قارن» plan is the later one: its column moves to the start side… */
    .pr-cmp:has(#cmp-a option[value=start]:checked):has(#cmp-b option[value=free]:checked) .cmp tr > :nth-child(3),
    .pr-cmp:has(#cmp-a option[value=grow]:checked):has(#cmp-b :is([value=free],[value=start]):checked) .cmp tr > :nth-child(4),
    .pr-cmp:has(#cmp-a option[value=pro]:checked):has(#cmp-b :is([value=free],[value=start],[value=grow]):checked) .cmp tr > :nth-child(5),
    .pr-cmp:has(#cmp-a option[value=business]:checked):has(#cmp-b :is([value=free],[value=start],[value=grow],[value=pro]):checked) .cmp tr > :nth-child(6),
    .pr-cmp:has(#cmp-a option[value=enterprise]:checked):has(#cmp-b option:not([value=enterprise]):checked) .cmp tr > :nth-child(7){transform:translateX(calc(var(--cmp-s) * 100%))}
    /* …and the «مع» plan, the earlier one, moves to the end side */
    .pr-cmp:has(#cmp-b option[value=free]:checked):has(#cmp-a option:not([value=free]):checked) .cmp tr > :nth-child(2),
    .pr-cmp:has(#cmp-b option[value=start]:checked):has(#cmp-a :is([value=grow],[value=pro],[value=business],[value=enterprise]):checked) .cmp tr > :nth-child(3),
    .pr-cmp:has(#cmp-b option[value=grow]:checked):has(#cmp-a :is([value=pro],[value=business],[value=enterprise]):checked) .cmp tr > :nth-child(4),
    .pr-cmp:has(#cmp-b option[value=pro]:checked):has(#cmp-a :is([value=business],[value=enterprise]):checked) .cmp tr > :nth-child(5),
    .pr-cmp:has(#cmp-b option[value=business]:checked):has(#cmp-a option[value=enterprise]:checked) .cmp tr > :nth-child(6){transform:translateX(calc(var(--cmp-s) * -100%))}
    /* both selects on the same plan: that one column takes the whole rest of the row, so the header rule and every hairline run full width */
    .pr-cmp:has(#cmp-a option[value=free]:checked):has(#cmp-b option[value=free]:checked) .cmp thead th:nth-child(2),
    .pr-cmp:has(#cmp-a option[value=start]:checked):has(#cmp-b option[value=start]:checked) .cmp thead th:nth-child(3),
    .pr-cmp:has(#cmp-a option[value=grow]:checked):has(#cmp-b option[value=grow]:checked) .cmp thead th:nth-child(4),
    .pr-cmp:has(#cmp-a option[value=pro]:checked):has(#cmp-b option[value=pro]:checked) .cmp thead th:nth-child(5),
    .pr-cmp:has(#cmp-a option[value=business]:checked):has(#cmp-b option[value=business]:checked) .cmp thead th:nth-child(6),
    .pr-cmp:has(#cmp-a option[value=enterprise]:checked):has(#cmp-b option[value=enterprise]:checked) .cmp thead th:nth-child(7){width:calc(100% - var(--cmp-c0))}
  }
}
