/* Plans (kit): the plan cards, the plan switch and the full comparison, used by the pricing sections of ascend.so
   and ascendviral.com (owner, Oct 7: the "Trial first" spec cards, the Every plan / Growth plan switch, the full
   comparison behind Show / Hide, no top-ups, assistant hours only in the comparison, the Growth plan's Included and
   2X in blue). Behaviour (the switch's tabs, the comparison's button): site.js section 6.

   .pcards > .pcard(.is-pick)     the three plans: name, tag, "Free for 5 days / then $X/mo", the spec sheet, a button
   .pspec                         the spec sheet (dl): Usage, Credits every week, Growth plan
   .pswitch[data-pswitch]         a tablist of two buttons and two panels of .pswitch__list items
   .pcmp[data-pcmp]               the Compare every plan button and the table it shows */

.pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1000px; margin: 56px auto 0; }
.pcards:first-child { margin-top: 0; }   /* /pricing/: the page intro is the heading, its space is --sec-intro */
.pcard { display: flex; flex-direction: column; min-width: 0; padding: 26px 24px; border: 1px solid var(--line-2); border-radius: 24px; background: var(--bg); }
.pcard.is-pick { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--tint); }
.pcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.pcard__name { font: 600 21px/1.2 var(--font-head); letter-spacing: -0.015em; color: var(--ink); }
.pcard__flag { font: 500 13px/1 var(--font-head); color: var(--blue); }
.pcard__tag { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.pcard__free { display: grid; gap: 4px; margin-top: 20px; }
.pcard__free b { font: 600 24px/1.15 var(--font-head); letter-spacing: -0.02em; color: var(--ink); }
.pcard__free span { font-size: 15px; color: var(--body); }
.pcard .btn { margin-top: auto; --h: 46px; }

.pspec { display: grid; margin: 20px 0 24px; border-top: 1px solid var(--line); }
.pspec > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pcard.is-pick .pspec, .pcard.is-pick .pspec > div { border-color: var(--tint-line); }
.pspec dt { font-size: 14.5px; color: var(--body); }
.pspec dd { font: 600 14.5px/1.4 var(--font-head); color: var(--ink); text-align: right; }
.pspec .is-gp { color: var(--blue); }
.pspec .is-none { color: var(--muted); font-weight: 500; }

/* the plan switch */
.pswitch { max-width: 760px; margin: 64px auto 0; }
.pswitch__seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.pswitch__seg button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; color: var(--body); font: 600 16px/1 var(--font-head); cursor: pointer; }
.pswitch__seg button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2), 0 4px 10px -6px rgba(0, 0, 0, 0.3); }
.pswitch__panel[hidden] { display: none; }
/* each panel's line reads as its heading (owner, Oct 10: "Make better videos with Ascend AI.") */
.pswitch__lead { margin-top: 24px; text-align: center; font: 600 19px/1.35 var(--font-head); color: var(--ink); text-wrap: balance; }
.pswitch__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; margin-top: 22px; }
.pswitch__list li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.pswitch__list b { display: block; font: 600 15.5px/1.3 var(--font-head); color: var(--ink); }
.pswitch__list li > span:last-child { display: block; font-size: 14.5px; line-height: 1.45; color: var(--body); }
.pswitch__list li > span:last-child b { margin-bottom: 3px; }
/* both panels' icons in the Growth plan's blue (owner, Oct 10: "I like that pop of color") */
.pswitch__ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--blue); background: var(--tint); box-shadow: inset 0 0 0 1px var(--tint-line); }
.pswitch__ic svg { width: 19px; height: 19px; }

/* the full comparison, shown on demand */
.pcmp { display: flex; flex-direction: column; align-items: center; max-width: 1000px; margin: 40px auto 0; }
.pcmp__btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--ink); font: 500 15px/1 var(--font-head); cursor: pointer; }
.pcmp__btn:hover { background: var(--panel); }
.pcmp__btn svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.pcmp__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.pcmp__btn[aria-expanded="true"] .pcmp__closed, .pcmp__btn:not([aria-expanded="true"]) .pcmp__open { display: none; }
.pcmp__table { width: 100%; margin-top: 20px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--bg); }
.pcmp__table[hidden] { display: none; }
.pcmp__table table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pcmp__table th, .pcmp__table td { padding: 13px 18px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 15px; line-height: 1.4; }
.pcmp__table thead th, .pcmp__table thead td { width: auto; border-top: 0; padding: 18px; font: 600 16px/1.2 var(--font-head); color: var(--ink); background: var(--panel); }
.pcmp__table thead td { width: 34%; }
.pcmp__table thead th.pick { color: var(--blue); background: var(--tint); }
.pcmp__table tbody th { font-weight: 500; color: var(--body); }
.pcmp__table td { color: var(--ink); font-weight: 500; }
.pcmp__table .pick { background: var(--tint); }
.pcmp__table .pcmp__grp th { padding-top: 22px; background: var(--panel); font: 600 12.5px/1 var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pcmp__table .is-gp { color: var(--blue); font-weight: 600; }
.pcmp__yes { display: inline-flex; color: var(--green); }
.pcmp__yes svg { width: 16px; height: 16px; }
.pcmp__no { color: var(--muted); }
/* Rows that belong to the one above them (the three kinds of targeting under Targeted account growth, owner Oct 10):
   one tight group with no lines between its rows, joined to the parent's label by a thin tree line */
.pcmp__table .pcmp__parent th, .pcmp__table .pcmp__sub th { position: relative; }
.pcmp__table .pcmp__parent th, .pcmp__table .pcmp__parent td { padding-bottom: 8px; }
.pcmp__table .pcmp__sub th, .pcmp__table .pcmp__sub td { border-top: 0; padding-top: 8px; padding-bottom: 8px; }
.pcmp__table .pcmp__sub--end th, .pcmp__table .pcmp__sub--end td { padding-bottom: 14px; }
.pcmp__table .pcmp__sub td.pick { box-shadow: 0 -1px 0 var(--tint); }   /* no hairline seam between the grouped rows */
.pcmp__table .pcmp__sub th { padding-left: 46px; }
.pcmp__table .pcmp__parent th::after, .pcmp__table .pcmp__sub th::before, .pcmp__table .pcmp__sub th::after {
  content: ""; position: absolute; left: 26px; border: 0 solid var(--line-2); }
.pcmp__table .pcmp__parent th::after { top: calc(50% + 13px); bottom: 0; border-left-width: 1.5px; }
.pcmp__table .pcmp__sub th::before { top: 0; bottom: 0; border-left-width: 1.5px; }
.pcmp__table .pcmp__sub th::after { top: 50%; width: 12px; border-top-width: 1.5px; }
.pcmp__table .pcmp__sub--end th::before { bottom: auto; height: calc(50% - 7px); }   /* the last one bends */
.pcmp__table .pcmp__sub--end th::after { top: calc(50% - 7px); width: 12px; height: 7px; border-left-width: 1.5px;
  border-bottom-width: 1.5px; border-top-width: 0; border-bottom-left-radius: 7px; }

@media (max-width: 860px) { .pcards { grid-template-columns: minmax(0, 1fr); max-width: 440px; } }
@media (max-width: 640px) {
  .pcards { gap: 12px; margin-top: 40px; }
  .pcards:first-child { margin-top: 0; }
  .pswitch { margin-top: 48px; }
  .pswitch__list { grid-template-columns: minmax(0, 1fr); }
  /* the comparison: each row becomes a line, its three values side by side, each labelled with its plan */
  .pcmp__table { border: 0; border-radius: 0; overflow: visible; background: none; }
  .pcmp__table table, .pcmp__table tbody { display: block; }
  .pcmp__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pcmp__table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; padding: 14px 2px; border-top: 1px solid var(--line); }
  .pcmp__table tbody th { grid-column: 1 / -1; padding: 0; border: 0; font: 500 15px/1.35 var(--font-head); color: var(--ink); }
  .pcmp__table td { display: block; padding: 0; border: 0; font-size: 14.5px; }
  .pcmp__table td.pick { background: none; }
  .pcmp__table td::before { content: attr(data-plan); display: block; margin-bottom: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
  .pcmp__table td.pick::before { color: var(--blue); }
  .pcmp__table .pcmp__grp { display: block; padding: 26px 2px 10px; }
  .pcmp__table .pcmp__grp th { padding: 0; background: none; }
  /* phones: the group is indented under its parent, with one guide line down its left */
  .pcmp__table .pcmp__parent { padding-bottom: 10px; }
  .pcmp__table .pcmp__sub { position: relative; margin-left: 10px; padding: 8px 2px 8px 16px; border-top: 0; }
  .pcmp__table .pcmp__sub--end { padding-bottom: 14px; }
  .pcmp__table .pcmp__sub::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1.5px solid var(--line-2); }
  .pcmp__table .pcmp__sub--end::before { bottom: 14px; }
  .pcmp__table .pcmp__sub th, .pcmp__table .pcmp__parent th { position: static; padding-left: 0; }
  .pcmp__table .pcmp__parent th::after, .pcmp__table .pcmp__sub th::before, .pcmp__table .pcmp__sub th::after { content: none; }
}
